Package com.azure.cosmos.models
Class UniqueKeyPolicy
- java.lang.Object
-
- com.azure.cosmos.models.UniqueKeyPolicy
-
public final class UniqueKeyPolicy extends Object
Represents the unique key policy configuration for specifying uniqueness constraints on items in the container in the Azure Cosmos DB service.
-
-
Constructor Summary
Constructors Constructor Description UniqueKeyPolicy()
Instantiates a new Unique key policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<UniqueKey>
getUniqueKeys()
Gets or sets container ofUniqueKey
that guarantee uniqueness of items in container in the Azure Cosmos DB service.UniqueKeyPolicy
setUniqueKeys(List<UniqueKey> uniqueKeys)
Unique keys unique key policy.
-
-
-
Method Detail
-
getUniqueKeys
public List<UniqueKey> getUniqueKeys()
Gets or sets container ofUniqueKey
that guarantee uniqueness of items in container in the Azure Cosmos DB service.- Returns:
- the unique keys.
-
setUniqueKeys
public UniqueKeyPolicy setUniqueKeys(List<UniqueKey> uniqueKeys)
Unique keys unique key policy.- Parameters:
uniqueKeys
- the unique keys- Returns:
- the unique key policy
- Throws:
IllegalArgumentException
- thrown if an error occurs
-
-