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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents intent parameters.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Intent.Parameter</code>
 */
class Intent_Parameter extends \Google\Protobuf\Internal\Message
{
    /**
     * The unique identifier of this parameter.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. The name of the parameter.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    private $display_name = '';
    /**
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     */
    private $value = '';
    /**
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string default_value = 4;</code>
     */
    private $default_value = '';
    /**
     * Optional. The name of the entity type, prefixed with `&#64;`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     *
     * Generated from protobuf field <code>string entity_type_display_name = 5;</code>
     */
    private $entity_type_display_name = '';
    /**
     * Optional. Indicates whether the parameter is required. That is,
     * whether the intent cannot be completed without collecting the parameter
     * value.
     *
     * Generated from protobuf field <code>bool mandatory = 6;</code>
     */
    private $mandatory = false;
    /**
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7;</code>
     */
    private $prompts;
    /**
     * Optional. Indicates whether the parameter represents a list of values.
     *
     * Generated from protobuf field <code>bool is_list = 8;</code>
     */
    private $is_list = false;

    public function __construct() {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce();
        parent::__construct();
    }

    /**
     * The unique identifier of this parameter.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The unique identifier of this parameter.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The name of the parameter.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The name of the parameter.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->value = $var;

        return $this;
    }

    /**
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string default_value = 4;</code>
     * @return string
     */
    public function getDefaultValue()
    {
        return $this->default_value;
    }

    /**
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     *
     * Generated from protobuf field <code>string default_value = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->default_value = $var;

        return $this;
    }

    /**
     * Optional. The name of the entity type, prefixed with `&#64;`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     *
     * Generated from protobuf field <code>string entity_type_display_name = 5;</code>
     * @return string
     */
    public function getEntityTypeDisplayName()
    {
        return $this->entity_type_display_name;
    }

    /**
     * Optional. The name of the entity type, prefixed with `&#64;`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     *
     * Generated from protobuf field <code>string entity_type_display_name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setEntityTypeDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->entity_type_display_name = $var;

        return $this;
    }

    /**
     * Optional. Indicates whether the parameter is required. That is,
     * whether the intent cannot be completed without collecting the parameter
     * value.
     *
     * Generated from protobuf field <code>bool mandatory = 6;</code>
     * @return bool
     */
    public function getMandatory()
    {
        return $this->mandatory;
    }

    /**
     * Optional. Indicates whether the parameter is required. That is,
     * whether the intent cannot be completed without collecting the parameter
     * value.
     *
     * Generated from protobuf field <code>bool mandatory = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setMandatory($var)
    {
        GPBUtil::checkBool($var);
        $this->mandatory = $var;

        return $this;
    }

    /**
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPrompts()
    {
        return $this->prompts;
    }

    /**
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPrompts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->prompts = $arr;

        return $this;
    }

    /**
     * Optional. Indicates whether the parameter represents a list of values.
     *
     * Generated from protobuf field <code>bool is_list = 8;</code>
     * @return bool
     */
    public function getIsList()
    {
        return $this->is_list;
    }

    /**
     * Optional. Indicates whether the parameter represents a list of values.
     *
     * Generated from protobuf field <code>bool is_list = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsList($var)
    {
        GPBUtil::checkBool($var);
        $this->is_list = $var;

        return $this;
    }

}

