Class MongoIndexOptions
- java.lang.Object
-
- com.azure.resourcemanager.cosmos.models.MongoIndexOptions
-
public final class MongoIndexOptions extends Object
Cosmos DB MongoDB collection index options.
-
-
Constructor Summary
Constructors Constructor Description MongoIndexOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerexpireAfterSeconds()Get the expireAfterSeconds property: Expire after seconds.Booleanunique()Get the unique property: Is unique or not.voidvalidate()Validates the instance.MongoIndexOptionswithExpireAfterSeconds(Integer expireAfterSeconds)Set the expireAfterSeconds property: Expire after seconds.MongoIndexOptionswithUnique(Boolean unique)Set the unique property: Is unique or not.
-
-
-
Method Detail
-
expireAfterSeconds
public Integer expireAfterSeconds()
Get the expireAfterSeconds property: Expire after seconds.- Returns:
- the expireAfterSeconds value.
-
withExpireAfterSeconds
public MongoIndexOptions withExpireAfterSeconds(Integer expireAfterSeconds)
Set the expireAfterSeconds property: Expire after seconds.- Parameters:
expireAfterSeconds- the expireAfterSeconds value to set.- Returns:
- the MongoIndexOptions object itself.
-
unique
public Boolean unique()
Get the unique property: Is unique or not.- Returns:
- the unique value.
-
withUnique
public MongoIndexOptions withUnique(Boolean unique)
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.
-
-