Class KeyAccessJustificationsPolicy.Builder

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

public static final class KeyAccessJustificationsPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<KeyAccessJustificationsPolicy.Builder> implements KeyAccessJustificationsPolicyOrBuilder
 A
 [KeyAccessJustificationsPolicy][google.cloud.kms.v1.KeyAccessJustificationsPolicy]
 specifies zero or more allowed
 [AccessReason][google.cloud.kms.v1.AccessReason] values for encrypt, decrypt,
 and sign operations on a [CryptoKey][google.cloud.kms.v1.CryptoKey] or
 [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig]
 (the default Key Access Justifications policy).
 
Protobuf type google.cloud.kms.v1.KeyAccessJustificationsPolicy
  • 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<KeyAccessJustificationsPolicy.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<KeyAccessJustificationsPolicy.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<KeyAccessJustificationsPolicy.Builder>
    • getDefaultInstanceForType

      public KeyAccessJustificationsPolicy 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

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

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

      public KeyAccessJustificationsPolicy.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<KeyAccessJustificationsPolicy.Builder>
      Throws:
      IOException
    • getAllowedAccessReasonsList

      public List<AccessReason> getAllowedAccessReasonsList()
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Specified by:
      getAllowedAccessReasonsList in interface KeyAccessJustificationsPolicyOrBuilder
      Returns:
      A list containing the allowedAccessReasons.
    • getAllowedAccessReasonsCount

      public int getAllowedAccessReasonsCount()
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Specified by:
      getAllowedAccessReasonsCount in interface KeyAccessJustificationsPolicyOrBuilder
      Returns:
      The count of allowedAccessReasons.
    • getAllowedAccessReasons

      public AccessReason getAllowedAccessReasons(int index)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Specified by:
      getAllowedAccessReasons in interface KeyAccessJustificationsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedAccessReasons at the given index.
    • setAllowedAccessReasons

      public KeyAccessJustificationsPolicy.Builder setAllowedAccessReasons(int index, AccessReason value)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      index - The index to set the value at.
      value - The allowedAccessReasons to set.
      Returns:
      This builder for chaining.
    • addAllowedAccessReasons

      public KeyAccessJustificationsPolicy.Builder addAllowedAccessReasons(AccessReason value)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      value - The allowedAccessReasons to add.
      Returns:
      This builder for chaining.
    • addAllAllowedAccessReasons

      public KeyAccessJustificationsPolicy.Builder addAllAllowedAccessReasons(Iterable<? extends AccessReason> values)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      values - The allowedAccessReasons to add.
      Returns:
      This builder for chaining.
    • clearAllowedAccessReasons

      public KeyAccessJustificationsPolicy.Builder clearAllowedAccessReasons()
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Returns:
      This builder for chaining.
    • getAllowedAccessReasonsValueList

      public List<Integer> getAllowedAccessReasonsValueList()
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Specified by:
      getAllowedAccessReasonsValueList in interface KeyAccessJustificationsPolicyOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for allowedAccessReasons.
    • getAllowedAccessReasonsValue

      public int getAllowedAccessReasonsValue(int index)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Specified by:
      getAllowedAccessReasonsValue in interface KeyAccessJustificationsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of allowedAccessReasons at the given index.
    • setAllowedAccessReasonsValue

      public KeyAccessJustificationsPolicy.Builder setAllowedAccessReasonsValue(int index, int value)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for allowedAccessReasons to set.
      Returns:
      This builder for chaining.
    • addAllowedAccessReasonsValue

      public KeyAccessJustificationsPolicy.Builder addAllowedAccessReasonsValue(int value)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      value - The enum numeric value on the wire for allowedAccessReasons to add.
      Returns:
      This builder for chaining.
    • addAllAllowedAccessReasonsValue

      public KeyAccessJustificationsPolicy.Builder addAllAllowedAccessReasonsValue(Iterable<Integer> values)
       The list of allowed reasons for access to a
       [CryptoKey][google.cloud.kms.v1.CryptoKey]. Note that empty
       allowed_access_reasons has a different meaning depending on where this
       message appears. If this is under
       [KeyAccessJustificationsPolicyConfig][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig],
       it means allow-all. If this is under
       [CryptoKey][google.cloud.kms.v1.CryptoKey], it means deny-all.
       
      repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;
      Parameters:
      values - The enum numeric values on the wire for allowedAccessReasons to add.
      Returns:
      This builder for chaining.