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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Optional. Represents an entity.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.EntityType.Entity</code>
 */
class EntityType_Entity extends \Google\Protobuf\Internal\Message
{
    /**
     * Required.
     * For `KIND_MAP` entity types:
     *   A canonical name to be used in place of synonyms.
     * For `KIND_LIST` entity types:
     *   A string that can contain references to other entity types (with or
     *   without aliases).
     *
     * Generated from protobuf field <code>string value = 1;</code>
     */
    private $value = '';
    /**
     * Required. A collection of synonyms. For `KIND_LIST` entity types this
     * must contain exactly one synonym equal to `value`.
     *
     * Generated from protobuf field <code>repeated string synonyms = 2;</code>
     */
    private $synonyms;

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

    /**
     * Required.
     * For `KIND_MAP` entity types:
     *   A canonical name to be used in place of synonyms.
     * For `KIND_LIST` entity types:
     *   A string that can contain references to other entity types (with or
     *   without aliases).
     *
     * Generated from protobuf field <code>string value = 1;</code>
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Required.
     * For `KIND_MAP` entity types:
     *   A canonical name to be used in place of synonyms.
     * For `KIND_LIST` entity types:
     *   A string that can contain references to other entity types (with or
     *   without aliases).
     *
     * Generated from protobuf field <code>string value = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->value = $var;

        return $this;
    }

    /**
     * Required. A collection of synonyms. For `KIND_LIST` entity types this
     * must contain exactly one synonym equal to `value`.
     *
     * Generated from protobuf field <code>repeated string synonyms = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSynonyms()
    {
        return $this->synonyms;
    }

    /**
     * Required. A collection of synonyms. For `KIND_LIST` entity types this
     * must contain exactly one synonym equal to `value`.
     *
     * Generated from protobuf field <code>repeated string synonyms = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSynonyms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->synonyms = $arr;

        return $this;
    }

}

