Class RestorableSqlDatabasePropertiesResourceDatabase

java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlDatabaseResource
com.azure.resourcemanager.cosmos.models.RestorableSqlDatabasePropertiesResourceDatabase
All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlDatabaseResource>

public final class RestorableSqlDatabasePropertiesResourceDatabase extends SqlDatabaseResource
Cosmos DB SQL database resource object.
  • Constructor Details

    • RestorableSqlDatabasePropertiesResourceDatabase

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

    • colls

      public String colls()
      Get the colls property: A system generated property that specified the addressable path of the collections resource.
      Returns:
      the colls value.
    • users

      public String users()
      Get the users property: A system generated property that specifies the addressable path of the users resource.
      Returns:
      the users value.
    • self

      public String self()
      Get the self property: A system generated property that specifies the addressable path of the database resource.
      Returns:
      the self value.
    • rid

      public String rid()
      Get the rid property: A system generated property. A unique identifier.
      Returns:
      the rid value.
    • ts

      public Float ts()
      Get the ts property: A system generated property that denotes the last updated timestamp of the resource.
      Returns:
      the ts value.
    • etag

      public String etag()
      Get the etag property: A system generated property representing the resource etag required for optimistic concurrency control.
      Returns:
      the etag value.
    • withId

      Set the id property: Name of the Cosmos DB SQL database.
      Overrides:
      withId in class SqlDatabaseResource
      Parameters:
      id - the id value to set.
      Returns:
      the SqlDatabaseResource object itself.
    • withRestoreParameters

      public RestorableSqlDatabasePropertiesResourceDatabase withRestoreParameters(ResourceRestoreParameters restoreParameters)
      Set the restoreParameters property: Parameters to indicate the information about the restore.
      Overrides:
      withRestoreParameters in class SqlDatabaseResource
      Parameters:
      restoreParameters - the restoreParameters value to set.
      Returns:
      the SqlDatabaseResource object itself.
    • withCreateMode

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

      public void validate()
      Validates the instance.
      Overrides:
      validate in class SqlDatabaseResource
      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<SqlDatabaseResource>
      Overrides:
      toJson in class SqlDatabaseResource
      Throws:
      IOException
    • fromJson

      public static RestorableSqlDatabasePropertiesResourceDatabase fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RestorableSqlDatabasePropertiesResourceDatabase from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RestorableSqlDatabasePropertiesResourceDatabase 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 RestorableSqlDatabasePropertiesResourceDatabase.