# IAM Policy Troubleshooter V1 API - Class Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation (v1.7.0)

1.7.0 (latest) 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.11.0 0.10.2 0.9.0 0.8.1 0.7.1 0.6.0 0.5.0 0.4.0 0.3.5 Reference documentation and code samples for the IAM Policy Troubleshooter V1 API class Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #access

    def access() -> ::Google::Cloud::PolicyTroubleshooter::V1::AccessState

**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-AccessState)) --- 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\]\[IamChecker.TroubleshootIamPolicyResponse\].

### #access=

    def access=(value) -> ::Google::Cloud::PolicyTroubleshooter::V1::AccessState

**Parameter**

- **value** ([::Google::Cloud::PolicyTroubleshooter::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-AccessState)) --- 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\]\[IamChecker.TroubleshootIamPolicyResponse\].
**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-AccessState)) --- 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\]\[IamChecker.TroubleshootIamPolicyResponse\].

### #condition

    def condition() -> ::Google::Type::Expr

**Returns**

- ([::Google::Type::Expr](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Type-Expr)) --- 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.

### #condition=

    def condition=(value) -> ::Google::Type::Expr

**Parameter**

- **value** ([::Google::Type::Expr](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Type-Expr)) --- 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.
**Returns**

- ([::Google::Type::Expr](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Type-Expr)) --- 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.

### #memberships

    def memberships() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::AnnotatedMembership}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::AnnotatedMembership}) --- 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`.

### #memberships=

    def memberships=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::AnnotatedMembership}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::AnnotatedMembership}) --- 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`.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::AnnotatedMembership}) --- 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`.

### #relevance

    def relevance() -> ::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance

**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of this binding to the overall determination for the entire policy.

### #relevance=

    def relevance=(value) -> ::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance

**Parameter**

- **value** ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of this binding to the overall determination for the entire policy.
**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of this binding to the overall determination for the entire policy.

### #role

    def role() -> ::String

**Returns**

- (::String) --- 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.

### #role=

    def role=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.

### #role_permission

    def role_permission() -> ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::RolePermission

**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::RolePermission](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-BindingExplanation-RolePermission)) --- Indicates whether the role granted by this binding contains the specified permission.

### #role_permission=

    def role_permission=(value) -> ::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::RolePermission

**Parameter**

- **value** ([::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::RolePermission](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-BindingExplanation-RolePermission)) --- Indicates whether the role granted by this binding contains the specified permission.
**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::BindingExplanation::RolePermission](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-BindingExplanation-RolePermission)) --- Indicates whether the role granted by this binding contains the specified permission.

### #role_permission_relevance

    def role_permission_relevance() -> ::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance

**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.

### #role_permission_relevance=

    def role_permission_relevance=(value) -> ::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance

**Parameter**

- **value** ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.
**Returns**

- ([::Google::Cloud::PolicyTroubleshooter::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-v1/latest/Google-Cloud-PolicyTroubleshooter-V1-HeuristicRelevance)) --- The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.