Class MongoCollectionResource
- java.lang.Object
-
- com.microsoft.azure.management.cosmosdb.MongoCollectionResource
-
public class MongoCollectionResource extends Object
Cosmos DB Mongo collection resource object.
-
-
Constructor Summary
Constructors Constructor Description MongoCollectionResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringid()Get name of the Cosmos DB Mongo collection.List<MongoIndex>indexes()Get list of index keys.Map<String,String>shardKey()Get a key-value pair of shard keys to be applied for the request.MongoCollectionResourcewithId(String id)Set name of the Cosmos DB Mongo collection.MongoCollectionResourcewithIndexes(List<MongoIndex> indexes)Set list of index keys.MongoCollectionResourcewithShardKey(Map<String,String> shardKey)Set a key-value pair of shard keys to be applied for the request.
-
-
-
Method Detail
-
id
public String id()
Get name of the Cosmos DB Mongo collection.- Returns:
- the id value
-
withId
public MongoCollectionResource withId(String id)
Set name of the Cosmos DB Mongo collection.- Parameters:
id- the id value to set- Returns:
- the MongoCollectionResource object itself.
-
shardKey
public Map<String,String> shardKey()
Get a key-value pair of shard keys to be applied for the request.- Returns:
- the shardKey value
-
withShardKey
public MongoCollectionResource withShardKey(Map<String,String> shardKey)
Set a key-value pair of shard keys to be applied for the request.- Parameters:
shardKey- the shardKey value to set- Returns:
- the MongoCollectionResource object itself.
-
indexes
public List<MongoIndex> indexes()
Get list of index keys.- Returns:
- the indexes value
-
withIndexes
public MongoCollectionResource withIndexes(List<MongoIndex> indexes)
Set list of index keys.- Parameters:
indexes- the indexes value to set- Returns:
- the MongoCollectionResource object itself.
-
-