Class MongoIndexOptions

java.lang.Object
com.azure.resourcemanager.cosmos.models.MongoIndexOptions

public final class MongoIndexOptions extends Object
Cosmos DB MongoDB collection index options.
  • Constructor Details

    • MongoIndexOptions

      public MongoIndexOptions()
      Creates an instance of MongoIndexOptions class.
  • Method Details

    • 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.