<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/translate/v3/adaptive_mt.proto

namespace Google\Cloud\Translate\V3;

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

/**
 *  Request message for creating an AdaptiveMtDataset.
 *
 * Generated from protobuf message <code>google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest</code>
 */
class CreateAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the parent project. In form of
     * `projects/{project-number-or-id}/locations/{location-id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The AdaptiveMtDataset to be created.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $adaptive_mt_dataset = null;

    /**
     * @param string                                       $parent            Required. Name of the parent project. In form of
     *                                                                        `projects/{project-number-or-id}/locations/{location-id}`
     *                                                                        Please see {@see TranslationServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset Required. The AdaptiveMtDataset to be created.
     *
     * @return \Google\Cloud\Translate\V3\CreateAdaptiveMtDatasetRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset): self
    {
        return (new self())
            ->setParent($parent)
            ->setAdaptiveMtDataset($adaptiveMtDataset);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Name of the parent project. In form of
     *           `projects/{project-number-or-id}/locations/{location-id}`
     *     @type \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptive_mt_dataset
     *           Required. The AdaptiveMtDataset to be created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the parent project. In form of
     * `projects/{project-number-or-id}/locations/{location-id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. Name of the parent project. In form of
     * `projects/{project-number-or-id}/locations/{location-id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The AdaptiveMtDataset to be created.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset|null
     */
    public function getAdaptiveMtDataset()
    {
        return $this->adaptive_mt_dataset;
    }

    public function hasAdaptiveMtDataset()
    {
        return isset($this->adaptive_mt_dataset);
    }

    public function clearAdaptiveMtDataset()
    {
        unset($this->adaptive_mt_dataset);
    }

    /**
     * Required. The AdaptiveMtDataset to be created.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $var
     * @return $this
     */
    public function setAdaptiveMtDataset($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtDataset::class);
        $this->adaptive_mt_dataset = $var;

        return $this;
    }

}

