Class ClientEncryptionPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.ClientEncryptionPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ClientEncryptionPolicy>
public final class ClientEncryptionPolicy
extends Object
implements com.azure.json.JsonSerializable<ClientEncryptionPolicy>
Cosmos DB client encryption policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ClientEncryptionPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientEncryptionPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ClientEncryptionPolicy from the JsonReader.Get the includedPaths property: Paths of the item that need encryption along with path-specific settings.intGet the policyFormatVersion property: Version of the client encryption policy definition.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withIncludedPaths(List<ClientEncryptionIncludedPath> includedPaths) Set the includedPaths property: Paths of the item that need encryption along with path-specific settings.withPolicyFormatVersion(int policyFormatVersion) Set the policyFormatVersion property: Version of the client encryption policy definition.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ClientEncryptionPolicy
public ClientEncryptionPolicy()Creates an instance of ClientEncryptionPolicy class.
-
-
Method Details
-
includedPaths
Get the includedPaths property: Paths of the item that need encryption along with path-specific settings.- Returns:
- the includedPaths value.
-
withIncludedPaths
Set the includedPaths property: Paths of the item that need encryption along with path-specific settings.- Parameters:
includedPaths- the includedPaths value to set.- Returns:
- the ClientEncryptionPolicy object itself.
-
policyFormatVersion
public int policyFormatVersion()Get the policyFormatVersion property: Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and partition key path encryption.- Returns:
- the policyFormatVersion value.
-
withPolicyFormatVersion
Set the policyFormatVersion property: Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and partition key path encryption.- Parameters:
policyFormatVersion- the policyFormatVersion value to set.- Returns:
- the ClientEncryptionPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ClientEncryptionPolicy>- Throws:
IOException
-
fromJson
public static ClientEncryptionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ClientEncryptionPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ClientEncryptionPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ClientEncryptionPolicy.
-