Class ExplainedDenyPolicy.Builder

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

public static final class ExplainedDenyPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<ExplainedDenyPolicy.Builder> implements ExplainedDenyPolicyOrBuilder
 Details about how a specific IAM deny policy [Policy][google.iam.v2.Policy]
 contributed to the access check.
 
Protobuf type google.cloud.policytroubleshooter.iam.v3.ExplainedDenyPolicy
  • 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<ExplainedDenyPolicy.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<ExplainedDenyPolicy.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<ExplainedDenyPolicy.Builder>
    • getDefaultInstanceForType

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

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

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

      public ExplainedDenyPolicy.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<ExplainedDenyPolicy.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<ExplainedDenyPolicy.Builder>
    • mergeFrom

      public ExplainedDenyPolicy.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<ExplainedDenyPolicy.Builder>
      Throws:
      IOException
    • getDenyAccessStateValue

      public int getDenyAccessStateValue()
       Required. Indicates whether _this policy_ denies 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 `overall_access_state` field in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policytroubleshooter.iam.v3.DenyAccessState deny_access_state = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDenyAccessStateValue in interface ExplainedDenyPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for denyAccessState.
    • setDenyAccessStateValue

      public ExplainedDenyPolicy.Builder setDenyAccessStateValue(int value)
       Required. Indicates whether _this policy_ denies 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 `overall_access_state` field in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policytroubleshooter.iam.v3.DenyAccessState deny_access_state = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for denyAccessState to set.
      Returns:
      This builder for chaining.
    • getDenyAccessState

      public DenyAccessState getDenyAccessState()
       Required. Indicates whether _this policy_ denies 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 `overall_access_state` field in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policytroubleshooter.iam.v3.DenyAccessState deny_access_state = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDenyAccessState in interface ExplainedDenyPolicyOrBuilder
      Returns:
      The denyAccessState.
    • setDenyAccessState

      public ExplainedDenyPolicy.Builder setDenyAccessState(DenyAccessState value)
       Required. Indicates whether _this policy_ denies 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 `overall_access_state` field in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policytroubleshooter.iam.v3.DenyAccessState deny_access_state = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The denyAccessState to set.
      Returns:
      This builder for chaining.
    • clearDenyAccessState

      public ExplainedDenyPolicy.Builder clearDenyAccessState()
       Required. Indicates whether _this policy_ denies 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 `overall_access_state` field in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
       
      .google.cloud.policytroubleshooter.iam.v3.DenyAccessState deny_access_state = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • hasPolicy

      public boolean hasPolicy()
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
      Specified by:
      hasPolicy in interface ExplainedDenyPolicyOrBuilder
      Returns:
      Whether the policy field is set.
    • getPolicy

      public Policy getPolicy()
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
      Specified by:
      getPolicy in interface ExplainedDenyPolicyOrBuilder
      Returns:
      The policy.
    • setPolicy

      public ExplainedDenyPolicy.Builder setPolicy(Policy value)
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
    • setPolicy

      public ExplainedDenyPolicy.Builder setPolicy(Policy.Builder builderForValue)
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
    • mergePolicy

      public ExplainedDenyPolicy.Builder mergePolicy(Policy value)
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
    • clearPolicy

      public ExplainedDenyPolicy.Builder clearPolicy()
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
    • getPolicyBuilder

      public Policy.Builder getPolicyBuilder()
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
    • getPolicyOrBuilder

      public PolicyOrBuilder getPolicyOrBuilder()
       The IAM deny policy attached to the resource.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.iam.v2.Policy policy = 2;
      Specified by:
      getPolicyOrBuilder in interface ExplainedDenyPolicyOrBuilder
    • getRuleExplanationsList

      public List<DenyRuleExplanation> getRuleExplanationsList()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
      Specified by:
      getRuleExplanationsList in interface ExplainedDenyPolicyOrBuilder
    • getRuleExplanationsCount

      public int getRuleExplanationsCount()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
      Specified by:
      getRuleExplanationsCount in interface ExplainedDenyPolicyOrBuilder
    • getRuleExplanations

      public DenyRuleExplanation getRuleExplanations(int index)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
      Specified by:
      getRuleExplanations in interface ExplainedDenyPolicyOrBuilder
    • setRuleExplanations

      public ExplainedDenyPolicy.Builder setRuleExplanations(int index, DenyRuleExplanation value)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • setRuleExplanations

      public ExplainedDenyPolicy.Builder setRuleExplanations(int index, DenyRuleExplanation.Builder builderForValue)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addRuleExplanations

      public ExplainedDenyPolicy.Builder addRuleExplanations(DenyRuleExplanation value)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addRuleExplanations

      public ExplainedDenyPolicy.Builder addRuleExplanations(int index, DenyRuleExplanation value)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addRuleExplanations

      public ExplainedDenyPolicy.Builder addRuleExplanations(DenyRuleExplanation.Builder builderForValue)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addRuleExplanations

      public ExplainedDenyPolicy.Builder addRuleExplanations(int index, DenyRuleExplanation.Builder builderForValue)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addAllRuleExplanations

      public ExplainedDenyPolicy.Builder addAllRuleExplanations(Iterable<? extends DenyRuleExplanation> values)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • clearRuleExplanations

      public ExplainedDenyPolicy.Builder clearRuleExplanations()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • removeRuleExplanations

      public ExplainedDenyPolicy.Builder removeRuleExplanations(int index)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • getRuleExplanationsBuilder

      public DenyRuleExplanation.Builder getRuleExplanationsBuilder(int index)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • getRuleExplanationsOrBuilder

      public DenyRuleExplanationOrBuilder getRuleExplanationsOrBuilder(int index)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
      Specified by:
      getRuleExplanationsOrBuilder in interface ExplainedDenyPolicyOrBuilder
    • getRuleExplanationsOrBuilderList

      public List<? extends DenyRuleExplanationOrBuilder> getRuleExplanationsOrBuilderList()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
      Specified by:
      getRuleExplanationsOrBuilderList in interface ExplainedDenyPolicyOrBuilder
    • addRuleExplanationsBuilder

      public DenyRuleExplanation.Builder addRuleExplanationsBuilder()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • addRuleExplanationsBuilder

      public DenyRuleExplanation.Builder addRuleExplanationsBuilder(int index)
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • getRuleExplanationsBuilderList

      public List<DenyRuleExplanation.Builder> getRuleExplanationsBuilderList()
       Details about how each rule in the policy affects the principal's inability
       to use the permission for the resource. The order of the deny rule matches
       the order of the rules in the deny policy.
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      repeated .google.cloud.policytroubleshooter.iam.v3.DenyRuleExplanation rule_explanations = 3;
    • getRelevanceValue

      public int getRelevanceValue()
       The relevance of this policy to the overall access state in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 4;
      Specified by:
      getRelevanceValue in interface ExplainedDenyPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for relevance.
    • setRelevanceValue

      public ExplainedDenyPolicy.Builder setRelevanceValue(int value)
       The relevance of this policy to the overall access state in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 4;
      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 this policy to the overall access state in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 4;
      Specified by:
      getRelevance in interface ExplainedDenyPolicyOrBuilder
      Returns:
      The relevance.
    • setRelevance

      public ExplainedDenyPolicy.Builder setRelevance(HeuristicRelevance value)
       The relevance of this policy to the overall access state in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 4;
      Parameters:
      value - The relevance to set.
      Returns:
      This builder for chaining.
    • clearRelevance

      public ExplainedDenyPolicy.Builder clearRelevance()
       The relevance of this policy to the overall access state in the
       [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].
      
       If the sender of the request does not have access to the policy, this field
       is omitted.
       
      .google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance relevance = 4;
      Returns:
      This builder for chaining.