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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents a session entity type.
 * Extends or replaces a developer entity type at the user session level (we
 * refer to the entity types defined at the agent level as "developer entity
 * types").
 * Note: session entity types apply to all queries, regardless of the language.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SessionEntityType</code>
 */
class SessionEntityType extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The unique identifier of this session entity type. Format:
     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
     * Display Name>`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. Indicates whether the additional data should override or
     * supplement the developer entity type definition.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2;</code>
     */
    private $entity_override_mode = 0;
    /**
     * Required. The collection of entities associated with this session entity
     * type.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3;</code>
     */
    private $entities;

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

    /**
     * Required. The unique identifier of this session entity type. Format:
     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
     * Display Name>`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The unique identifier of this session entity type. Format:
     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
     * Display Name>`.
     *
     * 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. Indicates whether the additional data should override or
     * supplement the developer entity type definition.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2;</code>
     * @return int
     */
    public function getEntityOverrideMode()
    {
        return $this->entity_override_mode;
    }

    /**
     * Required. Indicates whether the additional data should override or
     * supplement the developer entity type definition.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEntityOverrideMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SessionEntityType_EntityOverrideMode::class);
        $this->entity_override_mode = $var;

        return $this;
    }

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

    /**
     * Required. The collection of entities associated with this session entity
     * type.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3;</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;
    }

}

