Class TroubleshootIamPolicyResponse.Builder

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

public static final class TroubleshootIamPolicyResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<TroubleshootIamPolicyResponse.Builder> implements TroubleshootIamPolicyResponseOrBuilder
 Response for
 [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy].
 
Protobuf type google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse
  • 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<TroubleshootIamPolicyResponse.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<TroubleshootIamPolicyResponse.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<TroubleshootIamPolicyResponse.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public TroubleshootIamPolicyResponse.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<TroubleshootIamPolicyResponse.Builder>
      Throws:
      IOException
    • getAccessValue

      public int getAccessValue()
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all of the applicable IAM policies.
       
      .google.cloud.policytroubleshooter.v1.AccessState access = 1;
      Specified by:
      getAccessValue in interface TroubleshootIamPolicyResponseOrBuilder
      Returns:
      The enum numeric value on the wire for access.
    • setAccessValue

      public TroubleshootIamPolicyResponse.Builder setAccessValue(int value)
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all of the applicable IAM policies.
       
      .google.cloud.policytroubleshooter.v1.AccessState access = 1;
      Parameters:
      value - The enum numeric value on the wire for access to set.
      Returns:
      This builder for chaining.
    • getAccess

      public Explanations.AccessState getAccess()
       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all of the applicable IAM policies.
       
      .google.cloud.policytroubleshooter.v1.AccessState access = 1;
      Specified by:
      getAccess in interface TroubleshootIamPolicyResponseOrBuilder
      Returns:
      The access.
    • setAccess

       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all of the applicable IAM policies.
       
      .google.cloud.policytroubleshooter.v1.AccessState access = 1;
      Parameters:
      value - The access to set.
      Returns:
      This builder for chaining.
    • clearAccess

       Indicates whether the principal has the specified permission for the
       specified resource, based on evaluating all of the applicable IAM policies.
       
      .google.cloud.policytroubleshooter.v1.AccessState access = 1;
      Returns:
      This builder for chaining.
    • getExplainedPoliciesList

      public List<Explanations.ExplainedPolicy> getExplainedPoliciesList()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesList in interface TroubleshootIamPolicyResponseOrBuilder
    • getExplainedPoliciesCount

      public int getExplainedPoliciesCount()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesCount in interface TroubleshootIamPolicyResponseOrBuilder
    • getExplainedPolicies

      public Explanations.ExplainedPolicy getExplainedPolicies(int index)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
      Specified by:
      getExplainedPolicies in interface TroubleshootIamPolicyResponseOrBuilder
    • setExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder setExplainedPolicies(int index, Explanations.ExplainedPolicy value)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • setExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder setExplainedPolicies(int index, Explanations.ExplainedPolicy.Builder builderForValue)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addExplainedPolicies

       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder addExplainedPolicies(int index, Explanations.ExplainedPolicy value)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder addExplainedPolicies(Explanations.ExplainedPolicy.Builder builderForValue)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder addExplainedPolicies(int index, Explanations.ExplainedPolicy.Builder builderForValue)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addAllExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder addAllExplainedPolicies(Iterable<? extends Explanations.ExplainedPolicy> values)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • clearExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder clearExplainedPolicies()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • removeExplainedPolicies

      public TroubleshootIamPolicyResponse.Builder removeExplainedPolicies(int index)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • getExplainedPoliciesBuilder

      public Explanations.ExplainedPolicy.Builder getExplainedPoliciesBuilder(int index)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • getExplainedPoliciesOrBuilder

      public Explanations.ExplainedPolicyOrBuilder getExplainedPoliciesOrBuilder(int index)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesOrBuilder in interface TroubleshootIamPolicyResponseOrBuilder
    • getExplainedPoliciesOrBuilderList

      public List<? extends Explanations.ExplainedPolicyOrBuilder> getExplainedPoliciesOrBuilderList()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
      Specified by:
      getExplainedPoliciesOrBuilderList in interface TroubleshootIamPolicyResponseOrBuilder
    • addExplainedPoliciesBuilder

      public Explanations.ExplainedPolicy.Builder addExplainedPoliciesBuilder()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • addExplainedPoliciesBuilder

      public Explanations.ExplainedPolicy.Builder addExplainedPoliciesBuilder(int index)
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • getExplainedPoliciesBuilderList

      public List<Explanations.ExplainedPolicy.Builder> getExplainedPoliciesBuilderList()
       List of IAM 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 can include the policy for the resource itself. It can
       also include 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.v1.ExplainedPolicy explained_policies = 2;
    • getErrorsList

      public List<Status> getErrorsList()
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
      Specified by:
      getErrorsList in interface TroubleshootIamPolicyResponseOrBuilder
    • getErrorsCount

      public int getErrorsCount()
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
      Specified by:
      getErrorsCount in interface TroubleshootIamPolicyResponseOrBuilder
    • getErrors

      public Status getErrors(int index)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
      Specified by:
      getErrors in interface TroubleshootIamPolicyResponseOrBuilder
    • setErrors

      public TroubleshootIamPolicyResponse.Builder setErrors(int index, Status value)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • setErrors

      public TroubleshootIamPolicyResponse.Builder setErrors(int index, Status.Builder builderForValue)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addErrors

       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addErrors

      public TroubleshootIamPolicyResponse.Builder addErrors(int index, Status value)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addErrors

      public TroubleshootIamPolicyResponse.Builder addErrors(Status.Builder builderForValue)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addErrors

      public TroubleshootIamPolicyResponse.Builder addErrors(int index, Status.Builder builderForValue)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addAllErrors

      public TroubleshootIamPolicyResponse.Builder addAllErrors(Iterable<? extends Status> values)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • clearErrors

       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • removeErrors

      public TroubleshootIamPolicyResponse.Builder removeErrors(int index)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • getErrorsBuilder

      public Status.Builder getErrorsBuilder(int index)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • getErrorsOrBuilder

      public StatusOrBuilder getErrorsOrBuilder(int index)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
      Specified by:
      getErrorsOrBuilder in interface TroubleshootIamPolicyResponseOrBuilder
    • getErrorsOrBuilderList

      public List<? extends StatusOrBuilder> getErrorsOrBuilderList()
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
      Specified by:
      getErrorsOrBuilderList in interface TroubleshootIamPolicyResponseOrBuilder
    • addErrorsBuilder

      public Status.Builder addErrorsBuilder()
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • addErrorsBuilder

      public Status.Builder addErrorsBuilder(int index)
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;
    • getErrorsBuilderList

      public List<Status.Builder> getErrorsBuilderList()
       The general errors contained in the troubleshooting response.
       
      repeated .google.rpc.Status errors = 3;