Class CryptoKeyVersionTemplate.Builder

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

public static final class CryptoKeyVersionTemplate.Builder extends com.google.protobuf.GeneratedMessage.Builder<CryptoKeyVersionTemplate.Builder> implements CryptoKeyVersionTemplateOrBuilder
 A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate]
 specifies the properties to use when creating a new
 [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually
 with
 [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
 or automatically as a result of auto-rotation.
 
Protobuf type google.cloud.kms.v1.CryptoKeyVersionTemplate
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CryptoKeyVersionTemplate.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<CryptoKeyVersionTemplate.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<CryptoKeyVersionTemplate.Builder>
    • getDefaultInstanceForType

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

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

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

      public CryptoKeyVersionTemplate.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<CryptoKeyVersionTemplate.Builder>
    • mergeFrom

    • isInitialized

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

      public CryptoKeyVersionTemplate.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<CryptoKeyVersionTemplate.Builder>
      Throws:
      IOException
    • getProtectionLevelValue

      public int getProtectionLevelValue()
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
       a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template. Immutable. Defaults to
       [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
       
      .google.cloud.kms.v1.ProtectionLevel protection_level = 1;
      Specified by:
      getProtectionLevelValue in interface CryptoKeyVersionTemplateOrBuilder
      Returns:
      The enum numeric value on the wire for protectionLevel.
    • setProtectionLevelValue

      public CryptoKeyVersionTemplate.Builder setProtectionLevelValue(int value)
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
       a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template. Immutable. Defaults to
       [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
       
      .google.cloud.kms.v1.ProtectionLevel protection_level = 1;
      Parameters:
      value - The enum numeric value on the wire for protectionLevel to set.
      Returns:
      This builder for chaining.
    • getProtectionLevel

      public ProtectionLevel getProtectionLevel()
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
       a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template. Immutable. Defaults to
       [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
       
      .google.cloud.kms.v1.ProtectionLevel protection_level = 1;
      Specified by:
      getProtectionLevel in interface CryptoKeyVersionTemplateOrBuilder
      Returns:
      The protectionLevel.
    • setProtectionLevel

      public CryptoKeyVersionTemplate.Builder setProtectionLevel(ProtectionLevel value)
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
       a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template. Immutable. Defaults to
       [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
       
      .google.cloud.kms.v1.ProtectionLevel protection_level = 1;
      Parameters:
      value - The protectionLevel to set.
      Returns:
      This builder for chaining.
    • clearProtectionLevel

      public CryptoKeyVersionTemplate.Builder clearProtectionLevel()
       [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
       a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template. Immutable. Defaults to
       [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
       
      .google.cloud.kms.v1.ProtectionLevel protection_level = 1;
      Returns:
      This builder for chaining.
    • getAlgorithmValue

      public int getAlgorithmValue()
       Required.
       [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
       to use when creating a
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template.
      
       For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
       this field is omitted and
       [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
       
      .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAlgorithmValue in interface CryptoKeyVersionTemplateOrBuilder
      Returns:
      The enum numeric value on the wire for algorithm.
    • setAlgorithmValue

      public CryptoKeyVersionTemplate.Builder setAlgorithmValue(int value)
       Required.
       [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
       to use when creating a
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template.
      
       For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
       this field is omitted and
       [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
       
      .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for algorithm to set.
      Returns:
      This builder for chaining.
    • getAlgorithm

       Required.
       [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
       to use when creating a
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template.
      
       For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
       this field is omitted and
       [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
       
      .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAlgorithm in interface CryptoKeyVersionTemplateOrBuilder
      Returns:
      The algorithm.
    • setAlgorithm

       Required.
       [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
       to use when creating a
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template.
      
       For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
       this field is omitted and
       [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
       
      .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The algorithm to set.
      Returns:
      This builder for chaining.
    • clearAlgorithm

      public CryptoKeyVersionTemplate.Builder clearAlgorithm()
       Required.
       [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
       to use when creating a
       [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
       template.
      
       For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
       this field is omitted and
       [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
       [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
       
      .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.