/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/policysimulator/v1/explanations.proto

package com.google.cloud.policysimulator.v1;

public interface BindingExplanationOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.policysimulator.v1.BindingExplanation)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   * <pre>
   * 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].
   * </pre>
   *
   * <code>
   * .google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The enum numeric value on the wire for access.
   */
  int getAccessValue();
  /**
   *
   *
   * <pre>
   * 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].
   * </pre>
   *
   * <code>
   * .google.cloud.policysimulator.v1.AccessState access = 1 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The access.
   */
  com.google.cloud.policysimulator.v1.AccessState getAccess();

  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>string role = 2;</code>
   *
   * @return The role.
   */
  java.lang.String getRole();
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>string role = 2;</code>
   *
   * @return The bytes for role.
   */
  com.google.protobuf.ByteString getRoleBytes();

  /**
   *
   *
   * <pre>
   * Indicates whether the role granted by this binding contains the specified
   * permission.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.BindingExplanation.RolePermission role_permission = 3;
   * </code>
   *
   * @return The enum numeric value on the wire for rolePermission.
   */
  int getRolePermissionValue();
  /**
   *
   *
   * <pre>
   * Indicates whether the role granted by this binding contains the specified
   * permission.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.BindingExplanation.RolePermission role_permission = 3;
   * </code>
   *
   * @return The rolePermission.
   */
  com.google.cloud.policysimulator.v1.BindingExplanation.RolePermission getRolePermission();

  /**
   *
   *
   * <pre>
   * The relevance of the permission's existence, or nonexistence, in the role
   * to the overall determination for the entire policy.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.HeuristicRelevance role_permission_relevance = 4;</code>
   *
   * @return The enum numeric value on the wire for rolePermissionRelevance.
   */
  int getRolePermissionRelevanceValue();
  /**
   *
   *
   * <pre>
   * The relevance of the permission's existence, or nonexistence, in the role
   * to the overall determination for the entire policy.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.HeuristicRelevance role_permission_relevance = 4;</code>
   *
   * @return The rolePermissionRelevance.
   */
  com.google.cloud.policysimulator.v1.HeuristicRelevance getRolePermissionRelevance();

  /**
   *
   *
   * <pre>
   * 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&#64;example.com`
   * * `group:product-eng&#64;example.com`
   *
   * The principal in the replayed access tuple is `user:bob&#64;example.com`. This
   * user is a principal of the group `group:product-eng&#64;example.com`.
   *
   * For the first principal in the binding, the key is
   * `user:alice&#64;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&#64;example.com`, and the `membership` field in the value is
   * set to `MEMBERSHIP_INCLUDED`.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership&gt; memberships = 5;
   * </code>
   */
  int getMembershipsCount();
  /**
   *
   *
   * <pre>
   * 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&#64;example.com`
   * * `group:product-eng&#64;example.com`
   *
   * The principal in the replayed access tuple is `user:bob&#64;example.com`. This
   * user is a principal of the group `group:product-eng&#64;example.com`.
   *
   * For the first principal in the binding, the key is
   * `user:alice&#64;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&#64;example.com`, and the `membership` field in the value is
   * set to `MEMBERSHIP_INCLUDED`.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership&gt; memberships = 5;
   * </code>
   */
  boolean containsMemberships(java.lang.String key);
  /** Use {@link #getMembershipsMap()} instead. */
  @java.lang.Deprecated
  java.util.Map<
          java.lang.String,
          com.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership>
      getMemberships();
  /**
   *
   *
   * <pre>
   * 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&#64;example.com`
   * * `group:product-eng&#64;example.com`
   *
   * The principal in the replayed access tuple is `user:bob&#64;example.com`. This
   * user is a principal of the group `group:product-eng&#64;example.com`.
   *
   * For the first principal in the binding, the key is
   * `user:alice&#64;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&#64;example.com`, and the `membership` field in the value is
   * set to `MEMBERSHIP_INCLUDED`.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership&gt; memberships = 5;
   * </code>
   */
  java.util.Map<
          java.lang.String,
          com.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership>
      getMembershipsMap();
  /**
   *
   *
   * <pre>
   * 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&#64;example.com`
   * * `group:product-eng&#64;example.com`
   *
   * The principal in the replayed access tuple is `user:bob&#64;example.com`. This
   * user is a principal of the group `group:product-eng&#64;example.com`.
   *
   * For the first principal in the binding, the key is
   * `user:alice&#64;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&#64;example.com`, and the `membership` field in the value is
   * set to `MEMBERSHIP_INCLUDED`.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership&gt; memberships = 5;
   * </code>
   */
  /* nullable */
  com.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership
      getMembershipsOrDefault(
          java.lang.String key,
          /* nullable */
          com.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership defaultValue);
  /**
   *
   *
   * <pre>
   * 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&#64;example.com`
   * * `group:product-eng&#64;example.com`
   *
   * The principal in the replayed access tuple is `user:bob&#64;example.com`. This
   * user is a principal of the group `group:product-eng&#64;example.com`.
   *
   * For the first principal in the binding, the key is
   * `user:alice&#64;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&#64;example.com`, and the `membership` field in the value is
   * set to `MEMBERSHIP_INCLUDED`.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership&gt; memberships = 5;
   * </code>
   */
  com.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership getMembershipsOrThrow(
      java.lang.String key);

  /**
   *
   *
   * <pre>
   * The relevance of this binding to the overall determination for the entire
   * policy.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 6;</code>
   *
   * @return The enum numeric value on the wire for relevance.
   */
  int getRelevanceValue();
  /**
   *
   *
   * <pre>
   * The relevance of this binding to the overall determination for the entire
   * policy.
   * </pre>
   *
   * <code>.google.cloud.policysimulator.v1.HeuristicRelevance relevance = 6;</code>
   *
   * @return The relevance.
   */
  com.google.cloud.policysimulator.v1.HeuristicRelevance getRelevance();

  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>.google.type.Expr condition = 7;</code>
   *
   * @return Whether the condition field is set.
   */
  boolean hasCondition();
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>.google.type.Expr condition = 7;</code>
   *
   * @return The condition.
   */
  com.google.type.Expr getCondition();
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>.google.type.Expr condition = 7;</code>
   */
  com.google.type.ExprOrBuilder getConditionOrBuilder();
}
