Class MongoIndex
- java.lang.Object
-
- com.azure.resourcemanager.cosmos.models.MongoIndex
-
public final class MongoIndex extends Object
Cosmos DB MongoDB collection index key.
-
-
Constructor Summary
Constructors Constructor Description MongoIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MongoIndexKeyskey()Get the key property: Cosmos DB MongoDB collection index keys.MongoIndexOptionsoptions()Get the options property: Cosmos DB MongoDB collection index key options.voidvalidate()Validates the instance.MongoIndexwithKey(MongoIndexKeys key)Set the key property: Cosmos DB MongoDB collection index keys.MongoIndexwithOptions(MongoIndexOptions options)Set the options property: Cosmos DB MongoDB collection index key options.
-
-
-
Method Detail
-
key
public MongoIndexKeys key()
Get the key property: Cosmos DB MongoDB collection index keys.- Returns:
- the key value.
-
withKey
public MongoIndex withKey(MongoIndexKeys key)
Set the key property: Cosmos DB MongoDB collection index keys.- Parameters:
key- the key value to set.- Returns:
- the MongoIndex object itself.
-
options
public MongoIndexOptions options()
Get the options property: Cosmos DB MongoDB collection index key options.- Returns:
- the options value.
-
withOptions
public MongoIndex withOptions(MongoIndexOptions options)
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.
-
-