NAME

Google::Cloud::Policytroubleshooter::V1::Explanations - Compiled Protocol Buffers messages for google/cloud/policytroubleshooter/v1/explanations.proto

SYNOPSIS

use Google::Cloud::Policytroubleshooter::V1::Explanations;

my $msg = Google::Cloud::Policytroubleshooter::V1::Explanations::AccessTuple->new({
    principal => $principal,
    full_resource_name => $full_resource_name,
    permission => $permission,
});

# Read or update a field
my $val = $msg->principal();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Policytroubleshooter::V1::Explanations::AccessTuple->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/policytroubleshooter/v1/explanations.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Policytroubleshooter::V1::Explanations::AccessTuple

Information about the principal, resource, and permission to check.

Inherits from Protobuf::Message.

Accessors

  • $msg->principal() / $msg->principal($value)

    Type: String

    Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`.

    The principal must be a Google Account or a service account. Other types of principals are not supported.

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.

    For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.

  • $msg->permission() / $msg->permission($value)

    Type: String

    Required. The IAM permission to check for the specified principal and resource.

    For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference.

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

Google::Cloud::Policytroubleshooter::V1::Explanations::ExplainedPolicy

Details about how a specific IAM [Policy][google.iam.v1.Policy] contributed to the access check.

Inherits from Protobuf::Message.

Accessors

  • $msg->access() / $msg->access($value)

    Type: Enum (Google::Cloud::Policytroubleshooter::V1::AccessState)

    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][IamChecker.TroubleshootIamPolicyResponse].

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    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 sender of the request 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.

  • $msg->policy() / $msg->policy($value)

    Type: Message (Google::Iam::V1::Policy::Policy)

    The IAM policy attached to the resource.

    If the sender of the request does not have access to the policy, this field is empty.

  • $msg->binding_explanations() / $msg->binding_explanations($value)

    Type: Message (Google::Cloud::Policytroubleshooter::V1::Explanations::BindingExplanation)

    Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.

    If the sender of the request does not have access to the policy, this field is omitted.

  • $msg->relevance() / $msg->relevance($value)

    Type: Enum (Google::Cloud::Policytroubleshooter::V1::HeuristicRelevance)

    The relevance of this policy to the overall determination in the [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse].

    If the sender of the request does not have access to the policy, this field is omitted.

Google::Cloud::Policytroubleshooter::V1::Explanations::BindingExplanation

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

Inherits from Protobuf::Message.

Accessors

  • $msg->access() / $msg->access($value)

    Type: Enum (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].

  • $msg->role() / $msg->role($value)

    Type: 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.

  • $msg->role_permission() / $msg->role_permission($value)

    Type: Enum (Google::Cloud::Policytroubleshooter::V1::BindingExplanation::RolePermission)

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

  • $msg->role_permission_relevance() / $msg->role_permission_relevance($value)

    Type: Enum (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.

  • $msg->memberships() / $msg->memberships($value)

    Type: Message (Google::Cloud::Policytroubleshooter::V1::Explanations::BindingExplanation::MembershipsEntry)

    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`.

  • $msg->relevance() / $msg->relevance($value)

    Type: Enum (Google::Cloud::Policytroubleshooter::V1::HeuristicRelevance)

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

  • $msg->condition() / $msg->condition($value)

    Type: Message (Google::Type::Expr::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.

Enum: BindingExplanation::RolePermission

  • ROLE_PERMISSION_UNSPECIFIED => 0

  • ROLE_PERMISSION_INCLUDED => 1

  • ROLE_PERMISSION_NOT_INCLUDED => 2

  • ROLE_PERMISSION_UNKNOWN_INFO_DENIED => 3

Enum: BindingExplanation::Membership

  • MEMBERSHIP_UNSPECIFIED => 0

  • MEMBERSHIP_INCLUDED => 1

  • MEMBERSHIP_NOT_INCLUDED => 2

  • MEMBERSHIP_UNKNOWN_INFO_DENIED => 3

  • MEMBERSHIP_UNKNOWN_UNSUPPORTED => 4

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Policytroubleshooter::V1::Explanations::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.