/*
 * Copyright 2020 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/asset/v1/asset_service.proto

package com.google.cloud.asset.v1;

/**
 *
 *
 * <pre>
 * A response message for
 * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
 * </pre>
 *
 * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse}
 */
public final class BatchGetEffectiveIamPoliciesResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)
    BatchGetEffectiveIamPoliciesResponseOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use BatchGetEffectiveIamPoliciesResponse.newBuilder() to construct.
  private BatchGetEffectiveIamPoliciesResponse(
      com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private BatchGetEffectiveIamPoliciesResponse() {
    policyResults_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new BatchGetEffectiveIamPoliciesResponse();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.asset.v1.AssetServiceProto
        .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.asset.v1.AssetServiceProto
        .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class,
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class);
  }

  public interface EffectiveIamPolicyOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The [full_resource_name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for which the
     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
     * are computed. This is one of the
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
     * the caller provides in the request.
     * </pre>
     *
     * <code>string full_resource_name = 1;</code>
     *
     * @return The fullResourceName.
     */
    java.lang.String getFullResourceName();
    /**
     *
     *
     * <pre>
     * The [full_resource_name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for which the
     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
     * are computed. This is one of the
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
     * the caller provides in the request.
     * </pre>
     *
     * <code>string full_resource_name = 1;</code>
     *
     * @return The bytes for fullResourceName.
     */
    com.google.protobuf.ByteString getFullResourceNameBytes();

    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo>
        getPoliciesList();
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo
        getPolicies(int index);
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    int getPoliciesCount();
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    java.util.List<
            ? extends
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfoOrBuilder>
        getPoliciesOrBuilderList();
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
            .PolicyInfoOrBuilder
        getPoliciesOrBuilder(int index);
  }
  /**
   *
   *
   * <pre>
   * The effective IAM policies on one resource.
   * </pre>
   *
   * Protobuf type {@code
   * google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy}
   */
  public static final class EffectiveIamPolicy extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
      EffectiveIamPolicyOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use EffectiveIamPolicy.newBuilder() to construct.
    private EffectiveIamPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private EffectiveIamPolicy() {
      fullResourceName_ = "";
      policies_ = java.util.Collections.emptyList();
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
      return new EffectiveIamPolicy();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .class,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .Builder.class);
    }

    public interface PolicyInfoOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * The full resource name the
       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
       * is directly attached to.
       * </pre>
       *
       * <code>string attached_resource = 1;</code>
       *
       * @return The attachedResource.
       */
      java.lang.String getAttachedResource();
      /**
       *
       *
       * <pre>
       * The full resource name the
       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
       * is directly attached to.
       * </pre>
       *
       * <code>string attached_resource = 1;</code>
       *
       * @return The bytes for attachedResource.
       */
      com.google.protobuf.ByteString getAttachedResourceBytes();

      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       *
       * @return Whether the policy field is set.
       */
      boolean hasPolicy();
      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       *
       * @return The policy.
       */
      com.google.iam.v1.Policy getPolicy();
      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       */
      com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder();
    }
    /**
     *
     *
     * <pre>
     * The IAM policy and its attached resource.
     * </pre>
     *
     * Protobuf type {@code
     * google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo}
     */
    public static final class PolicyInfo extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)
        PolicyInfoOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use PolicyInfo.newBuilder() to construct.
      private PolicyInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private PolicyInfo() {
        attachedResource_ = "";
      }

      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
        return new PolicyInfo();
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
        return this.unknownFields;
      }

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo.class,
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo.Builder.class);
      }

      public static final int ATTACHED_RESOURCE_FIELD_NUMBER = 1;

      @SuppressWarnings("serial")
      private volatile java.lang.Object attachedResource_ = "";
      /**
       *
       *
       * <pre>
       * The full resource name the
       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
       * is directly attached to.
       * </pre>
       *
       * <code>string attached_resource = 1;</code>
       *
       * @return The attachedResource.
       */
      @java.lang.Override
      public java.lang.String getAttachedResource() {
        java.lang.Object ref = attachedResource_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          attachedResource_ = s;
          return s;
        }
      }
      /**
       *
       *
       * <pre>
       * The full resource name the
       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
       * is directly attached to.
       * </pre>
       *
       * <code>string attached_resource = 1;</code>
       *
       * @return The bytes for attachedResource.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getAttachedResourceBytes() {
        java.lang.Object ref = attachedResource_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          attachedResource_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int POLICY_FIELD_NUMBER = 2;
      private com.google.iam.v1.Policy policy_;
      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       *
       * @return Whether the policy field is set.
       */
      @java.lang.Override
      public boolean hasPolicy() {
        return policy_ != null;
      }
      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       *
       * @return The policy.
       */
      @java.lang.Override
      public com.google.iam.v1.Policy getPolicy() {
        return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
      }
      /**
       *
       *
       * <pre>
       * The IAM policy that's directly attached to the
       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
       * </pre>
       *
       * <code>.google.iam.v1.Policy policy = 2;</code>
       */
      @java.lang.Override
      public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() {
        return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
      }

      private byte memoizedIsInitialized = -1;

      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResource_);
        }
        if (policy_ != null) {
          output.writeMessage(2, getPolicy());
        }
        getUnknownFields().writeTo(output);
      }

      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResource_);
        }
        if (policy_ != null) {
          size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy());
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
          return true;
        }
        if (!(obj
            instanceof
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo)) {
          return super.equals(obj);
        }
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo
            other =
                (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                        .PolicyInfo)
                    obj;

        if (!getAttachedResource().equals(other.getAttachedResource())) return false;
        if (hasPolicy() != other.hasPolicy()) return false;
        if (hasPolicy()) {
          if (!getPolicy().equals(other.getPolicy())) return false;
        }
        if (!getUnknownFields().equals(other.getUnknownFields())) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + ATTACHED_RESOURCE_FIELD_NUMBER;
        hash = (53 * hash) + getAttachedResource().hashCode();
        if (hasPolicy()) {
          hash = (37 * hash) + POLICY_FIELD_NUMBER;
          hash = (53 * hash) + getPolicy().hashCode();
        }
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(java.nio.ByteBuffer data)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(
              java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(com.google.protobuf.ByteString data)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(
              com.google.protobuf.ByteString data,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(
              java.io.InputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
            PARSER, input, extensionRegistry);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseDelimitedFrom(
              java.io.InputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
            PARSER, input, extensionRegistry);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          parseFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
            PARSER, input, extensionRegistry);
      }

      @java.lang.Override
      public Builder newBuilderForType() {
        return newBuilder();
      }

      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }

      public static Builder newBuilder(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }

      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       *
       *
       * <pre>
       * The IAM policy and its attached resource.
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfoOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.asset.v1.AssetServiceProto
              .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.asset.v1.AssetServiceProto
              .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfo.class,
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfo.Builder.class);
        }

        // Construct using
        // com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.newBuilder()
        private Builder() {}

        private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
        }

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          attachedResource_ = "";
          policy_ = null;
          if (policyBuilder_ != null) {
            policyBuilder_.dispose();
            policyBuilder_ = null;
          }
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.cloud.asset.v1.AssetServiceProto
              .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor;
        }

        @java.lang.Override
        public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo
            getDefaultInstanceForType() {
          return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo.getDefaultInstance();
        }

        @java.lang.Override
        public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo
            build() {
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo
            buildPartial() {
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              result =
                  new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                      .EffectiveIamPolicy.PolicyInfo(this);
          if (bitField0_ != 0) {
            buildPartial0(result);
          }
          onBuilt();
          return result;
        }

        private void buildPartial0(
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo
                result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.attachedResource_ = attachedResource_;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.policy_ = policyBuilder_ == null ? policy_ : policyBuilder_.build();
          }
        }

        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }

        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
          return super.setField(field, value);
        }

        @java.lang.Override
        public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }

        @java.lang.Override
        public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }

        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index,
            java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }

        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other
              instanceof
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo) {
            return mergeFrom(
                (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                        .PolicyInfo)
                    other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo
                other) {
          if (other
              == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.getDefaultInstance()) return this;
          if (!other.getAttachedResource().isEmpty()) {
            attachedResource_ = other.attachedResource_;
            bitField0_ |= 0x00000001;
            onChanged();
          }
          if (other.hasPolicy()) {
            mergePolicy(other.getPolicy());
          }
          this.mergeUnknownFields(other.getUnknownFields());
          onChanged();
          return this;
        }

        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          if (extensionRegistry == null) {
            throw new java.lang.NullPointerException();
          }
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                case 10:
                  {
                    attachedResource_ = input.readStringRequireUtf8();
                    bitField0_ |= 0x00000001;
                    break;
                  } // case 10
                case 18:
                  {
                    input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry);
                    bitField0_ |= 0x00000002;
                    break;
                  } // case 18
                default:
                  {
                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                      done = true; // was an endgroup tag
                    }
                    break;
                  } // default:
              } // switch (tag)
            } // while (!done)
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.unwrapIOException();
          } finally {
            onChanged();
          } // finally
          return this;
        }

        private int bitField0_;

        private java.lang.Object attachedResource_ = "";
        /**
         *
         *
         * <pre>
         * The full resource name the
         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
         * is directly attached to.
         * </pre>
         *
         * <code>string attached_resource = 1;</code>
         *
         * @return The attachedResource.
         */
        public java.lang.String getAttachedResource() {
          java.lang.Object ref = attachedResource_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            attachedResource_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * The full resource name the
         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
         * is directly attached to.
         * </pre>
         *
         * <code>string attached_resource = 1;</code>
         *
         * @return The bytes for attachedResource.
         */
        public com.google.protobuf.ByteString getAttachedResourceBytes() {
          java.lang.Object ref = attachedResource_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
            attachedResource_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * The full resource name the
         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
         * is directly attached to.
         * </pre>
         *
         * <code>string attached_resource = 1;</code>
         *
         * @param value The attachedResource to set.
         * @return This builder for chaining.
         */
        public Builder setAttachedResource(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          attachedResource_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The full resource name the
         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
         * is directly attached to.
         * </pre>
         *
         * <code>string attached_resource = 1;</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearAttachedResource() {
          attachedResource_ = getDefaultInstance().getAttachedResource();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The full resource name the
         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
         * is directly attached to.
         * </pre>
         *
         * <code>string attached_resource = 1;</code>
         *
         * @param value The bytes for attachedResource to set.
         * @return This builder for chaining.
         */
        public Builder setAttachedResourceBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          attachedResource_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }

        private com.google.iam.v1.Policy policy_;
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.iam.v1.Policy,
                com.google.iam.v1.Policy.Builder,
                com.google.iam.v1.PolicyOrBuilder>
            policyBuilder_;
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         *
         * @return Whether the policy field is set.
         */
        public boolean hasPolicy() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         *
         * @return The policy.
         */
        public com.google.iam.v1.Policy getPolicy() {
          if (policyBuilder_ == null) {
            return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
          } else {
            return policyBuilder_.getMessage();
          }
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public Builder setPolicy(com.google.iam.v1.Policy value) {
          if (policyBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            policy_ = value;
          } else {
            policyBuilder_.setMessage(value);
          }
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public Builder setPolicy(com.google.iam.v1.Policy.Builder builderForValue) {
          if (policyBuilder_ == null) {
            policy_ = builderForValue.build();
          } else {
            policyBuilder_.setMessage(builderForValue.build());
          }
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public Builder mergePolicy(com.google.iam.v1.Policy value) {
          if (policyBuilder_ == null) {
            if (((bitField0_ & 0x00000002) != 0)
                && policy_ != null
                && policy_ != com.google.iam.v1.Policy.getDefaultInstance()) {
              getPolicyBuilder().mergeFrom(value);
            } else {
              policy_ = value;
            }
          } else {
            policyBuilder_.mergeFrom(value);
          }
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public Builder clearPolicy() {
          bitField0_ = (bitField0_ & ~0x00000002);
          policy_ = null;
          if (policyBuilder_ != null) {
            policyBuilder_.dispose();
            policyBuilder_ = null;
          }
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public com.google.iam.v1.Policy.Builder getPolicyBuilder() {
          bitField0_ |= 0x00000002;
          onChanged();
          return getPolicyFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() {
          if (policyBuilder_ != null) {
            return policyBuilder_.getMessageOrBuilder();
          } else {
            return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
          }
        }
        /**
         *
         *
         * <pre>
         * The IAM policy that's directly attached to the
         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
         * </pre>
         *
         * <code>.google.iam.v1.Policy policy = 2;</code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.iam.v1.Policy,
                com.google.iam.v1.Policy.Builder,
                com.google.iam.v1.PolicyOrBuilder>
            getPolicyFieldBuilder() {
          if (policyBuilder_ == null) {
            policyBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.iam.v1.Policy,
                    com.google.iam.v1.Policy.Builder,
                    com.google.iam.v1.PolicyOrBuilder>(
                    getPolicy(), getParentForChildren(), isClean());
            policy_ = null;
          }
          return policyBuilder_;
        }

        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }

        // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)
      }

      // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)
      private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE =
            new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo();
      }

      public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
              .EffectiveIamPolicy.PolicyInfo
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static final com.google.protobuf.Parser<PolicyInfo> PARSER =
          new com.google.protobuf.AbstractParser<PolicyInfo>() {
            @java.lang.Override
            public PolicyInfo parsePartialFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws com.google.protobuf.InvalidProtocolBufferException {
              Builder builder = newBuilder();
              try {
                builder.mergeFrom(input, extensionRegistry);
              } catch (com.google.protobuf.InvalidProtocolBufferException e) {
                throw e.setUnfinishedMessage(builder.buildPartial());
              } catch (com.google.protobuf.UninitializedMessageException e) {
                throw e.asInvalidProtocolBufferException()
                    .setUnfinishedMessage(builder.buildPartial());
              } catch (java.io.IOException e) {
                throw new com.google.protobuf.InvalidProtocolBufferException(e)
                    .setUnfinishedMessage(builder.buildPartial());
              }
              return builder.buildPartial();
            }
          };

      public static com.google.protobuf.Parser<PolicyInfo> parser() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.protobuf.Parser<PolicyInfo> getParserForType() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object fullResourceName_ = "";
    /**
     *
     *
     * <pre>
     * The [full_resource_name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for which the
     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
     * are computed. This is one of the
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
     * the caller provides in the request.
     * </pre>
     *
     * <code>string full_resource_name = 1;</code>
     *
     * @return The fullResourceName.
     */
    @java.lang.Override
    public java.lang.String getFullResourceName() {
      java.lang.Object ref = fullResourceName_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        fullResourceName_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The [full_resource_name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for which the
     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
     * are computed. This is one of the
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
     * the caller provides in the request.
     * </pre>
     *
     * <code>string full_resource_name = 1;</code>
     *
     * @return The bytes for fullResourceName.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getFullResourceNameBytes() {
      java.lang.Object ref = fullResourceName_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        fullResourceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int POLICIES_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo>
        policies_;
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .PolicyInfo>
        getPoliciesList() {
      return policies_;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            ? extends
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfoOrBuilder>
        getPoliciesOrBuilderList() {
      return policies_;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    @java.lang.Override
    public int getPoliciesCount() {
      return policies_.size();
    }
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
            .PolicyInfo
        getPolicies(int index) {
      return policies_.get(index);
    }
    /**
     *
     *
     * <pre>
     * The effective policies for the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies include the policy set on the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * and those set on its parents and ancestors up to the
     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
     * Note that these policies are not filtered according to the resource type
     * of the
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
     * These policies are hierarchically ordered by
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * starting from
     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
     * itself to its parents and ancestors, such that policies[i]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
     * is the child of policies[i+1]'s
     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
     * if policies[i+1] exists.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
            .PolicyInfoOrBuilder
        getPoliciesOrBuilder(int index) {
      return policies_.get(index);
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_);
      }
      for (int i = 0; i < policies_.size(); i++) {
        output.writeMessage(2, policies_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_);
      }
      for (int i = 0; i < policies_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, policies_.get(i));
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj
          instanceof
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other =
          (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) obj;

      if (!getFullResourceName().equals(other.getFullResourceName())) return false;
      if (!getPoliciesList().equals(other.getPoliciesList())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER;
      hash = (53 * hash) + getFullResourceName().hashCode();
      if (getPoliciesCount() > 0) {
        hash = (37 * hash) + POLICIES_FIELD_NUMBER;
        hash = (53 * hash) + getPoliciesList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(java.nio.ByteBuffer data)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(
            java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(
            com.google.protobuf.ByteString data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(
            java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseDelimitedFrom(
            java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        parseFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
            prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     *
     *
     * <pre>
     * The effective IAM policies on one resource.
     * </pre>
     *
     * Protobuf type {@code
     * google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .class,
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .Builder.class);
      }

      // Construct using
      // com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        fullResourceName_ = "";
        if (policiesBuilder_ == null) {
          policies_ = java.util.Collections.emptyList();
        } else {
          policies_ = null;
          policiesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
          getDefaultInstanceForType() {
        return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
          build() {
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result =
            buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
          buildPartial() {
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result =
            new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy(
                this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              result) {
        if (policiesBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)) {
            policies_ = java.util.Collections.unmodifiableList(policies_);
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.policies_ = policies_;
        } else {
          result.policies_ = policiesBuilder_.build();
        }
      }

      private void buildPartial0(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.fullResourceName_ = fullResourceName_;
        }
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }

      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.setField(field, value);
      }

      @java.lang.Override
      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @java.lang.Override
      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index,
          java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other
            instanceof
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) {
          return mergeFrom(
              (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
                  other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other) {
        if (other
            == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .getDefaultInstance()) return this;
        if (!other.getFullResourceName().isEmpty()) {
          fullResourceName_ = other.fullResourceName_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (policiesBuilder_ == null) {
          if (!other.policies_.isEmpty()) {
            if (policies_.isEmpty()) {
              policies_ = other.policies_;
              bitField0_ = (bitField0_ & ~0x00000002);
            } else {
              ensurePoliciesIsMutable();
              policies_.addAll(other.policies_);
            }
            onChanged();
          }
        } else {
          if (!other.policies_.isEmpty()) {
            if (policiesBuilder_.isEmpty()) {
              policiesBuilder_.dispose();
              policiesBuilder_ = null;
              policies_ = other.policies_;
              bitField0_ = (bitField0_ & ~0x00000002);
              policiesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getPoliciesFieldBuilder()
                      : null;
            } else {
              policiesBuilder_.addAllMessages(other.policies_);
            }
          }
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  fullResourceName_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                          .PolicyInfo
                      m =
                          input.readMessage(
                              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                                  .EffectiveIamPolicy.PolicyInfo.parser(),
                              extensionRegistry);
                  if (policiesBuilder_ == null) {
                    ensurePoliciesIsMutable();
                    policies_.add(m);
                  } else {
                    policiesBuilder_.addMessage(m);
                  }
                  break;
                } // case 18
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object fullResourceName_ = "";
      /**
       *
       *
       * <pre>
       * The [full_resource_name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * for which the
       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
       * are computed. This is one of the
       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
       * the caller provides in the request.
       * </pre>
       *
       * <code>string full_resource_name = 1;</code>
       *
       * @return The fullResourceName.
       */
      public java.lang.String getFullResourceName() {
        java.lang.Object ref = fullResourceName_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          fullResourceName_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The [full_resource_name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * for which the
       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
       * are computed. This is one of the
       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
       * the caller provides in the request.
       * </pre>
       *
       * <code>string full_resource_name = 1;</code>
       *
       * @return The bytes for fullResourceName.
       */
      public com.google.protobuf.ByteString getFullResourceNameBytes() {
        java.lang.Object ref = fullResourceName_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          fullResourceName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The [full_resource_name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * for which the
       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
       * are computed. This is one of the
       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
       * the caller provides in the request.
       * </pre>
       *
       * <code>string full_resource_name = 1;</code>
       *
       * @param value The fullResourceName to set.
       * @return This builder for chaining.
       */
      public Builder setFullResourceName(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        fullResourceName_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The [full_resource_name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * for which the
       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
       * are computed. This is one of the
       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
       * the caller provides in the request.
       * </pre>
       *
       * <code>string full_resource_name = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearFullResourceName() {
        fullResourceName_ = getDefaultInstance().getFullResourceName();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The [full_resource_name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * for which the
       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
       * are computed. This is one of the
       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
       * the caller provides in the request.
       * </pre>
       *
       * <code>string full_resource_name = 1;</code>
       *
       * @param value The bytes for fullResourceName to set.
       * @return This builder for chaining.
       */
      public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        fullResourceName_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.util.List<
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo>
          policies_ = java.util.Collections.emptyList();

      private void ensurePoliciesIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          policies_ =
              new java.util.ArrayList<
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfo>(policies_);
          bitField0_ |= 0x00000002;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfoOrBuilder>
          policiesBuilder_;

      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public java.util.List<
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo>
          getPoliciesList() {
        if (policiesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(policies_);
        } else {
          return policiesBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public int getPoliciesCount() {
        if (policiesBuilder_ == null) {
          return policies_.size();
        } else {
          return policiesBuilder_.getCount();
        }
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo
          getPolicies(int index) {
        if (policiesBuilder_ == null) {
          return policies_.get(index);
        } else {
          return policiesBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder setPolicies(
          int index,
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              value) {
        if (policiesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePoliciesIsMutable();
          policies_.set(index, value);
          onChanged();
        } else {
          policiesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder setPolicies(
          int index,
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder
              builderForValue) {
        if (policiesBuilder_ == null) {
          ensurePoliciesIsMutable();
          policies_.set(index, builderForValue.build());
          onChanged();
        } else {
          policiesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder addPolicies(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              value) {
        if (policiesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePoliciesIsMutable();
          policies_.add(value);
          onChanged();
        } else {
          policiesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder addPolicies(
          int index,
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo
              value) {
        if (policiesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePoliciesIsMutable();
          policies_.add(index, value);
          onChanged();
        } else {
          policiesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder addPolicies(
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder
              builderForValue) {
        if (policiesBuilder_ == null) {
          ensurePoliciesIsMutable();
          policies_.add(builderForValue.build());
          onChanged();
        } else {
          policiesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder addPolicies(
          int index,
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder
              builderForValue) {
        if (policiesBuilder_ == null) {
          ensurePoliciesIsMutable();
          policies_.add(index, builderForValue.build());
          onChanged();
        } else {
          policiesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder addAllPolicies(
          java.lang.Iterable<
                  ? extends
                      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                          .EffectiveIamPolicy.PolicyInfo>
              values) {
        if (policiesBuilder_ == null) {
          ensurePoliciesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_);
          onChanged();
        } else {
          policiesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder clearPolicies() {
        if (policiesBuilder_ == null) {
          policies_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
        } else {
          policiesBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public Builder removePolicies(int index) {
        if (policiesBuilder_ == null) {
          ensurePoliciesIsMutable();
          policies_.remove(index);
          onChanged();
        } else {
          policiesBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo.Builder
          getPoliciesBuilder(int index) {
        return getPoliciesFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfoOrBuilder
          getPoliciesOrBuilder(int index) {
        if (policiesBuilder_ == null) {
          return policies_.get(index);
        } else {
          return policiesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public java.util.List<
              ? extends
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfoOrBuilder>
          getPoliciesOrBuilderList() {
        if (policiesBuilder_ != null) {
          return policiesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(policies_);
        }
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo.Builder
          addPoliciesBuilder() {
        return getPoliciesFieldBuilder()
            .addBuilder(
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
              .PolicyInfo.Builder
          addPoliciesBuilder(int index) {
        return getPoliciesFieldBuilder()
            .addBuilder(
                index,
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .PolicyInfo.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * The effective policies for the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies include the policy set on the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * and those set on its parents and ancestors up to the
       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
       * Note that these policies are not filtered according to the resource type
       * of the
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
       * These policies are hierarchically ordered by
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * starting from
       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
       * itself to its parents and ancestors, such that policies[i]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
       * is the child of policies[i+1]'s
       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
       * if policies[i+1] exists.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2;
       * </code>
       */
      public java.util.List<
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder>
          getPoliciesBuilderList() {
        return getPoliciesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfo.Builder,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .PolicyInfoOrBuilder>
          getPoliciesFieldBuilder() {
        if (policiesBuilder_ == null) {
          policiesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfo,
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfo.Builder,
                  com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                      .PolicyInfoOrBuilder>(
                  policies_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
          policies_ = null;
        }
        return policiesBuilder_;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)
    private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
            .EffectiveIamPolicy
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE =
          new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy();
    }

    public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<EffectiveIamPolicy> PARSER =
        new com.google.protobuf.AbstractParser<EffectiveIamPolicy>() {
          @java.lang.Override
          public EffectiveIamPolicy parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            Builder builder = newBuilder();
            try {
              builder.mergeFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
              throw e.setUnfinishedMessage(builder.buildPartial());
            } catch (com.google.protobuf.UninitializedMessageException e) {
              throw e.asInvalidProtocolBufferException()
                  .setUnfinishedMessage(builder.buildPartial());
            } catch (java.io.IOException e) {
              throw new com.google.protobuf.InvalidProtocolBufferException(e)
                  .setUnfinishedMessage(builder.buildPartial());
            }
            return builder.buildPartial();
          }
        };

    public static com.google.protobuf.Parser<EffectiveIamPolicy> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<EffectiveIamPolicy> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int POLICY_RESULTS_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private java.util.List<
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy>
      policyResults_;
  /**
   *
   *
   * <pre>
   * The effective policies for a batch of resources. Note that the results
   * order is the same as the order of
   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
   * When a resource does not have any effective IAM policies, its corresponding
   * policy_result will contain empty
   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy>
      getPolicyResultsList() {
    return policyResults_;
  }
  /**
   *
   *
   * <pre>
   * The effective policies for a batch of resources. Note that the results
   * order is the same as the order of
   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
   * When a resource does not have any effective IAM policies, its corresponding
   * policy_result will contain empty
   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                  .EffectiveIamPolicyOrBuilder>
      getPolicyResultsOrBuilderList() {
    return policyResults_;
  }
  /**
   *
   *
   * <pre>
   * The effective policies for a batch of resources. Note that the results
   * order is the same as the order of
   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
   * When a resource does not have any effective IAM policies, its corresponding
   * policy_result will contain empty
   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
   * </code>
   */
  @java.lang.Override
  public int getPolicyResultsCount() {
    return policyResults_.size();
  }
  /**
   *
   *
   * <pre>
   * The effective policies for a batch of resources. Note that the results
   * order is the same as the order of
   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
   * When a resource does not have any effective IAM policies, its corresponding
   * policy_result will contain empty
   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
      getPolicyResults(int index) {
    return policyResults_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The effective policies for a batch of resources. Note that the results
   * order is the same as the order of
   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
   * When a resource does not have any effective IAM policies, its corresponding
   * policy_result will contain empty
   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder
      getPolicyResultsOrBuilder(int index) {
    return policyResults_.get(index);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < policyResults_.size(); i++) {
      output.writeMessage(2, policyResults_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    for (int i = 0; i < policyResults_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, policyResults_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)) {
      return super.equals(obj);
    }
    com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other =
        (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) obj;

    if (!getPolicyResultsList().equals(other.getPolicyResultsList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getPolicyResultsCount() > 0) {
      hash = (37 * hash) + POLICY_RESULTS_FIELD_NUMBER;
      hash = (53 * hash) + getPolicyResultsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * A response message for
   * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)
      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class);
    }

    // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (policyResultsBuilder_ == null) {
        policyResults_ = java.util.Collections.emptyList();
      } else {
        policyResults_ = null;
        policyResultsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
        getDefaultInstanceForType() {
      return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse build() {
      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse buildPartial() {
      com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result =
          new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result) {
      if (policyResultsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          policyResults_ = java.util.Collections.unmodifiableList(policyResults_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.policyResults_ = policyResults_;
      } else {
        result.policyResults_ = policyResultsBuilder_.build();
      }
    }

    private void buildPartial0(
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result) {
      int from_bitField0_ = bitField0_;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) {
        return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other) {
      if (other
          == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())
        return this;
      if (policyResultsBuilder_ == null) {
        if (!other.policyResults_.isEmpty()) {
          if (policyResults_.isEmpty()) {
            policyResults_ = other.policyResults_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensurePolicyResultsIsMutable();
            policyResults_.addAll(other.policyResults_);
          }
          onChanged();
        }
      } else {
        if (!other.policyResults_.isEmpty()) {
          if (policyResultsBuilder_.isEmpty()) {
            policyResultsBuilder_.dispose();
            policyResultsBuilder_ = null;
            policyResults_ = other.policyResults_;
            bitField0_ = (bitField0_ & ~0x00000001);
            policyResultsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getPolicyResultsFieldBuilder()
                    : null;
          } else {
            policyResultsBuilder_.addAllMessages(other.policyResults_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 18:
              {
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    m =
                        input.readMessage(
                            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                                .EffectiveIamPolicy.parser(),
                            extensionRegistry);
                if (policyResultsBuilder_ == null) {
                  ensurePolicyResultsIsMutable();
                  policyResults_.add(m);
                } else {
                  policyResultsBuilder_.addMessage(m);
                }
                break;
              } // case 18
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy>
        policyResults_ = java.util.Collections.emptyList();

    private void ensurePolicyResultsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        policyResults_ =
            new java.util.ArrayList<
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy>(
                policyResults_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy,
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .Builder,
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                .EffectiveIamPolicyOrBuilder>
        policyResultsBuilder_;

    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy>
        getPolicyResultsList() {
      if (policyResultsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(policyResults_);
      } else {
        return policyResultsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public int getPolicyResultsCount() {
      if (policyResultsBuilder_ == null) {
        return policyResults_.size();
      } else {
        return policyResultsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
        getPolicyResults(int index) {
      if (policyResultsBuilder_ == null) {
        return policyResults_.get(index);
      } else {
        return policyResultsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder setPolicyResults(
        int index,
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) {
      if (policyResultsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePolicyResultsIsMutable();
        policyResults_.set(index, value);
        onChanged();
      } else {
        policyResultsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder setPolicyResults(
        int index,
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
            builderForValue) {
      if (policyResultsBuilder_ == null) {
        ensurePolicyResultsIsMutable();
        policyResults_.set(index, builderForValue.build());
        onChanged();
      } else {
        policyResultsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder addPolicyResults(
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) {
      if (policyResultsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePolicyResultsIsMutable();
        policyResults_.add(value);
        onChanged();
      } else {
        policyResultsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder addPolicyResults(
        int index,
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) {
      if (policyResultsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePolicyResultsIsMutable();
        policyResults_.add(index, value);
        onChanged();
      } else {
        policyResultsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder addPolicyResults(
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
            builderForValue) {
      if (policyResultsBuilder_ == null) {
        ensurePolicyResultsIsMutable();
        policyResults_.add(builderForValue.build());
        onChanged();
      } else {
        policyResultsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder addPolicyResults(
        int index,
        com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
            builderForValue) {
      if (policyResultsBuilder_ == null) {
        ensurePolicyResultsIsMutable();
        policyResults_.add(index, builderForValue.build());
        onChanged();
      } else {
        policyResultsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder addAllPolicyResults(
        java.lang.Iterable<
                ? extends
                    com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                        .EffectiveIamPolicy>
            values) {
      if (policyResultsBuilder_ == null) {
        ensurePolicyResultsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyResults_);
        onChanged();
      } else {
        policyResultsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder clearPolicyResults() {
      if (policyResultsBuilder_ == null) {
        policyResults_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        policyResultsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public Builder removePolicyResults(int index) {
      if (policyResultsBuilder_ == null) {
        ensurePolicyResultsIsMutable();
        policyResults_.remove(index);
        onChanged();
      } else {
        policyResultsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
        getPolicyResultsBuilder(int index) {
      return getPolicyResultsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
            .EffectiveIamPolicyOrBuilder
        getPolicyResultsOrBuilder(int index) {
      if (policyResultsBuilder_ == null) {
        return policyResults_.get(index);
      } else {
        return policyResultsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public java.util.List<
            ? extends
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                    .EffectiveIamPolicyOrBuilder>
        getPolicyResultsOrBuilderList() {
      if (policyResultsBuilder_ != null) {
        return policyResultsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(policyResults_);
      }
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
        addPolicyResultsBuilder() {
      return getPolicyResultsFieldBuilder()
          .addBuilder(
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder
        addPolicyResultsBuilder(int index) {
      return getPolicyResultsFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                  .getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The effective policies for a batch of resources. Note that the results
     * order is the same as the order of
     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
     * When a resource does not have any effective IAM policies, its corresponding
     * policy_result will contain empty
     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2;
     * </code>
     */
    public java.util.List<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .Builder>
        getPolicyResultsBuilderList() {
      return getPolicyResultsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy,
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                .Builder,
            com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                .EffectiveIamPolicyOrBuilder>
        getPolicyResultsFieldBuilder() {
      if (policyResultsBuilder_ == null) {
        policyResultsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy,
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy
                    .Builder,
                com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
                    .EffectiveIamPolicyOrBuilder>(
                policyResults_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        policyResults_ = null;
      }
      return policyResultsBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)
  private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse();
  }

  public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
      getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<BatchGetEffectiveIamPoliciesResponse> PARSER =
      new com.google.protobuf.AbstractParser<BatchGetEffectiveIamPoliciesResponse>() {
        @java.lang.Override
        public BatchGetEffectiveIamPoliciesResponse parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<BatchGetEffectiveIamPoliciesResponse> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<BatchGetEffectiveIamPoliciesResponse> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
