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

package com.google.cloud.asset.v1;

/**
 *
 *
 * <pre>
 * IAM policy analysis query message.
 * </pre>
 *
 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery}
 */
public final class IamPolicyAnalysisQuery extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery)
    IamPolicyAnalysisQueryOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use IamPolicyAnalysisQuery.newBuilder() to construct.
  private IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private IamPolicyAnalysisQuery() {
    scope_ = "";
  }

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

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

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

  public interface ResourceSelectorOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Required. The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of a resource of [supported resource
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
     * </pre>
     *
     * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The fullResourceName.
     */
    java.lang.String getFullResourceName();
    /**
     *
     *
     * <pre>
     * Required. The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of a resource of [supported resource
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
     * </pre>
     *
     * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for fullResourceName.
     */
    com.google.protobuf.ByteString getFullResourceNameBytes();
  }
  /**
   *
   *
   * <pre>
   * Specifies the resource to analyze for access policies, which may be set
   * directly on the resource, or on ancestors such as organizations, folders or
   * projects.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector}
   */
  public static final class ResourceSelector extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)
      ResourceSelectorOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use ResourceSelector.newBuilder() to construct.
    private ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private ResourceSelector() {
      fullResourceName_ = "";
    }

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

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

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

    public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object fullResourceName_ = "";
    /**
     *
     *
     * <pre>
     * Required. The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of a resource of [supported resource
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
     * </pre>
     *
     * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of a resource of [supported resource
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
     * </pre>
     *
     * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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;
      }
    }

    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_);
      }
      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_);
      }
      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.IamPolicyAnalysisQuery.ResourceSelector)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other =
          (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj;

      if (!getFullResourceName().equals(other.getFullResourceName())) 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();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector
        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.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector 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>
     * Specifies the resource to analyze for access policies, which may be set
     * directly on the resource, or on ancestors such as organizations, folders or
     * projects.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor;
      }

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

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        fullResourceName_ = "";
        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_IamPolicyAnalysisQuery_ResourceSelector_descriptor;
      }

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

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

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

      private void buildPartial0(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector) {
          return mergeFrom(
              (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other) {
        if (other
            == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector
                .getDefaultInstance()) return this;
        if (!other.getFullResourceName().isEmpty()) {
          fullResourceName_ = other.fullResourceName_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        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
              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>
       * Required. The [full resource name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * of a resource of [supported resource
       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
       * </pre>
       *
       * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
       * Required. The [full resource name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * of a resource of [supported resource
       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
       * </pre>
       *
       * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
       * Required. The [full resource name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * of a resource of [supported resource
       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
       * </pre>
       *
       * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
       * Required. The [full resource name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * of a resource of [supported resource
       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
       * </pre>
       *
       * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearFullResourceName() {
        fullResourceName_ = getDefaultInstance().getFullResourceName();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The [full resource name]
       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
       * of a resource of [supported resource
       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
       * </pre>
       *
       * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</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;
      }

      @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.IamPolicyAnalysisQuery.ResourceSelector)
    }

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

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

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

    private static final com.google.protobuf.Parser<ResourceSelector> PARSER =
        new com.google.protobuf.AbstractParser<ResourceSelector>() {
          @java.lang.Override
          public ResourceSelector 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<ResourceSelector> parser() {
      return PARSER;
    }

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

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

  public interface IdentitySelectorOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Required. The identity appear in the form of principals in
     * [IAM policy
     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
     *
     * The examples of supported forms are:
     * "user:mike&#64;example.com",
     * "group:admins&#64;example.com",
     * "domain:google.com",
     * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
     *
     * Notice that wildcard characters (such as * and ?) are not supported.
     * You must give a specific identity.
     * </pre>
     *
     * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The identity.
     */
    java.lang.String getIdentity();
    /**
     *
     *
     * <pre>
     * Required. The identity appear in the form of principals in
     * [IAM policy
     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
     *
     * The examples of supported forms are:
     * "user:mike&#64;example.com",
     * "group:admins&#64;example.com",
     * "domain:google.com",
     * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
     *
     * Notice that wildcard characters (such as * and ?) are not supported.
     * You must give a specific identity.
     * </pre>
     *
     * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for identity.
     */
    com.google.protobuf.ByteString getIdentityBytes();
  }
  /**
   *
   *
   * <pre>
   * Specifies an identity for which to determine resource access, based on
   * roles assigned either directly to them or to the groups they belong to,
   * directly or indirectly.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector}
   */
  public static final class IdentitySelector extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)
      IdentitySelectorOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use IdentitySelector.newBuilder() to construct.
    private IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private IdentitySelector() {
      identity_ = "";
    }

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

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

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

    public static final int IDENTITY_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object identity_ = "";
    /**
     *
     *
     * <pre>
     * Required. The identity appear in the form of principals in
     * [IAM policy
     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
     *
     * The examples of supported forms are:
     * "user:mike&#64;example.com",
     * "group:admins&#64;example.com",
     * "domain:google.com",
     * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
     *
     * Notice that wildcard characters (such as * and ?) are not supported.
     * You must give a specific identity.
     * </pre>
     *
     * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The identity.
     */
    @java.lang.Override
    public java.lang.String getIdentity() {
      java.lang.Object ref = identity_;
      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();
        identity_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The identity appear in the form of principals in
     * [IAM policy
     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
     *
     * The examples of supported forms are:
     * "user:mike&#64;example.com",
     * "group:admins&#64;example.com",
     * "domain:google.com",
     * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
     *
     * Notice that wildcard characters (such as * and ?) are not supported.
     * You must give a specific identity.
     * </pre>
     *
     * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for identity.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getIdentityBytes() {
      java.lang.Object ref = identity_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        identity_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    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(identity_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_);
      }
      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(identity_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_);
      }
      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.IamPolicyAnalysisQuery.IdentitySelector)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other =
          (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj;

      if (!getIdentity().equals(other.getIdentity())) 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) + IDENTITY_FIELD_NUMBER;
      hash = (53 * hash) + getIdentity().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector
        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.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector 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>
     * Specifies an identity for which to determine resource access, based on
     * roles assigned either directly to them or to the groups they belong to,
     * directly or indirectly.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor;
      }

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

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        identity_ = "";
        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_IamPolicyAnalysisQuery_IdentitySelector_descriptor;
      }

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

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

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

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

      @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.IamPolicyAnalysisQuery.IdentitySelector) {
          return mergeFrom(
              (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other) {
        if (other
            == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector
                .getDefaultInstance()) return this;
        if (!other.getIdentity().isEmpty()) {
          identity_ = other.identity_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        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:
                {
                  identity_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              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 identity_ = "";
      /**
       *
       *
       * <pre>
       * Required. The identity appear in the form of principals in
       * [IAM policy
       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
       *
       * The examples of supported forms are:
       * "user:mike&#64;example.com",
       * "group:admins&#64;example.com",
       * "domain:google.com",
       * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
       *
       * Notice that wildcard characters (such as * and ?) are not supported.
       * You must give a specific identity.
       * </pre>
       *
       * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The identity.
       */
      public java.lang.String getIdentity() {
        java.lang.Object ref = identity_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          identity_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The identity appear in the form of principals in
       * [IAM policy
       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
       *
       * The examples of supported forms are:
       * "user:mike&#64;example.com",
       * "group:admins&#64;example.com",
       * "domain:google.com",
       * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
       *
       * Notice that wildcard characters (such as * and ?) are not supported.
       * You must give a specific identity.
       * </pre>
       *
       * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The bytes for identity.
       */
      public com.google.protobuf.ByteString getIdentityBytes() {
        java.lang.Object ref = identity_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          identity_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The identity appear in the form of principals in
       * [IAM policy
       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
       *
       * The examples of supported forms are:
       * "user:mike&#64;example.com",
       * "group:admins&#64;example.com",
       * "domain:google.com",
       * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
       *
       * Notice that wildcard characters (such as * and ?) are not supported.
       * You must give a specific identity.
       * </pre>
       *
       * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The identity to set.
       * @return This builder for chaining.
       */
      public Builder setIdentity(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        identity_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The identity appear in the form of principals in
       * [IAM policy
       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
       *
       * The examples of supported forms are:
       * "user:mike&#64;example.com",
       * "group:admins&#64;example.com",
       * "domain:google.com",
       * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
       *
       * Notice that wildcard characters (such as * and ?) are not supported.
       * You must give a specific identity.
       * </pre>
       *
       * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearIdentity() {
        identity_ = getDefaultInstance().getIdentity();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The identity appear in the form of principals in
       * [IAM policy
       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
       *
       * The examples of supported forms are:
       * "user:mike&#64;example.com",
       * "group:admins&#64;example.com",
       * "domain:google.com",
       * "serviceAccount:my-project-id&#64;appspot.gserviceaccount.com".
       *
       * Notice that wildcard characters (such as * and ?) are not supported.
       * You must give a specific identity.
       * </pre>
       *
       * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The bytes for identity to set.
       * @return This builder for chaining.
       */
      public Builder setIdentityBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        identity_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      @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.IamPolicyAnalysisQuery.IdentitySelector)
    }

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

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

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

    private static final com.google.protobuf.Parser<IdentitySelector> PARSER =
        new com.google.protobuf.AbstractParser<IdentitySelector>() {
          @java.lang.Override
          public IdentitySelector 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<IdentitySelector> parser() {
      return PARSER;
    }

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

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

  public interface AccessSelectorOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return A list containing the roles.
     */
    java.util.List<java.lang.String> getRolesList();
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The count of roles.
     */
    int getRolesCount();
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the element to return.
     * @return The roles at the given index.
     */
    java.lang.String getRoles(int index);
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the roles at the given index.
     */
    com.google.protobuf.ByteString getRolesBytes(int index);

    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return A list containing the permissions.
     */
    java.util.List<java.lang.String> getPermissionsList();
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The count of permissions.
     */
    int getPermissionsCount();
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the element to return.
     * @return The permissions at the given index.
     */
    java.lang.String getPermissions(int index);
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the permissions at the given index.
     */
    com.google.protobuf.ByteString getPermissionsBytes(int index);
  }
  /**
   *
   *
   * <pre>
   * Specifies roles and/or permissions to analyze, to determine both the
   * identities possessing them and the resources they control. If multiple
   * values are specified, results will include roles or permissions matching
   * any of them. The total number of roles and permissions should be equal or
   * less than 10.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector}
   */
  public static final class AccessSelector extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)
      AccessSelectorOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use AccessSelector.newBuilder() to construct.
    private AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AccessSelector() {
      roles_ = com.google.protobuf.LazyStringArrayList.emptyList();
      permissions_ = com.google.protobuf.LazyStringArrayList.emptyList();
    }

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

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

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

    public static final int ROLES_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringArrayList roles_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return A list containing the roles.
     */
    public com.google.protobuf.ProtocolStringList getRolesList() {
      return roles_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The count of roles.
     */
    public int getRolesCount() {
      return roles_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the element to return.
     * @return The roles at the given index.
     */
    public java.lang.String getRoles(int index) {
      return roles_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The roles to appear in result.
     * </pre>
     *
     * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the roles at the given index.
     */
    public com.google.protobuf.ByteString getRolesBytes(int index) {
      return roles_.getByteString(index);
    }

    public static final int PERMISSIONS_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringArrayList permissions_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return A list containing the permissions.
     */
    public com.google.protobuf.ProtocolStringList getPermissionsList() {
      return permissions_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The count of permissions.
     */
    public int getPermissionsCount() {
      return permissions_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the element to return.
     * @return The permissions at the given index.
     */
    public java.lang.String getPermissions(int index) {
      return permissions_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The permissions to appear in result.
     * </pre>
     *
     * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the permissions at the given index.
     */
    public com.google.protobuf.ByteString getPermissionsBytes(int index) {
      return permissions_.getByteString(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 < roles_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roles_.getRaw(i));
      }
      for (int i = 0; i < permissions_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < roles_.size(); i++) {
          dataSize += computeStringSizeNoTag(roles_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getRolesList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < permissions_.size(); i++) {
          dataSize += computeStringSizeNoTag(permissions_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getPermissionsList().size();
      }
      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.IamPolicyAnalysisQuery.AccessSelector)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other =
          (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) obj;

      if (!getRolesList().equals(other.getRolesList())) return false;
      if (!getPermissionsList().equals(other.getPermissionsList())) 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 (getRolesCount() > 0) {
        hash = (37 * hash) + ROLES_FIELD_NUMBER;
        hash = (53 * hash) + getRolesList().hashCode();
      }
      if (getPermissionsCount() > 0) {
        hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER;
        hash = (53 * hash) + getPermissionsList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector
        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.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector 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>
     * Specifies roles and/or permissions to analyze, to determine both the
     * identities possessing them and the resources they control. If multiple
     * values are specified, results will include roles or permissions matching
     * any of them. The total number of roles and permissions should be equal or
     * less than 10.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor;
      }

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

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        roles_ = com.google.protobuf.LazyStringArrayList.emptyList();
        permissions_ = com.google.protobuf.LazyStringArrayList.emptyList();
        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_IamPolicyAnalysisQuery_AccessSelector_descriptor;
      }

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

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

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

      private void buildPartial0(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          roles_.makeImmutable();
          result.roles_ = roles_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          permissions_.makeImmutable();
          result.permissions_ = permissions_;
        }
      }

      @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.IamPolicyAnalysisQuery.AccessSelector) {
          return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other) {
        if (other
            == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance())
          return this;
        if (!other.roles_.isEmpty()) {
          if (roles_.isEmpty()) {
            roles_ = other.roles_;
            bitField0_ |= 0x00000001;
          } else {
            ensureRolesIsMutable();
            roles_.addAll(other.roles_);
          }
          onChanged();
        }
        if (!other.permissions_.isEmpty()) {
          if (permissions_.isEmpty()) {
            permissions_ = other.permissions_;
            bitField0_ |= 0x00000002;
          } else {
            ensurePermissionsIsMutable();
            permissions_.addAll(other.permissions_);
          }
          onChanged();
        }
        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:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensureRolesIsMutable();
                  roles_.add(s);
                  break;
                } // case 10
              case 18:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensurePermissionsIsMutable();
                  permissions_.add(s);
                  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 com.google.protobuf.LazyStringArrayList roles_ =
          com.google.protobuf.LazyStringArrayList.emptyList();

      private void ensureRolesIsMutable() {
        if (!roles_.isModifiable()) {
          roles_ = new com.google.protobuf.LazyStringArrayList(roles_);
        }
        bitField0_ |= 0x00000001;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return A list containing the roles.
       */
      public com.google.protobuf.ProtocolStringList getRolesList() {
        roles_.makeImmutable();
        return roles_;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The count of roles.
       */
      public int getRolesCount() {
        return roles_.size();
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index of the element to return.
       * @return The roles at the given index.
       */
      public java.lang.String getRoles(int index) {
        return roles_.get(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the roles at the given index.
       */
      public com.google.protobuf.ByteString getRolesBytes(int index) {
        return roles_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index to set the value at.
       * @param value The roles to set.
       * @return This builder for chaining.
       */
      public Builder setRoles(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRolesIsMutable();
        roles_.set(index, value);
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The roles to add.
       * @return This builder for chaining.
       */
      public Builder addRoles(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRolesIsMutable();
        roles_.add(value);
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param values The roles to add.
       * @return This builder for chaining.
       */
      public Builder addAllRoles(java.lang.Iterable<java.lang.String> values) {
        ensureRolesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, roles_);
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearRoles() {
        roles_ = com.google.protobuf.LazyStringArrayList.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        ;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The roles to appear in result.
       * </pre>
       *
       * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The bytes of the roles to add.
       * @return This builder for chaining.
       */
      public Builder addRolesBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensureRolesIsMutable();
        roles_.add(value);
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringArrayList permissions_ =
          com.google.protobuf.LazyStringArrayList.emptyList();

      private void ensurePermissionsIsMutable() {
        if (!permissions_.isModifiable()) {
          permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_);
        }
        bitField0_ |= 0x00000002;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return A list containing the permissions.
       */
      public com.google.protobuf.ProtocolStringList getPermissionsList() {
        permissions_.makeImmutable();
        return permissions_;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The count of permissions.
       */
      public int getPermissionsCount() {
        return permissions_.size();
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index of the element to return.
       * @return The permissions at the given index.
       */
      public java.lang.String getPermissions(int index) {
        return permissions_.get(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the permissions at the given index.
       */
      public com.google.protobuf.ByteString getPermissionsBytes(int index) {
        return permissions_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param index The index to set the value at.
       * @param value The permissions to set.
       * @return This builder for chaining.
       */
      public Builder setPermissions(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePermissionsIsMutable();
        permissions_.set(index, value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The permissions to add.
       * @return This builder for chaining.
       */
      public Builder addPermissions(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePermissionsIsMutable();
        permissions_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param values The permissions to add.
       * @return This builder for chaining.
       */
      public Builder addAllPermissions(java.lang.Iterable<java.lang.String> values) {
        ensurePermissionsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearPermissions() {
        permissions_ = com.google.protobuf.LazyStringArrayList.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        ;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The permissions to appear in result.
       * </pre>
       *
       * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The bytes of the permissions to add.
       * @return This builder for chaining.
       */
      public Builder addPermissionsBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensurePermissionsIsMutable();
        permissions_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      @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.IamPolicyAnalysisQuery.AccessSelector)
    }

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

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

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

    private static final com.google.protobuf.Parser<AccessSelector> PARSER =
        new com.google.protobuf.AbstractParser<AccessSelector>() {
          @java.lang.Override
          public AccessSelector 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<AccessSelector> parser() {
      return PARSER;
    }

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

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

  public interface OptionsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Optional. If true, the identities section of the result will expand any
     * Google groups appearing in an IAM policy binding.
     *
     * If
     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
     * is specified, the identity in the result will be determined by the
     * selector, and this flag is not allowed to set.
     *
     * If true, the default max expansion per group is 1000 for
     * AssetService.AnalyzeIamPolicy][].
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandGroups.
     */
    boolean getExpandGroups();

    /**
     *
     *
     * <pre>
     * Optional. If true, the access section of result will expand any roles
     * appearing in IAM policy bindings to include their permissions.
     *
     * If
     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
     * is specified, the access section of the result will be determined by the
     * selector, and this flag is not allowed to set.
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandRoles.
     */
    boolean getExpandRoles();

    /**
     *
     *
     * <pre>
     * Optional. If true and
     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
     * is not specified, the resource section of the result will expand any
     * resource attached to an IAM policy to include resources lower in the
     * resource hierarchy.
     *
     * For example, if the request analyzes for which resources user A has
     * permission P, and the results include an IAM policy with P on a Google
     * Cloud folder, the results will also include resources in that folder with
     * permission P.
     *
     * If true and
     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
     * is specified, the resource section of the result will expand the
     * specified resource to include resources lower in the resource hierarchy.
     * Only project or lower resources are supported. Folder and organization
     * resources cannot be used together with this option.
     *
     * For example, if the request analyzes for which users have permission P on
     * a Google Cloud project with this option enabled, the results will include
     * all users who have permission P on that project or any lower resource.
     *
     * If true, the default max expansion per resource is 1000 for
     * AssetService.AnalyzeIamPolicy][] and 100000 for
     * AssetService.AnalyzeIamPolicyLongrunning][].
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandResources.
     */
    boolean getExpandResources();

    /**
     *
     *
     * <pre>
     * Optional. If true, the result will output the relevant parent/child
     * relationships between resources. Default is false.
     * </pre>
     *
     * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The outputResourceEdges.
     */
    boolean getOutputResourceEdges();

    /**
     *
     *
     * <pre>
     * Optional. If true, the result will output the relevant membership
     * relationships between groups and other groups, and between groups and
     * principals. Default is false.
     * </pre>
     *
     * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The outputGroupEdges.
     */
    boolean getOutputGroupEdges();

    /**
     *
     *
     * <pre>
     * Optional. If true, the response will include access analysis from
     * identities to resources via service account impersonation. This is a very
     * expensive operation, because many derived queries will be executed. We
     * highly recommend you use
     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
     * RPC instead.
     *
     * For example, if the request analyzes for which resources user A has
     * permission P, and there's an IAM policy states user A has
     * iam.serviceAccounts.getAccessToken permission to a service account SA,
     * and there's another IAM policy states service account SA has permission P
     * to a Google Cloud folder F, then user A potentially has access to the
     * Google Cloud folder F. And those advanced analysis results will be
     * included in
     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
     *
     * Another example, if the request analyzes for who has
     * permission P to a Google Cloud folder F, and there's an IAM policy states
     * user A has iam.serviceAccounts.actAs permission to a service account SA,
     * and there's another IAM policy states service account SA has permission P
     * to the Google Cloud folder F, then user A potentially has access to the
     * Google Cloud folder F. And those advanced analysis results will be
     * included in
     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
     *
     * Only the following permissions are considered in this analysis:
     *
     * * `iam.serviceAccounts.actAs`
     * * `iam.serviceAccounts.signBlob`
     * * `iam.serviceAccounts.signJwt`
     * * `iam.serviceAccounts.getAccessToken`
     * * `iam.serviceAccounts.getOpenIdToken`
     * * `iam.serviceAccounts.implicitDelegation`
     *
     * Default is false.
     * </pre>
     *
     * <code>
     * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The analyzeServiceAccountImpersonation.
     */
    boolean getAnalyzeServiceAccountImpersonation();
  }
  /**
   *
   *
   * <pre>
   * Contains query options.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options}
   */
  public static final class Options extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)
      OptionsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Options.newBuilder() to construct.
    private Options(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Options() {}

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

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

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

    public static final int EXPAND_GROUPS_FIELD_NUMBER = 1;
    private boolean expandGroups_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true, the identities section of the result will expand any
     * Google groups appearing in an IAM policy binding.
     *
     * If
     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
     * is specified, the identity in the result will be determined by the
     * selector, and this flag is not allowed to set.
     *
     * If true, the default max expansion per group is 1000 for
     * AssetService.AnalyzeIamPolicy][].
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandGroups.
     */
    @java.lang.Override
    public boolean getExpandGroups() {
      return expandGroups_;
    }

    public static final int EXPAND_ROLES_FIELD_NUMBER = 2;
    private boolean expandRoles_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true, the access section of result will expand any roles
     * appearing in IAM policy bindings to include their permissions.
     *
     * If
     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
     * is specified, the access section of the result will be determined by the
     * selector, and this flag is not allowed to set.
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandRoles.
     */
    @java.lang.Override
    public boolean getExpandRoles() {
      return expandRoles_;
    }

    public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3;
    private boolean expandResources_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true and
     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
     * is not specified, the resource section of the result will expand any
     * resource attached to an IAM policy to include resources lower in the
     * resource hierarchy.
     *
     * For example, if the request analyzes for which resources user A has
     * permission P, and the results include an IAM policy with P on a Google
     * Cloud folder, the results will also include resources in that folder with
     * permission P.
     *
     * If true and
     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
     * is specified, the resource section of the result will expand the
     * specified resource to include resources lower in the resource hierarchy.
     * Only project or lower resources are supported. Folder and organization
     * resources cannot be used together with this option.
     *
     * For example, if the request analyzes for which users have permission P on
     * a Google Cloud project with this option enabled, the results will include
     * all users who have permission P on that project or any lower resource.
     *
     * If true, the default max expansion per resource is 1000 for
     * AssetService.AnalyzeIamPolicy][] and 100000 for
     * AssetService.AnalyzeIamPolicyLongrunning][].
     *
     * Default is false.
     * </pre>
     *
     * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expandResources.
     */
    @java.lang.Override
    public boolean getExpandResources() {
      return expandResources_;
    }

    public static final int OUTPUT_RESOURCE_EDGES_FIELD_NUMBER = 4;
    private boolean outputResourceEdges_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true, the result will output the relevant parent/child
     * relationships between resources. Default is false.
     * </pre>
     *
     * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The outputResourceEdges.
     */
    @java.lang.Override
    public boolean getOutputResourceEdges() {
      return outputResourceEdges_;
    }

    public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5;
    private boolean outputGroupEdges_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true, the result will output the relevant membership
     * relationships between groups and other groups, and between groups and
     * principals. Default is false.
     * </pre>
     *
     * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The outputGroupEdges.
     */
    @java.lang.Override
    public boolean getOutputGroupEdges() {
      return outputGroupEdges_;
    }

    public static final int ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER = 6;
    private boolean analyzeServiceAccountImpersonation_ = false;
    /**
     *
     *
     * <pre>
     * Optional. If true, the response will include access analysis from
     * identities to resources via service account impersonation. This is a very
     * expensive operation, because many derived queries will be executed. We
     * highly recommend you use
     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
     * RPC instead.
     *
     * For example, if the request analyzes for which resources user A has
     * permission P, and there's an IAM policy states user A has
     * iam.serviceAccounts.getAccessToken permission to a service account SA,
     * and there's another IAM policy states service account SA has permission P
     * to a Google Cloud folder F, then user A potentially has access to the
     * Google Cloud folder F. And those advanced analysis results will be
     * included in
     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
     *
     * Another example, if the request analyzes for who has
     * permission P to a Google Cloud folder F, and there's an IAM policy states
     * user A has iam.serviceAccounts.actAs permission to a service account SA,
     * and there's another IAM policy states service account SA has permission P
     * to the Google Cloud folder F, then user A potentially has access to the
     * Google Cloud folder F. And those advanced analysis results will be
     * included in
     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
     *
     * Only the following permissions are considered in this analysis:
     *
     * * `iam.serviceAccounts.actAs`
     * * `iam.serviceAccounts.signBlob`
     * * `iam.serviceAccounts.signJwt`
     * * `iam.serviceAccounts.getAccessToken`
     * * `iam.serviceAccounts.getOpenIdToken`
     * * `iam.serviceAccounts.implicitDelegation`
     *
     * Default is false.
     * </pre>
     *
     * <code>
     * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The analyzeServiceAccountImpersonation.
     */
    @java.lang.Override
    public boolean getAnalyzeServiceAccountImpersonation() {
      return analyzeServiceAccountImpersonation_;
    }

    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 (expandGroups_ != false) {
        output.writeBool(1, expandGroups_);
      }
      if (expandRoles_ != false) {
        output.writeBool(2, expandRoles_);
      }
      if (expandResources_ != false) {
        output.writeBool(3, expandResources_);
      }
      if (outputResourceEdges_ != false) {
        output.writeBool(4, outputResourceEdges_);
      }
      if (outputGroupEdges_ != false) {
        output.writeBool(5, outputGroupEdges_);
      }
      if (analyzeServiceAccountImpersonation_ != false) {
        output.writeBool(6, analyzeServiceAccountImpersonation_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (expandGroups_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, expandGroups_);
      }
      if (expandRoles_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, expandRoles_);
      }
      if (expandResources_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, expandResources_);
      }
      if (outputResourceEdges_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, outputResourceEdges_);
      }
      if (outputGroupEdges_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, outputGroupEdges_);
      }
      if (analyzeServiceAccountImpersonation_ != false) {
        size +=
            com.google.protobuf.CodedOutputStream.computeBoolSize(
                6, analyzeServiceAccountImpersonation_);
      }
      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.IamPolicyAnalysisQuery.Options)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other =
          (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) obj;

      if (getExpandGroups() != other.getExpandGroups()) return false;
      if (getExpandRoles() != other.getExpandRoles()) return false;
      if (getExpandResources() != other.getExpandResources()) return false;
      if (getOutputResourceEdges() != other.getOutputResourceEdges()) return false;
      if (getOutputGroupEdges() != other.getOutputGroupEdges()) return false;
      if (getAnalyzeServiceAccountImpersonation() != other.getAnalyzeServiceAccountImpersonation())
        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) + EXPAND_GROUPS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandGroups());
      hash = (37 * hash) + EXPAND_ROLES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandRoles());
      hash = (37 * hash) + EXPAND_RESOURCES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandResources());
      hash = (37 * hash) + OUTPUT_RESOURCE_EDGES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputResourceEdges());
      hash = (37 * hash) + OUTPUT_GROUP_EDGES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputGroupEdges());
      hash = (37 * hash) + ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER;
      hash =
          (53 * hash)
              + com.google.protobuf.Internal.hashBoolean(getAnalyzeServiceAccountImpersonation());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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>
     * Contains query options.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor;
      }

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

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        expandGroups_ = false;
        expandRoles_ = false;
        expandResources_ = false;
        outputResourceEdges_ = false;
        outputGroupEdges_ = false;
        analyzeServiceAccountImpersonation_ = false;
        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_IamPolicyAnalysisQuery_Options_descriptor;
      }

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

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

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

      private void buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.expandGroups_ = expandGroups_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.expandRoles_ = expandRoles_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.expandResources_ = expandResources_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.outputResourceEdges_ = outputResourceEdges_;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.outputGroupEdges_ = outputGroupEdges_;
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_;
        }
      }

      @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.IamPolicyAnalysisQuery.Options) {
          return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other) {
        if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance())
          return this;
        if (other.getExpandGroups() != false) {
          setExpandGroups(other.getExpandGroups());
        }
        if (other.getExpandRoles() != false) {
          setExpandRoles(other.getExpandRoles());
        }
        if (other.getExpandResources() != false) {
          setExpandResources(other.getExpandResources());
        }
        if (other.getOutputResourceEdges() != false) {
          setOutputResourceEdges(other.getOutputResourceEdges());
        }
        if (other.getOutputGroupEdges() != false) {
          setOutputGroupEdges(other.getOutputGroupEdges());
        }
        if (other.getAnalyzeServiceAccountImpersonation() != false) {
          setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation());
        }
        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 8:
                {
                  expandGroups_ = input.readBool();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              case 16:
                {
                  expandRoles_ = input.readBool();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 16
              case 24:
                {
                  expandResources_ = input.readBool();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 24
              case 32:
                {
                  outputResourceEdges_ = input.readBool();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 32
              case 40:
                {
                  outputGroupEdges_ = input.readBool();
                  bitField0_ |= 0x00000010;
                  break;
                } // case 40
              case 48:
                {
                  analyzeServiceAccountImpersonation_ = input.readBool();
                  bitField0_ |= 0x00000020;
                  break;
                } // case 48
              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 boolean expandGroups_;
      /**
       *
       *
       * <pre>
       * Optional. If true, the identities section of the result will expand any
       * Google groups appearing in an IAM policy binding.
       *
       * If
       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
       * is specified, the identity in the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * If true, the default max expansion per group is 1000 for
       * AssetService.AnalyzeIamPolicy][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The expandGroups.
       */
      @java.lang.Override
      public boolean getExpandGroups() {
        return expandGroups_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the identities section of the result will expand any
       * Google groups appearing in an IAM policy binding.
       *
       * If
       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
       * is specified, the identity in the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * If true, the default max expansion per group is 1000 for
       * AssetService.AnalyzeIamPolicy][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The expandGroups to set.
       * @return This builder for chaining.
       */
      public Builder setExpandGroups(boolean value) {

        expandGroups_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the identities section of the result will expand any
       * Google groups appearing in an IAM policy binding.
       *
       * If
       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
       * is specified, the identity in the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * If true, the default max expansion per group is 1000 for
       * AssetService.AnalyzeIamPolicy][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearExpandGroups() {
        bitField0_ = (bitField0_ & ~0x00000001);
        expandGroups_ = false;
        onChanged();
        return this;
      }

      private boolean expandRoles_;
      /**
       *
       *
       * <pre>
       * Optional. If true, the access section of result will expand any roles
       * appearing in IAM policy bindings to include their permissions.
       *
       * If
       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
       * is specified, the access section of the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The expandRoles.
       */
      @java.lang.Override
      public boolean getExpandRoles() {
        return expandRoles_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the access section of result will expand any roles
       * appearing in IAM policy bindings to include their permissions.
       *
       * If
       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
       * is specified, the access section of the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The expandRoles to set.
       * @return This builder for chaining.
       */
      public Builder setExpandRoles(boolean value) {

        expandRoles_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the access section of result will expand any roles
       * appearing in IAM policy bindings to include their permissions.
       *
       * If
       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
       * is specified, the access section of the result will be determined by the
       * selector, and this flag is not allowed to set.
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearExpandRoles() {
        bitField0_ = (bitField0_ & ~0x00000002);
        expandRoles_ = false;
        onChanged();
        return this;
      }

      private boolean expandResources_;
      /**
       *
       *
       * <pre>
       * Optional. If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is not specified, the resource section of the result will expand any
       * resource attached to an IAM policy to include resources lower in the
       * resource hierarchy.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and the results include an IAM policy with P on a Google
       * Cloud folder, the results will also include resources in that folder with
       * permission P.
       *
       * If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is specified, the resource section of the result will expand the
       * specified resource to include resources lower in the resource hierarchy.
       * Only project or lower resources are supported. Folder and organization
       * resources cannot be used together with this option.
       *
       * For example, if the request analyzes for which users have permission P on
       * a Google Cloud project with this option enabled, the results will include
       * all users who have permission P on that project or any lower resource.
       *
       * If true, the default max expansion per resource is 1000 for
       * AssetService.AnalyzeIamPolicy][] and 100000 for
       * AssetService.AnalyzeIamPolicyLongrunning][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The expandResources.
       */
      @java.lang.Override
      public boolean getExpandResources() {
        return expandResources_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is not specified, the resource section of the result will expand any
       * resource attached to an IAM policy to include resources lower in the
       * resource hierarchy.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and the results include an IAM policy with P on a Google
       * Cloud folder, the results will also include resources in that folder with
       * permission P.
       *
       * If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is specified, the resource section of the result will expand the
       * specified resource to include resources lower in the resource hierarchy.
       * Only project or lower resources are supported. Folder and organization
       * resources cannot be used together with this option.
       *
       * For example, if the request analyzes for which users have permission P on
       * a Google Cloud project with this option enabled, the results will include
       * all users who have permission P on that project or any lower resource.
       *
       * If true, the default max expansion per resource is 1000 for
       * AssetService.AnalyzeIamPolicy][] and 100000 for
       * AssetService.AnalyzeIamPolicyLongrunning][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The expandResources to set.
       * @return This builder for chaining.
       */
      public Builder setExpandResources(boolean value) {

        expandResources_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is not specified, the resource section of the result will expand any
       * resource attached to an IAM policy to include resources lower in the
       * resource hierarchy.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and the results include an IAM policy with P on a Google
       * Cloud folder, the results will also include resources in that folder with
       * permission P.
       *
       * If true and
       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
       * is specified, the resource section of the result will expand the
       * specified resource to include resources lower in the resource hierarchy.
       * Only project or lower resources are supported. Folder and organization
       * resources cannot be used together with this option.
       *
       * For example, if the request analyzes for which users have permission P on
       * a Google Cloud project with this option enabled, the results will include
       * all users who have permission P on that project or any lower resource.
       *
       * If true, the default max expansion per resource is 1000 for
       * AssetService.AnalyzeIamPolicy][] and 100000 for
       * AssetService.AnalyzeIamPolicyLongrunning][].
       *
       * Default is false.
       * </pre>
       *
       * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearExpandResources() {
        bitField0_ = (bitField0_ & ~0x00000004);
        expandResources_ = false;
        onChanged();
        return this;
      }

      private boolean outputResourceEdges_;
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant parent/child
       * relationships between resources. Default is false.
       * </pre>
       *
       * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The outputResourceEdges.
       */
      @java.lang.Override
      public boolean getOutputResourceEdges() {
        return outputResourceEdges_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant parent/child
       * relationships between resources. Default is false.
       * </pre>
       *
       * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The outputResourceEdges to set.
       * @return This builder for chaining.
       */
      public Builder setOutputResourceEdges(boolean value) {

        outputResourceEdges_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant parent/child
       * relationships between resources. Default is false.
       * </pre>
       *
       * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearOutputResourceEdges() {
        bitField0_ = (bitField0_ & ~0x00000008);
        outputResourceEdges_ = false;
        onChanged();
        return this;
      }

      private boolean outputGroupEdges_;
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant membership
       * relationships between groups and other groups, and between groups and
       * principals. Default is false.
       * </pre>
       *
       * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The outputGroupEdges.
       */
      @java.lang.Override
      public boolean getOutputGroupEdges() {
        return outputGroupEdges_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant membership
       * relationships between groups and other groups, and between groups and
       * principals. Default is false.
       * </pre>
       *
       * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The outputGroupEdges to set.
       * @return This builder for chaining.
       */
      public Builder setOutputGroupEdges(boolean value) {

        outputGroupEdges_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the result will output the relevant membership
       * relationships between groups and other groups, and between groups and
       * principals. Default is false.
       * </pre>
       *
       * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearOutputGroupEdges() {
        bitField0_ = (bitField0_ & ~0x00000010);
        outputGroupEdges_ = false;
        onChanged();
        return this;
      }

      private boolean analyzeServiceAccountImpersonation_;
      /**
       *
       *
       * <pre>
       * Optional. If true, the response will include access analysis from
       * identities to resources via service account impersonation. This is a very
       * expensive operation, because many derived queries will be executed. We
       * highly recommend you use
       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
       * RPC instead.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and there's an IAM policy states user A has
       * iam.serviceAccounts.getAccessToken permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to a Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Another example, if the request analyzes for who has
       * permission P to a Google Cloud folder F, and there's an IAM policy states
       * user A has iam.serviceAccounts.actAs permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to the Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Only the following permissions are considered in this analysis:
       *
       * * `iam.serviceAccounts.actAs`
       * * `iam.serviceAccounts.signBlob`
       * * `iam.serviceAccounts.signJwt`
       * * `iam.serviceAccounts.getAccessToken`
       * * `iam.serviceAccounts.getOpenIdToken`
       * * `iam.serviceAccounts.implicitDelegation`
       *
       * Default is false.
       * </pre>
       *
       * <code>
       * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The analyzeServiceAccountImpersonation.
       */
      @java.lang.Override
      public boolean getAnalyzeServiceAccountImpersonation() {
        return analyzeServiceAccountImpersonation_;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the response will include access analysis from
       * identities to resources via service account impersonation. This is a very
       * expensive operation, because many derived queries will be executed. We
       * highly recommend you use
       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
       * RPC instead.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and there's an IAM policy states user A has
       * iam.serviceAccounts.getAccessToken permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to a Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Another example, if the request analyzes for who has
       * permission P to a Google Cloud folder F, and there's an IAM policy states
       * user A has iam.serviceAccounts.actAs permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to the Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Only the following permissions are considered in this analysis:
       *
       * * `iam.serviceAccounts.actAs`
       * * `iam.serviceAccounts.signBlob`
       * * `iam.serviceAccounts.signJwt`
       * * `iam.serviceAccounts.getAccessToken`
       * * `iam.serviceAccounts.getOpenIdToken`
       * * `iam.serviceAccounts.implicitDelegation`
       *
       * Default is false.
       * </pre>
       *
       * <code>
       * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @param value The analyzeServiceAccountImpersonation to set.
       * @return This builder for chaining.
       */
      public Builder setAnalyzeServiceAccountImpersonation(boolean value) {

        analyzeServiceAccountImpersonation_ = value;
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If true, the response will include access analysis from
       * identities to resources via service account impersonation. This is a very
       * expensive operation, because many derived queries will be executed. We
       * highly recommend you use
       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
       * RPC instead.
       *
       * For example, if the request analyzes for which resources user A has
       * permission P, and there's an IAM policy states user A has
       * iam.serviceAccounts.getAccessToken permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to a Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Another example, if the request analyzes for who has
       * permission P to a Google Cloud folder F, and there's an IAM policy states
       * user A has iam.serviceAccounts.actAs permission to a service account SA,
       * and there's another IAM policy states service account SA has permission P
       * to the Google Cloud folder F, then user A potentially has access to the
       * Google Cloud folder F. And those advanced analysis results will be
       * included in
       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
       *
       * Only the following permissions are considered in this analysis:
       *
       * * `iam.serviceAccounts.actAs`
       * * `iam.serviceAccounts.signBlob`
       * * `iam.serviceAccounts.signJwt`
       * * `iam.serviceAccounts.getAccessToken`
       * * `iam.serviceAccounts.getOpenIdToken`
       * * `iam.serviceAccounts.implicitDelegation`
       *
       * Default is false.
       * </pre>
       *
       * <code>
       * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAnalyzeServiceAccountImpersonation() {
        bitField0_ = (bitField0_ & ~0x00000020);
        analyzeServiceAccountImpersonation_ = false;
        onChanged();
        return this;
      }

      @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.IamPolicyAnalysisQuery.Options)
    }

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

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

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

    private static final com.google.protobuf.Parser<Options> PARSER =
        new com.google.protobuf.AbstractParser<Options>() {
          @java.lang.Override
          public Options 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<Options> parser() {
      return PARSER;
    }

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

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

  public interface ConditionContextOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     *
     * @return Whether the accessTime field is set.
     */
    boolean hasAccessTime();
    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     *
     * @return The accessTime.
     */
    com.google.protobuf.Timestamp getAccessTime();
    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     */
    com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder();

    com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.TimeContextCase
        getTimeContextCase();
  }
  /**
   *
   *
   * <pre>
   * The IAM conditions context.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext}
   */
  public static final class ConditionContext extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)
      ConditionContextOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use ConditionContext.newBuilder() to construct.
    private ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private ConditionContext() {}

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

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

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

    private int timeContextCase_ = 0;

    @SuppressWarnings("serial")
    private java.lang.Object timeContext_;

    public enum TimeContextCase
        implements
            com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      ACCESS_TIME(1),
      TIMECONTEXT_NOT_SET(0);
      private final int value;

      private TimeContextCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static TimeContextCase valueOf(int value) {
        return forNumber(value);
      }

      public static TimeContextCase forNumber(int value) {
        switch (value) {
          case 1:
            return ACCESS_TIME;
          case 0:
            return TIMECONTEXT_NOT_SET;
          default:
            return null;
        }
      }

      public int getNumber() {
        return this.value;
      }
    };

    public TimeContextCase getTimeContextCase() {
      return TimeContextCase.forNumber(timeContextCase_);
    }

    public static final int ACCESS_TIME_FIELD_NUMBER = 1;
    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     *
     * @return Whether the accessTime field is set.
     */
    @java.lang.Override
    public boolean hasAccessTime() {
      return timeContextCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     *
     * @return The accessTime.
     */
    @java.lang.Override
    public com.google.protobuf.Timestamp getAccessTime() {
      if (timeContextCase_ == 1) {
        return (com.google.protobuf.Timestamp) timeContext_;
      }
      return com.google.protobuf.Timestamp.getDefaultInstance();
    }
    /**
     *
     *
     * <pre>
     * The hypothetical access timestamp to evaluate IAM conditions. Note that
     * this value must not be earlier than the current time; otherwise, an
     * INVALID_ARGUMENT error will be returned.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp access_time = 1;</code>
     */
    @java.lang.Override
    public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() {
      if (timeContextCase_ == 1) {
        return (com.google.protobuf.Timestamp) timeContext_;
      }
      return com.google.protobuf.Timestamp.getDefaultInstance();
    }

    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 (timeContextCase_ == 1) {
        output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (timeContextCase_ == 1) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(
                1, (com.google.protobuf.Timestamp) timeContext_);
      }
      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.IamPolicyAnalysisQuery.ConditionContext)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other =
          (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) obj;

      if (!getTimeContextCase().equals(other.getTimeContextCase())) return false;
      switch (timeContextCase_) {
        case 1:
          if (!getAccessTime().equals(other.getAccessTime())) return false;
          break;
        case 0:
        default:
      }
      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();
      switch (timeContextCase_) {
        case 1:
          hash = (37 * hash) + ACCESS_TIME_FIELD_NUMBER;
          hash = (53 * hash) + getAccessTime().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext
        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.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext 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.IamPolicyAnalysisQuery.ConditionContext 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 conditions context.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor;
      }

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

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        if (accessTimeBuilder_ != null) {
          accessTimeBuilder_.clear();
        }
        timeContextCase_ = 0;
        timeContext_ = 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_IamPolicyAnalysisQuery_ConditionContext_descriptor;
      }

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

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

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

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

      private void buildPartialOneofs(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result) {
        result.timeContextCase_ = timeContextCase_;
        result.timeContext_ = this.timeContext_;
        if (timeContextCase_ == 1 && accessTimeBuilder_ != null) {
          result.timeContext_ = accessTimeBuilder_.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.IamPolicyAnalysisQuery.ConditionContext) {
          return mergeFrom(
              (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other) {
        if (other
            == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext
                .getDefaultInstance()) return this;
        switch (other.getTimeContextCase()) {
          case ACCESS_TIME:
            {
              mergeAccessTime(other.getAccessTime());
              break;
            }
          case TIMECONTEXT_NOT_SET:
            {
              break;
            }
        }
        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:
                {
                  input.readMessage(getAccessTimeFieldBuilder().getBuilder(), extensionRegistry);
                  timeContextCase_ = 1;
                  break;
                } // case 10
              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 timeContextCase_ = 0;
      private java.lang.Object timeContext_;

      public TimeContextCase getTimeContextCase() {
        return TimeContextCase.forNumber(timeContextCase_);
      }

      public Builder clearTimeContext() {
        timeContextCase_ = 0;
        timeContext_ = null;
        onChanged();
        return this;
      }

      private int bitField0_;

      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Timestamp,
              com.google.protobuf.Timestamp.Builder,
              com.google.protobuf.TimestampOrBuilder>
          accessTimeBuilder_;
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       *
       * @return Whether the accessTime field is set.
       */
      @java.lang.Override
      public boolean hasAccessTime() {
        return timeContextCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       *
       * @return The accessTime.
       */
      @java.lang.Override
      public com.google.protobuf.Timestamp getAccessTime() {
        if (accessTimeBuilder_ == null) {
          if (timeContextCase_ == 1) {
            return (com.google.protobuf.Timestamp) timeContext_;
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        } else {
          if (timeContextCase_ == 1) {
            return accessTimeBuilder_.getMessage();
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      public Builder setAccessTime(com.google.protobuf.Timestamp value) {
        if (accessTimeBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          timeContext_ = value;
          onChanged();
        } else {
          accessTimeBuilder_.setMessage(value);
        }
        timeContextCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      public Builder setAccessTime(com.google.protobuf.Timestamp.Builder builderForValue) {
        if (accessTimeBuilder_ == null) {
          timeContext_ = builderForValue.build();
          onChanged();
        } else {
          accessTimeBuilder_.setMessage(builderForValue.build());
        }
        timeContextCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      public Builder mergeAccessTime(com.google.protobuf.Timestamp value) {
        if (accessTimeBuilder_ == null) {
          if (timeContextCase_ == 1
              && timeContext_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
            timeContext_ =
                com.google.protobuf.Timestamp.newBuilder(
                        (com.google.protobuf.Timestamp) timeContext_)
                    .mergeFrom(value)
                    .buildPartial();
          } else {
            timeContext_ = value;
          }
          onChanged();
        } else {
          if (timeContextCase_ == 1) {
            accessTimeBuilder_.mergeFrom(value);
          } else {
            accessTimeBuilder_.setMessage(value);
          }
        }
        timeContextCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      public Builder clearAccessTime() {
        if (accessTimeBuilder_ == null) {
          if (timeContextCase_ == 1) {
            timeContextCase_ = 0;
            timeContext_ = null;
            onChanged();
          }
        } else {
          if (timeContextCase_ == 1) {
            timeContextCase_ = 0;
            timeContext_ = null;
          }
          accessTimeBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      public com.google.protobuf.Timestamp.Builder getAccessTimeBuilder() {
        return getAccessTimeFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      @java.lang.Override
      public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() {
        if ((timeContextCase_ == 1) && (accessTimeBuilder_ != null)) {
          return accessTimeBuilder_.getMessageOrBuilder();
        } else {
          if (timeContextCase_ == 1) {
            return (com.google.protobuf.Timestamp) timeContext_;
          }
          return com.google.protobuf.Timestamp.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * The hypothetical access timestamp to evaluate IAM conditions. Note that
       * this value must not be earlier than the current time; otherwise, an
       * INVALID_ARGUMENT error will be returned.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp access_time = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Timestamp,
              com.google.protobuf.Timestamp.Builder,
              com.google.protobuf.TimestampOrBuilder>
          getAccessTimeFieldBuilder() {
        if (accessTimeBuilder_ == null) {
          if (!(timeContextCase_ == 1)) {
            timeContext_ = com.google.protobuf.Timestamp.getDefaultInstance();
          }
          accessTimeBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Timestamp,
                  com.google.protobuf.Timestamp.Builder,
                  com.google.protobuf.TimestampOrBuilder>(
                  (com.google.protobuf.Timestamp) timeContext_, getParentForChildren(), isClean());
          timeContext_ = null;
        }
        timeContextCase_ = 1;
        onChanged();
        return accessTimeBuilder_;
      }

      @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.IamPolicyAnalysisQuery.ConditionContext)
    }

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

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

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

    private static final com.google.protobuf.Parser<ConditionContext> PARSER =
        new com.google.protobuf.AbstractParser<ConditionContext>() {
          @java.lang.Override
          public ConditionContext 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<ConditionContext> parser() {
      return PARSER;
    }

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

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

  public static final int SCOPE_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object scope_ = "";
  /**
   *
   *
   * <pre>
   * Required. The relative name of the root asset. Only resources and IAM
   * policies within the scope will be analyzed.
   *
   * This can only be an organization number (such as "organizations/123"), a
   * folder number (such as "folders/123"), a project ID (such as
   * "projects/my-project-id"), or a project number (such as "projects/12345").
   *
   * To know how to get organization id, visit [here
   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
   *
   * To know how to get folder or project id, visit [here
   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
   * </pre>
   *
   * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The scope.
   */
  @java.lang.Override
  public java.lang.String getScope() {
    java.lang.Object ref = scope_;
    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();
      scope_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The relative name of the root asset. Only resources and IAM
   * policies within the scope will be analyzed.
   *
   * This can only be an organization number (such as "organizations/123"), a
   * folder number (such as "folders/123"), a project ID (such as
   * "projects/my-project-id"), or a project number (such as "projects/12345").
   *
   * To know how to get organization id, visit [here
   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
   *
   * To know how to get folder or project id, visit [here
   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
   * </pre>
   *
   * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The bytes for scope.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getScopeBytes() {
    java.lang.Object ref = scope_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      scope_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2;
  private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_;
  /**
   *
   *
   * <pre>
   * Optional. Specifies a resource for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the resourceSelector field is set.
   */
  @java.lang.Override
  public boolean hasResourceSelector() {
    return resourceSelector_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies a resource for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The resourceSelector.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() {
    return resourceSelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()
        : resourceSelector_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies a resource for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder
      getResourceSelectorOrBuilder() {
    return resourceSelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()
        : resourceSelector_;
  }

  public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3;
  private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_;
  /**
   *
   *
   * <pre>
   * Optional. Specifies an identity for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the identitySelector field is set.
   */
  @java.lang.Override
  public boolean hasIdentitySelector() {
    return identitySelector_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies an identity for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The identitySelector.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() {
    return identitySelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()
        : identitySelector_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies an identity for analysis.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder
      getIdentitySelectorOrBuilder() {
    return identitySelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()
        : identitySelector_;
  }

  public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4;
  private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_;
  /**
   *
   *
   * <pre>
   * Optional. Specifies roles or permissions for analysis. This is optional.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the accessSelector field is set.
   */
  @java.lang.Override
  public boolean hasAccessSelector() {
    return accessSelector_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies roles or permissions for analysis. This is optional.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The accessSelector.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() {
    return accessSelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()
        : accessSelector_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Specifies roles or permissions for analysis. This is optional.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder
      getAccessSelectorOrBuilder() {
    return accessSelector_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()
        : accessSelector_;
  }

  public static final int OPTIONS_FIELD_NUMBER = 5;
  private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_;
  /**
   *
   *
   * <pre>
   * Optional. The query options.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the options field is set.
   */
  @java.lang.Override
  public boolean hasOptions() {
    return options_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. The query options.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The options.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() {
    return options_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()
        : options_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The query options.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() {
    return options_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()
        : options_;
  }

  public static final int CONDITION_CONTEXT_FIELD_NUMBER = 6;
  private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_;
  /**
   *
   *
   * <pre>
   * Optional. The hypothetical context for IAM conditions evaluation.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the conditionContext field is set.
   */
  @java.lang.Override
  public boolean hasConditionContext() {
    return conditionContext_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. The hypothetical context for IAM conditions evaluation.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The conditionContext.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() {
    return conditionContext_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()
        : conditionContext_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The hypothetical context for IAM conditions evaluation.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder
      getConditionContextOrBuilder() {
    return conditionContext_ == null
        ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()
        : conditionContext_;
  }

  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(scope_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_);
    }
    if (resourceSelector_ != null) {
      output.writeMessage(2, getResourceSelector());
    }
    if (identitySelector_ != null) {
      output.writeMessage(3, getIdentitySelector());
    }
    if (accessSelector_ != null) {
      output.writeMessage(4, getAccessSelector());
    }
    if (options_ != null) {
      output.writeMessage(5, getOptions());
    }
    if (conditionContext_ != null) {
      output.writeMessage(6, getConditionContext());
    }
    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(scope_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_);
    }
    if (resourceSelector_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceSelector());
    }
    if (identitySelector_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIdentitySelector());
    }
    if (accessSelector_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAccessSelector());
    }
    if (options_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOptions());
    }
    if (conditionContext_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConditionContext());
    }
    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.IamPolicyAnalysisQuery)) {
      return super.equals(obj);
    }
    com.google.cloud.asset.v1.IamPolicyAnalysisQuery other =
        (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) obj;

    if (!getScope().equals(other.getScope())) return false;
    if (hasResourceSelector() != other.hasResourceSelector()) return false;
    if (hasResourceSelector()) {
      if (!getResourceSelector().equals(other.getResourceSelector())) return false;
    }
    if (hasIdentitySelector() != other.hasIdentitySelector()) return false;
    if (hasIdentitySelector()) {
      if (!getIdentitySelector().equals(other.getIdentitySelector())) return false;
    }
    if (hasAccessSelector() != other.hasAccessSelector()) return false;
    if (hasAccessSelector()) {
      if (!getAccessSelector().equals(other.getAccessSelector())) return false;
    }
    if (hasOptions() != other.hasOptions()) return false;
    if (hasOptions()) {
      if (!getOptions().equals(other.getOptions())) return false;
    }
    if (hasConditionContext() != other.hasConditionContext()) return false;
    if (hasConditionContext()) {
      if (!getConditionContext().equals(other.getConditionContext())) 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) + SCOPE_FIELD_NUMBER;
    hash = (53 * hash) + getScope().hashCode();
    if (hasResourceSelector()) {
      hash = (37 * hash) + RESOURCE_SELECTOR_FIELD_NUMBER;
      hash = (53 * hash) + getResourceSelector().hashCode();
    }
    if (hasIdentitySelector()) {
      hash = (37 * hash) + IDENTITY_SELECTOR_FIELD_NUMBER;
      hash = (53 * hash) + getIdentitySelector().hashCode();
    }
    if (hasAccessSelector()) {
      hash = (37 * hash) + ACCESS_SELECTOR_FIELD_NUMBER;
      hash = (53 * hash) + getAccessSelector().hashCode();
    }
    if (hasOptions()) {
      hash = (37 * hash) + OPTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getOptions().hashCode();
    }
    if (hasConditionContext()) {
      hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + getConditionContext().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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>
   * IAM policy analysis query message.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery)
      com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      scope_ = "";
      resourceSelector_ = null;
      if (resourceSelectorBuilder_ != null) {
        resourceSelectorBuilder_.dispose();
        resourceSelectorBuilder_ = null;
      }
      identitySelector_ = null;
      if (identitySelectorBuilder_ != null) {
        identitySelectorBuilder_.dispose();
        identitySelectorBuilder_ = null;
      }
      accessSelector_ = null;
      if (accessSelectorBuilder_ != null) {
        accessSelectorBuilder_.dispose();
        accessSelectorBuilder_ = null;
      }
      options_ = null;
      if (optionsBuilder_ != null) {
        optionsBuilder_.dispose();
        optionsBuilder_ = null;
      }
      conditionContext_ = null;
      if (conditionContextBuilder_ != null) {
        conditionContextBuilder_.dispose();
        conditionContextBuilder_ = 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_IamPolicyAnalysisQuery_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.scope_ = scope_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.resourceSelector_ =
            resourceSelectorBuilder_ == null ? resourceSelector_ : resourceSelectorBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.identitySelector_ =
            identitySelectorBuilder_ == null ? identitySelector_ : identitySelectorBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.accessSelector_ =
            accessSelectorBuilder_ == null ? accessSelector_ : accessSelectorBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.conditionContext_ =
            conditionContextBuilder_ == null ? conditionContext_ : conditionContextBuilder_.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.IamPolicyAnalysisQuery) {
        return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) {
      if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance())
        return this;
      if (!other.getScope().isEmpty()) {
        scope_ = other.scope_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasResourceSelector()) {
        mergeResourceSelector(other.getResourceSelector());
      }
      if (other.hasIdentitySelector()) {
        mergeIdentitySelector(other.getIdentitySelector());
      }
      if (other.hasAccessSelector()) {
        mergeAccessSelector(other.getAccessSelector());
      }
      if (other.hasOptions()) {
        mergeOptions(other.getOptions());
      }
      if (other.hasConditionContext()) {
        mergeConditionContext(other.getConditionContext());
      }
      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:
              {
                scope_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(
                    getResourceSelectorFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(
                    getIdentitySelectorFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getAccessSelectorFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(
                    getConditionContextFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            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 scope_ = "";
    /**
     *
     *
     * <pre>
     * Required. The relative name of the root asset. Only resources and IAM
     * policies within the scope will be analyzed.
     *
     * This can only be an organization number (such as "organizations/123"), a
     * folder number (such as "folders/123"), a project ID (such as
     * "projects/my-project-id"), or a project number (such as "projects/12345").
     *
     * To know how to get organization id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
     *
     * To know how to get folder or project id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
     * </pre>
     *
     * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The scope.
     */
    public java.lang.String getScope() {
      java.lang.Object ref = scope_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        scope_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The relative name of the root asset. Only resources and IAM
     * policies within the scope will be analyzed.
     *
     * This can only be an organization number (such as "organizations/123"), a
     * folder number (such as "folders/123"), a project ID (such as
     * "projects/my-project-id"), or a project number (such as "projects/12345").
     *
     * To know how to get organization id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
     *
     * To know how to get folder or project id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
     * </pre>
     *
     * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for scope.
     */
    public com.google.protobuf.ByteString getScopeBytes() {
      java.lang.Object ref = scope_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        scope_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The relative name of the root asset. Only resources and IAM
     * policies within the scope will be analyzed.
     *
     * This can only be an organization number (such as "organizations/123"), a
     * folder number (such as "folders/123"), a project ID (such as
     * "projects/my-project-id"), or a project number (such as "projects/12345").
     *
     * To know how to get organization id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
     *
     * To know how to get folder or project id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
     * </pre>
     *
     * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The scope to set.
     * @return This builder for chaining.
     */
    public Builder setScope(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      scope_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The relative name of the root asset. Only resources and IAM
     * policies within the scope will be analyzed.
     *
     * This can only be an organization number (such as "organizations/123"), a
     * folder number (such as "folders/123"), a project ID (such as
     * "projects/my-project-id"), or a project number (such as "projects/12345").
     *
     * To know how to get organization id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
     *
     * To know how to get folder or project id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
     * </pre>
     *
     * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearScope() {
      scope_ = getDefaultInstance().getScope();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The relative name of the root asset. Only resources and IAM
     * policies within the scope will be analyzed.
     *
     * This can only be an organization number (such as "organizations/123"), a
     * folder number (such as "folders/123"), a project ID (such as
     * "projects/my-project-id"), or a project number (such as "projects/12345").
     *
     * To know how to get organization id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
     *
     * To know how to get folder or project id, visit [here
     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
     * </pre>
     *
     * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The bytes for scope to set.
     * @return This builder for chaining.
     */
    public Builder setScopeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      scope_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>
        resourceSelectorBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the resourceSelector field is set.
     */
    public boolean hasResourceSelector() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The resourceSelector.
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() {
      if (resourceSelectorBuilder_ == null) {
        return resourceSelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()
            : resourceSelector_;
      } else {
        return resourceSelectorBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setResourceSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) {
      if (resourceSelectorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resourceSelector_ = value;
      } else {
        resourceSelectorBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setResourceSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue) {
      if (resourceSelectorBuilder_ == null) {
        resourceSelector_ = builderForValue.build();
      } else {
        resourceSelectorBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeResourceSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) {
      if (resourceSelectorBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && resourceSelector_ != null
            && resourceSelector_
                != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector
                    .getDefaultInstance()) {
          getResourceSelectorBuilder().mergeFrom(value);
        } else {
          resourceSelector_ = value;
        }
      } else {
        resourceSelectorBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearResourceSelector() {
      bitField0_ = (bitField0_ & ~0x00000002);
      resourceSelector_ = null;
      if (resourceSelectorBuilder_ != null) {
        resourceSelectorBuilder_.dispose();
        resourceSelectorBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder
        getResourceSelectorBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getResourceSelectorFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder
        getResourceSelectorOrBuilder() {
      if (resourceSelectorBuilder_ != null) {
        return resourceSelectorBuilder_.getMessageOrBuilder();
      } else {
        return resourceSelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()
            : resourceSelector_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies a resource for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>
        getResourceSelectorFieldBuilder() {
      if (resourceSelectorBuilder_ == null) {
        resourceSelectorBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>(
                getResourceSelector(), getParentForChildren(), isClean());
        resourceSelector_ = null;
      }
      return resourceSelectorBuilder_;
    }

    private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>
        identitySelectorBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the identitySelector field is set.
     */
    public boolean hasIdentitySelector() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The identitySelector.
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() {
      if (identitySelectorBuilder_ == null) {
        return identitySelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()
            : identitySelector_;
      } else {
        return identitySelectorBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setIdentitySelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) {
      if (identitySelectorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        identitySelector_ = value;
      } else {
        identitySelectorBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setIdentitySelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue) {
      if (identitySelectorBuilder_ == null) {
        identitySelector_ = builderForValue.build();
      } else {
        identitySelectorBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeIdentitySelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) {
      if (identitySelectorBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && identitySelector_ != null
            && identitySelector_
                != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector
                    .getDefaultInstance()) {
          getIdentitySelectorBuilder().mergeFrom(value);
        } else {
          identitySelector_ = value;
        }
      } else {
        identitySelectorBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearIdentitySelector() {
      bitField0_ = (bitField0_ & ~0x00000004);
      identitySelector_ = null;
      if (identitySelectorBuilder_ != null) {
        identitySelectorBuilder_.dispose();
        identitySelectorBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder
        getIdentitySelectorBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getIdentitySelectorFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder
        getIdentitySelectorOrBuilder() {
      if (identitySelectorBuilder_ != null) {
        return identitySelectorBuilder_.getMessageOrBuilder();
      } else {
        return identitySelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()
            : identitySelector_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies an identity for analysis.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>
        getIdentitySelectorFieldBuilder() {
      if (identitySelectorBuilder_ == null) {
        identitySelectorBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>(
                getIdentitySelector(), getParentForChildren(), isClean());
        identitySelector_ = null;
      }
      return identitySelectorBuilder_;
    }

    private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>
        accessSelectorBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the accessSelector field is set.
     */
    public boolean hasAccessSelector() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The accessSelector.
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() {
      if (accessSelectorBuilder_ == null) {
        return accessSelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()
            : accessSelector_;
      } else {
        return accessSelectorBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setAccessSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) {
      if (accessSelectorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        accessSelector_ = value;
      } else {
        accessSelectorBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setAccessSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue) {
      if (accessSelectorBuilder_ == null) {
        accessSelector_ = builderForValue.build();
      } else {
        accessSelectorBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeAccessSelector(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) {
      if (accessSelectorBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && accessSelector_ != null
            && accessSelector_
                != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector
                    .getDefaultInstance()) {
          getAccessSelectorBuilder().mergeFrom(value);
        } else {
          accessSelector_ = value;
        }
      } else {
        accessSelectorBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearAccessSelector() {
      bitField0_ = (bitField0_ & ~0x00000008);
      accessSelector_ = null;
      if (accessSelectorBuilder_ != null) {
        accessSelectorBuilder_.dispose();
        accessSelectorBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder
        getAccessSelectorBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getAccessSelectorFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder
        getAccessSelectorOrBuilder() {
      if (accessSelectorBuilder_ != null) {
        return accessSelectorBuilder_.getMessageOrBuilder();
      } else {
        return accessSelector_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()
            : accessSelector_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Specifies roles or permissions for analysis. This is optional.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>
        getAccessSelectorFieldBuilder() {
      if (accessSelectorBuilder_ == null) {
        accessSelectorBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>(
                getAccessSelector(), getParentForChildren(), isClean());
        accessSelector_ = null;
      }
      return accessSelectorBuilder_;
    }

    private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>
        optionsBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the options field is set.
     */
    public boolean hasOptions() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The options.
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() {
      if (optionsBuilder_ == null) {
        return options_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()
            : options_;
      } else {
        return optionsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) {
      if (optionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        options_ = value;
      } else {
        optionsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setOptions(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue) {
      if (optionsBuilder_ == null) {
        options_ = builderForValue.build();
      } else {
        optionsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) {
      if (optionsBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && options_ != null
            && options_
                != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) {
          getOptionsBuilder().mergeFrom(value);
        } else {
          options_ = value;
        }
      } else {
        optionsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearOptions() {
      bitField0_ = (bitField0_ & ~0x00000010);
      options_ = null;
      if (optionsBuilder_ != null) {
        optionsBuilder_.dispose();
        optionsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder getOptionsBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getOptionsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() {
      if (optionsBuilder_ != null) {
        return optionsBuilder_.getMessageOrBuilder();
      } else {
        return options_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()
            : options_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The query options.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>
        getOptionsFieldBuilder() {
      if (optionsBuilder_ == null) {
        optionsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>(
                getOptions(), getParentForChildren(), isClean());
        options_ = null;
      }
      return optionsBuilder_;
    }

    private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>
        conditionContextBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the conditionContext field is set.
     */
    public boolean hasConditionContext() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The conditionContext.
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() {
      if (conditionContextBuilder_ == null) {
        return conditionContext_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()
            : conditionContext_;
      } else {
        return conditionContextBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setConditionContext(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) {
      if (conditionContextBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        conditionContext_ = value;
      } else {
        conditionContextBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setConditionContext(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue) {
      if (conditionContextBuilder_ == null) {
        conditionContext_ = builderForValue.build();
      } else {
        conditionContextBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeConditionContext(
        com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) {
      if (conditionContextBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && conditionContext_ != null
            && conditionContext_
                != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext
                    .getDefaultInstance()) {
          getConditionContextBuilder().mergeFrom(value);
        } else {
          conditionContext_ = value;
        }
      } else {
        conditionContextBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearConditionContext() {
      bitField0_ = (bitField0_ & ~0x00000020);
      conditionContext_ = null;
      if (conditionContextBuilder_ != null) {
        conditionContextBuilder_.dispose();
        conditionContextBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder
        getConditionContextBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getConditionContextFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder
        getConditionContextOrBuilder() {
      if (conditionContextBuilder_ != null) {
        return conditionContextBuilder_.getMessageOrBuilder();
      } else {
        return conditionContext_ == null
            ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()
            : conditionContext_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The hypothetical context for IAM conditions evaluation.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder,
            com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>
        getConditionContextFieldBuilder() {
      if (conditionContextBuilder_ == null) {
        conditionContextBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder,
                com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>(
                getConditionContext(), getParentForChildren(), isClean());
        conditionContext_ = null;
      }
      return conditionContextBuilder_;
    }

    @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.IamPolicyAnalysisQuery)
  }

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

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

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

  private static final com.google.protobuf.Parser<IamPolicyAnalysisQuery> PARSER =
      new com.google.protobuf.AbstractParser<IamPolicyAnalysisQuery>() {
        @java.lang.Override
        public IamPolicyAnalysisQuery 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<IamPolicyAnalysisQuery> parser() {
    return PARSER;
  }

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

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