Package com.azure.data.cosmos
Class UniqueKeyPolicy
- java.lang.Object
-
- com.azure.data.cosmos.JsonSerializable
-
- com.azure.data.cosmos.UniqueKeyPolicy
-
public class UniqueKeyPolicy extends JsonSerializable
Represents the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
-
-
Constructor Summary
Constructors Constructor Description UniqueKeyPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<UniqueKey>
uniqueKeys()
Gets or sets collection ofUniqueKey
that guarantee uniqueness of documents in collection in the Azure Cosmos DB service.UniqueKeyPolicy
uniqueKeys(List<UniqueKey> uniqueKeys)
-
Methods inherited from class com.azure.data.cosmos.JsonSerializable
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toJson, toObject, toString
-
-
-
-
Method Detail
-
uniqueKeys
public Collection<UniqueKey> uniqueKeys()
Gets or sets collection ofUniqueKey
that guarantee uniqueness of documents in collection in the Azure Cosmos DB service.- Returns:
- the unique keys.
-
uniqueKeys
public UniqueKeyPolicy uniqueKeys(List<UniqueKey> uniqueKeys)
-
-