<?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 start and monitor a BigQuery load job.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.StartBigQueryJobsRequest</code>
 */
class StartBigQueryJobsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the resource in the form:
     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Import jobs which should be started and monitored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2;</code>
     */
    private $imported_data;
    /**
     * User credentials which should be used to start/monitor
     * BigQuery jobs. If not specified, then jobs
     * are started using data source service account credentials.
     * This may be OAuth token or JWT token.
     *
     * Generated from protobuf field <code>bytes user_credentials = 3;</code>
     */
    private $user_credentials = '';
    /**
     * The number of BQ Jobs that can run in parallel.
     *
     * Generated from protobuf field <code>int32 max_parallelism = 8;</code>
     */
    private $max_parallelism = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the resource in the form:
     *           "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
     *     @type \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo[]|\Google\Protobuf\Internal\RepeatedField $imported_data
     *           Import jobs which should be started and monitored.
     *     @type string $user_credentials
     *           User credentials which should be used to start/monitor
     *           BigQuery jobs. If not specified, then jobs
     *           are started using data source service account credentials.
     *           This may be OAuth token or JWT token.
     *     @type int $max_parallelism
     *           The number of BQ Jobs that can run in parallel.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datasource::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the resource in the form:
     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the resource in the form:
     * "projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}"
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Import jobs which should be started and monitored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getImportedData()
    {
        return $this->imported_data;
    }

    /**
     * Import jobs which should be started and monitored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo imported_data = 2;</code>
     * @param \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setImportedData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo::class);
        $this->imported_data = $arr;

        return $this;
    }

    /**
     * User credentials which should be used to start/monitor
     * BigQuery jobs. If not specified, then jobs
     * are started using data source service account credentials.
     * This may be OAuth token or JWT token.
     *
     * Generated from protobuf field <code>bytes user_credentials = 3;</code>
     * @return string
     */
    public function getUserCredentials()
    {
        return $this->user_credentials;
    }

    /**
     * User credentials which should be used to start/monitor
     * BigQuery jobs. If not specified, then jobs
     * are started using data source service account credentials.
     * This may be OAuth token or JWT token.
     *
     * Generated from protobuf field <code>bytes user_credentials = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setUserCredentials($var)
    {
        GPBUtil::checkString($var, False);
        $this->user_credentials = $var;

        return $this;
    }

    /**
     * The number of BQ Jobs that can run in parallel.
     *
     * Generated from protobuf field <code>int32 max_parallelism = 8;</code>
     * @return int
     */
    public function getMaxParallelism()
    {
        return $this->max_parallelism;
    }

    /**
     * The number of BQ Jobs that can run in parallel.
     *
     * Generated from protobuf field <code>int32 max_parallelism = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxParallelism($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_parallelism = $var;

        return $this;
    }

}

