Class KeyAccessJustificationsPolicy.Builder (2.58.0)

public static final class KeyAccessJustificationsPolicy.Builder extends GeneratedMessageV3.Builder<KeyAccessJustificationsPolicy.Builder> implements KeyAccessJustificationsPolicyOrBuilder

A KeyAccessJustificationsPolicy specifies zero or more allowed AccessReason values for encrypt, decrypt, and sign operations on a CryptoKey.

Protobuf type google.cloud.kms.v1.KeyAccessJustificationsPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAllowedAccessReasons(Iterable<? extends AccessReason> values)

public KeyAccessJustificationsPolicy.Builder addAllAllowedAccessReasons(Iterable<? extends AccessReason> values)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.kms.v1.AccessReason>

The allowedAccessReasons to add.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

addAllAllowedAccessReasonsValue(Iterable<Integer> values)

public KeyAccessJustificationsPolicy.Builder addAllAllowedAccessReasonsValue(Iterable<Integer> values)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for allowedAccessReasons to add.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

addAllowedAccessReasons(AccessReason value)

public KeyAccessJustificationsPolicy.Builder addAllowedAccessReasons(AccessReason value)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
valueAccessReason

The allowedAccessReasons to add.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

addAllowedAccessReasonsValue(int value)

public KeyAccessJustificationsPolicy.Builder addAllowedAccessReasonsValue(int value)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
valueint

The enum numeric value on the wire for allowedAccessReasons to add.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyAccessJustificationsPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

build()

public KeyAccessJustificationsPolicy build()
Returns
TypeDescription
KeyAccessJustificationsPolicy

buildPartial()

public KeyAccessJustificationsPolicy buildPartial()
Returns
TypeDescription
KeyAccessJustificationsPolicy

clear()

public KeyAccessJustificationsPolicy.Builder clear()
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

clearAllowedAccessReasons()

public KeyAccessJustificationsPolicy.Builder clearAllowedAccessReasons()

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeyAccessJustificationsPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyAccessJustificationsPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

clone()

public KeyAccessJustificationsPolicy.Builder clone()
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

getAllowedAccessReasons(int index)

public AccessReason getAllowedAccessReasons(int index)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
AccessReason

The allowedAccessReasons at the given index.

getAllowedAccessReasonsCount()

public int getAllowedAccessReasonsCount()

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Returns
TypeDescription
int

The count of allowedAccessReasons.

getAllowedAccessReasonsList()

public List<AccessReason> getAllowedAccessReasonsList()

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Returns
TypeDescription
List<AccessReason>

A list containing the allowedAccessReasons.

getAllowedAccessReasonsValue(int index)

public int getAllowedAccessReasonsValue(int index)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of allowedAccessReasons at the given index.

getAllowedAccessReasonsValueList()

public List<Integer> getAllowedAccessReasonsValueList()

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for allowedAccessReasons.

getDefaultInstanceForType()

public KeyAccessJustificationsPolicy getDefaultInstanceForType()
Returns
TypeDescription
KeyAccessJustificationsPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(KeyAccessJustificationsPolicy other)

public KeyAccessJustificationsPolicy.Builder mergeFrom(KeyAccessJustificationsPolicy other)
Parameter
NameDescription
otherKeyAccessJustificationsPolicy
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyAccessJustificationsPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public KeyAccessJustificationsPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyAccessJustificationsPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

setAllowedAccessReasons(int index, AccessReason value)

public KeyAccessJustificationsPolicy.Builder setAllowedAccessReasons(int index, AccessReason value)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueAccessReason

The allowedAccessReasons to set.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

setAllowedAccessReasonsValue(int index, int value)

public KeyAccessJustificationsPolicy.Builder setAllowedAccessReasonsValue(int index, int value)

The list of allowed reasons for access to a CryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for the CryptoKey associated with this policy will fail.

repeated .google.cloud.kms.v1.AccessReason allowed_access_reasons = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

The enum numeric value on the wire for allowedAccessReasons to set.

Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeyAccessJustificationsPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public KeyAccessJustificationsPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyAccessJustificationsPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeyAccessJustificationsPolicy.Builder
Overrides