Class ExplainedPolicy.Builder (0.22.0)

public static final class ExplainedPolicy.Builder extends GeneratedMessageV3.Builder<ExplainedPolicy.Builder> implements ExplainedPolicyOrBuilder

Details about how a specific IAM Policy contributed to the access check.

Protobuf type google.cloud.policysimulator.v1.ExplainedPolicy

Static Methods

getDescriptor()

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

Methods

addAllBindingExplanations(Iterable<? extends BindingExplanation> values)

public ExplainedPolicy.Builder addAllBindingExplanations(Iterable<? extends BindingExplanation> values)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

addBindingExplanations(BindingExplanation value)

public ExplainedPolicy.Builder addBindingExplanations(BindingExplanation value)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
value BindingExplanation
Returns
Type Description
ExplainedPolicy.Builder

addBindingExplanations(BindingExplanation.Builder builderForValue)

public ExplainedPolicy.Builder addBindingExplanations(BindingExplanation.Builder builderForValue)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

addBindingExplanations(int index, BindingExplanation value)

public ExplainedPolicy.Builder addBindingExplanations(int index, BindingExplanation value)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

addBindingExplanations(int index, BindingExplanation.Builder builderForValue)

public ExplainedPolicy.Builder addBindingExplanations(int index, BindingExplanation.Builder builderForValue)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

addBindingExplanationsBuilder()

public BindingExplanation.Builder addBindingExplanationsBuilder()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Returns
Type Description
BindingExplanation.Builder

addBindingExplanationsBuilder(int index)

public BindingExplanation.Builder addBindingExplanationsBuilder(int index)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
index int
Returns
Type Description
BindingExplanation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ExplainedPolicy build()
Returns
Type Description
ExplainedPolicy

buildPartial()

public ExplainedPolicy buildPartial()
Returns
Type Description
ExplainedPolicy

clear()

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

clearAccess()

public ExplainedPolicy.Builder clearAccess()

Indicates whether this policy provides the specified permission to the specified principal for the specified resource.

This field does not indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

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

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

clearBindingExplanations()

public ExplainedPolicy.Builder clearBindingExplanations()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Returns
Type Description
ExplainedPolicy.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearFullResourceName()

public ExplainedPolicy.Builder clearFullResourceName()

The full resource name that identifies the resource. For example, //compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance.

If the user who created the Replay does not have access to the policy, this field is omitted.

For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

string full_resource_name = 2;

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPolicy()

public ExplainedPolicy.Builder clearPolicy()

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Returns
Type Description
ExplainedPolicy.Builder

clearRelevance()

public ExplainedPolicy.Builder clearRelevance()

The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse.

If the user who created the Replay does not have access to the policy, this field is omitted.

.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 5;

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

clone()

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

getAccess()

public AccessState getAccess()

Indicates whether this policy provides the specified permission to the specified principal for the specified resource.

This field does not indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

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

Returns
Type Description
AccessState

The access.

getAccessValue()

public int getAccessValue()

Indicates whether this policy provides the specified permission to the specified principal for the specified resource.

This field does not indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

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

Returns
Type Description
int

The enum numeric value on the wire for access.

getBindingExplanations(int index)

public BindingExplanation getBindingExplanations(int index)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
index int
Returns
Type Description
BindingExplanation

getBindingExplanationsBuilder(int index)

public BindingExplanation.Builder getBindingExplanationsBuilder(int index)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
index int
Returns
Type Description
BindingExplanation.Builder

getBindingExplanationsBuilderList()

public List<BindingExplanation.Builder> getBindingExplanationsBuilderList()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Returns
Type Description
List<Builder>

getBindingExplanationsCount()

public int getBindingExplanationsCount()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Returns
Type Description
int

getBindingExplanationsList()

public List<BindingExplanation> getBindingExplanationsList()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Returns
Type Description
List<BindingExplanation>

getBindingExplanationsOrBuilder(int index)

public BindingExplanationOrBuilder getBindingExplanationsOrBuilder(int index)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
index int
Returns
Type Description
BindingExplanationOrBuilder

getBindingExplanationsOrBuilderList()

public List<? extends BindingExplanationOrBuilder> getBindingExplanationsOrBuilderList()

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

getDefaultInstanceForType()

public ExplainedPolicy getDefaultInstanceForType()
Returns
Type Description
ExplainedPolicy

getDescriptorForType()

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

getFullResourceName()

public String getFullResourceName()

The full resource name that identifies the resource. For example, //compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance.

If the user who created the Replay does not have access to the policy, this field is omitted.

For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

string full_resource_name = 2;

Returns
Type Description
String

The fullResourceName.

