Class MongoDBCollectionResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.MongoDBCollectionResource
- Direct Known Subclasses:
MongoDBCollectionGetPropertiesResource
Cosmos DB MongoDB collection resource object.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of MongoDBCollectionResource class. -
Method Summary
Modifier and TypeMethodDescriptionGet the analyticalStorageTtl property: Analytical TTL.id()Get the id property: Name of the Cosmos DB MongoDB collection.indexes()Get the indexes property: List of index keys.shardKey()Get the shardKey property: A key-value pair of shard keys to be applied for the request.voidvalidate()Validates the instance.withAnalyticalStorageTtl(Integer analyticalStorageTtl) Set the analyticalStorageTtl property: Analytical TTL.Set the id property: Name of the Cosmos DB MongoDB collection.withIndexes(List<MongoIndex> indexes) Set the indexes property: List of index keys.withShardKey(Map<String, String> shardKey) Set the shardKey property: A key-value pair of shard keys to be applied for the request.
-
Constructor Details
-
MongoDBCollectionResource
public MongoDBCollectionResource()Creates an instance of MongoDBCollectionResource class.
-
-
Method Details
-
id
Get the id property: Name of the Cosmos DB MongoDB collection.- Returns:
- the id value.
-
withId
Set the id property: Name of the Cosmos DB MongoDB collection.- Parameters:
id- the id value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
shardKey
Get the shardKey property: A key-value pair of shard keys to be applied for the request.- Returns:
- the shardKey value.
-
withShardKey
Set the shardKey property: A key-value pair of shard keys to be applied for the request.- Parameters:
shardKey- the shardKey value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
indexes
Get the indexes property: List of index keys.- Returns:
- the indexes value.
-
withIndexes
Set the indexes property: List of index keys.- Parameters:
indexes- the indexes value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
analyticalStorageTtl
Get the analyticalStorageTtl property: Analytical TTL.- Returns:
- the analyticalStorageTtl value.
-
withAnalyticalStorageTtl
Set the analyticalStorageTtl property: Analytical TTL.- Parameters:
analyticalStorageTtl- the analyticalStorageTtl value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-