Class BindingExplanation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.policysimulator.v1.BindingExplanation
All Implemented Interfaces:
BindingExplanationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class BindingExplanation extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • ACCESS_FIELD_NUMBER

      public static final int ACCESS_FIELD_NUMBER
      See Also:
    • ROLE_FIELD_NUMBER

      public static final int ROLE_FIELD_NUMBER
      See Also:
    • ROLE_PERMISSION_FIELD_NUMBER

      public static final int ROLE_PERMISSION_FIELD_NUMBER
      See Also:
    • ROLE_PERMISSION_RELEVANCE_FIELD_NUMBER

      public static final int ROLE_PERMISSION_RELEVANCE_FIELD_NUMBER
      See Also:
    • MEMBERSHIPS_FIELD_NUMBER

      public static final int MEMBERSHIPS_FIELD_NUMBER
      See Also:
    • RELEVANCE_FIELD_NUMBER

      public static final int RELEVANCE_FIELD_NUMBER
      See Also:
    • CONDITION_FIELD_NUMBER

      public static final int CONDITION_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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.policytroubleshooter.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAccessValue in interface BindingExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for access.
    • 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.policytroubleshooter.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAccess in interface BindingExplanationOrBuilder
      Returns:
      The access.
    • 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;
      Specified by:
      getRole in interface BindingExplanationOrBuilder
      Returns:
      The role.
    • getRoleBytes

      public com.google.protobuf.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;
      Specified by:
      getRoleBytes in interface BindingExplanationOrBuilder
      Returns:
      The bytes for role.
    • 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;
      Specified by:
      getRolePermissionValue in interface BindingExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for rolePermission.
    • 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;
      Specified by:
      getRolePermission in interface BindingExplanationOrBuilder
      Returns:
      The rolePermission.
    • 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;
      Specified by:
      getRolePermissionRelevanceValue in interface BindingExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for rolePermissionRelevance.
    • 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;
      Specified by:
      getRolePermissionRelevance in interface BindingExplanationOrBuilder
      Returns:
      The rolePermissionRelevance.
    • getMembershipsCount

      public int getMembershipsCount()
      Description copied from interface: BindingExplanationOrBuilder
       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;
      Specified by:
      getMembershipsCount in interface BindingExplanationOrBuilder
    • containsMemberships

      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;
      Specified by:
      containsMemberships in interface BindingExplanationOrBuilder
    • getMemberships

      Deprecated.
      Use getMembershipsMap() instead.
      Specified by:
      getMemberships in interface BindingExplanationOrBuilder
    • 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;
      Specified by:
      getMembershipsMap in interface BindingExplanationOrBuilder
    • getMembershipsOrDefault

      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;
      Specified by:
      getMembershipsOrDefault in interface BindingExplanationOrBuilder
    • getMembershipsOrThrow

      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;
      Specified by:
      getMembershipsOrThrow in interface BindingExplanationOrBuilder
    • getRelevanceValue

      public int getRelevanceValue()
       The relevance of this binding to the overall determination for the entire
       policy.
       
      .google.cloud.policysimulator.v1.HeuristicRelevance relevance = 6;
      Specified by:
      getRelevanceValue in interface BindingExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for relevance.
    • getRelevance

      public HeuristicRelevance getRelevance()
       The relevance of this binding to the overall determination for the entire
       policy.
       
      .google.cloud.policysimulator.v1.HeuristicRelevance relevance = 6;
      Specified by:
      getRelevance in interface BindingExplanationOrBuilder
      Returns:
      The relevance.
    • 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;
      Specified by:
      hasCondition in interface BindingExplanationOrBuilder
      Returns:
      Whether the condition field is set.
    • 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;
      Specified by:
      getCondition in interface BindingExplanationOrBuilder
      Returns:
      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;
      Specified by:
      getConditionOrBuilder in interface BindingExplanationOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static BindingExplanation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BindingExplanation parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BindingExplanation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BindingExplanation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BindingExplanation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BindingExplanation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BindingExplanation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public BindingExplanation.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static BindingExplanation.Builder newBuilder()
    • newBuilder

      public static BindingExplanation.Builder newBuilder(BindingExplanation prototype)
    • toBuilder

      public BindingExplanation.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected BindingExplanation.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static BindingExplanation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<BindingExplanation> parser()
    • getParserForType

      public com.google.protobuf.Parser<BindingExplanation> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public BindingExplanation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder