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

namespace Google\Cloud\Datastream\V1\BigQueryDestinationConfig;

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

/**
 * Destination datasets are created so that hierarchy of the destination data
 * objects matches the source hierarchy.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets</code>
 */
class SourceHierarchyDatasets extends \Google\Protobuf\Internal\Message
{
    /**
     * The dataset template to use for dynamic dataset creation.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2;</code>
     */
    protected $dataset_template = null;
    /**
     * Optional. The project id of the BigQuery dataset. If not specified, the
     * project will be inferred from the stream resource.
     *
     * Generated from protobuf field <code>optional string project_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $project_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $dataset_template
     *           The dataset template to use for dynamic dataset creation.
     *     @type string $project_id
     *           Optional. The project id of the BigQuery dataset. If not specified, the
     *           project will be inferred from the stream resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The dataset template to use for dynamic dataset creation.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2;</code>
     * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate|null
     */
    public function getDatasetTemplate()
    {
        return $this->dataset_template;
    }

    public function hasDatasetTemplate()
    {
        return isset($this->dataset_template);
    }

    public function clearDatasetTemplate()
    {
        unset($this->dataset_template);
    }

    /**
     * The dataset template to use for dynamic dataset creation.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2;</code>
     * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $var
     * @return $this
     */
    public function setDatasetTemplate($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate::class);
        $this->dataset_template = $var;

        return $this;
    }

    /**
     * Optional. The project id of the BigQuery dataset. If not specified, the
     * project will be inferred from the stream resource.
     *
     * Generated from protobuf field <code>optional string project_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getProjectId()
    {
        return isset($this->project_id) ? $this->project_id : '';
    }

    public function hasProjectId()
    {
        return isset($this->project_id);
    }

    public function clearProjectId()
    {
        unset($this->project_id);
    }

    /**
     * Optional. The project id of the BigQuery dataset. If not specified, the
     * project will be inferred from the stream resource.
     *
     * Generated from protobuf field <code>optional string project_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

}

