Class ExplainedPolicy (0.1.0)

public final class ExplainedPolicy extends GeneratedMessageV3 implements ExplainedPolicyOrBuilder

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

Protobuf type google.cloud.policysimulator.v1.ExplainedPolicy

Static Fields

ACCESS_FIELD_NUMBER

public static final int ACCESS_FIELD_NUMBER
Field Value
TypeDescription
int

BINDING_EXPLANATIONS_FIELD_NUMBER

public static final int BINDING_EXPLANATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

FULL_RESOURCE_NAME_FIELD_NUMBER

public static final int FULL_RESOURCE_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

POLICY_FIELD_NUMBER

public static final int POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

RELEVANCE_FIELD_NUMBER

public static final int RELEVANCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ExplainedPolicy getDefaultInstance()
Returns
TypeDescription
ExplainedPolicy

getDescriptor()

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

newBuilder()

public static ExplainedPolicy.Builder newBuilder()
Returns
TypeDescription
ExplainedPolicy.Builder

newBuilder(ExplainedPolicy prototype)

public static ExplainedPolicy.Builder newBuilder(ExplainedPolicy prototype)
Parameter
NameDescription
prototypeExplainedPolicy
Returns
TypeDescription
ExplainedPolicy.Builder

parseDelimitedFrom(InputStream input)

public static ExplainedPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ExplainedPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ExplainedPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ExplainedPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ExplainedPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ExplainedPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ExplainedPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExplainedPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ExplainedPolicy> parser()
Returns
TypeDescription
Parser<ExplainedPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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

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.

getParserForType()

public Parser<ExplainedPolicy> getParserForType()
Returns
TypeDescription
Parser<ExplainedPolicy>
Overrides

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.

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ExplainedPolicy.Builder newBuilderForType()
Returns
TypeDescription
ExplainedPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ExplainedPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ExplainedPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ExplainedPolicy.Builder toBuilder()
Returns
TypeDescription
ExplainedPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException