<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/conversation_dataset.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * The request message for
 * [ConversationDatasets.CreateConversationDataset][google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDataset].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.CreateConversationDatasetRequest</code>
 */
class CreateConversationDatasetRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The project to create conversation dataset for. Format:
     * `projects/<Project ID>/locations/<Location ID>`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $parent = '';
    /**
     * Required. The conversation dataset to create.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $conversation_dataset = null;

    /**
     * @param string                                          $parent              Required. The project to create conversation dataset for. Format:
     *                                                                             `projects/<Project ID>/locations/<Location ID>`
     * @param \Google\Cloud\Dialogflow\V2\ConversationDataset $conversationDataset Required. The conversation dataset to create.
     *
     * @return \Google\Cloud\Dialogflow\V2\CreateConversationDatasetRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dialogflow\V2\ConversationDataset $conversationDataset): self
    {
        return (new self())
            ->setParent($parent)
            ->setConversationDataset($conversationDataset);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The project to create conversation dataset for. Format:
     *           `projects/<Project ID>/locations/<Location ID>`
     *     @type \Google\Cloud\Dialogflow\V2\ConversationDataset $conversation_dataset
     *           Required. The conversation dataset to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The project to create conversation dataset for. Format:
     * `projects/<Project ID>/locations/<Location ID>`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The project to create conversation dataset for. Format:
     * `projects/<Project ID>/locations/<Location ID>`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The conversation dataset to create.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\ConversationDataset|null
     */
    public function getConversationDataset()
    {
        return $this->conversation_dataset;
    }

    public function hasConversationDataset()
    {
        return isset($this->conversation_dataset);
    }

    public function clearConversationDataset()
    {
        unset($this->conversation_dataset);
    }

    /**
     * Required. The conversation dataset to create.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationDataset conversation_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\ConversationDataset $var
     * @return $this
     */
    public function setConversationDataset($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationDataset::class);
        $this->conversation_dataset = $var;

        return $this;
    }

}

