Class ExplainedPolicy.Builder (0.9.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.policysimulator.v1.BindingExplanation>
Returns
TypeDescription
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
NameDescription
valueBindingExplanation
Returns
TypeDescription
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
NameDescription
builderForValueBindingExplanation.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueBindingExplanation
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBindingExplanation.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
BindingExplanation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ExplainedPolicy build()
Returns
TypeDescription
ExplainedPolicy

buildPartial()

public ExplainedPolicy buildPartial()
Returns
TypeDescription
ExplainedPolicy

clear()

public ExplainedPolicy.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ExplainedPolicy.Builder

clearField(Descriptors.FieldDescriptor field)

public ExplainedPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ExplainedPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ExplainedPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ExplainedPolicy.Builder

This builder for chaining.

clone()

public ExplainedPolicy.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.policysimulator.v1.BindingExplanationOrBuilder>

getDefaultInstanceForType()

public ExplainedPolicy getDefaultInstanceForType()
Returns
TypeDescription
ExplainedPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the policy field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ExplainedPolicy other)

public ExplainedPolicy.Builder mergeFrom(ExplainedPolicy other)
Parameter
NameDescription
otherExplainedPolicy
Returns
TypeDescription
ExplainedPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ExplainedPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuecom.google.iam.v1.Policy
Returns
TypeDescription
ExplainedPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ExplainedPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueAccessState

The access to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
indexint
valueBindingExplanation
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBindingExplanation.Builder
Returns
TypeDescription
ExplainedPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ExplainedPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The fullResourceName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for fullResourceName to set.

Returns
TypeDescription
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
NameDescription
valuecom.google.iam.v1.Policy
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.iam.v1.Policy.Builder
Returns
TypeDescription
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
NameDescription
valueHeuristicRelevance

The relevance to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ExplainedPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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