Class AllowPolicyExplanation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder>
com.google.cloud.policytroubleshooter.iam.v3.AllowPolicyExplanation.Builder
All Implemented Interfaces:
AllowPolicyExplanationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AllowPolicyExplanation

public static final class AllowPolicyExplanation.Builder extends com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder> implements AllowPolicyExplanationOrBuilder
 Details about how the relevant IAM allow policies affect the final access
 state.
 
Protobuf type google.cloud.policytroubleshooter.iam.v3.AllowPolicyExplanation
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder>
    • getDefaultInstanceForType

      public AllowPolicyExplanation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public AllowPolicyExplanation build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AllowPolicyExplanation buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AllowPolicyExplanation.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AllowPolicyExplanation.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AllowPolicyExplanation.Builder>
    • mergeFrom

      public AllowPolicyExplanation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AllowPolicyExplanation.Builder>
      Throws:
      IOException
    • getAllowAccessStateValue

      public int getAllowAccessStateValue()
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all applicable IAM allow policies.
       
      .google.cloud.policytroubleshooter.iam.v3.AllowAccessState allow_access_state = 1;
      Specified by:
      getAllowAccessStateValue in interface AllowPolicyExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for allowAccessState.
    • setAllowAccessStateValue

      public AllowPolicyExplanation.Builder setAllowAccessStateValue(int value)
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all applicable IAM allow policies.
       
      .google.cloud.policytroubleshooter.iam.v3.AllowAccessState allow_access_state = 1;
      Parameters:
      value - The enum numeric value on the wire for allowAccessState to set.
      Returns:
      This builder for chaining.
    • getAllowAccessState

      public AllowAccessState getAllowAccessState()
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all applicable IAM allow policies.
       
      .google.cloud.policytroubleshooter.iam.v3.AllowAccessState allow_access_state = 1;
      Specified by:
      getAllowAccessState in interface AllowPolicyExplanationOrBuilder
      Returns:
      The allowAccessState.
    • setAllowAccessState

      public AllowPolicyExplanation.Builder setAllowAccessState(AllowAccessState value)
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all applicable IAM allow policies.
       
      .google.cloud.policytroubleshooter.iam.v3.AllowAccessState allow_access_state = 1;
      Parameters:
      value - The allowAccessState to set.
      Returns:
      This builder for chaining.
    • clearAllowAccessState

      public AllowPolicyExplanation.Builder clearAllowAccessState()
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all applicable IAM allow policies.
       
      .google.cloud.policytroubleshooter.iam.v3.AllowAccessState allow_access_state = 1;
      Returns:
      This builder for chaining.
    • getExplainedPoliciesList

      public List<ExplainedAllowPolicy> getExplainedPoliciesList()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesList in interface AllowPolicyExplanationOrBuilder
    • getExplainedPoliciesCount

      public int getExplainedPoliciesCount()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesCount in interface AllowPolicyExplanationOrBuilder
    • getExplainedPolicies

      public ExplainedAllowPolicy getExplainedPolicies(int index)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
      Specified by:
      getExplainedPolicies in interface AllowPolicyExplanationOrBuilder
    • setExplainedPolicies

      public AllowPolicyExplanation.Builder setExplainedPolicies(int index, ExplainedAllowPolicy value)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • setExplainedPolicies

      public AllowPolicyExplanation.Builder setExplainedPolicies(int index, ExplainedAllowPolicy.Builder builderForValue)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addExplainedPolicies

      public AllowPolicyExplanation.Builder addExplainedPolicies(ExplainedAllowPolicy value)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addExplainedPolicies

      public AllowPolicyExplanation.Builder addExplainedPolicies(int index, ExplainedAllowPolicy value)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addExplainedPolicies

      public AllowPolicyExplanation.Builder addExplainedPolicies(ExplainedAllowPolicy.Builder builderForValue)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addExplainedPolicies

      public AllowPolicyExplanation.Builder addExplainedPolicies(int index, ExplainedAllowPolicy.Builder builderForValue)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addAllExplainedPolicies

      public AllowPolicyExplanation.Builder addAllExplainedPolicies(Iterable<? extends ExplainedAllowPolicy> values)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • clearExplainedPolicies

      public AllowPolicyExplanation.Builder clearExplainedPolicies()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • removeExplainedPolicies

      public AllowPolicyExplanation.Builder removeExplainedPolicies(int index)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • getExplainedPoliciesBuilder

      public ExplainedAllowPolicy.Builder getExplainedPoliciesBuilder(int index)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • getExplainedPoliciesOrBuilder

      public ExplainedAllowPolicyOrBuilder getExplainedPoliciesOrBuilder(int index)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesOrBuilder in interface AllowPolicyExplanationOrBuilder
    • getExplainedPoliciesOrBuilderList

      public List<? extends ExplainedAllowPolicyOrBuilder> getExplainedPoliciesOrBuilderList()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesOrBuilderList in interface AllowPolicyExplanationOrBuilder
    • addExplainedPoliciesBuilder

      public ExplainedAllowPolicy.Builder addExplainedPoliciesBuilder()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • addExplainedPoliciesBuilder

      public ExplainedAllowPolicy.Builder addExplainedPoliciesBuilder(int index)
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • getExplainedPoliciesBuilderList

      public List<ExplainedAllowPolicy.Builder> getExplainedPoliciesBuilderList()
       List of IAM allow policies that were evaluated to check the principal's
       permissions, with annotations to indicate how each policy contributed to
       the final result.
      
       The list of policies includes the policy for the resource itself, as well
       as allow policies that are inherited from higher levels of the resource
       hierarchy, including the organization, the folder, and the project.
      
       To learn more about the resource hierarchy, see
       https://cloud.google.com/iam/help/resource-hierarchy.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.ExplainedAllowPolicy explained_policies = 2;
    • getRelevanceValue

      public int getRelevanceValue()
       The relevance of the allow policy type to the overall access state.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 3;
      Specified by:
      getRelevanceValue in interface AllowPolicyExplanationOrBuilder
      Returns:
      The enum numeric value on the wire for relevance.
    • setRelevanceValue

      public AllowPolicyExplanation.Builder setRelevanceValue(int value)
       The relevance of the allow policy type to the overall access state.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 3;
      Parameters:
      value - The enum numeric value on the wire for relevance to set.
      Returns:
      This builder for chaining.
    • getRelevance

      public HeuristicRelevance getRelevance()
       The relevance of the allow policy type to the overall access state.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 3;
      Specified by:
      getRelevance in interface AllowPolicyExplanationOrBuilder
      Returns:
      The relevance.
    • setRelevance

       The relevance of the allow policy type to the overall access state.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 3;
      Parameters:
      value - The relevance to set.
      Returns:
      This builder for chaining.
    • clearRelevance

      public AllowPolicyExplanation.Builder clearRelevance()
       The relevance of the allow policy type to the overall access state.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 3;
      Returns:
      This builder for chaining.