Class MongoCollectionResource


  • public class MongoCollectionResource
    extends Object
    Cosmos DB Mongo collection resource object.
    • Constructor Detail

      • MongoCollectionResource

        public MongoCollectionResource()
    • 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.