Class SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder

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

public static final class SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder extends com.google.protobuf.GeneratedMessage.Builder<SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder> implements SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
 Register 2FA keys for the
 [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance].
 This operation requires all Challenges to be signed by 2FA keys. The
 [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must
 be in the
 [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION]
 state to perform this operation.
 
Protobuf type google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys
  • 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<SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.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<SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.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<SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder>
    • getDefaultInstanceForType

      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.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<SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder>
      Throws:
      IOException
    • getRequiredApproverCount

      public int getRequiredApproverCount()
       Required. The required numbers of approvers to set for the
       [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance].
       This is the M value used for M of N quorum auth. Must be greater than or
       equal to 2 and less than or equal to
       [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
       - 1.
       
      int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRequiredApproverCount in interface SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
      Returns:
      The requiredApproverCount.
    • setRequiredApproverCount

      public SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder setRequiredApproverCount(int value)
       Required. The required numbers of approvers to set for the
       [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance].
       This is the M value used for M of N quorum auth. Must be greater than or
       equal to 2 and less than or equal to
       [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
       - 1.
       
      int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The requiredApproverCount to set.
      Returns:
      This builder for chaining.
    • clearRequiredApproverCount

       Required. The required numbers of approvers to set for the
       [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance].
       This is the M value used for M of N quorum auth. Must be greater than or
       equal to 2 and less than or equal to
       [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
       - 1.
       
      int32 required_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getTwoFactorPublicKeyPemsList

      public com.google.protobuf.ProtocolStringList getTwoFactorPublicKeyPemsList()
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTwoFactorPublicKeyPemsList in interface SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
      Returns:
      A list containing the twoFactorPublicKeyPems.
    • getTwoFactorPublicKeyPemsCount

      public int getTwoFactorPublicKeyPemsCount()
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTwoFactorPublicKeyPemsCount in interface SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
      Returns:
      The count of twoFactorPublicKeyPems.
    • getTwoFactorPublicKeyPems

      public String getTwoFactorPublicKeyPems(int index)
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTwoFactorPublicKeyPems in interface SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The twoFactorPublicKeyPems at the given index.
    • getTwoFactorPublicKeyPemsBytes

      public com.google.protobuf.ByteString getTwoFactorPublicKeyPemsBytes(int index)
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTwoFactorPublicKeyPemsBytes in interface SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeysOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the twoFactorPublicKeyPems at the given index.
    • setTwoFactorPublicKeyPems

      public SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder setTwoFactorPublicKeyPems(int index, String value)
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The twoFactorPublicKeyPems to set.
      Returns:
      This builder for chaining.
    • addTwoFactorPublicKeyPems

       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The twoFactorPublicKeyPems to add.
      Returns:
      This builder for chaining.
    • addAllTwoFactorPublicKeyPems

       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The twoFactorPublicKeyPems to add.
      Returns:
      This builder for chaining.
    • clearTwoFactorPublicKeyPems

       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addTwoFactorPublicKeyPemsBytes

      public SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys.Builder addTwoFactorPublicKeyPemsBytes(com.google.protobuf.ByteString value)
       Required. The public keys associated with the 2FA keys for M of N quorum
       auth. Public keys must be associated with RSA 2048 keys.
       
      repeated string two_factor_public_key_pems = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the twoFactorPublicKeyPems to add.
      Returns:
      This builder for chaining.