UniqueKeyPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. cosmos. models. UniqueKeyPolicy
- com.
Implements
public final class UniqueKeyPolicy
implements JsonSerializable<UniqueKeyPolicy>
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
Constructor Summary
Constructor | Description |
---|---|
UniqueKeyPolicy() |
Creates an instance of Unique |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Unique |
fromJson(JsonReader jsonReader)
Reads an instance of Unique |
Json |
toJson(JsonWriter jsonWriter) |
List<Unique |
uniqueKeys()
Get the unique |
void |
validate()
Validates the instance. |
Unique |
withUniqueKeys(List<UniqueKey> uniqueKeys)
Set the unique |
Methods inherited from java.lang.Object
Constructor Details
UniqueKeyPolicy
public UniqueKeyPolicy()
Creates an instance of UniqueKeyPolicy class.
Method Details
fromJson
public static UniqueKeyPolicy fromJson(JsonReader jsonReader)
Reads an instance of UniqueKeyPolicy from the JsonReader.
Parameters:
Returns:
Throws:
toJson
uniqueKeys
public List
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:
validate
public void validate()
Validates the instance.
withUniqueKeys
public UniqueKeyPolicy withUniqueKeys(List
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:
Returns:
Applies to
Azure SDK for Java