Class MongoIndexKeys

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

public final class MongoIndexKeys extends Object implements com.azure.json.JsonSerializable<MongoIndexKeys>
Cosmos DB MongoDB collection resource object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of MongoIndexKeys class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of MongoIndexKeys from the JsonReader.
    Get the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • MongoIndexKeys

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

    • keys

      public List<String> keys()
      Get the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.
      Returns:
      the keys value.
    • withKeys

      public MongoIndexKeys withKeys(List<String> keys)
      Set the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.
      Parameters:
      keys - the keys value to set.
      Returns:
      the MongoIndexKeys 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<MongoIndexKeys>
      Throws:
      IOException
    • fromJson

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