<?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;

/**
 * Represents an entity type.
 * Entity types serve as a tool for extracting parameter values from natural
 * language queries.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.EntityType</code>
 */
class EntityType extends \Google\Protobuf\Internal\Message
{
    /**
     * Required for all methods except `create` (`create` populates the name
     * automatically.
     * The unique identifier of the entity type. Format:
     * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. The name of the entity.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    private $display_name = '';
    /**
     * Required. Indicates the kind of entity type.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.Kind kind = 3;</code>
     */
    private $kind = 0;
    /**
     * Optional. Indicates whether the entity type can be automatically
     * expanded.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4;</code>
     */
    private $auto_expansion_mode = 0;
    /**
     * Optional. The collection of entities associated with the entity type.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6;</code>
     */
    private $entities;

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

    /**
     * Required for all methods except `create` (`create` populates the name
     * automatically.
     * The unique identifier of the entity type. Format:
     * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required for all methods except `create` (`create` populates the name
     * automatically.
     * The unique identifier of the entity type. Format:
     * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
     *
     * 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 entity.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The name of the entity.
     *
     * 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;
    }

    /**
     * Required. Indicates the kind of entity type.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.Kind kind = 3;</code>
     * @return int
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * Required. Indicates the kind of entity type.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.Kind kind = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType_Kind::class);
        $this->kind = $var;

        return $this;
    }

    /**
     * Optional. Indicates whether the entity type can be automatically
     * expanded.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4;</code>
     * @return int
     */
    public function getAutoExpansionMode()
    {
        return $this->auto_expansion_mode;
    }

    /**
     * Optional. Indicates whether the entity type can be automatically
     * expanded.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setAutoExpansionMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType_AutoExpansionMode::class);
        $this->auto_expansion_mode = $var;

        return $this;
    }

    /**
     * Optional. The collection of entities associated with the entity type.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEntities()
    {
        return $this->entities;
    }

    /**
     * Optional. The collection of entities associated with the entity type.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6;</code>
     * @param \Google\Cloud\Dialogflow\V2\EntityType_Entity[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEntities($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType_Entity::class);
        $this->entities = $arr;

        return $this;
    }

}

