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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Request of CreateGeneratorEvaluation.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.CreateGeneratorEvaluationRequest</code>
 */
class CreateGeneratorEvaluationRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The generator resource name. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The generator evaluation to be created.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GeneratorEvaluation generator_evaluation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $generator_evaluation = null;

    /**
     * @param string                                          $parent              Required. The generator resource name. Format:
     *                                                                             `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *                                                                             Please see {@see GeneratorEvaluationsClient::generatorName()} for help formatting this field.
     * @param \Google\Cloud\Dialogflow\V2\GeneratorEvaluation $generatorEvaluation Required. The generator evaluation to be created.
     *
     * @return \Google\Cloud\Dialogflow\V2\CreateGeneratorEvaluationRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dialogflow\V2\GeneratorEvaluation $generatorEvaluation): self
    {
        return (new self())
            ->setParent($parent)
            ->setGeneratorEvaluation($generatorEvaluation);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The generator resource name. Format:
     *           `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *     @type \Google\Cloud\Dialogflow\V2\GeneratorEvaluation $generator_evaluation
     *           Required. The generator evaluation to be created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\GeneratorEvaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The generator resource name. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator 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. The generator resource name. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator 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 generator evaluation to be created.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GeneratorEvaluation generator_evaluation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\GeneratorEvaluation|null
     */
    public function getGeneratorEvaluation()
    {
        return $this->generator_evaluation;
    }

    public function hasGeneratorEvaluation()
    {
        return isset($this->generator_evaluation);
    }

    public function clearGeneratorEvaluation()
    {
        unset($this->generator_evaluation);
    }

    /**
     * Required. The generator evaluation to be created.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GeneratorEvaluation generator_evaluation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\GeneratorEvaluation $var
     * @return $this
     */
    public function setGeneratorEvaluation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GeneratorEvaluation::class);
        $this->generator_evaluation = $var;

        return $this;
    }

}

