Class CryptoKey.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
com.google.cloud.kms.v1.CryptoKey.Builder
All Implemented Interfaces:
CryptoKeyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CryptoKey

public static final class CryptoKey.Builder extends com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder> implements CryptoKeyOrBuilder
 A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
 can be used for cryptographic operations.

 A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more
 [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
 key material used in cryptographic operations.
 
Protobuf type google.cloud.kms.v1.CryptoKey
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • clear

      public CryptoKey.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • getDefaultInstanceForType

      public CryptoKey getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CryptoKey build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CryptoKey buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CryptoKey.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CryptoKey.Builder>
    • mergeFrom

      public CryptoKey.Builder mergeFrom(CryptoKey other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CryptoKey.Builder>
    • mergeFrom

      public CryptoKey.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CryptoKey.Builder>
      Throws:
      IOException
    • getRotationScheduleCase

      public CryptoKey.RotationScheduleCase getRotationScheduleCase()
      Specified by:
      getRotationScheduleCase in interface CryptoKeyOrBuilder
    • clearRotationSchedule

      public CryptoKey.Builder clearRotationSchedule()
    • getName

      public String getName()
       Output only. The resource name for this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
       `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface CryptoKeyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The resource name for this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
       `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface CryptoKeyOrBuilder
      Returns:
      The bytes for name.
    • setName

      public CryptoKey.Builder setName(String value)
       Output only. The resource name for this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
       `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public CryptoKey.Builder clearName()
       Output only. The resource name for this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
       `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public CryptoKey.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. The resource name for this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
       `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasPrimary

      public boolean hasPrimary()
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasPrimary in interface CryptoKeyOrBuilder
      Returns:
      Whether the primary field is set.
    • getPrimary

      public CryptoKeyVersion getPrimary()
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPrimary in interface CryptoKeyOrBuilder
      Returns:
      The primary.
    • setPrimary

      public CryptoKey.Builder setPrimary(CryptoKeyVersion value)
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setPrimary

      public CryptoKey.Builder setPrimary(CryptoKeyVersion.Builder builderForValue)
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergePrimary

      public CryptoKey.Builder mergePrimary(CryptoKeyVersion value)
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearPrimary

      public CryptoKey.Builder clearPrimary()
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPrimaryBuilder

      public CryptoKeyVersion.Builder getPrimaryBuilder()
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPrimaryOrBuilder

      public CryptoKeyVersionOrBuilder getPrimaryOrBuilder()
       Output only. A copy of the "primary"
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
       by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
       [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
      
       The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
       updated via
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       may have a primary. For other keys, this field will be omitted.
       
      .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPrimaryOrBuilder in interface CryptoKeyOrBuilder
    • getPurposeValue

      public int getPurposeValue()
       Immutable. The immutable purpose of this
       [CryptoKey][google.cloud.kms.v1.CryptoKey].
       
      .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getPurposeValue in interface CryptoKeyOrBuilder
      Returns:
      The enum numeric value on the wire for purpose.
    • setPurposeValue

      public CryptoKey.Builder setPurposeValue(int value)
       Immutable. The immutable purpose of this
       [CryptoKey][google.cloud.kms.v1.CryptoKey].
       
      .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The enum numeric value on the wire for purpose to set.
      Returns:
      This builder for chaining.
    • getPurpose

      public CryptoKey.CryptoKeyPurpose getPurpose()
       Immutable. The immutable purpose of this
       [CryptoKey][google.cloud.kms.v1.CryptoKey].
       
      .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getPurpose in interface CryptoKeyOrBuilder
      Returns:
      The purpose.
    • setPurpose

      public CryptoKey.Builder setPurpose(CryptoKey.CryptoKeyPurpose value)
       Immutable. The immutable purpose of this
       [CryptoKey][google.cloud.kms.v1.CryptoKey].
       
      .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The purpose to set.
      Returns:
      This builder for chaining.
    • clearPurpose

      public CryptoKey.Builder clearPurpose()
       Immutable. The immutable purpose of this
       [CryptoKey][google.cloud.kms.v1.CryptoKey].
       
      .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface CryptoKeyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface CryptoKeyOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public CryptoKey.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public CryptoKey.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public CryptoKey.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public CryptoKey.Builder clearCreateTime()
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which this
       [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface CryptoKeyOrBuilder
    • hasNextRotationTime

      public boolean hasNextRotationTime()
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
      Specified by:
      hasNextRotationTime in interface CryptoKeyOrBuilder
      Returns:
      Whether the nextRotationTime field is set.
    • getNextRotationTime

      public com.google.protobuf.Timestamp getNextRotationTime()
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
      Specified by:
      getNextRotationTime in interface CryptoKeyOrBuilder
      Returns:
      The nextRotationTime.
    • setNextRotationTime

      public CryptoKey.Builder setNextRotationTime(com.google.protobuf.Timestamp value)
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
    • setNextRotationTime

      public CryptoKey.Builder setNextRotationTime(com.google.protobuf.Timestamp.Builder builderForValue)
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
    • mergeNextRotationTime

      public CryptoKey.Builder mergeNextRotationTime(com.google.protobuf.Timestamp value)
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
    • clearNextRotationTime

      public CryptoKey.Builder clearNextRotationTime()
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
    • getNextRotationTimeBuilder

      public com.google.protobuf.Timestamp.Builder getNextRotationTimeBuilder()
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
    • getNextRotationTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getNextRotationTimeOrBuilder()
       At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
       the Key Management Service will automatically:
      
       1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
       2. Mark the new version as primary.
      
       Key rotations performed manually via
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       and
       [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
       do not affect
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Timestamp next_rotation_time = 7;
      Specified by:
      getNextRotationTimeOrBuilder in interface CryptoKeyOrBuilder
    • hasRotationPeriod

      public boolean hasRotationPeriod()
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
      Specified by:
      hasRotationPeriod in interface CryptoKeyOrBuilder
      Returns:
      Whether the rotationPeriod field is set.
    • getRotationPeriod

      public com.google.protobuf.Duration getRotationPeriod()
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
      Specified by:
      getRotationPeriod in interface CryptoKeyOrBuilder
      Returns:
      The rotationPeriod.
    • setRotationPeriod

      public CryptoKey.Builder setRotationPeriod(com.google.protobuf.Duration value)
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
    • setRotationPeriod

      public CryptoKey.Builder setRotationPeriod(com.google.protobuf.Duration.Builder builderForValue)
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
    • mergeRotationPeriod

      public CryptoKey.Builder mergeRotationPeriod(com.google.protobuf.Duration value)
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
    • clearRotationPeriod

      public CryptoKey.Builder clearRotationPeriod()
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
    • getRotationPeriodBuilder

      public com.google.protobuf.Duration.Builder getRotationPeriodBuilder()
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
    • getRotationPeriodOrBuilder

      public com.google.protobuf.DurationOrBuilder getRotationPeriodOrBuilder()
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       will be advanced by this period when the service automatically rotates a
       key. Must be at least 24 hours and at most 876,000 hours.
      
       If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
       set,
       [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
       must also be set.
      
       Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
       support automatic rotation. For other keys, this field must be omitted.
       
      .google.protobuf.Duration rotation_period = 8;
      Specified by:
      getRotationPeriodOrBuilder in interface CryptoKeyOrBuilder
    • hasVersionTemplate

      public boolean hasVersionTemplate()
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
      Specified by:
      hasVersionTemplate in interface CryptoKeyOrBuilder
      Returns:
      Whether the versionTemplate field is set.
    • getVersionTemplate

      public CryptoKeyVersionTemplate getVersionTemplate()
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
      Specified by:
      getVersionTemplate in interface CryptoKeyOrBuilder
      Returns:
      The versionTemplate.
    • setVersionTemplate

      public CryptoKey.Builder setVersionTemplate(CryptoKeyVersionTemplate value)
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
    • setVersionTemplate

      public CryptoKey.Builder setVersionTemplate(CryptoKeyVersionTemplate.Builder builderForValue)
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
    • mergeVersionTemplate

      public CryptoKey.Builder mergeVersionTemplate(CryptoKeyVersionTemplate value)
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
    • clearVersionTemplate

      public CryptoKey.Builder clearVersionTemplate()
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
    • getVersionTemplateBuilder

      public CryptoKeyVersionTemplate.Builder getVersionTemplateBuilder()
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
    • getVersionTemplateOrBuilder

      public CryptoKeyVersionTemplateOrBuilder getVersionTemplateOrBuilder()
       A template describing settings for new
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
       properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
       instances created by either
       [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
       or auto-rotation are controlled by this template.
       
      .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
      Specified by:
      getVersionTemplateOrBuilder in interface CryptoKeyOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: CryptoKeyOrBuilder
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
      Specified by:
      getLabelsCount in interface CryptoKeyOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
      Specified by:
      containsLabels in interface CryptoKeyOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface CryptoKeyOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
      Specified by:
      getLabelsMap in interface CryptoKeyOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
      Specified by:
      getLabelsOrDefault in interface CryptoKeyOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
      Specified by:
      getLabelsOrThrow in interface CryptoKeyOrBuilder
    • clearLabels

      public CryptoKey.Builder clearLabels()
    • removeLabels

      public CryptoKey.Builder removeLabels(String key)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public CryptoKey.Builder putLabels(String key, String value)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
    • putAllLabels

      public CryptoKey.Builder putAllLabels(Map<String,String> values)
       Labels with user-defined metadata. For more information, see
       [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
       
      map<string, string> labels = 10;
    • getImportOnly

      public boolean getImportOnly()
       Immutable. Whether this key may contain imported versions only.
       
      bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getImportOnly in interface CryptoKeyOrBuilder
      Returns:
      The importOnly.
    • setImportOnly

      public CryptoKey.Builder setImportOnly(boolean value)
       Immutable. Whether this key may contain imported versions only.
       
      bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The importOnly to set.
      Returns:
      This builder for chaining.
    • clearImportOnly

      public CryptoKey.Builder clearImportOnly()
       Immutable. Whether this key may contain imported versions only.
       
      bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • hasDestroyScheduledDuration

      public boolean hasDestroyScheduledDuration()
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      hasDestroyScheduledDuration in interface CryptoKeyOrBuilder
      Returns:
      Whether the destroyScheduledDuration field is set.
    • getDestroyScheduledDuration

      public com.google.protobuf.Duration getDestroyScheduledDuration()
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getDestroyScheduledDuration in interface CryptoKeyOrBuilder
      Returns:
      The destroyScheduledDuration.
    • setDestroyScheduledDuration

      public CryptoKey.Builder setDestroyScheduledDuration(com.google.protobuf.Duration value)
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
    • setDestroyScheduledDuration

      public CryptoKey.Builder setDestroyScheduledDuration(com.google.protobuf.Duration.Builder builderForValue)
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
    • mergeDestroyScheduledDuration

      public CryptoKey.Builder mergeDestroyScheduledDuration(com.google.protobuf.Duration value)
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
    • clearDestroyScheduledDuration

      public CryptoKey.Builder clearDestroyScheduledDuration()
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
    • getDestroyScheduledDurationBuilder

      public com.google.protobuf.Duration.Builder getDestroyScheduledDurationBuilder()
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
    • getDestroyScheduledDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getDestroyScheduledDurationOrBuilder()
       Immutable. The period of time that versions of this key spend in the
       [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
       state before transitioning to
       [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
       If not specified at creation time, the default duration is 30 days.
       
      .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getDestroyScheduledDurationOrBuilder in interface CryptoKeyOrBuilder
    • getCryptoKeyBackend

      public String getCryptoKeyBackend()
       Immutable. The resource name of the backend environment where the key
       material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
       where all related cryptographic operations are performed. Only applicable
       if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the
       resource name in the format `projects/*/locations/*/ekmConnections/*`. Only
       applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT],
       with the resource name in the format
       `projects/*/locations/*/singleTenantHsmInstances/*`.
       Note, this list is non-exhaustive and may apply to additional
       [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
       
      string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getCryptoKeyBackend in interface CryptoKeyOrBuilder
      Returns:
      The cryptoKeyBackend.
    • getCryptoKeyBackendBytes

      public com.google.protobuf.ByteString getCryptoKeyBackendBytes()
       Immutable. The resource name of the backend environment where the key
       material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
       where all related cryptographic operations are performed. Only applicable
       if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the
       resource name in the format `projects/*/locations/*/ekmConnections/*`. Only
       applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT],
       with the resource name in the format
       `projects/*/locations/*/singleTenantHsmInstances/*`.
       Note, this list is non-exhaustive and may apply to additional
       [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
       
      string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getCryptoKeyBackendBytes in interface CryptoKeyOrBuilder
      Returns:
      The bytes for cryptoKeyBackend.
    • setCryptoKeyBackend

      public CryptoKey.Builder setCryptoKeyBackend(String value)
       Immutable. The resource name of the backend environment where the key
       material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
       where all related cryptographic operations are performed. Only applicable
       if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the
       resource name in the format `projects/*/locations/*/ekmConnections/*`. Only
       applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT],
       with the resource name in the format
       `projects/*/locations/*/singleTenantHsmInstances/*`.
       Note, this list is non-exhaustive and may apply to additional
       [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
       
      string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The cryptoKeyBackend to set.
      Returns:
      This builder for chaining.
    • clearCryptoKeyBackend

      public CryptoKey.Builder clearCryptoKeyBackend()
       Immutable. The resource name of the backend environment where the key
       material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
       where all related cryptographic operations are performed. Only applicable
       if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the
       resource name in the format `projects/*/locations/*/ekmConnections/*`. Only
       applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT],
       with the resource name in the format
       `projects/*/locations/*/singleTenantHsmInstances/*`.
       Note, this list is non-exhaustive and may apply to additional
       [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
       
      string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setCryptoKeyBackendBytes

      public CryptoKey.Builder setCryptoKeyBackendBytes(com.google.protobuf.ByteString value)
       Immutable. The resource name of the backend environment where the key
       material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
       where all related cryptographic operations are performed. Only applicable
       if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the
       resource name in the format `projects/*/locations/*/ekmConnections/*`. Only
       applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
       have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
       [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT],
       with the resource name in the format
       `projects/*/locations/*/singleTenantHsmInstances/*`.
       Note, this list is non-exhaustive and may apply to additional
       [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
       
      string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for cryptoKeyBackend to set.
      Returns:
      This builder for chaining.
    • hasKeyAccessJustificationsPolicy

      public boolean hasKeyAccessJustificationsPolicy()
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasKeyAccessJustificationsPolicy in interface CryptoKeyOrBuilder
      Returns:
      Whether the keyAccessJustificationsPolicy field is set.
    • getKeyAccessJustificationsPolicy

      public KeyAccessJustificationsPolicy getKeyAccessJustificationsPolicy()
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKeyAccessJustificationsPolicy in interface CryptoKeyOrBuilder
      Returns:
      The keyAccessJustificationsPolicy.
    • setKeyAccessJustificationsPolicy

      public CryptoKey.Builder setKeyAccessJustificationsPolicy(KeyAccessJustificationsPolicy value)
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
    • setKeyAccessJustificationsPolicy

      public CryptoKey.Builder setKeyAccessJustificationsPolicy(KeyAccessJustificationsPolicy.Builder builderForValue)
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
    • mergeKeyAccessJustificationsPolicy

      public CryptoKey.Builder mergeKeyAccessJustificationsPolicy(KeyAccessJustificationsPolicy value)
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
    • clearKeyAccessJustificationsPolicy

      public CryptoKey.Builder clearKeyAccessJustificationsPolicy()
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
    • getKeyAccessJustificationsPolicyBuilder

      public KeyAccessJustificationsPolicy.Builder getKeyAccessJustificationsPolicyBuilder()
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
    • getKeyAccessJustificationsPolicyOrBuilder

      public KeyAccessJustificationsPolicyOrBuilder getKeyAccessJustificationsPolicyOrBuilder()
       Optional. The policy used for Key Access Justifications Policy Enforcement.
       If this field is present and this key is enrolled in Key Access
       Justifications Policy Enforcement, the policy will be evaluated in encrypt,
       decrypt, and sign operations, and the operation will fail if rejected by
       the policy. The policy is defined by specifying zero or more allowed
       justification codes.
       https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
       By default, this field is absent, and all justification codes are allowed.
       If the
       `key_access_justifications_policy.allowed_access_reasons`
       is empty (zero allowed justification code), all encrypt, decrypt, and sign
       operations will fail.
       
      .google.cloud.kms.v1.KeyAccessJustificationsPolicy key_access_justifications_policy = 17 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKeyAccessJustificationsPolicyOrBuilder in interface CryptoKeyOrBuilder