Class MongoIndexOptions
java.lang.Object
com.azure.resourcemanager.cosmos.models.MongoIndexOptions
Cosmos DB MongoDB collection index options.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the expireAfterSeconds property: Expire after seconds.unique()Get the unique property: Is unique or not.voidvalidate()Validates the instance.withExpireAfterSeconds(Integer expireAfterSeconds) Set the expireAfterSeconds property: Expire after seconds.withUnique(Boolean unique) Set the unique property: Is unique or not.
-
Constructor Details
-
MongoIndexOptions
public MongoIndexOptions()Creates an instance of MongoIndexOptions class.
-
-
Method Details
-
expireAfterSeconds
Get the expireAfterSeconds property: Expire after seconds.- Returns:
- the expireAfterSeconds value.
-
withExpireAfterSeconds
Set the expireAfterSeconds property: Expire after seconds.- Parameters:
expireAfterSeconds- the expireAfterSeconds value to set.- Returns:
- the MongoIndexOptions object itself.
-
unique
Get the unique property: Is unique or not.- Returns:
- the unique value.
-
withUnique
Set the unique property: Is unique or not.- Parameters:
unique- the unique value to set.- Returns:
- the MongoIndexOptions object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-