Class DatabaseAccountKeysMetadata

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

public final class DatabaseAccountKeysMetadata extends Object implements com.azure.json.JsonSerializable<DatabaseAccountKeysMetadata>
The metadata related to each access key for the given Cosmos DB database account.
  • Constructor Details

    • DatabaseAccountKeysMetadata

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

    • primaryMasterKey

      public AccountKeyMetadata primaryMasterKey()
      Get the primaryMasterKey property: The metadata related to the Primary Read-Write Key for the given Cosmos DB database account.
      Returns:
      the primaryMasterKey value.
    • secondaryMasterKey

      public AccountKeyMetadata secondaryMasterKey()
      Get the secondaryMasterKey property: The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account.
      Returns:
      the secondaryMasterKey value.
    • primaryReadonlyMasterKey

      public AccountKeyMetadata primaryReadonlyMasterKey()
      Get the primaryReadonlyMasterKey property: The metadata related to the Primary Read-Only Key for the given Cosmos DB database account.
      Returns:
      the primaryReadonlyMasterKey value.
    • secondaryReadonlyMasterKey

      public AccountKeyMetadata secondaryReadonlyMasterKey()
      Get the secondaryReadonlyMasterKey property: The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account.
      Returns:
      the secondaryReadonlyMasterKey value.
    • 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<DatabaseAccountKeysMetadata>
      Throws:
      IOException
    • fromJson

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