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

namespace Google\Cloud\Dialogflow\V2\Intent;

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 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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $mandatory = false;
    /**
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect a value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $prompts;
    /**
     * Optional. Indicates whether the parameter represents a list of values.
     *
     * Generated from protobuf field <code>bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $is_list = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The unique identifier of this parameter.
     *     @type string $display_name
     *           Required. The name of the parameter.
     *     @type string $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`.
     *     @type string $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`.
     *     @type string $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.
     *     @type bool $mandatory
     *           Optional. Indicates whether the parameter is required. That is,
     *           whether the intent cannot be completed without collecting the parameter
     *           value.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $prompts
     *           Optional. The collection of prompts that the agent can present to the
     *           user in order to collect a value for the parameter.
     *     @type bool $is_list
     *           Optional. Indicates whether the parameter represents a list of values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce();
        parent::__construct($data);
    }

    /**
     * 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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</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 a value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];</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 a value for the parameter.
     *
     * Generated from protobuf field <code>repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<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 [(.google.api.field_behavior) = OPTIONAL];</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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsList($var)
    {
        GPBUtil::checkBool($var);
        $this->is_list = $var;

        return $this;
    }

}


