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

package com.google.cloud.asset.v1;

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

  private QueryAssetsOutputConfig() {}

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

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

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

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

  public interface BigQueryDestinationOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     * </pre>
     *
     * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The dataset.
     */
    java.lang.String getDataset();
    /**
     *
     *
     * <pre>
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     * </pre>
     *
     * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for dataset.
     */
    com.google.protobuf.ByteString getDatasetBytes();

    /**
     *
     *
     * <pre>
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     * </pre>
     *
     * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The table.
     */
    java.lang.String getTable();
    /**
     *
     *
     * <pre>
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     * </pre>
     *
     * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for table.
     */
    com.google.protobuf.ByteString getTableBytes();

    /**
     *
     *
     * <pre>
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     * </pre>
     *
     * <code>string write_disposition = 3;</code>
     *
     * @return The writeDisposition.
     */
    java.lang.String getWriteDisposition();
    /**
     *
     *
     * <pre>
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     * </pre>
     *
     * <code>string write_disposition = 3;</code>
     *
     * @return The bytes for writeDisposition.
     */
    com.google.protobuf.ByteString getWriteDispositionBytes();
  }
  /**
   *
   *
   * <pre>
   * BigQuery destination.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination}
   */
  public static final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)
      BigQueryDestinationOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use BigQueryDestination.newBuilder() to construct.
    private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private BigQueryDestination() {
      dataset_ = "";
      table_ = "";
      writeDisposition_ = "";
    }

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

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

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

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

    public static final int DATASET_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object dataset_ = "";
    /**
     *
     *
     * <pre>
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     * </pre>
     *
     * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The dataset.
     */
    @java.lang.Override
    public java.lang.String getDataset() {
      java.lang.Object ref = dataset_;
      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();
        dataset_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     * </pre>
     *
     * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for dataset.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getDatasetBytes() {
      java.lang.Object ref = dataset_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        dataset_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int TABLE_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object table_ = "";
    /**
     *
     *
     * <pre>
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     * </pre>
     *
     * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The table.
     */
    @java.lang.Override
    public java.lang.String getTable() {
      java.lang.Object ref = table_;
      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();
        table_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     * </pre>
     *
     * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for table.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTableBytes() {
      java.lang.Object ref = table_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        table_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int WRITE_DISPOSITION_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object writeDisposition_ = "";
    /**
     *
     *
     * <pre>
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     * </pre>
     *
     * <code>string write_disposition = 3;</code>
     *
     * @return The writeDisposition.
     */
    @java.lang.Override
    public java.lang.String getWriteDisposition() {
      java.lang.Object ref = writeDisposition_;
      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();
        writeDisposition_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     * </pre>
     *
     * <code>string write_disposition = 3;</code>
     *
     * @return The bytes for writeDisposition.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getWriteDispositionBytes() {
      java.lang.Object ref = writeDisposition_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        writeDisposition_ = 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(dataset_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, writeDisposition_);
      }
      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(dataset_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, writeDisposition_);
      }
      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.QueryAssetsOutputConfig.BigQueryDestination)) {
        return super.equals(obj);
      }
      com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other =
          (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) obj;

      if (!getDataset().equals(other.getDataset())) return false;
      if (!getTable().equals(other.getTable())) return false;
      if (!getWriteDisposition().equals(other.getWriteDisposition())) 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) + DATASET_FIELD_NUMBER;
      hash = (53 * hash) + getDataset().hashCode();
      hash = (37 * hash) + TABLE_FIELD_NUMBER;
      hash = (53 * hash) + getTable().hashCode();
      hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER;
      hash = (53 * hash) + getWriteDisposition().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

    public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
        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.QueryAssetsOutputConfig.BigQueryDestination 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.QueryAssetsOutputConfig.BigQueryDestination 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.QueryAssetsOutputConfig.BigQueryDestination 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>
     * BigQuery destination.
     * </pre>
     *
     * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)
        com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.asset.v1.AssetServiceProto
            .internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor;
      }

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

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

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

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

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

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

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

      private void buildPartial0(
          com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.dataset_ = dataset_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.table_ = table_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.writeDisposition_ = writeDisposition_;
        }
      }

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

      public Builder mergeFrom(
          com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other) {
        if (other
            == com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
                .getDefaultInstance()) return this;
        if (!other.getDataset().isEmpty()) {
          dataset_ = other.dataset_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getTable().isEmpty()) {
          table_ = other.table_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (!other.getWriteDisposition().isEmpty()) {
          writeDisposition_ = other.writeDisposition_;
          bitField0_ |= 0x00000004;
          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:
                {
                  dataset_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  table_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              case 26:
                {
                  writeDisposition_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              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 dataset_ = "";
      /**
       *
       *
       * <pre>
       * Required. The BigQuery dataset where the query results will be saved. It
       * has the format of "projects/{projectId}/datasets/{datasetId}".
       * </pre>
       *
       * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The dataset.
       */
      public java.lang.String getDataset() {
        java.lang.Object ref = dataset_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          dataset_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery dataset where the query results will be saved. It
       * has the format of "projects/{projectId}/datasets/{datasetId}".
       * </pre>
       *
       * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The bytes for dataset.
       */
      public com.google.protobuf.ByteString getDatasetBytes() {
        java.lang.Object ref = dataset_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          dataset_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery dataset where the query results will be saved. It
       * has the format of "projects/{projectId}/datasets/{datasetId}".
       * </pre>
       *
       * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The dataset to set.
       * @return This builder for chaining.
       */
      public Builder setDataset(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        dataset_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery dataset where the query results will be saved. It
       * has the format of "projects/{projectId}/datasets/{datasetId}".
       * </pre>
       *
       * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearDataset() {
        dataset_ = getDefaultInstance().getDataset();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery dataset where the query results will be saved. It
       * has the format of "projects/{projectId}/datasets/{datasetId}".
       * </pre>
       *
       * <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The bytes for dataset to set.
       * @return This builder for chaining.
       */
      public Builder setDatasetBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        dataset_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object table_ = "";
      /**
       *
       *
       * <pre>
       * Required. The BigQuery table where the query results will be saved. If
       * this table does not exist, a new table with the given name will be
       * created.
       * </pre>
       *
       * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The table.
       */
      public java.lang.String getTable() {
        java.lang.Object ref = table_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          table_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery table where the query results will be saved. If
       * this table does not exist, a new table with the given name will be
       * created.
       * </pre>
       *
       * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The bytes for table.
       */
      public com.google.protobuf.ByteString getTableBytes() {
        java.lang.Object ref = table_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          table_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery table where the query results will be saved. If
       * this table does not exist, a new table with the given name will be
       * created.
       * </pre>
       *
       * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The table to set.
       * @return This builder for chaining.
       */
      public Builder setTable(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        table_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery table where the query results will be saved. If
       * this table does not exist, a new table with the given name will be
       * created.
       * </pre>
       *
       * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearTable() {
        table_ = getDefaultInstance().getTable();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Required. The BigQuery table where the query results will be saved. If
       * this table does not exist, a new table with the given name will be
       * created.
       * </pre>
       *
       * <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @param value The bytes for table to set.
       * @return This builder for chaining.
       */
      public Builder setTableBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        table_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private java.lang.Object writeDisposition_ = "";
      /**
       *
       *
       * <pre>
       * Specifies the action that occurs if the destination table or partition
       * already exists. The following values are supported:
       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
       * overwrites the entire table or all the partitions data.
       * * WRITE_APPEND: If the table or partition already exists, BigQuery
       * appends the data to the table or the latest partition.
       * * WRITE_EMPTY: If the table already exists and contains data, a
       * 'duplicate' error is returned in the job result.
       * The default value is WRITE_EMPTY.
       * </pre>
       *
       * <code>string write_disposition = 3;</code>
       *
       * @return The writeDisposition.
       */
      public java.lang.String getWriteDisposition() {
        java.lang.Object ref = writeDisposition_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          writeDisposition_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Specifies the action that occurs if the destination table or partition
       * already exists. The following values are supported:
       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
       * overwrites the entire table or all the partitions data.
       * * WRITE_APPEND: If the table or partition already exists, BigQuery
       * appends the data to the table or the latest partition.
       * * WRITE_EMPTY: If the table already exists and contains data, a
       * 'duplicate' error is returned in the job result.
       * The default value is WRITE_EMPTY.
       * </pre>
       *
       * <code>string write_disposition = 3;</code>
       *
       * @return The bytes for writeDisposition.
       */
      public com.google.protobuf.ByteString getWriteDispositionBytes() {
        java.lang.Object ref = writeDisposition_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          writeDisposition_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Specifies the action that occurs if the destination table or partition
       * already exists. The following values are supported:
       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
       * overwrites the entire table or all the partitions data.
       * * WRITE_APPEND: If the table or partition already exists, BigQuery
       * appends the data to the table or the latest partition.
       * * WRITE_EMPTY: If the table already exists and contains data, a
       * 'duplicate' error is returned in the job result.
       * The default value is WRITE_EMPTY.
       * </pre>
       *
       * <code>string write_disposition = 3;</code>
       *
       * @param value The writeDisposition to set.
       * @return This builder for chaining.
       */
      public Builder setWriteDisposition(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        writeDisposition_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Specifies the action that occurs if the destination table or partition
       * already exists. The following values are supported:
       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
       * overwrites the entire table or all the partitions data.
       * * WRITE_APPEND: If the table or partition already exists, BigQuery
       * appends the data to the table or the latest partition.
       * * WRITE_EMPTY: If the table already exists and contains data, a
       * 'duplicate' error is returned in the job result.
       * The default value is WRITE_EMPTY.
       * </pre>
       *
       * <code>string write_disposition = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearWriteDisposition() {
        writeDisposition_ = getDefaultInstance().getWriteDisposition();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Specifies the action that occurs if the destination table or partition
       * already exists. The following values are supported:
       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
       * overwrites the entire table or all the partitions data.
       * * WRITE_APPEND: If the table or partition already exists, BigQuery
       * appends the data to the table or the latest partition.
       * * WRITE_EMPTY: If the table already exists and contains data, a
       * 'duplicate' error is returned in the job result.
       * The default value is WRITE_EMPTY.
       * </pre>
       *
       * <code>string write_disposition = 3;</code>
       *
       * @param value The bytes for writeDisposition to set.
       * @return This builder for chaining.
       */
      public Builder setWriteDispositionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        writeDisposition_ = value;
        bitField0_ |= 0x00000004;
        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.QueryAssetsOutputConfig.BigQueryDestination)
    }

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

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

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

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

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

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

  public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 1;
  private com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
      bigqueryDestination_;
  /**
   *
   *
   * <pre>
   * BigQuery destination where the query results will be saved.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
   * </code>
   *
   * @return Whether the bigqueryDestination field is set.
   */
  @java.lang.Override
  public boolean hasBigqueryDestination() {
    return bigqueryDestination_ != null;
  }
  /**
   *
   *
   * <pre>
   * BigQuery destination where the query results will be saved.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
   * </code>
   *
   * @return The bigqueryDestination.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
      getBigqueryDestination() {
    return bigqueryDestination_ == null
        ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance()
        : bigqueryDestination_;
  }
  /**
   *
   *
   * <pre>
   * BigQuery destination where the query results will be saved.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder
      getBigqueryDestinationOrBuilder() {
    return bigqueryDestination_ == null
        ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance()
        : bigqueryDestination_;
  }

  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 (bigqueryDestination_ != null) {
      output.writeMessage(1, getBigqueryDestination());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (bigqueryDestination_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryDestination());
    }
    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.QueryAssetsOutputConfig)) {
      return super.equals(obj);
    }
    com.google.cloud.asset.v1.QueryAssetsOutputConfig other =
        (com.google.cloud.asset.v1.QueryAssetsOutputConfig) obj;

    if (hasBigqueryDestination() != other.hasBigqueryDestination()) return false;
    if (hasBigqueryDestination()) {
      if (!getBigqueryDestination().equals(other.getBigqueryDestination())) 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 (hasBigqueryDestination()) {
      hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER;
      hash = (53 * hash) + getBigqueryDestination().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

  public static com.google.cloud.asset.v1.QueryAssetsOutputConfig 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.QueryAssetsOutputConfig 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.QueryAssetsOutputConfig 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.QueryAssetsOutputConfig 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>
   * Output configuration query assets.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig)
      com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      bigqueryDestination_ = null;
      if (bigqueryDestinationBuilder_ != null) {
        bigqueryDestinationBuilder_.dispose();
        bigqueryDestinationBuilder_ = 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_QueryAssetsOutputConfig_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.cloud.asset.v1.QueryAssetsOutputConfig result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.bigqueryDestination_ =
            bigqueryDestinationBuilder_ == null
                ? bigqueryDestination_
                : bigqueryDestinationBuilder_.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.QueryAssetsOutputConfig) {
        return mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig other) {
      if (other == com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance())
        return this;
      if (other.hasBigqueryDestination()) {
        mergeBigqueryDestination(other.getBigqueryDestination());
      }
      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(
                    getBigqueryDestinationFieldBuilder().getBuilder(), extensionRegistry);
                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 com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
        bigqueryDestination_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination,
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder,
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder>
        bigqueryDestinationBuilder_;
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     *
     * @return Whether the bigqueryDestination field is set.
     */
    public boolean hasBigqueryDestination() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     *
     * @return The bigqueryDestination.
     */
    public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
        getBigqueryDestination() {
      if (bigqueryDestinationBuilder_ == null) {
        return bigqueryDestination_ == null
            ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
                .getDefaultInstance()
            : bigqueryDestination_;
      } else {
        return bigqueryDestinationBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public Builder setBigqueryDestination(
        com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) {
      if (bigqueryDestinationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        bigqueryDestination_ = value;
      } else {
        bigqueryDestinationBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public Builder setBigqueryDestination(
        com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder
            builderForValue) {
      if (bigqueryDestinationBuilder_ == null) {
        bigqueryDestination_ = builderForValue.build();
      } else {
        bigqueryDestinationBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public Builder mergeBigqueryDestination(
        com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) {
      if (bigqueryDestinationBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)
            && bigqueryDestination_ != null
            && bigqueryDestination_
                != com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
                    .getDefaultInstance()) {
          getBigqueryDestinationBuilder().mergeFrom(value);
        } else {
          bigqueryDestination_ = value;
        }
      } else {
        bigqueryDestinationBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public Builder clearBigqueryDestination() {
      bitField0_ = (bitField0_ & ~0x00000001);
      bigqueryDestination_ = null;
      if (bigqueryDestinationBuilder_ != null) {
        bigqueryDestinationBuilder_.dispose();
        bigqueryDestinationBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder
        getBigqueryDestinationBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getBigqueryDestinationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder
        getBigqueryDestinationOrBuilder() {
      if (bigqueryDestinationBuilder_ != null) {
        return bigqueryDestinationBuilder_.getMessageOrBuilder();
      } else {
        return bigqueryDestination_ == null
            ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination
                .getDefaultInstance()
            : bigqueryDestination_;
      }
    }
    /**
     *
     *
     * <pre>
     * BigQuery destination where the query results will be saved.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination,
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder,
            com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder>
        getBigqueryDestinationFieldBuilder() {
      if (bigqueryDestinationBuilder_ == null) {
        bigqueryDestinationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination,
                com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder,
                com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder>(
                getBigqueryDestination(), getParentForChildren(), isClean());
        bigqueryDestination_ = null;
      }
      return bigqueryDestinationBuilder_;
    }

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

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

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

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

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

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

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