<?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;

/**
 * Represents the request of the CreateDataSourceDefinition method.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.CreateDataSourceDefinitionRequest</code>
 */
class CreateDataSourceDefinitionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The BigQuery project id for which data source definition is associated.
     * Must be in the form: `projects/{project_id}/locations/{location_id}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     */
    private $parent = '';
    /**
     * Data source definition.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2;</code>
     */
    private $data_source_definition = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           The BigQuery project id for which data source definition is associated.
     *           Must be in the form: `projects/{project_id}/locations/{location_id}`
     *     @type \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceDefinition $data_source_definition
     *           Data source definition.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datasource::initOnce();
        parent::__construct($data);
    }

    /**
     * The BigQuery project id for which data source definition is associated.
     * Must be in the form: `projects/{project_id}/locations/{location_id}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * The BigQuery project id for which data source definition is associated.
     * Must be in the form: `projects/{project_id}/locations/{location_id}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Data source definition.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2;</code>
     * @return \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceDefinition
     */
    public function getDataSourceDefinition()
    {
        return $this->data_source_definition;
    }

    /**
     * Data source definition.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.DataSourceDefinition data_source_definition = 2;</code>
     * @param \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceDefinition $var
     * @return $this
     */
    public function setDataSourceDefinition($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSourceDefinition::class);
        $this->data_source_definition = $var;

        return $this;
    }

}

