Class UniqueKeyPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.UniqueKeyPolicy
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure
Cosmos DB service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the uniqueKeys property: List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.voidvalidate()Validates the instance.withUniqueKeys(List<UniqueKey> uniqueKeys) Set the uniqueKeys property: List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
-
Constructor Details
-
UniqueKeyPolicy
public UniqueKeyPolicy()Creates an instance of UniqueKeyPolicy class.
-
-
Method Details
-
uniqueKeys
Get the uniqueKeys property: List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.- Returns:
- the uniqueKeys value.
-
withUniqueKeys
Set the uniqueKeys property: List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.- Parameters:
uniqueKeys- the uniqueKeys value to set.- Returns:
- the UniqueKeyPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-