Class MongoIndex
java.lang.Object
com.azure.resourcemanager.cosmos.models.MongoIndex
Cosmos DB MongoDB collection index key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionkey()Get the key property: Cosmos DB MongoDB collection index keys.options()Get the options property: Cosmos DB MongoDB collection index key options.voidvalidate()Validates the instance.withKey(MongoIndexKeys key) Set the key property: Cosmos DB MongoDB collection index keys.withOptions(MongoIndexOptions options) Set the options property: Cosmos DB MongoDB collection index key options.
-
Constructor Details
-
MongoIndex
public MongoIndex()Creates an instance of MongoIndex class.
-
-
Method Details
-
key
Get the key property: Cosmos DB MongoDB collection index keys.- Returns:
- the key value.
-
withKey
Set the key property: Cosmos DB MongoDB collection index keys.- Parameters:
key- the key value to set.- Returns:
- the MongoIndex object itself.
-
options
Get the options property: Cosmos DB MongoDB collection index key options.- Returns:
- the options value.
-
withOptions
Set the options property: Cosmos DB MongoDB collection index key options.- Parameters:
options- the options value to set.- Returns:
- the MongoIndex object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-