<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/bigquery/datatransfer/v1/datatransfer.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 configuration. To update the user id of the
 * transfer configuration, an authorization code needs to be provided.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest</code>
 */
class UpdateTransferConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Data transfer configuration to create.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1;</code>
     */
    private $transfer_config = null;
    /**
     * Optional OAuth2 authorization code to use with this transfer configuration.
     * If it is provided, the transfer configuration will be associated with the
     * authorizing user.
     * In order to obtain authorization_code, please make a
     * request to
     * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
     * * client_id should be OAuth client_id of BigQuery DTS API for the given
     *   data source returned by ListDataSources method.
     * * data_source_scopes are the scopes returned by ListDataSources method.
     * * redirect_uri is an optional parameter. If not specified, then
     *   authorization code is posted to the opener of authorization flow window.
     *   Otherwise it will be sent to the redirect uri. A special value of
     *   urn:ietf:wg:oauth:2.0:oob means that authorization code should be
     *   returned in the title bar of the browser, with the page text prompting
     *   the user to copy the code and paste it in the application.
     *
     * Generated from protobuf field <code>string authorization_code = 3;</code>
     */
    private $authorization_code = '';
    /**
     * Required list of fields to be updated in this request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 4;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $transfer_config
     *           Data transfer configuration to create.
     *     @type string $authorization_code
     *           Optional OAuth2 authorization code to use with this transfer configuration.
     *           If it is provided, the transfer configuration will be associated with the
     *           authorizing user.
     *           In order to obtain authorization_code, please make a
     *           request to
     *           https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
     *           * client_id should be OAuth client_id of BigQuery DTS API for the given
     *             data source returned by ListDataSources method.
     *           * data_source_scopes are the scopes returned by ListDataSources method.
     *           * redirect_uri is an optional parameter. If not specified, then
     *             authorization code is posted to the opener of authorization flow window.
     *             Otherwise it will be sent to the redirect uri. A special value of
     *             urn:ietf:wg:oauth:2.0:oob means that authorization code should be
     *             returned in the title bar of the browser, with the page text prompting
     *             the user to copy the code and paste it in the application.
     *     @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\Datatransfer::initOnce();
        parent::__construct($data);
    }

    /**
     * Data transfer configuration to create.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1;</code>
     * @return \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig
     */
    public function getTransferConfig()
    {
        return $this->transfer_config;
    }

    /**
     * Data transfer configuration to create.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferConfig transfer_config = 1;</code>
     * @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig $var
     * @return $this
     */
    public function setTransferConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferConfig::class);
        $this->transfer_config = $var;

        return $this;
    }

    /**
     * Optional OAuth2 authorization code to use with this transfer configuration.
     * If it is provided, the transfer configuration will be associated with the
     * authorizing user.
     * In order to obtain authorization_code, please make a
     * request to
     * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
     * * client_id should be OAuth client_id of BigQuery DTS API for the given
     *   data source returned by ListDataSources method.
     * * data_source_scopes are the scopes returned by ListDataSources method.
     * * redirect_uri is an optional parameter. If not specified, then
     *   authorization code is posted to the opener of authorization flow window.
     *   Otherwise it will be sent to the redirect uri. A special value of
     *   urn:ietf:wg:oauth:2.0:oob means that authorization code should be
     *   returned in the title bar of the browser, with the page text prompting
     *   the user to copy the code and paste it in the application.
     *
     * Generated from protobuf field <code>string authorization_code = 3;</code>
     * @return string
     */
    public function getAuthorizationCode()
    {
        return $this->authorization_code;
    }

    /**
     * Optional OAuth2 authorization code to use with this transfer configuration.
     * If it is provided, the transfer configuration will be associated with the
     * authorizing user.
     * In order to obtain authorization_code, please make a
     * request to
     * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
     * * client_id should be OAuth client_id of BigQuery DTS API for the given
     *   data source returned by ListDataSources method.
     * * data_source_scopes are the scopes returned by ListDataSources method.
     * * redirect_uri is an optional parameter. If not specified, then
     *   authorization code is posted to the opener of authorization flow window.
     *   Otherwise it will be sent to the redirect uri. A special value of
     *   urn:ietf:wg:oauth:2.0:oob means that authorization code should be
     *   returned in the title bar of the browser, with the page text prompting
     *   the user to copy the code and paste it in the application.
     *
     * Generated from protobuf field <code>string authorization_code = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setAuthorizationCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->authorization_code = $var;

        return $this;
    }

    /**
     * Required list of fields to be updated in this request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 4;</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 = 4;</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;
    }

}

