Class ExplainedAccess.Builder (0.33.0)

public static final class ExplainedAccess.Builder extends GeneratedMessageV3.Builder<ExplainedAccess.Builder> implements ExplainedAccessOrBuilder

Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.

Protobuf type google.cloud.policysimulator.v1.ExplainedAccess

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllErrors(Iterable<? extends Status> values)

public ExplainedAccess.Builder addAllErrors(Iterable<? extends Status> values)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
values Iterable<? extends com.google.rpc.Status>
Returns
Type Description
ExplainedAccess.Builder

addAllPolicies(Iterable<? extends ExplainedPolicy> values)

public ExplainedAccess.Builder addAllPolicies(Iterable<? extends ExplainedPolicy> values)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.policysimulator.v1.ExplainedPolicy>
Returns
Type Description
ExplainedAccess.Builder

addErrors(Status value)

public ExplainedAccess.Builder addErrors(Status value)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
ExplainedAccess.Builder

addErrors(Status.Builder builderForValue)

public ExplainedAccess.Builder addErrors(Status.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
ExplainedAccess.Builder

addErrors(int index, Status value)

public ExplainedAccess.Builder addErrors(int index, Status value)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameters
Name Description
index int
value com.google.rpc.Status
Returns
Type Description
ExplainedAccess.Builder

addErrors(int index, Status.Builder builderForValue)

public ExplainedAccess.Builder addErrors(int index, Status.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameters
Name Description
index int
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
ExplainedAccess.Builder

addErrorsBuilder()

public Status.Builder addErrorsBuilder()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
com.google.rpc.Status.Builder

addErrorsBuilder(int index)

public Status.Builder addErrorsBuilder(int index)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
index int
Returns
Type Description
com.google.rpc.Status.Builder

addPolicies(ExplainedPolicy value)

public ExplainedAccess.Builder addPolicies(ExplainedPolicy value)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
value ExplainedPolicy
Returns
Type Description
ExplainedAccess.Builder

addPolicies(ExplainedPolicy.Builder builderForValue)

public ExplainedAccess.Builder addPolicies(ExplainedPolicy.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
builderForValue ExplainedPolicy.Builder
Returns
Type Description
ExplainedAccess.Builder

addPolicies(int index, ExplainedPolicy value)

public ExplainedAccess.Builder addPolicies(int index, ExplainedPolicy value)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameters
Name Description
index int
value ExplainedPolicy
Returns
Type Description
ExplainedAccess.Builder

addPolicies(int index, ExplainedPolicy.Builder builderForValue)

public ExplainedAccess.Builder addPolicies(int index, ExplainedPolicy.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameters
Name Description
index int
builderForValue ExplainedPolicy.Builder
Returns
Type Description
ExplainedAccess.Builder

addPoliciesBuilder()

public ExplainedPolicy.Builder addPoliciesBuilder()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
ExplainedPolicy.Builder

addPoliciesBuilder(int index)

public ExplainedPolicy.Builder addPoliciesBuilder(int index)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
index int
Returns
Type Description
ExplainedPolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ExplainedAccess build()
Returns
Type Description
ExplainedAccess

buildPartial()

public ExplainedAccess buildPartial()
Returns
Type Description
ExplainedAccess

clear()

public ExplainedAccess.Builder clear()
Returns
Type Description
ExplainedAccess.Builder
Overrides

clearAccessState()

public ExplainedAccess.Builder clearAccessState()

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

.google.cloud.policysimulator.v1.AccessState access_state = 1;

Returns
Type Description
ExplainedAccess.Builder

This builder for chaining.

clearErrors()

public ExplainedAccess.Builder clearErrors()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
ExplainedAccess.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPolicies()

public ExplainedAccess.Builder clearPolicies()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
ExplainedAccess.Builder

clone()

public ExplainedAccess.Builder clone()
Returns
Type Description
ExplainedAccess.Builder
Overrides

getAccessState()

public AccessState getAccessState()

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

.google.cloud.policysimulator.v1.AccessState access_state = 1;

Returns
Type Description
AccessState

The accessState.

getAccessStateValue()

public int getAccessStateValue()

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

.google.cloud.policysimulator.v1.AccessState access_state = 1;

Returns
Type Description
int

The enum numeric value on the wire for accessState.

getDefaultInstanceForType()

public ExplainedAccess getDefaultInstanceForType()
Returns
Type Description
ExplainedAccess

getDescriptorForType()

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

getErrors(int index)

public Status getErrors(int index)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
index int
Returns
Type Description
com.google.rpc.Status

getErrorsBuilder(int index)

public Status.Builder getErrorsBuilder(int index)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
index int
Returns
Type Description
com.google.rpc.Status.Builder

getErrorsBuilderList()

public List<Status.Builder> getErrorsBuilderList()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
List<com.google.rpc.Status.Builder>

getErrorsCount()

public int getErrorsCount()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
int

getErrorsList()

public List<Status> getErrorsList()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
List<com.google.rpc.Status>

getErrorsOrBuilder(int index)

public StatusOrBuilder getErrorsOrBuilder(int index)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
index int
Returns
Type Description
com.google.rpc.StatusOrBuilder

getErrorsOrBuilderList()

public List<? extends StatusOrBuilder> getErrorsOrBuilderList()

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Returns
Type Description
List<? extends com.google.rpc.StatusOrBuilder>

getPolicies(int index)

public ExplainedPolicy getPolicies(int index)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
index int
Returns
Type Description
ExplainedPolicy

getPoliciesBuilder(int index)

public ExplainedPolicy.Builder getPoliciesBuilder(int index)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
index int
Returns
Type Description
ExplainedPolicy.Builder

getPoliciesBuilderList()

public List<ExplainedPolicy.Builder> getPoliciesBuilderList()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
List<Builder>

getPoliciesCount()

public int getPoliciesCount()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
int

getPoliciesList()

public List<ExplainedPolicy> getPoliciesList()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
List<ExplainedPolicy>

getPoliciesOrBuilder(int index)

public ExplainedPolicyOrBuilder getPoliciesOrBuilder(int index)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
index int
Returns
Type Description
ExplainedPolicyOrBuilder

getPoliciesOrBuilderList()

public List<? extends ExplainedPolicyOrBuilder> getPoliciesOrBuilderList()

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Returns
Type Description
List<? extends com.google.cloud.policysimulator.v1.ExplainedPolicyOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ExplainedAccess other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ExplainedAccess.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ExplainedAccess.Builder
Overrides

removeErrors(int index)

public ExplainedAccess.Builder removeErrors(int index)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameter
Name Description
index int
Returns
Type Description
ExplainedAccess.Builder

removePolicies(int index)

public ExplainedAccess.Builder removePolicies(int index)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameter
Name Description
index int
Returns
Type Description
ExplainedAccess.Builder

setAccessState(AccessState value)

public ExplainedAccess.Builder setAccessState(AccessState value)

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

.google.cloud.policysimulator.v1.AccessState access_state = 1;

Parameter
Name Description
value AccessState

The accessState to set.

Returns
Type Description
ExplainedAccess.Builder

This builder for chaining.

setAccessStateValue(int value)

public ExplainedAccess.Builder setAccessStateValue(int value)

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

.google.cloud.policysimulator.v1.AccessState access_state = 1;

Parameter
Name Description
value int

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

Returns
Type Description
ExplainedAccess.Builder

This builder for chaining.

setErrors(int index, Status value)

public ExplainedAccess.Builder setErrors(int index, Status value)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameters
Name Description
index int
value com.google.rpc.Status
Returns
Type Description
ExplainedAccess.Builder

setErrors(int index, Status.Builder builderForValue)

public ExplainedAccess.Builder setErrors(int index, Status.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.rpc.Status errors = 3;

Parameters
Name Description
index int
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
ExplainedAccess.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPolicies(int index, ExplainedPolicy value)

public ExplainedAccess.Builder setPolicies(int index, ExplainedPolicy value)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameters
Name Description
index int
value ExplainedPolicy
Returns
Type Description
ExplainedAccess.Builder

setPolicies(int index, ExplainedPolicy.Builder builderForValue)

public ExplainedAccess.Builder setPolicies(int index, ExplainedPolicy.Builder builderForValue)

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

repeated .google.cloud.policysimulator.v1.ExplainedPolicy policies = 2;

Parameters
Name Description
index int
builderForValue ExplainedPolicy.Builder
Returns
Type Description
ExplainedAccess.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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