// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/bigquery/datatransfer/v1/transfer.proto

package com.google.cloud.bigquery.datatransfer.v1;

/**
 *
 *
 * <pre>
 * Represents a data transfer configuration. A transfer configuration
 * contains all metadata needed to perform a data transfer. For example,
 * `destination_dataset_id` specifies where data should be stored.
 * When a new transfer configuration is created, the specified
 * `destination_dataset_id` is created when needed and shared with the
 * appropriate data source service account.
 * </pre>
 *
 * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.TransferConfig}
 */
public final class TransferConfig extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.TransferConfig)
    TransferConfigOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use TransferConfig.newBuilder() to construct.
  private TransferConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private TransferConfig() {
    name_ = "";
    destinationDatasetId_ = "";
    displayName_ = "";
    dataSourceId_ = "";
    schedule_ = "";
    state_ = 0;
    datasetRegion_ = "";
  }

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

  private TransferConfig(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    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();

              name_ = s;
              break;
            }
          case 18:
            {
              java.lang.String s = input.readStringRequireUtf8();

              destinationDatasetId_ = s;
              break;
            }
          case 26:
            {
              java.lang.String s = input.readStringRequireUtf8();

              displayName_ = s;
              break;
            }
          case 34:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (updateTime_ != null) {
                subBuilder = updateTime_.toBuilder();
              }
              updateTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(updateTime_);
                updateTime_ = subBuilder.buildPartial();
              }

              break;
            }
          case 42:
            {
              java.lang.String s = input.readStringRequireUtf8();

              dataSourceId_ = s;
              break;
            }
          case 58:
            {
              java.lang.String s = input.readStringRequireUtf8();

              schedule_ = s;
              break;
            }
          case 66:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (nextRunTime_ != null) {
                subBuilder = nextRunTime_.toBuilder();
              }
              nextRunTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(nextRunTime_);
                nextRunTime_ = subBuilder.buildPartial();
              }

              break;
            }
          case 74:
            {
              com.google.protobuf.Struct.Builder subBuilder = null;
              if (params_ != null) {
                subBuilder = params_.toBuilder();
              }
              params_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(params_);
                params_ = subBuilder.buildPartial();
              }

              break;
            }
          case 80:
            {
              int rawValue = input.readEnum();

              state_ = rawValue;
              break;
            }
          case 88:
            {
              userId_ = input.readInt64();
              break;
            }
          case 96:
            {
              dataRefreshWindowDays_ = input.readInt32();
              break;
            }
          case 104:
            {
              disabled_ = input.readBool();
              break;
            }
          case 114:
            {
              java.lang.String s = input.readStringRequireUtf8();

              datasetRegion_ = s;
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.bigquery.datatransfer.v1.TransferProto
        .internal_static_google_cloud_bigquery_datatransfer_v1_TransferConfig_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.bigquery.datatransfer.v1.TransferProto
        .internal_static_google_cloud_bigquery_datatransfer_v1_TransferConfig_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.bigquery.datatransfer.v1.TransferConfig.class,
            com.google.cloud.bigquery.datatransfer.v1.TransferConfig.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   * <pre>
   * The resource name of the transfer config.
   * Transfer config names have the form
   * `projects/{project_id}/transferConfigs/{config_id}`.
   * Where `config_id` is usually a uuid, even though it is not
   * guaranteed or required. The name is ignored when creating a transfer
   * config.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The resource name of the transfer config.
   * Transfer config names have the form
   * `projects/{project_id}/transferConfigs/{config_id}`.
   * Where `config_id` is usually a uuid, even though it is not
   * guaranteed or required. The name is ignored when creating a transfer
   * config.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESTINATION_DATASET_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object destinationDatasetId_;
  /**
   *
   *
   * <pre>
   * The BigQuery target dataset id.
   * </pre>
   *
   * <code>string destination_dataset_id = 2;</code>
   */
  public java.lang.String getDestinationDatasetId() {
    java.lang.Object ref = destinationDatasetId_;
    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();
      destinationDatasetId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The BigQuery target dataset id.
   * </pre>
   *
   * <code>string destination_dataset_id = 2;</code>
   */
  public com.google.protobuf.ByteString getDestinationDatasetIdBytes() {
    java.lang.Object ref = destinationDatasetId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      destinationDatasetId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISPLAY_NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object displayName_;
  /**
   *
   *
   * <pre>
   * User specified display name for the data transfer.
   * </pre>
   *
   * <code>string display_name = 3;</code>
   */
  public java.lang.String getDisplayName() {
    java.lang.Object ref = displayName_;
    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();
      displayName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * User specified display name for the data transfer.
   * </pre>
   *
   * <code>string display_name = 3;</code>
   */
  public com.google.protobuf.ByteString getDisplayNameBytes() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      displayName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_SOURCE_ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object dataSourceId_;
  /**
   *
   *
   * <pre>
   * Data source id. Cannot be changed once data transfer is created.
   * </pre>
   *
   * <code>string data_source_id = 5;</code>
   */
  public java.lang.String getDataSourceId() {
    java.lang.Object ref = dataSourceId_;
    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();
      dataSourceId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Data source id. Cannot be changed once data transfer is created.
   * </pre>
   *
   * <code>string data_source_id = 5;</code>
   */
  public com.google.protobuf.ByteString getDataSourceIdBytes() {
    java.lang.Object ref = dataSourceId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      dataSourceId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PARAMS_FIELD_NUMBER = 9;
  private com.google.protobuf.Struct params_;
  /**
   *
   *
   * <pre>
   * Data transfer specific parameters.
   * </pre>
   *
   * <code>.google.protobuf.Struct params = 9;</code>
   */
  public boolean hasParams() {
    return params_ != null;
  }
  /**
   *
   *
   * <pre>
   * Data transfer specific parameters.
   * </pre>
   *
   * <code>.google.protobuf.Struct params = 9;</code>
   */
  public com.google.protobuf.Struct getParams() {
    return params_ == null ? com.google.protobuf.Struct.getDefaultInstance() : params_;
  }
  /**
   *
   *
   * <pre>
   * Data transfer specific parameters.
   * </pre>
   *
   * <code>.google.protobuf.Struct params = 9;</code>
   */
  public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
    return getParams();
  }

  public static final int SCHEDULE_FIELD_NUMBER = 7;
  private volatile java.lang.Object schedule_;
  /**
   *
   *
   * <pre>
   * Data transfer schedule.
   * If the data source does not support a custom schedule, this should be
   * empty. If it is empty, the default value for the data source will be
   * used.
   * The specified times are in UTC.
   * Examples of valid format:
   * `1st,3rd monday of month 15:30`,
   * `every wed,fri of jan,jun 13:15`, and
   * `first sunday of quarter 00:00`.
   * See more explanation about the format here:
   * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
   * NOTE: the granularity should be at least 8 hours, or less frequent.
   * </pre>
   *
   * <code>string schedule = 7;</code>
   */
  public java.lang.String getSchedule() {
    java.lang.Object ref = schedule_;
    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();
      schedule_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Data transfer schedule.
   * If the data source does not support a custom schedule, this should be
   * empty. If it is empty, the default value for the data source will be
   * used.
   * The specified times are in UTC.
   * Examples of valid format:
   * `1st,3rd monday of month 15:30`,
   * `every wed,fri of jan,jun 13:15`, and
   * `first sunday of quarter 00:00`.
   * See more explanation about the format here:
   * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
   * NOTE: the granularity should be at least 8 hours, or less frequent.
   * </pre>
   *
   * <code>string schedule = 7;</code>
   */
  public com.google.protobuf.ByteString getScheduleBytes() {
    java.lang.Object ref = schedule_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      schedule_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_REFRESH_WINDOW_DAYS_FIELD_NUMBER = 12;
  private int dataRefreshWindowDays_;
  /**
   *
   *
   * <pre>
   * The number of days to look back to automatically refresh the data.
   * For example, if `data_refresh_window_days = 10`, then every day
   * BigQuery reingests data for [today-10, today-1], rather than ingesting data
   * for just [today-1].
   * Only valid if the data source supports the feature. Set the value to  0
   * to use the default value.
   * </pre>
   *
   * <code>int32 data_refresh_window_days = 12;</code>
   */
  public int getDataRefreshWindowDays() {
    return dataRefreshWindowDays_;
  }

  public static final int DISABLED_FIELD_NUMBER = 13;
  private boolean disabled_;
  /**
   *
   *
   * <pre>
   * Is this config disabled. When set to true, no runs are scheduled
   * for a given transfer.
   * </pre>
   *
   * <code>bool disabled = 13;</code>
   */
  public boolean getDisabled() {
    return disabled_;
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. Data transfer modification time. Ignored by server on input.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 4;</code>
   */
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Data transfer modification time. Ignored by server on input.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 4;</code>
   */
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Data transfer modification time. Ignored by server on input.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 4;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return getUpdateTime();
  }

  public static final int NEXT_RUN_TIME_FIELD_NUMBER = 8;
  private com.google.protobuf.Timestamp nextRunTime_;
  /**
   *
   *
   * <pre>
   * Output only. Next time when data transfer will run.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
   */
  public boolean hasNextRunTime() {
    return nextRunTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Next time when data transfer will run.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
   */
  public com.google.protobuf.Timestamp getNextRunTime() {
    return nextRunTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : nextRunTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Next time when data transfer will run.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getNextRunTimeOrBuilder() {
    return getNextRunTime();
  }

  public static final int STATE_FIELD_NUMBER = 10;
  private int state_;
  /**
   *
   *
   * <pre>
   * Output only. State of the most recently updated transfer run.
   * </pre>
   *
   * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
   */
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * Output only. State of the most recently updated transfer run.
   * </pre>
   *
   * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
   */
  public com.google.cloud.bigquery.datatransfer.v1.TransferState getState() {
    @SuppressWarnings("deprecation")
    com.google.cloud.bigquery.datatransfer.v1.TransferState result =
        com.google.cloud.bigquery.datatransfer.v1.TransferState.valueOf(state_);
    return result == null
        ? com.google.cloud.bigquery.datatransfer.v1.TransferState.UNRECOGNIZED
        : result;
  }

  public static final int USER_ID_FIELD_NUMBER = 11;
  private long userId_;
  /**
   *
   *
   * <pre>
   * Output only. Unique ID of the user on whose behalf transfer is done.
   * Applicable only to data sources that do not support service accounts.
   * When set to 0, the data source service account credentials are used.
   * May be negative. Note, that this identifier is not stable.
   * It may change over time even for the same user.
   * </pre>
   *
   * <code>int64 user_id = 11;</code>
   */
  public long getUserId() {
    return userId_;
  }

  public static final int DATASET_REGION_FIELD_NUMBER = 14;
  private volatile java.lang.Object datasetRegion_;
  /**
   *
   *
   * <pre>
   * Output only. Region in which BigQuery dataset is located.
   * </pre>
   *
   * <code>string dataset_region = 14;</code>
   */
  public java.lang.String getDatasetRegion() {
    java.lang.Object ref = datasetRegion_;
    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();
      datasetRegion_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. Region in which BigQuery dataset is located.
   * </pre>
   *
   * <code>string dataset_region = 14;</code>
   */
  public com.google.protobuf.ByteString getDatasetRegionBytes() {
    java.lang.Object ref = datasetRegion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      datasetRegion_ = 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 (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!getDestinationDatasetIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationDatasetId_);
    }
    if (!getDisplayNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_);
    }
    if (updateTime_ != null) {
      output.writeMessage(4, getUpdateTime());
    }
    if (!getDataSourceIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, dataSourceId_);
    }
    if (!getScheduleBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, schedule_);
    }
    if (nextRunTime_ != null) {
      output.writeMessage(8, getNextRunTime());
    }
    if (params_ != null) {
      output.writeMessage(9, getParams());
    }
    if (state_
        != com.google.cloud.bigquery.datatransfer.v1.TransferState.TRANSFER_STATE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(10, state_);
    }
    if (userId_ != 0L) {
      output.writeInt64(11, userId_);
    }
    if (dataRefreshWindowDays_ != 0) {
      output.writeInt32(12, dataRefreshWindowDays_);
    }
    if (disabled_ != false) {
      output.writeBool(13, disabled_);
    }
    if (!getDatasetRegionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, datasetRegion_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!getDestinationDatasetIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationDatasetId_);
    }
    if (!getDisplayNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_);
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime());
    }
    if (!getDataSourceIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, dataSourceId_);
    }
    if (!getScheduleBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, schedule_);
    }
    if (nextRunTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getNextRunTime());
    }
    if (params_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getParams());
    }
    if (state_
        != com.google.cloud.bigquery.datatransfer.v1.TransferState.TRANSFER_STATE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_);
    }
    if (userId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, userId_);
    }
    if (dataRefreshWindowDays_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, dataRefreshWindowDays_);
    }
    if (disabled_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, disabled_);
    }
    if (!getDatasetRegionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, datasetRegion_);
    }
    size += unknownFields.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.bigquery.datatransfer.v1.TransferConfig)) {
      return super.equals(obj);
    }
    com.google.cloud.bigquery.datatransfer.v1.TransferConfig other =
        (com.google.cloud.bigquery.datatransfer.v1.TransferConfig) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getDestinationDatasetId().equals(other.getDestinationDatasetId())) return false;
    if (!getDisplayName().equals(other.getDisplayName())) return false;
    if (!getDataSourceId().equals(other.getDataSourceId())) return false;
    if (hasParams() != other.hasParams()) return false;
    if (hasParams()) {
      if (!getParams().equals(other.getParams())) return false;
    }
    if (!getSchedule().equals(other.getSchedule())) return false;
    if (getDataRefreshWindowDays() != other.getDataRefreshWindowDays()) return false;
    if (getDisabled() != other.getDisabled()) return false;
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (hasNextRunTime() != other.hasNextRunTime()) return false;
    if (hasNextRunTime()) {
      if (!getNextRunTime().equals(other.getNextRunTime())) return false;
    }
    if (state_ != other.state_) return false;
    if (getUserId() != other.getUserId()) return false;
    if (!getDatasetRegion().equals(other.getDatasetRegion())) return false;
    if (!unknownFields.equals(other.unknownFields)) 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) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + DESTINATION_DATASET_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDestinationDatasetId().hashCode();
    hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDisplayName().hashCode();
    hash = (37 * hash) + DATA_SOURCE_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDataSourceId().hashCode();
    if (hasParams()) {
      hash = (37 * hash) + PARAMS_FIELD_NUMBER;
      hash = (53 * hash) + getParams().hashCode();
    }
    hash = (37 * hash) + SCHEDULE_FIELD_NUMBER;
    hash = (53 * hash) + getSchedule().hashCode();
    hash = (37 * hash) + DATA_REFRESH_WINDOW_DAYS_FIELD_NUMBER;
    hash = (53 * hash) + getDataRefreshWindowDays();
    hash = (37 * hash) + DISABLED_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    if (hasNextRunTime()) {
      hash = (37 * hash) + NEXT_RUN_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getNextRunTime().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + USER_ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUserId());
    hash = (37 * hash) + DATASET_REGION_FIELD_NUMBER;
    hash = (53 * hash) + getDatasetRegion().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.cloud.bigquery.datatransfer.v1.TransferConfig 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.bigquery.datatransfer.v1.TransferConfig 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>
   * Represents a data transfer configuration. A transfer configuration
   * contains all metadata needed to perform a data transfer. For example,
   * `destination_dataset_id` specifies where data should be stored.
   * When a new transfer configuration is created, the specified
   * `destination_dataset_id` is created when needed and shared with the
   * appropriate data source service account.
   * </pre>
   *
   * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.TransferConfig}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.TransferConfig)
      com.google.cloud.bigquery.datatransfer.v1.TransferConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto
          .internal_static_google_cloud_bigquery_datatransfer_v1_TransferConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto
          .internal_static_google_cloud_bigquery_datatransfer_v1_TransferConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.bigquery.datatransfer.v1.TransferConfig.class,
              com.google.cloud.bigquery.datatransfer.v1.TransferConfig.Builder.class);
    }

    // Construct using com.google.cloud.bigquery.datatransfer.v1.TransferConfig.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      destinationDatasetId_ = "";

      displayName_ = "";

      dataSourceId_ = "";

      if (paramsBuilder_ == null) {
        params_ = null;
      } else {
        params_ = null;
        paramsBuilder_ = null;
      }
      schedule_ = "";

      dataRefreshWindowDays_ = 0;

      disabled_ = false;

      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }
      if (nextRunTimeBuilder_ == null) {
        nextRunTime_ = null;
      } else {
        nextRunTime_ = null;
        nextRunTimeBuilder_ = null;
      }
      state_ = 0;

      userId_ = 0L;

      datasetRegion_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto
          .internal_static_google_cloud_bigquery_datatransfer_v1_TransferConfig_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.bigquery.datatransfer.v1.TransferConfig getDefaultInstanceForType() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferConfig.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.cloud.bigquery.datatransfer.v1.TransferConfig buildPartial() {
      com.google.cloud.bigquery.datatransfer.v1.TransferConfig result =
          new com.google.cloud.bigquery.datatransfer.v1.TransferConfig(this);
      result.name_ = name_;
      result.destinationDatasetId_ = destinationDatasetId_;
      result.displayName_ = displayName_;
      result.dataSourceId_ = dataSourceId_;
      if (paramsBuilder_ == null) {
        result.params_ = params_;
      } else {
        result.params_ = paramsBuilder_.build();
      }
      result.schedule_ = schedule_;
      result.dataRefreshWindowDays_ = dataRefreshWindowDays_;
      result.disabled_ = disabled_;
      if (updateTimeBuilder_ == null) {
        result.updateTime_ = updateTime_;
      } else {
        result.updateTime_ = updateTimeBuilder_.build();
      }
      if (nextRunTimeBuilder_ == null) {
        result.nextRunTime_ = nextRunTime_;
      } else {
        result.nextRunTime_ = nextRunTimeBuilder_.build();
      }
      result.state_ = state_;
      result.userId_ = userId_;
      result.datasetRegion_ = datasetRegion_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.google.cloud.bigquery.datatransfer.v1.TransferConfig other) {
      if (other == com.google.cloud.bigquery.datatransfer.v1.TransferConfig.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getDestinationDatasetId().isEmpty()) {
        destinationDatasetId_ = other.destinationDatasetId_;
        onChanged();
      }
      if (!other.getDisplayName().isEmpty()) {
        displayName_ = other.displayName_;
        onChanged();
      }
      if (!other.getDataSourceId().isEmpty()) {
        dataSourceId_ = other.dataSourceId_;
        onChanged();
      }
      if (other.hasParams()) {
        mergeParams(other.getParams());
      }
      if (!other.getSchedule().isEmpty()) {
        schedule_ = other.schedule_;
        onChanged();
      }
      if (other.getDataRefreshWindowDays() != 0) {
        setDataRefreshWindowDays(other.getDataRefreshWindowDays());
      }
      if (other.getDisabled() != false) {
        setDisabled(other.getDisabled());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (other.hasNextRunTime()) {
        mergeNextRunTime(other.getNextRunTime());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.getUserId() != 0L) {
        setUserId(other.getUserId());
      }
      if (!other.getDatasetRegion().isEmpty()) {
        datasetRegion_ = other.datasetRegion_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      com.google.cloud.bigquery.datatransfer.v1.TransferConfig parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.cloud.bigquery.datatransfer.v1.TransferConfig) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * The resource name of the transfer config.
     * Transfer config names have the form
     * `projects/{project_id}/transferConfigs/{config_id}`.
     * Where `config_id` is usually a uuid, even though it is not
     * guaranteed or required. The name is ignored when creating a transfer
     * config.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The resource name of the transfer config.
     * Transfer config names have the form
     * `projects/{project_id}/transferConfigs/{config_id}`.
     * Where `config_id` is usually a uuid, even though it is not
     * guaranteed or required. The name is ignored when creating a transfer
     * config.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The resource name of the transfer config.
     * Transfer config names have the form
     * `projects/{project_id}/transferConfigs/{config_id}`.
     * Where `config_id` is usually a uuid, even though it is not
     * guaranteed or required. The name is ignored when creating a transfer
     * config.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The resource name of the transfer config.
     * Transfer config names have the form
     * `projects/{project_id}/transferConfigs/{config_id}`.
     * Where `config_id` is usually a uuid, even though it is not
     * guaranteed or required. The name is ignored when creating a transfer
     * config.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The resource name of the transfer config.
     * Transfer config names have the form
     * `projects/{project_id}/transferConfigs/{config_id}`.
     * Where `config_id` is usually a uuid, even though it is not
     * guaranteed or required. The name is ignored when creating a transfer
     * config.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object destinationDatasetId_ = "";
    /**
     *
     *
     * <pre>
     * The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public java.lang.String getDestinationDatasetId() {
      java.lang.Object ref = destinationDatasetId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        destinationDatasetId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public com.google.protobuf.ByteString getDestinationDatasetIdBytes() {
      java.lang.Object ref = destinationDatasetId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        destinationDatasetId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public Builder setDestinationDatasetId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      destinationDatasetId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public Builder clearDestinationDatasetId() {

      destinationDatasetId_ = getDefaultInstance().getDestinationDatasetId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public Builder setDestinationDatasetIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      destinationDatasetId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object displayName_ = "";
    /**
     *
     *
     * <pre>
     * User specified display name for the data transfer.
     * </pre>
     *
     * <code>string display_name = 3;</code>
     */
    public java.lang.String getDisplayName() {
      java.lang.Object ref = displayName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        displayName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * User specified display name for the data transfer.
     * </pre>
     *
     * <code>string display_name = 3;</code>
     */
    public com.google.protobuf.ByteString getDisplayNameBytes() {
      java.lang.Object ref = displayName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        displayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * User specified display name for the data transfer.
     * </pre>
     *
     * <code>string display_name = 3;</code>
     */
    public Builder setDisplayName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      displayName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User specified display name for the data transfer.
     * </pre>
     *
     * <code>string display_name = 3;</code>
     */
    public Builder clearDisplayName() {

      displayName_ = getDefaultInstance().getDisplayName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User specified display name for the data transfer.
     * </pre>
     *
     * <code>string display_name = 3;</code>
     */
    public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      displayName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object dataSourceId_ = "";
    /**
     *
     *
     * <pre>
     * Data source id. Cannot be changed once data transfer is created.
     * </pre>
     *
     * <code>string data_source_id = 5;</code>
     */
    public java.lang.String getDataSourceId() {
      java.lang.Object ref = dataSourceId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        dataSourceId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Data source id. Cannot be changed once data transfer is created.
     * </pre>
     *
     * <code>string data_source_id = 5;</code>
     */
    public com.google.protobuf.ByteString getDataSourceIdBytes() {
      java.lang.Object ref = dataSourceId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        dataSourceId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Data source id. Cannot be changed once data transfer is created.
     * </pre>
     *
     * <code>string data_source_id = 5;</code>
     */
    public Builder setDataSourceId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      dataSourceId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data source id. Cannot be changed once data transfer is created.
     * </pre>
     *
     * <code>string data_source_id = 5;</code>
     */
    public Builder clearDataSourceId() {

      dataSourceId_ = getDefaultInstance().getDataSourceId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data source id. Cannot be changed once data transfer is created.
     * </pre>
     *
     * <code>string data_source_id = 5;</code>
     */
    public Builder setDataSourceIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      dataSourceId_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Struct params_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        paramsBuilder_;
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public boolean hasParams() {
      return paramsBuilder_ != null || params_ != null;
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public com.google.protobuf.Struct getParams() {
      if (paramsBuilder_ == null) {
        return params_ == null ? com.google.protobuf.Struct.getDefaultInstance() : params_;
      } else {
        return paramsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public Builder setParams(com.google.protobuf.Struct value) {
      if (paramsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        params_ = value;
        onChanged();
      } else {
        paramsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public Builder setParams(com.google.protobuf.Struct.Builder builderForValue) {
      if (paramsBuilder_ == null) {
        params_ = builderForValue.build();
        onChanged();
      } else {
        paramsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public Builder mergeParams(com.google.protobuf.Struct value) {
      if (paramsBuilder_ == null) {
        if (params_ != null) {
          params_ = com.google.protobuf.Struct.newBuilder(params_).mergeFrom(value).buildPartial();
        } else {
          params_ = value;
        }
        onChanged();
      } else {
        paramsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public Builder clearParams() {
      if (paramsBuilder_ == null) {
        params_ = null;
        onChanged();
      } else {
        params_ = null;
        paramsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public com.google.protobuf.Struct.Builder getParamsBuilder() {

      onChanged();
      return getParamsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
      if (paramsBuilder_ != null) {
        return paramsBuilder_.getMessageOrBuilder();
      } else {
        return params_ == null ? com.google.protobuf.Struct.getDefaultInstance() : params_;
      }
    }
    /**
     *
     *
     * <pre>
     * Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        getParamsFieldBuilder() {
      if (paramsBuilder_ == null) {
        paramsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Struct,
                com.google.protobuf.Struct.Builder,
                com.google.protobuf.StructOrBuilder>(
                getParams(), getParentForChildren(), isClean());
        params_ = null;
      }
      return paramsBuilder_;
    }

    private java.lang.Object schedule_ = "";
    /**
     *
     *
     * <pre>
     * Data transfer schedule.
     * If the data source does not support a custom schedule, this should be
     * empty. If it is empty, the default value for the data source will be
     * used.
     * The specified times are in UTC.
     * Examples of valid format:
     * `1st,3rd monday of month 15:30`,
     * `every wed,fri of jan,jun 13:15`, and
     * `first sunday of quarter 00:00`.
     * See more explanation about the format here:
     * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
     * NOTE: the granularity should be at least 8 hours, or less frequent.
     * </pre>
     *
     * <code>string schedule = 7;</code>
     */
    public java.lang.String getSchedule() {
      java.lang.Object ref = schedule_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        schedule_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Data transfer schedule.
     * If the data source does not support a custom schedule, this should be
     * empty. If it is empty, the default value for the data source will be
     * used.
     * The specified times are in UTC.
     * Examples of valid format:
     * `1st,3rd monday of month 15:30`,
     * `every wed,fri of jan,jun 13:15`, and
     * `first sunday of quarter 00:00`.
     * See more explanation about the format here:
     * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
     * NOTE: the granularity should be at least 8 hours, or less frequent.
     * </pre>
     *
     * <code>string schedule = 7;</code>
     */
    public com.google.protobuf.ByteString getScheduleBytes() {
      java.lang.Object ref = schedule_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        schedule_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Data transfer schedule.
     * If the data source does not support a custom schedule, this should be
     * empty. If it is empty, the default value for the data source will be
     * used.
     * The specified times are in UTC.
     * Examples of valid format:
     * `1st,3rd monday of month 15:30`,
     * `every wed,fri of jan,jun 13:15`, and
     * `first sunday of quarter 00:00`.
     * See more explanation about the format here:
     * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
     * NOTE: the granularity should be at least 8 hours, or less frequent.
     * </pre>
     *
     * <code>string schedule = 7;</code>
     */
    public Builder setSchedule(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      schedule_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer schedule.
     * If the data source does not support a custom schedule, this should be
     * empty. If it is empty, the default value for the data source will be
     * used.
     * The specified times are in UTC.
     * Examples of valid format:
     * `1st,3rd monday of month 15:30`,
     * `every wed,fri of jan,jun 13:15`, and
     * `first sunday of quarter 00:00`.
     * See more explanation about the format here:
     * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
     * NOTE: the granularity should be at least 8 hours, or less frequent.
     * </pre>
     *
     * <code>string schedule = 7;</code>
     */
    public Builder clearSchedule() {

      schedule_ = getDefaultInstance().getSchedule();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data transfer schedule.
     * If the data source does not support a custom schedule, this should be
     * empty. If it is empty, the default value for the data source will be
     * used.
     * The specified times are in UTC.
     * Examples of valid format:
     * `1st,3rd monday of month 15:30`,
     * `every wed,fri of jan,jun 13:15`, and
     * `first sunday of quarter 00:00`.
     * See more explanation about the format here:
     * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
     * NOTE: the granularity should be at least 8 hours, or less frequent.
     * </pre>
     *
     * <code>string schedule = 7;</code>
     */
    public Builder setScheduleBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      schedule_ = value;
      onChanged();
      return this;
    }

    private int dataRefreshWindowDays_;
    /**
     *
     *
     * <pre>
     * The number of days to look back to automatically refresh the data.
     * For example, if `data_refresh_window_days = 10`, then every day
     * BigQuery reingests data for [today-10, today-1], rather than ingesting data
     * for just [today-1].
     * Only valid if the data source supports the feature. Set the value to  0
     * to use the default value.
     * </pre>
     *
     * <code>int32 data_refresh_window_days = 12;</code>
     */
    public int getDataRefreshWindowDays() {
      return dataRefreshWindowDays_;
    }
    /**
     *
     *
     * <pre>
     * The number of days to look back to automatically refresh the data.
     * For example, if `data_refresh_window_days = 10`, then every day
     * BigQuery reingests data for [today-10, today-1], rather than ingesting data
     * for just [today-1].
     * Only valid if the data source supports the feature. Set the value to  0
     * to use the default value.
     * </pre>
     *
     * <code>int32 data_refresh_window_days = 12;</code>
     */
    public Builder setDataRefreshWindowDays(int value) {

      dataRefreshWindowDays_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The number of days to look back to automatically refresh the data.
     * For example, if `data_refresh_window_days = 10`, then every day
     * BigQuery reingests data for [today-10, today-1], rather than ingesting data
     * for just [today-1].
     * Only valid if the data source supports the feature. Set the value to  0
     * to use the default value.
     * </pre>
     *
     * <code>int32 data_refresh_window_days = 12;</code>
     */
    public Builder clearDataRefreshWindowDays() {

      dataRefreshWindowDays_ = 0;
      onChanged();
      return this;
    }

    private boolean disabled_;
    /**
     *
     *
     * <pre>
     * Is this config disabled. When set to true, no runs are scheduled
     * for a given transfer.
     * </pre>
     *
     * <code>bool disabled = 13;</code>
     */
    public boolean getDisabled() {
      return disabled_;
    }
    /**
     *
     *
     * <pre>
     * Is this config disabled. When set to true, no runs are scheduled
     * for a given transfer.
     * </pre>
     *
     * <code>bool disabled = 13;</code>
     */
    public Builder setDisabled(boolean value) {

      disabled_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Is this config disabled. When set to true, no runs are scheduled
     * for a given transfer.
     * </pre>
     *
     * <code>bool disabled = 13;</code>
     */
    public Builder clearDisabled() {

      disabled_ = false;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public boolean hasUpdateTime() {
      return updateTimeBuilder_ != null || updateTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (updateTime_ != null) {
          updateTime_ =
              com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
        } else {
          updateTime_ = value;
        }
        onChanged();
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public Builder clearUpdateTime() {
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
        onChanged();
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {

      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Data transfer modification time. Ignored by server on input.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private com.google.protobuf.Timestamp nextRunTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        nextRunTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public boolean hasNextRunTime() {
      return nextRunTimeBuilder_ != null || nextRunTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public com.google.protobuf.Timestamp getNextRunTime() {
      if (nextRunTimeBuilder_ == null) {
        return nextRunTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : nextRunTime_;
      } else {
        return nextRunTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public Builder setNextRunTime(com.google.protobuf.Timestamp value) {
      if (nextRunTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        nextRunTime_ = value;
        onChanged();
      } else {
        nextRunTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public Builder setNextRunTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (nextRunTimeBuilder_ == null) {
        nextRunTime_ = builderForValue.build();
        onChanged();
      } else {
        nextRunTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public Builder mergeNextRunTime(com.google.protobuf.Timestamp value) {
      if (nextRunTimeBuilder_ == null) {
        if (nextRunTime_ != null) {
          nextRunTime_ =
              com.google.protobuf.Timestamp.newBuilder(nextRunTime_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          nextRunTime_ = value;
        }
        onChanged();
      } else {
        nextRunTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public Builder clearNextRunTime() {
      if (nextRunTimeBuilder_ == null) {
        nextRunTime_ = null;
        onChanged();
      } else {
        nextRunTime_ = null;
        nextRunTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public com.google.protobuf.Timestamp.Builder getNextRunTimeBuilder() {

      onChanged();
      return getNextRunTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getNextRunTimeOrBuilder() {
      if (nextRunTimeBuilder_ != null) {
        return nextRunTimeBuilder_.getMessageOrBuilder();
      } else {
        return nextRunTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : nextRunTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Next time when data transfer will run.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp next_run_time = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getNextRunTimeFieldBuilder() {
      if (nextRunTimeBuilder_ == null) {
        nextRunTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getNextRunTime(), getParentForChildren(), isClean());
        nextRunTime_ = null;
      }
      return nextRunTimeBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. State of the most recently updated transfer run.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
     */
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * Output only. State of the most recently updated transfer run.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
     */
    public Builder setStateValue(int value) {
      state_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. State of the most recently updated transfer run.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
     */
    public com.google.cloud.bigquery.datatransfer.v1.TransferState getState() {
      @SuppressWarnings("deprecation")
      com.google.cloud.bigquery.datatransfer.v1.TransferState result =
          com.google.cloud.bigquery.datatransfer.v1.TransferState.valueOf(state_);
      return result == null
          ? com.google.cloud.bigquery.datatransfer.v1.TransferState.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. State of the most recently updated transfer run.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
     */
    public Builder setState(com.google.cloud.bigquery.datatransfer.v1.TransferState value) {
      if (value == null) {
        throw new NullPointerException();
      }

      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. State of the most recently updated transfer run.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 10;</code>
     */
    public Builder clearState() {

      state_ = 0;
      onChanged();
      return this;
    }

    private long userId_;
    /**
     *
     *
     * <pre>
     * Output only. Unique ID of the user on whose behalf transfer is done.
     * Applicable only to data sources that do not support service accounts.
     * When set to 0, the data source service account credentials are used.
     * May be negative. Note, that this identifier is not stable.
     * It may change over time even for the same user.
     * </pre>
     *
     * <code>int64 user_id = 11;</code>
     */
    public long getUserId() {
      return userId_;
    }
    /**
     *
     *
     * <pre>
     * Output only. Unique ID of the user on whose behalf transfer is done.
     * Applicable only to data sources that do not support service accounts.
     * When set to 0, the data source service account credentials are used.
     * May be negative. Note, that this identifier is not stable.
     * It may change over time even for the same user.
     * </pre>
     *
     * <code>int64 user_id = 11;</code>
     */
    public Builder setUserId(long value) {

      userId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Unique ID of the user on whose behalf transfer is done.
     * Applicable only to data sources that do not support service accounts.
     * When set to 0, the data source service account credentials are used.
     * May be negative. Note, that this identifier is not stable.
     * It may change over time even for the same user.
     * </pre>
     *
     * <code>int64 user_id = 11;</code>
     */
    public Builder clearUserId() {

      userId_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object datasetRegion_ = "";
    /**
     *
     *
     * <pre>
     * Output only. Region in which BigQuery dataset is located.
     * </pre>
     *
     * <code>string dataset_region = 14;</code>
     */
    public java.lang.String getDatasetRegion() {
      java.lang.Object ref = datasetRegion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        datasetRegion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Region in which BigQuery dataset is located.
     * </pre>
     *
     * <code>string dataset_region = 14;</code>
     */
    public com.google.protobuf.ByteString getDatasetRegionBytes() {
      java.lang.Object ref = datasetRegion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        datasetRegion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Region in which BigQuery dataset is located.
     * </pre>
     *
     * <code>string dataset_region = 14;</code>
     */
    public Builder setDatasetRegion(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      datasetRegion_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Region in which BigQuery dataset is located.
     * </pre>
     *
     * <code>string dataset_region = 14;</code>
     */
    public Builder clearDatasetRegion() {

      datasetRegion_ = getDefaultInstance().getDatasetRegion();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Region in which BigQuery dataset is located.
     * </pre>
     *
     * <code>string dataset_region = 14;</code>
     */
    public Builder setDatasetRegionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      datasetRegion_ = value;
      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.bigquery.datatransfer.v1.TransferConfig)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.TransferConfig)
  private static final com.google.cloud.bigquery.datatransfer.v1.TransferConfig DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.TransferConfig();
  }

  public static com.google.cloud.bigquery.datatransfer.v1.TransferConfig getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<TransferConfig> PARSER =
      new com.google.protobuf.AbstractParser<TransferConfig>() {
        @java.lang.Override
        public TransferConfig parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new TransferConfig(input, extensionRegistry);
        }
      };

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

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

  @java.lang.Override
  public com.google.cloud.bigquery.datatransfer.v1.TransferConfig getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
