Interface Explanations.BindingExplanationOrBuilder (1.26.0)

public static interface Explanations.BindingExplanationOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsMemberships(String key)

public abstract 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

    You want to troubleshoot access for 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.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAccess()

public abstract Explanations.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.policytroubleshooter.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Explanations.AccessState

The access.

getAccessValue()

public abstract 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.policytroubleshooter.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for access.

getCondition()

public abstract 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/help/conditions/overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
com.google.type.Expr

The condition.

getConditionOrBuilder()

public abstract 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/help/conditions/overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
com.google.type.ExprOrBuilder

getMemberships()

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

Use #getMembershipsMap() instead.

Returns
TypeDescription
Map<String,AnnotatedMembership>

getMembershipsCount()

public abstract 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

    You want to troubleshoot access for 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.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Returns
TypeDescription
int

getMembershipsMap()

public abstract Map<String,Explanations.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

    You want to troubleshoot access for 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.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Returns
TypeDescription
Map<String,AnnotatedMembership>

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

public abstract Explanations.BindingExplanation.AnnotatedMembership getMembershipsOrDefault(String key, Explanations.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

    You want to troubleshoot access for 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.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameters
NameDescription
keyString
defaultValueExplanations.BindingExplanation.AnnotatedMembership
Returns
TypeDescription
Explanations.BindingExplanation.AnnotatedMembership

getMembershipsOrThrow(String key)

public abstract Explanations.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

    You want to troubleshoot access for 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.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership> memberships = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
Explanations.BindingExplanation.AnnotatedMembership

getRelevance()

public abstract Explanations.HeuristicRelevance getRelevance()

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

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

Returns
TypeDescription
Explanations.HeuristicRelevance

The relevance.

getRelevanceValue()

public abstract int getRelevanceValue()

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

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

Returns
TypeDescription
int

The enum numeric value on the wire for relevance.

getRole()

public abstract 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 abstract 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 abstract Explanations.BindingExplanation.RolePermission getRolePermission()

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

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

Returns
TypeDescription
Explanations.BindingExplanation.RolePermission

The rolePermission.

getRolePermissionRelevance()

public abstract Explanations.HeuristicRelevance getRolePermissionRelevance()

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

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

Returns
TypeDescription
Explanations.HeuristicRelevance

The rolePermissionRelevance.

getRolePermissionRelevanceValue()

public abstract int getRolePermissionRelevanceValue()

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

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

Returns
TypeDescription
int

The enum numeric value on the wire for rolePermissionRelevance.

getRolePermissionValue()

public abstract int getRolePermissionValue()

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

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

Returns
TypeDescription
int

The enum numeric value on the wire for rolePermission.

hasCondition()

public abstract 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/help/conditions/overview.

.google.type.Expr condition = 7;

Returns
TypeDescription
boolean

Whether the condition field is set.