getFullResourceNameBytes()

public ByteString getFullResourceNameBytes()

The full resource name that identifies the resource. For example, //compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance.

If the user who created the Replay does not have access to the policy, this field is omitted.

For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

string full_resource_name = 2;

Returns
Type Description
ByteString

The bytes for fullResourceName.

getPolicy()

public Policy getPolicy()

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Returns
Type Description
com.google.iam.v1.Policy

The policy.

getPolicyBuilder()

public Policy.Builder getPolicyBuilder()

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Returns
Type Description
com.google.iam.v1.Policy.Builder

getPolicyOrBuilder()

public PolicyOrBuilder getPolicyOrBuilder()

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Returns
Type Description
com.google.iam.v1.PolicyOrBuilder

getRelevance()

public HeuristicRelevance getRelevance()

The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse.

If the user who created the Replay does not have access to the policy, this field is omitted.

.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 5;

Returns
Type Description
HeuristicRelevance

The relevance.

getRelevanceValue()

public int getRelevanceValue()

The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse.

If the user who created the Replay does not have access to the policy, this field is omitted.

.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 5;

Returns
Type Description
int

The enum numeric value on the wire for relevance.

hasPolicy()

public boolean hasPolicy()

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Returns
Type Description
boolean

Whether the policy field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ExplainedPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePolicy(Policy value)

public ExplainedPolicy.Builder mergePolicy(Policy value)

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Parameter
Name Description
value com.google.iam.v1.Policy
Returns
Type Description
ExplainedPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeBindingExplanations(int index)

public ExplainedPolicy.Builder removeBindingExplanations(int index)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

Parameter
Name Description
index int
Returns
Type Description
ExplainedPolicy.Builder

setAccess(AccessState value)

public ExplainedPolicy.Builder setAccess(AccessState value)

Indicates whether this policy provides the specified permission to the specified principal for the specified resource.

This field does not indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

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

Parameter
Name Description
value AccessState

The access to set.

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

setAccessValue(int value)

public ExplainedPolicy.Builder setAccessValue(int value)

Indicates whether this policy provides the specified permission to the specified principal for the specified resource.

This field does not indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

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

Parameter
Name Description
value int

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

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

setBindingExplanations(int index, BindingExplanation value)

public ExplainedPolicy.Builder setBindingExplanations(int index, BindingExplanation value)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

setBindingExplanations(int index, BindingExplanation.Builder builderForValue)

public ExplainedPolicy.Builder setBindingExplanations(int index, BindingExplanation.Builder builderForValue)

Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

If the user who created the Replay does not have access to the policy, this field is omitted.

repeated .google.cloud.policysimulator.v1.BindingExplanation binding_explanations = 4;

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setFullResourceName(String value)

public ExplainedPolicy.Builder setFullResourceName(String value)

The full resource name that identifies the resource. For example, //compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance.

If the user who created the Replay does not have access to the policy, this field is omitted.

For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

string full_resource_name = 2;

Parameter
Name Description
value String

The fullResourceName to set.

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

setFullResourceNameBytes(ByteString value)

public ExplainedPolicy.Builder setFullResourceNameBytes(ByteString value)

The full resource name that identifies the resource. For example, //compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance.

If the user who created the Replay does not have access to the policy, this field is omitted.

For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

string full_resource_name = 2;

Parameter
Name Description
value ByteString

The bytes for fullResourceName to set.

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

setPolicy(Policy value)

public ExplainedPolicy.Builder setPolicy(Policy value)

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Parameter
Name Description
value com.google.iam.v1.Policy
Returns
Type Description
ExplainedPolicy.Builder

setPolicy(Policy.Builder builderForValue)

public ExplainedPolicy.Builder setPolicy(Policy.Builder builderForValue)

The IAM policy attached to the resource.

If the user who created the Replay does not have access to the policy, this field is empty.

.google.iam.v1.Policy policy = 3;

Parameter
Name Description
builderForValue com.google.iam.v1.Policy.Builder
Returns
Type Description
ExplainedPolicy.Builder

setRelevance(HeuristicRelevance value)

public ExplainedPolicy.Builder setRelevance(HeuristicRelevance value)

The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse.

If the user who created the Replay does not have access to the policy, this field is omitted.

.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 5;

Parameter
Name Description
value HeuristicRelevance

The relevance to set.

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

setRelevanceValue(int value)

public ExplainedPolicy.Builder setRelevanceValue(int value)

The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse.

If the user who created the Replay does not have access to the policy, this field is omitted.

.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 5;

Parameter
Name Description
value int

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

Returns
Type Description
ExplainedPolicy.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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