// 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 run.
 * </pre>
 *
 * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.TransferRun}
 */
public  final class TransferRun extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.cloud.bigquery.datatransfer.v1.TransferRun)
    TransferRunOrBuilder {
private static final long serialVersionUID = 0L;
  // Use TransferRun.newBuilder() to construct.
  private TransferRun(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private TransferRun() {
    name_ = "";
    destinationDatasetId_ = "";
    dataSourceId_ = "";
    state_ = 0;
    userId_ = 0L;
    schedule_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private TransferRun(
      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;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              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: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (scheduleTime_ != null) {
              subBuilder = scheduleTime_.toBuilder();
            }
            scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(scheduleTime_);
              scheduleTime_ = subBuilder.buildPartial();
            }

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

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

            break;
          }
          case 50: {
            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 58: {
            java.lang.String s = input.readStringRequireUtf8();

            dataSourceId_ = s;
            break;
          }
          case 64: {
            int rawValue = input.readEnum();

            state_ = rawValue;
            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 82: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (runTime_ != null) {
              subBuilder = runTime_.toBuilder();
            }
            runTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(runTime_);
              runTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 88: {

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

            schedule_ = s;
            break;
          }
          case 170: {
            com.google.rpc.Status.Builder subBuilder = null;
            if (errorStatus_ != null) {
              subBuilder = errorStatus_.toBuilder();
            }
            errorStatus_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(errorStatus_);
              errorStatus_ = subBuilder.buildPartial();
            }

            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_TransferRun_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.bigquery.datatransfer.v1.TransferProto.internal_static_google_cloud_bigquery_datatransfer_v1_TransferRun_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.bigquery.datatransfer.v1.TransferRun.class, com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * The resource name of the transfer run.
   * Transfer run names have the form
   * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
   * The name is ignored when creating a transfer run.
   * </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 run.
   * Transfer run names have the form
   * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
   * The name is ignored when creating a transfer run.
   * </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 SCHEDULE_TIME_FIELD_NUMBER = 3;
  private com.google.protobuf.Timestamp scheduleTime_;
  /**
   * <pre>
   * Minimum time after which a transfer run can be started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
   */
  public boolean hasScheduleTime() {
    return scheduleTime_ != null;
  }
  /**
   * <pre>
   * Minimum time after which a transfer run can be started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
   */
  public com.google.protobuf.Timestamp getScheduleTime() {
    return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_;
  }
  /**
   * <pre>
   * Minimum time after which a transfer run can be started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() {
    return getScheduleTime();
  }

  public static final int RUN_TIME_FIELD_NUMBER = 10;
  private com.google.protobuf.Timestamp runTime_;
  /**
   * <pre>
   * For batch transfer runs, specifies the date and time that
   * data should be ingested.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp run_time = 10;</code>
   */
  public boolean hasRunTime() {
    return runTime_ != null;
  }
  /**
   * <pre>
   * For batch transfer runs, specifies the date and time that
   * data should be ingested.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp run_time = 10;</code>
   */
  public com.google.protobuf.Timestamp getRunTime() {
    return runTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : runTime_;
  }
  /**
   * <pre>
   * For batch transfer runs, specifies the date and time that
   * data should be ingested.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp run_time = 10;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getRunTimeOrBuilder() {
    return getRunTime();
  }

  public static final int ERROR_STATUS_FIELD_NUMBER = 21;
  private com.google.rpc.Status errorStatus_;
  /**
   * <pre>
   * Status of the transfer run.
   * </pre>
   *
   * <code>.google.rpc.Status error_status = 21;</code>
   */
  public boolean hasErrorStatus() {
    return errorStatus_ != null;
  }
  /**
   * <pre>
   * Status of the transfer run.
   * </pre>
   *
   * <code>.google.rpc.Status error_status = 21;</code>
   */
  public com.google.rpc.Status getErrorStatus() {
    return errorStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : errorStatus_;
  }
  /**
   * <pre>
   * Status of the transfer run.
   * </pre>
   *
   * <code>.google.rpc.Status error_status = 21;</code>
   */
  public com.google.rpc.StatusOrBuilder getErrorStatusOrBuilder() {
    return getErrorStatus();
  }

  public static final int START_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp startTime_;
  /**
   * <pre>
   * Output only. Time when transfer run was started.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 4;</code>
   */
  public boolean hasStartTime() {
    return startTime_ != null;
  }
  /**
   * <pre>
   * Output only. Time when transfer run was started.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 4;</code>
   */
  public com.google.protobuf.Timestamp getStartTime() {
    return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
  }
  /**
   * <pre>
   * Output only. Time when transfer run was started.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 4;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
    return getStartTime();
  }

  public static final int END_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp endTime_;
  /**
   * <pre>
   * Output only. Time when transfer run ended.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 5;</code>
   */
  public boolean hasEndTime() {
    return endTime_ != null;
  }
  /**
   * <pre>
   * Output only. Time when transfer run ended.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 5;</code>
   */
  public com.google.protobuf.Timestamp getEndTime() {
    return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
  }
  /**
   * <pre>
   * Output only. Time when transfer run ended.
   * Parameter ignored by server for input requests.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 5;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
    return getEndTime();
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   * <pre>
   * Output only. Last time the data transfer run state was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6;</code>
   */
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   * <pre>
   * Output only. Last time the data transfer run state was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6;</code>
   */
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   * <pre>
   * Output only. Last time the data transfer run state was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return getUpdateTime();
  }

  public static final int PARAMS_FIELD_NUMBER = 9;
  private com.google.protobuf.Struct params_;
  /**
   * <pre>
   * Output only. Data transfer specific parameters.
   * </pre>
   *
   * <code>.google.protobuf.Struct params = 9;</code>
   */
  public boolean hasParams() {
    return params_ != null;
  }
  /**
   * <pre>
   * Output only. 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>
   * Output only. Data transfer specific parameters.
   * </pre>
   *
   * <code>.google.protobuf.Struct params = 9;</code>
   */
  public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
    return getParams();
  }

  public static final int DESTINATION_DATASET_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object destinationDatasetId_;
  /**
   * <pre>
   * Output only. 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>
   * Output only. 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 DATA_SOURCE_ID_FIELD_NUMBER = 7;
  private volatile java.lang.Object dataSourceId_;
  /**
   * <pre>
   * Output only. Data source id.
   * </pre>
   *
   * <code>string data_source_id = 7;</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>
   * Output only. Data source id.
   * </pre>
   *
   * <code>string data_source_id = 7;</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 STATE_FIELD_NUMBER = 8;
  private int state_;
  /**
   * <pre>
   * Data transfer run state. Ignored for input requests.
   * </pre>
   *
   * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
   */
  public int getStateValue() {
    return state_;
  }
  /**
   * <pre>
   * Data transfer run state. Ignored for input requests.
   * </pre>
   *
   * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
   */
  public com.google.cloud.bigquery.datatransfer.v1.TransferState getState() {
    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 SCHEDULE_FIELD_NUMBER = 12;
  private volatile java.lang.Object schedule_;
  /**
   * <pre>
   * Output only. Describes the schedule of this transfer run if it was
   * created as part of a regular schedule. For batch transfer runs that are
   * scheduled manually, this is empty.
   * NOTE: the system might choose to delay the schedule depending on the
   * current load, so `schedule_time` doesn't always matches this.
   * </pre>
   *
   * <code>string schedule = 12;</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>
   * Output only. Describes the schedule of this transfer run if it was
   * created as part of a regular schedule. For batch transfer runs that are
   * scheduled manually, this is empty.
   * NOTE: the system might choose to delay the schedule depending on the
   * current load, so `schedule_time` doesn't always matches this.
   * </pre>
   *
   * <code>string schedule = 12;</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;
    }
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  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 (scheduleTime_ != null) {
      output.writeMessage(3, getScheduleTime());
    }
    if (startTime_ != null) {
      output.writeMessage(4, getStartTime());
    }
    if (endTime_ != null) {
      output.writeMessage(5, getEndTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(6, getUpdateTime());
    }
    if (!getDataSourceIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, dataSourceId_);
    }
    if (state_ != com.google.cloud.bigquery.datatransfer.v1.TransferState.TRANSFER_STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(8, state_);
    }
    if (params_ != null) {
      output.writeMessage(9, getParams());
    }
    if (runTime_ != null) {
      output.writeMessage(10, getRunTime());
    }
    if (userId_ != 0L) {
      output.writeInt64(11, userId_);
    }
    if (!getScheduleBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, schedule_);
    }
    if (errorStatus_ != null) {
      output.writeMessage(21, getErrorStatus());
    }
    unknownFields.writeTo(output);
  }

  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 (scheduleTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getScheduleTime());
    }
    if (startTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getStartTime());
    }
    if (endTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getEndTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getUpdateTime());
    }
    if (!getDataSourceIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, dataSourceId_);
    }
    if (state_ != com.google.cloud.bigquery.datatransfer.v1.TransferState.TRANSFER_STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(8, state_);
    }
    if (params_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getParams());
    }
    if (runTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, getRunTime());
    }
    if (userId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(11, userId_);
    }
    if (!getScheduleBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, schedule_);
    }
    if (errorStatus_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(21, getErrorStatus());
    }
    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.TransferRun)) {
      return super.equals(obj);
    }
    com.google.cloud.bigquery.datatransfer.v1.TransferRun other = (com.google.cloud.bigquery.datatransfer.v1.TransferRun) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && (hasScheduleTime() == other.hasScheduleTime());
    if (hasScheduleTime()) {
      result = result && getScheduleTime()
          .equals(other.getScheduleTime());
    }
    result = result && (hasRunTime() == other.hasRunTime());
    if (hasRunTime()) {
      result = result && getRunTime()
          .equals(other.getRunTime());
    }
    result = result && (hasErrorStatus() == other.hasErrorStatus());
    if (hasErrorStatus()) {
      result = result && getErrorStatus()
          .equals(other.getErrorStatus());
    }
    result = result && (hasStartTime() == other.hasStartTime());
    if (hasStartTime()) {
      result = result && getStartTime()
          .equals(other.getStartTime());
    }
    result = result && (hasEndTime() == other.hasEndTime());
    if (hasEndTime()) {
      result = result && getEndTime()
          .equals(other.getEndTime());
    }
    result = result && (hasUpdateTime() == other.hasUpdateTime());
    if (hasUpdateTime()) {
      result = result && getUpdateTime()
          .equals(other.getUpdateTime());
    }
    result = result && (hasParams() == other.hasParams());
    if (hasParams()) {
      result = result && getParams()
          .equals(other.getParams());
    }
    result = result && getDestinationDatasetId()
        .equals(other.getDestinationDatasetId());
    result = result && getDataSourceId()
        .equals(other.getDataSourceId());
    result = result && state_ == other.state_;
    result = result && (getUserId()
        == other.getUserId());
    result = result && getSchedule()
        .equals(other.getSchedule());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @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();
    if (hasScheduleTime()) {
      hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getScheduleTime().hashCode();
    }
    if (hasRunTime()) {
      hash = (37 * hash) + RUN_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getRunTime().hashCode();
    }
    if (hasErrorStatus()) {
      hash = (37 * hash) + ERROR_STATUS_FIELD_NUMBER;
      hash = (53 * hash) + getErrorStatus().hashCode();
    }
    if (hasStartTime()) {
      hash = (37 * hash) + START_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getStartTime().hashCode();
    }
    if (hasEndTime()) {
      hash = (37 * hash) + END_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getEndTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    if (hasParams()) {
      hash = (37 * hash) + PARAMS_FIELD_NUMBER;
      hash = (53 * hash) + getParams().hashCode();
    }
    hash = (37 * hash) + DESTINATION_DATASET_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDestinationDatasetId().hashCode();
    hash = (37 * hash) + DATA_SOURCE_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDataSourceId().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) + SCHEDULE_FIELD_NUMBER;
    hash = (53 * hash) + getSchedule().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.bigquery.datatransfer.v1.TransferRun parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.bigquery.datatransfer.v1.TransferRun 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.TransferRun parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.bigquery.datatransfer.v1.TransferRun 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.TransferRun parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.bigquery.datatransfer.v1.TransferRun 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.TransferRun 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.TransferRun 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.TransferRun 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.TransferRun 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.TransferRun 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.TransferRun parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.cloud.bigquery.datatransfer.v1.TransferRun prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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 run.
   * </pre>
   *
   * Protobuf type {@code google.cloud.bigquery.datatransfer.v1.TransferRun}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.datatransfer.v1.TransferRun)
      com.google.cloud.bigquery.datatransfer.v1.TransferRunOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto.internal_static_google_cloud_bigquery_datatransfer_v1_TransferRun_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto.internal_static_google_cloud_bigquery_datatransfer_v1_TransferRun_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.bigquery.datatransfer.v1.TransferRun.class, com.google.cloud.bigquery.datatransfer.v1.TransferRun.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      name_ = "";

      if (scheduleTimeBuilder_ == null) {
        scheduleTime_ = null;
      } else {
        scheduleTime_ = null;
        scheduleTimeBuilder_ = null;
      }
      if (runTimeBuilder_ == null) {
        runTime_ = null;
      } else {
        runTime_ = null;
        runTimeBuilder_ = null;
      }
      if (errorStatusBuilder_ == null) {
        errorStatus_ = null;
      } else {
        errorStatus_ = null;
        errorStatusBuilder_ = null;
      }
      if (startTimeBuilder_ == null) {
        startTime_ = null;
      } else {
        startTime_ = null;
        startTimeBuilder_ = null;
      }
      if (endTimeBuilder_ == null) {
        endTime_ = null;
      } else {
        endTime_ = null;
        endTimeBuilder_ = null;
      }
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }
      if (paramsBuilder_ == null) {
        params_ = null;
      } else {
        params_ = null;
        paramsBuilder_ = null;
      }
      destinationDatasetId_ = "";

      dataSourceId_ = "";

      state_ = 0;

      userId_ = 0L;

      schedule_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferProto.internal_static_google_cloud_bigquery_datatransfer_v1_TransferRun_descriptor;
    }

    public com.google.cloud.bigquery.datatransfer.v1.TransferRun getDefaultInstanceForType() {
      return com.google.cloud.bigquery.datatransfer.v1.TransferRun.getDefaultInstance();
    }

    public com.google.cloud.bigquery.datatransfer.v1.TransferRun build() {
      com.google.cloud.bigquery.datatransfer.v1.TransferRun result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.cloud.bigquery.datatransfer.v1.TransferRun buildPartial() {
      com.google.cloud.bigquery.datatransfer.v1.TransferRun result = new com.google.cloud.bigquery.datatransfer.v1.TransferRun(this);
      result.name_ = name_;
      if (scheduleTimeBuilder_ == null) {
        result.scheduleTime_ = scheduleTime_;
      } else {
        result.scheduleTime_ = scheduleTimeBuilder_.build();
      }
      if (runTimeBuilder_ == null) {
        result.runTime_ = runTime_;
      } else {
        result.runTime_ = runTimeBuilder_.build();
      }
      if (errorStatusBuilder_ == null) {
        result.errorStatus_ = errorStatus_;
      } else {
        result.errorStatus_ = errorStatusBuilder_.build();
      }
      if (startTimeBuilder_ == null) {
        result.startTime_ = startTime_;
      } else {
        result.startTime_ = startTimeBuilder_.build();
      }
      if (endTimeBuilder_ == null) {
        result.endTime_ = endTime_;
      } else {
        result.endTime_ = endTimeBuilder_.build();
      }
      if (updateTimeBuilder_ == null) {
        result.updateTime_ = updateTime_;
      } else {
        result.updateTime_ = updateTimeBuilder_.build();
      }
      if (paramsBuilder_ == null) {
        result.params_ = params_;
      } else {
        result.params_ = paramsBuilder_.build();
      }
      result.destinationDatasetId_ = destinationDatasetId_;
      result.dataSourceId_ = dataSourceId_;
      result.state_ = state_;
      result.userId_ = userId_;
      result.schedule_ = schedule_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.bigquery.datatransfer.v1.TransferRun) {
        return mergeFrom((com.google.cloud.bigquery.datatransfer.v1.TransferRun)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.bigquery.datatransfer.v1.TransferRun other) {
      if (other == com.google.cloud.bigquery.datatransfer.v1.TransferRun.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasScheduleTime()) {
        mergeScheduleTime(other.getScheduleTime());
      }
      if (other.hasRunTime()) {
        mergeRunTime(other.getRunTime());
      }
      if (other.hasErrorStatus()) {
        mergeErrorStatus(other.getErrorStatus());
      }
      if (other.hasStartTime()) {
        mergeStartTime(other.getStartTime());
      }
      if (other.hasEndTime()) {
        mergeEndTime(other.getEndTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (other.hasParams()) {
        mergeParams(other.getParams());
      }
      if (!other.getDestinationDatasetId().isEmpty()) {
        destinationDatasetId_ = other.destinationDatasetId_;
        onChanged();
      }
      if (!other.getDataSourceId().isEmpty()) {
        dataSourceId_ = other.dataSourceId_;
        onChanged();
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.getUserId() != 0L) {
        setUserId(other.getUserId());
      }
      if (!other.getSchedule().isEmpty()) {
        schedule_ = other.schedule_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.bigquery.datatransfer.v1.TransferRun parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.bigquery.datatransfer.v1.TransferRun) 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 run.
     * Transfer run names have the form
     * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
     * The name is ignored when creating a transfer run.
     * </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 run.
     * Transfer run names have the form
     * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
     * The name is ignored when creating a transfer run.
     * </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 run.
     * Transfer run names have the form
     * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
     * The name is ignored when creating a transfer run.
     * </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 run.
     * Transfer run names have the form
     * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
     * The name is ignored when creating a transfer run.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The resource name of the transfer run.
     * Transfer run names have the form
     * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
     * The name is ignored when creating a transfer run.
     * </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 com.google.protobuf.Timestamp scheduleTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_;
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public boolean hasScheduleTime() {
      return scheduleTimeBuilder_ != null || scheduleTime_ != null;
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public com.google.protobuf.Timestamp getScheduleTime() {
      if (scheduleTimeBuilder_ == null) {
        return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_;
      } else {
        return scheduleTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public Builder setScheduleTime(com.google.protobuf.Timestamp value) {
      if (scheduleTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        scheduleTime_ = value;
        onChanged();
      } else {
        scheduleTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public Builder setScheduleTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (scheduleTimeBuilder_ == null) {
        scheduleTime_ = builderForValue.build();
        onChanged();
      } else {
        scheduleTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) {
      if (scheduleTimeBuilder_ == null) {
        if (scheduleTime_ != null) {
          scheduleTime_ =
            com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial();
        } else {
          scheduleTime_ = value;
        }
        onChanged();
      } else {
        scheduleTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public Builder clearScheduleTime() {
      if (scheduleTimeBuilder_ == null) {
        scheduleTime_ = null;
        onChanged();
      } else {
        scheduleTime_ = null;
        scheduleTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() {
      
      onChanged();
      return getScheduleTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() {
      if (scheduleTimeBuilder_ != null) {
        return scheduleTimeBuilder_.getMessageOrBuilder();
      } else {
        return scheduleTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_;
      }
    }
    /**
     * <pre>
     * Minimum time after which a transfer run can be started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp schedule_time = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getScheduleTimeFieldBuilder() {
      if (scheduleTimeBuilder_ == null) {
        scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getScheduleTime(),
                getParentForChildren(),
                isClean());
        scheduleTime_ = null;
      }
      return scheduleTimeBuilder_;
    }

    private com.google.protobuf.Timestamp runTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> runTimeBuilder_;
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public boolean hasRunTime() {
      return runTimeBuilder_ != null || runTime_ != null;
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public com.google.protobuf.Timestamp getRunTime() {
      if (runTimeBuilder_ == null) {
        return runTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : runTime_;
      } else {
        return runTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public Builder setRunTime(com.google.protobuf.Timestamp value) {
      if (runTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        runTime_ = value;
        onChanged();
      } else {
        runTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public Builder setRunTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (runTimeBuilder_ == null) {
        runTime_ = builderForValue.build();
        onChanged();
      } else {
        runTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public Builder mergeRunTime(com.google.protobuf.Timestamp value) {
      if (runTimeBuilder_ == null) {
        if (runTime_ != null) {
          runTime_ =
            com.google.protobuf.Timestamp.newBuilder(runTime_).mergeFrom(value).buildPartial();
        } else {
          runTime_ = value;
        }
        onChanged();
      } else {
        runTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public Builder clearRunTime() {
      if (runTimeBuilder_ == null) {
        runTime_ = null;
        onChanged();
      } else {
        runTime_ = null;
        runTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public com.google.protobuf.Timestamp.Builder getRunTimeBuilder() {
      
      onChanged();
      return getRunTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getRunTimeOrBuilder() {
      if (runTimeBuilder_ != null) {
        return runTimeBuilder_.getMessageOrBuilder();
      } else {
        return runTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : runTime_;
      }
    }
    /**
     * <pre>
     * For batch transfer runs, specifies the date and time that
     * data should be ingested.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp run_time = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getRunTimeFieldBuilder() {
      if (runTimeBuilder_ == null) {
        runTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getRunTime(),
                getParentForChildren(),
                isClean());
        runTime_ = null;
      }
      return runTimeBuilder_;
    }

    private com.google.rpc.Status errorStatus_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorStatusBuilder_;
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public boolean hasErrorStatus() {
      return errorStatusBuilder_ != null || errorStatus_ != null;
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public com.google.rpc.Status getErrorStatus() {
      if (errorStatusBuilder_ == null) {
        return errorStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : errorStatus_;
      } else {
        return errorStatusBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public Builder setErrorStatus(com.google.rpc.Status value) {
      if (errorStatusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        errorStatus_ = value;
        onChanged();
      } else {
        errorStatusBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public Builder setErrorStatus(
        com.google.rpc.Status.Builder builderForValue) {
      if (errorStatusBuilder_ == null) {
        errorStatus_ = builderForValue.build();
        onChanged();
      } else {
        errorStatusBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public Builder mergeErrorStatus(com.google.rpc.Status value) {
      if (errorStatusBuilder_ == null) {
        if (errorStatus_ != null) {
          errorStatus_ =
            com.google.rpc.Status.newBuilder(errorStatus_).mergeFrom(value).buildPartial();
        } else {
          errorStatus_ = value;
        }
        onChanged();
      } else {
        errorStatusBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public Builder clearErrorStatus() {
      if (errorStatusBuilder_ == null) {
        errorStatus_ = null;
        onChanged();
      } else {
        errorStatus_ = null;
        errorStatusBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public com.google.rpc.Status.Builder getErrorStatusBuilder() {
      
      onChanged();
      return getErrorStatusFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    public com.google.rpc.StatusOrBuilder getErrorStatusOrBuilder() {
      if (errorStatusBuilder_ != null) {
        return errorStatusBuilder_.getMessageOrBuilder();
      } else {
        return errorStatus_ == null ?
            com.google.rpc.Status.getDefaultInstance() : errorStatus_;
      }
    }
    /**
     * <pre>
     * Status of the transfer run.
     * </pre>
     *
     * <code>.google.rpc.Status error_status = 21;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> 
        getErrorStatusFieldBuilder() {
      if (errorStatusBuilder_ == null) {
        errorStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(
                getErrorStatus(),
                getParentForChildren(),
                isClean());
        errorStatus_ = null;
      }
      return errorStatusBuilder_;
    }

    private com.google.protobuf.Timestamp startTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_;
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public boolean hasStartTime() {
      return startTimeBuilder_ != null || startTime_ != null;
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public com.google.protobuf.Timestamp getStartTime() {
      if (startTimeBuilder_ == null) {
        return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
      } else {
        return startTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public Builder setStartTime(com.google.protobuf.Timestamp value) {
      if (startTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        startTime_ = value;
        onChanged();
      } else {
        startTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public Builder setStartTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (startTimeBuilder_ == null) {
        startTime_ = builderForValue.build();
        onChanged();
      } else {
        startTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public Builder mergeStartTime(com.google.protobuf.Timestamp value) {
      if (startTimeBuilder_ == null) {
        if (startTime_ != null) {
          startTime_ =
            com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial();
        } else {
          startTime_ = value;
        }
        onChanged();
      } else {
        startTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public Builder clearStartTime() {
      if (startTimeBuilder_ == null) {
        startTime_ = null;
        onChanged();
      } else {
        startTime_ = null;
        startTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() {
      
      onChanged();
      return getStartTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
      if (startTimeBuilder_ != null) {
        return startTimeBuilder_.getMessageOrBuilder();
      } else {
        return startTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
      }
    }
    /**
     * <pre>
     * Output only. Time when transfer run was started.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getStartTimeFieldBuilder() {
      if (startTimeBuilder_ == null) {
        startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getStartTime(),
                getParentForChildren(),
                isClean());
        startTime_ = null;
      }
      return startTimeBuilder_;
    }

    private com.google.protobuf.Timestamp endTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_;
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public boolean hasEndTime() {
      return endTimeBuilder_ != null || endTime_ != null;
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public com.google.protobuf.Timestamp getEndTime() {
      if (endTimeBuilder_ == null) {
        return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
      } else {
        return endTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public Builder setEndTime(com.google.protobuf.Timestamp value) {
      if (endTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        endTime_ = value;
        onChanged();
      } else {
        endTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public Builder setEndTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (endTimeBuilder_ == null) {
        endTime_ = builderForValue.build();
        onChanged();
      } else {
        endTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
      if (endTimeBuilder_ == null) {
        if (endTime_ != null) {
          endTime_ =
            com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
        } else {
          endTime_ = value;
        }
        onChanged();
      } else {
        endTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public Builder clearEndTime() {
      if (endTimeBuilder_ == null) {
        endTime_ = null;
        onChanged();
      } else {
        endTime_ = null;
        endTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
      
      onChanged();
      return getEndTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
      if (endTimeBuilder_ != null) {
        return endTimeBuilder_.getMessageOrBuilder();
      } else {
        return endTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
      }
    }
    /**
     * <pre>
     * Output only. Time when transfer run ended.
     * Parameter ignored by server for input requests.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getEndTimeFieldBuilder() {
      if (endTimeBuilder_ == null) {
        endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getEndTime(),
                getParentForChildren(),
                isClean());
        endTime_ = null;
      }
      return endTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_;
    /**
     * <pre>
     * Output only. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</code>
     */
    public boolean hasUpdateTime() {
      return updateTimeBuilder_ != null || updateTime_ != null;
    }
    /**
     * <pre>
     * Output only. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</code>
     */
    public Builder clearUpdateTime() {
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
        onChanged();
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output only. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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. Last time the data transfer run state was updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 6;</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.Struct params_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> paramsBuilder_;
    /**
     * <pre>
     * Output only. Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public boolean hasParams() {
      return paramsBuilder_ != null || params_ != null;
    }
    /**
     * <pre>
     * Output only. 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>
     * Output only. 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>
     * Output only. 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>
     * Output only. 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>
     * Output only. 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>
     * Output only. Data transfer specific parameters.
     * </pre>
     *
     * <code>.google.protobuf.Struct params = 9;</code>
     */
    public com.google.protobuf.Struct.Builder getParamsBuilder() {
      
      onChanged();
      return getParamsFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. 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>
     * Output only. 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 destinationDatasetId_ = "";
    /**
     * <pre>
     * Output only. 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>
     * Output only. 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>
     * Output only. 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>
     * Output only. The BigQuery target dataset id.
     * </pre>
     *
     * <code>string destination_dataset_id = 2;</code>
     */
    public Builder clearDestinationDatasetId() {
      
      destinationDatasetId_ = getDefaultInstance().getDestinationDatasetId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. 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 dataSourceId_ = "";
    /**
     * <pre>
     * Output only. Data source id.
     * </pre>
     *
     * <code>string data_source_id = 7;</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>
     * Output only. Data source id.
     * </pre>
     *
     * <code>string data_source_id = 7;</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>
     * Output only. Data source id.
     * </pre>
     *
     * <code>string data_source_id = 7;</code>
     */
    public Builder setDataSourceId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      dataSourceId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Data source id.
     * </pre>
     *
     * <code>string data_source_id = 7;</code>
     */
    public Builder clearDataSourceId() {
      
      dataSourceId_ = getDefaultInstance().getDataSourceId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Data source id.
     * </pre>
     *
     * <code>string data_source_id = 7;</code>
     */
    public Builder setDataSourceIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      dataSourceId_ = value;
      onChanged();
      return this;
    }

    private int state_ = 0;
    /**
     * <pre>
     * Data transfer run state. Ignored for input requests.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
     */
    public int getStateValue() {
      return state_;
    }
    /**
     * <pre>
     * Data transfer run state. Ignored for input requests.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
     */
    public Builder setStateValue(int value) {
      state_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Data transfer run state. Ignored for input requests.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
     */
    public com.google.cloud.bigquery.datatransfer.v1.TransferState getState() {
      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>
     * Data transfer run state. Ignored for input requests.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</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>
     * Data transfer run state. Ignored for input requests.
     * </pre>
     *
     * <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</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 schedule_ = "";
    /**
     * <pre>
     * Output only. Describes the schedule of this transfer run if it was
     * created as part of a regular schedule. For batch transfer runs that are
     * scheduled manually, this is empty.
     * NOTE: the system might choose to delay the schedule depending on the
     * current load, so `schedule_time` doesn't always matches this.
     * </pre>
     *
     * <code>string schedule = 12;</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>
     * Output only. Describes the schedule of this transfer run if it was
     * created as part of a regular schedule. For batch transfer runs that are
     * scheduled manually, this is empty.
     * NOTE: the system might choose to delay the schedule depending on the
     * current load, so `schedule_time` doesn't always matches this.
     * </pre>
     *
     * <code>string schedule = 12;</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>
     * Output only. Describes the schedule of this transfer run if it was
     * created as part of a regular schedule. For batch transfer runs that are
     * scheduled manually, this is empty.
     * NOTE: the system might choose to delay the schedule depending on the
     * current load, so `schedule_time` doesn't always matches this.
     * </pre>
     *
     * <code>string schedule = 12;</code>
     */
    public Builder setSchedule(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      schedule_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Describes the schedule of this transfer run if it was
     * created as part of a regular schedule. For batch transfer runs that are
     * scheduled manually, this is empty.
     * NOTE: the system might choose to delay the schedule depending on the
     * current load, so `schedule_time` doesn't always matches this.
     * </pre>
     *
     * <code>string schedule = 12;</code>
     */
    public Builder clearSchedule() {
      
      schedule_ = getDefaultInstance().getSchedule();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Describes the schedule of this transfer run if it was
     * created as part of a regular schedule. For batch transfer runs that are
     * scheduled manually, this is empty.
     * NOTE: the system might choose to delay the schedule depending on the
     * current load, so `schedule_time` doesn't always matches this.
     * </pre>
     *
     * <code>string schedule = 12;</code>
     */
    public Builder setScheduleBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      schedule_ = value;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.datatransfer.v1.TransferRun)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.bigquery.datatransfer.v1.TransferRun)
  private static final com.google.cloud.bigquery.datatransfer.v1.TransferRun DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.cloud.bigquery.datatransfer.v1.TransferRun();
  }

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

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

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

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

  public com.google.cloud.bigquery.datatransfer.v1.TransferRun getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

