Class BindingExplanation (0.11.0)

public final class BindingExplanation extends GeneratedMessageV3 implements BindingExplanationOrBuilder

Details about how a binding in a policy affects a principal's ability to use a permission.

Protobuf type google.cloud.policysimulator.v1.BindingExplanation

Static Fields

ACCESS_FIELD_NUMBER

public static final int ACCESS_FIELD_NUMBER
Field Value
TypeDescription
int

CONDITION_FIELD_NUMBER

public static final int CONDITION_FIELD_NUMBER
Field Value
TypeDescription
int

MEMBERSHIPS_FIELD_NUMBER

public static final int MEMBERSHIPS_FIELD_NUMBER
Field Value
TypeDescription
int

RELEVANCE_FIELD_NUMBER

public static final int RELEVANCE_FIELD_NUMBER
Field Value
TypeDescription
int

ROLE_FIELD_NUMBER

public static final int ROLE_FIELD_NUMBER
Field Value
TypeDescription
int

ROLE_PERMISSION_FIELD_NUMBER

public static final int ROLE_PERMISSION_FIELD_NUMBER
Field Value
TypeDescription
int

ROLE_PERMISSION_RELEVANCE_FIELD_NUMBER

public static final int ROLE_PERMISSION_RELEVANCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static BindingExplanation getDefaultInstance()
Returns
TypeDescription
BindingExplanation

getDescriptor()

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

newBuilder()

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

newBuilder(BindingExplanation prototype)

public static BindingExplanation.Builder newBuilder(BindingExplanation prototype)
Parameter
NameDescription
prototypeBindingExplanation
Returns
TypeDescription
BindingExplanation.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsMemberships(String key)

public boolean containsMemberships(String key)

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.

For example, suppose that a binding includes the following principals:

  • user:alice@example.com
  • group:product-eng@example.com

    The principal in the replayed access tuple is user:bob@example.com. This user is a principal of the group group:product-eng@example.com.

    For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED.

    For the second principal in the binding, the key is group:product-eng@example.com, and the membership field in the value is set to MEMBERSHIP_INCLUDED.

map<string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAccess()

public AccessState getAccess()

Required. Indicates whether this binding 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 binding that overrides this binding. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

.google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AccessState

The access.

getAccessValue()

public int getAccessValue()

Required. Indicates whether this binding 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 binding that overrides this binding. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse.

.google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for access.

getCondition()

public Expr getCondition()

A condition expression that prevents this binding from granting access unless the expression evaluates to true.

To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
com.google.type.Expr

The condition.

getConditionOrBuilder()

public ExprOrBuilder getConditionOrBuilder()

A condition expression that prevents this binding from granting access unless the expression evaluates to true.

To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
com.google.type.ExprOrBuilder

getDefaultInstanceForType()

public BindingExplanation getDefaultInstanceForType()
Returns
TypeDescription
BindingExplanation

getMemberships() (deprecated)

public Map<String,BindingExplanation.AnnotatedMembership> getMemberships()

Use #getMembershipsMap() instead.

Returns
TypeDescription
Map<String,AnnotatedMembership>

getMembershipsCount()

public int getMembershipsCount()

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.

For example, suppose that a binding includes the following principals:

  • user:alice@example.com
  • group:product-eng@example.com

    The principal in the replayed access tuple is user:bob@example.com. This user is a principal of the group group:product-eng@example.com.

    For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED.

    For the second principal in the binding, the key is group:product-eng@example.com, and the membership field in the value is set to MEMBERSHIP_INCLUDED.

map<string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Returns
TypeDescription
int

getMembershipsMap()

public Map<String,BindingExplanation.AnnotatedMembership> getMembershipsMap()

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.

For example, suppose that a binding includes the following principals:

  • user:alice@example.com
  • group:product-eng@example.com

    The principal in the replayed access tuple is user:bob@example.com. This user is a principal of the group group:product-eng@example.com.

    For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED.

    For the second principal in the binding, the key is group:product-eng@example.com, and the membership field in the value is set to MEMBERSHIP_INCLUDED.

map<string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Returns
TypeDescription
Map<String,AnnotatedMembership>

getMembershipsOrDefault(String key, BindingExplanation.AnnotatedMembership defaultValue)

public BindingExplanation.AnnotatedMembership getMembershipsOrDefault(String key, BindingExplanation.AnnotatedMembership defaultValue)

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.

For example, suppose that a binding includes the following principals:

  • user:alice@example.com
  • group:product-eng@example.com

    The principal in the replayed access tuple is user:bob@example.com. This user is a principal of the group group:product-eng@example.com.

    For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED.

    For the second principal in the binding, the key is group:product-eng@example.com, and the membership field in the value is set to MEMBERSHIP_INCLUDED.

map<string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameters
NameDescription
keyString
defaultValueBindingExplanation.AnnotatedMembership
Returns
TypeDescription
BindingExplanation.AnnotatedMembership

getMembershipsOrThrow(String key)

public BindingExplanation.AnnotatedMembership getMembershipsOrThrow(String key)

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.

For example, suppose that a binding includes the following principals:

  • user:alice@example.com
  • group:product-eng@example.com

    The principal in the replayed access tuple is user:bob@example.com. This user is a principal of the group group:product-eng@example.com.

    For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED.

    For the second principal in the binding, the key is group:product-eng@example.com, and the membership field in the value is set to MEMBERSHIP_INCLUDED.

map<string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
BindingExplanation.AnnotatedMembership

getParserForType()

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

getRelevance()

public HeuristicRelevance getRelevance()

The relevance of this binding to the overall determination for the entire policy.

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

Returns
TypeDescription
HeuristicRelevance

The relevance.

getRelevanceValue()

public int getRelevanceValue()

The relevance of this binding to the overall determination for the entire policy.

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

Returns
TypeDescription
int

The enum numeric value on the wire for relevance.

getRole()

public String getRole()

The role that this binding grants. For example, roles/compute.serviceAgent.

For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.

string role = 2;

Returns
TypeDescription
String

The role.

getRoleBytes()

public ByteString getRoleBytes()

The role that this binding grants. For example, roles/compute.serviceAgent.

For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.

string role = 2;

Returns
TypeDescription
ByteString

The bytes for role.

getRolePermission()

public BindingExplanation.RolePermission getRolePermission()

Indicates whether the role granted by this binding contains the specified permission.

.google.cloud.policysimulator.v1.BindingExplanation.RolePermission role_permission = 3;

Returns
TypeDescription
BindingExplanation.RolePermission

The rolePermission.

getRolePermissionRelevance()

public HeuristicRelevance getRolePermissionRelevance()

The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.

.google.cloud.policysimulator.v1.HeuristicRelevance role_permission_relevance = 4;

Returns
TypeDescription
HeuristicRelevance

The rolePermissionRelevance.

getRolePermissionRelevanceValue()

public int getRolePermissionRelevanceValue()

The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.

.google.cloud.policysimulator.v1.HeuristicRelevance role_permission_relevance = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for rolePermissionRelevance.

getRolePermissionValue()

public int getRolePermissionValue()

Indicates whether the role granted by this binding contains the specified permission.

.google.cloud.policysimulator.v1.BindingExplanation.RolePermission role_permission = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for rolePermission.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasCondition()

public boolean hasCondition()

A condition expression that prevents this binding from granting access unless the expression evaluates to true.

To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
boolean

Whether the condition field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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