Class TableResource

java.lang.Object
com.azure.resourcemanager.cosmos.models.TableResource
All Implemented Interfaces:
com.azure.json.JsonSerializable<TableResource>
Direct Known Subclasses:
TableGetPropertiesResource

public class TableResource extends Object implements com.azure.json.JsonSerializable<TableResource>
Cosmos DB table resource object.
  • Constructor Details

    • TableResource

      public TableResource()
      Creates an instance of TableResource class.
  • Method Details

    • id

      public String id()
      Get the id property: Name of the Cosmos DB table.
      Returns:
      the id value.
    • withId

      public TableResource withId(String id)
      Set the id property: Name of the Cosmos DB table.
      Parameters:
      id - the id value to set.
      Returns:
      the TableResource object itself.
    • restoreParameters

      public ResourceRestoreParameters restoreParameters()
      Get the restoreParameters property: Parameters to indicate the information about the restore.
      Returns:
      the restoreParameters value.
    • withRestoreParameters

      public TableResource withRestoreParameters(ResourceRestoreParameters restoreParameters)
      Set the restoreParameters property: Parameters to indicate the information about the restore.
      Parameters:
      restoreParameters - the restoreParameters value to set.
      Returns:
      the TableResource object itself.
    • createMode

      public CreateMode createMode()
      Get the createMode property: Enum to indicate the mode of resource creation.
      Returns:
      the createMode value.
    • withCreateMode

      public TableResource withCreateMode(CreateMode createMode)
      Set the createMode property: Enum to indicate the mode of resource creation.
      Parameters:
      createMode - the createMode value to set.
      Returns:
      the TableResource object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<TableResource>
      Throws:
      IOException
    • fromJson

      public static TableResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of TableResource from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of TableResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the TableResource.