Class EncryptionSpec

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.EncryptionSpec

public abstract class EncryptionSpec extends JsonSerializable
Represents a customer-managed encryption key spec that can be applied to a top-level resource.
  • Constructor Details

    • EncryptionSpec

      public EncryptionSpec()
  • Method Details

    • kmsKeyName

      public abstract Optional<String> kmsKeyName()
      Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created.
    • builder

      public static EncryptionSpec.Builder builder()
      Instantiates a builder for EncryptionSpec.
    • toBuilder

      public abstract EncryptionSpec.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static EncryptionSpec fromJson(String jsonString)
      Deserializes a JSON string to a EncryptionSpec object.