Class KeyAccessJustificationsPolicy.Builder (2.57.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
Type Description
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
Name Description
values Iterable<? extends com.google.cloud.kms.v1.AccessReason>

The allowedAccessReasons to add.

Returns
Type Description
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
Name Description
values Iterable<Integer>

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

Returns
Type Description
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
Name Description
value AccessReason

The allowedAccessReasons to add.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyAccessJustificationsPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

build()

public KeyAccessJustificationsPolicy build()
Returns
Type Description
KeyAccessJustificationsPolicy

buildPartial()

public KeyAccessJustificationsPolicy buildPartial()
Returns
Type Description
KeyAccessJustificationsPolicy

clear()

public KeyAccessJustificationsPolicy.Builder clear()
Returns
Type Description
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
Type Description
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeyAccessJustificationsPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyAccessJustificationsPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

clone()

public KeyAccessJustificationsPolicy.Builder clone()
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
List<Integer>

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

getDefaultInstanceForType()

public KeyAccessJustificationsPolicy getDefaultInstanceForType()
Returns
Type Description
KeyAccessJustificationsPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(KeyAccessJustificationsPolicy other)

public KeyAccessJustificationsPolicy.Builder mergeFrom(KeyAccessJustificationsPolicy other)
Parameter
Name Description
other KeyAccessJustificationsPolicy
Returns
Type Description
KeyAccessJustificationsPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyAccessJustificationsPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KeyAccessJustificationsPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyAccessJustificationsPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value AccessReason

The allowedAccessReasons to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value int

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

Returns
Type Description
KeyAccessJustificationsPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeyAccessJustificationsPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

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

public KeyAccessJustificationsPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyAccessJustificationsPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeyAccessJustificationsPolicy.Builder
Overrides