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 Details

    • ClientEncryptionPolicy

      public ClientEncryptionPolicy()
      Creates an instance of ClientEncryptionPolicy class.
  • Method Details

    • includedPaths

      public List<ClientEncryptionIncludedPath> includedPaths()
      Get the includedPaths property: Paths of the item that need encryption along with path-specific settings.
      Returns:
      the includedPaths value.
    • withIncludedPaths

      public ClientEncryptionPolicy withIncludedPaths(List<ClientEncryptionIncludedPath> includedPaths)
      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

      public ClientEncryptionPolicy withPolicyFormatVersion(int policyFormatVersion)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.