Class MongoDBCollectionResource
- java.lang.Object
-
- com.azure.resourcemanager.cosmos.models.MongoDBCollectionResource
-
- Direct Known Subclasses:
MongoDBCollectionGetPropertiesResource
public class MongoDBCollectionResource extends Object
Cosmos DB MongoDB collection resource object.
-
-
Constructor Summary
Constructors Constructor Description MongoDBCollectionResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegeranalyticalStorageTtl()Get the analyticalStorageTtl property: Analytical TTL.Stringid()Get the id property: Name of the Cosmos DB MongoDB collection.List<MongoIndex>indexes()Get the indexes property: List of index keys.Map<String,String>shardKey()Get the shardKey property: A key-value pair of shard keys to be applied for the request.voidvalidate()Validates the instance.MongoDBCollectionResourcewithAnalyticalStorageTtl(Integer analyticalStorageTtl)Set the analyticalStorageTtl property: Analytical TTL.MongoDBCollectionResourcewithId(String id)Set the id property: Name of the Cosmos DB MongoDB collection.MongoDBCollectionResourcewithIndexes(List<MongoIndex> indexes)Set the indexes property: List of index keys.MongoDBCollectionResourcewithShardKey(Map<String,String> shardKey)Set the shardKey property: A key-value pair of shard keys to be applied for the request.
-
-
-
Method Detail
-
id
public String id()
Get the id property: Name of the Cosmos DB MongoDB collection.- Returns:
- the id value.
-
withId
public MongoDBCollectionResource withId(String id)
Set the id property: Name of the Cosmos DB MongoDB collection.- Parameters:
id- the id value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
shardKey
public Map<String,String> shardKey()
Get the shardKey property: A key-value pair of shard keys to be applied for the request.- Returns:
- the shardKey value.
-
withShardKey
public MongoDBCollectionResource withShardKey(Map<String,String> shardKey)
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
public List<MongoIndex> indexes()
Get the indexes property: List of index keys.- Returns:
- the indexes value.
-
withIndexes
public MongoDBCollectionResource withIndexes(List<MongoIndex> indexes)
Set the indexes property: List of index keys.- Parameters:
indexes- the indexes value to set.- Returns:
- the MongoDBCollectionResource object itself.
-
analyticalStorageTtl
public Integer analyticalStorageTtl()
Get the analyticalStorageTtl property: Analytical TTL.- Returns:
- the analyticalStorageTtl value.
-
withAnalyticalStorageTtl
public MongoDBCollectionResource withAnalyticalStorageTtl(Integer analyticalStorageTtl)
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.
-
-