<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/bigquery/datatransfer/v1/datasource.proto

namespace Google\Cloud\BigQuery\DataTransfer\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A request to update a transfer run.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.UpdateTransferRunRequest</code>
 */
class UpdateTransferRunRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Run name must be set and correspond to an already existing run. Only
     * state, error_status, and data_version fields will be updated. All other
     * fields will be ignored.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1;</code>
     */
    private $transfer_run = null;
    /**
     * Required list of fields to be updated in this request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun $transfer_run
     *           Run name must be set and correspond to an already existing run. Only
     *           state, error_status, and data_version fields will be updated. All other
     *           fields will be ignored.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required list of fields to be updated in this request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datasource::initOnce();
        parent::__construct($data);
    }

    /**
     * Run name must be set and correspond to an already existing run. Only
     * state, error_status, and data_version fields will be updated. All other
     * fields will be ignored.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1;</code>
     * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun
     */
    public function getTransferRun()
    {
        return $this->transfer_run;
    }

    /**
     * Run name must be set and correspond to an already existing run. Only
     * state, error_status, and data_version fields will be updated. All other
     * fields will be ignored.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferRun transfer_run = 1;</code>
     * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun $var
     * @return $this
     */
    public function setTransferRun($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class);
        $this->transfer_run = $var;

        return $this;
    }

    /**
     * Required list of fields to be updated in this request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    /**
     * Required list of fields to be updated in this request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

