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 -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoIndexKeys
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MongoIndexKeys from the JsonReader.keys()
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
validate()
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
Get the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.- Returns:
- the keys value.
-
withKeys
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MongoIndexKeys>
- Throws:
IOException
-
fromJson
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.
-