<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/contactcenterinsights/v1/resources.proto

namespace Google\Cloud\ContactCenterInsights\V1;

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

/**
 * The data for an entity mention annotation.
 * This represents a mention of an `Entity` in the conversation.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.EntityMentionData</code>
 */
class EntityMentionData extends \Google\Protobuf\Internal\Message
{
    /**
     * The key of this entity in conversation entities.
     * Can be used to retrieve the exact `Entity` this mention is attached to.
     *
     * Generated from protobuf field <code>string entity_unique_id = 1;</code>
     */
    private $entity_unique_id = '';
    /**
     * The type of the entity mention.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2;</code>
     */
    private $type = 0;
    /**
     * Sentiment expressed for this mention of the entity.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3;</code>
     */
    private $sentiment = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $entity_unique_id
     *           The key of this entity in conversation entities.
     *           Can be used to retrieve the exact `Entity` this mention is attached to.
     *     @type int $type
     *           The type of the entity mention.
     *     @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment
     *           Sentiment expressed for this mention of the entity.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The key of this entity in conversation entities.
     * Can be used to retrieve the exact `Entity` this mention is attached to.
     *
     * Generated from protobuf field <code>string entity_unique_id = 1;</code>
     * @return string
     */
    public function getEntityUniqueId()
    {
        return $this->entity_unique_id;
    }

    /**
     * The key of this entity in conversation entities.
     * Can be used to retrieve the exact `Entity` this mention is attached to.
     *
     * Generated from protobuf field <code>string entity_unique_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEntityUniqueId($var)
    {
        GPBUtil::checkString($var, True);
        $this->entity_unique_id = $var;

        return $this;
    }

    /**
     * The type of the entity mention.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of the entity mention.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\EntityMentionData\MentionType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Sentiment expressed for this mention of the entity.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null
     */
    public function getSentiment()
    {
        return $this->sentiment;
    }

    public function hasSentiment()
    {
        return isset($this->sentiment);
    }

    public function clearSentiment()
    {
        unset($this->sentiment);
    }

    /**
     * Sentiment expressed for this mention of the entity.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment = 3;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var
     * @return $this
     */
    public function setSentiment($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class);
        $this->sentiment = $var;

        return $this;
    }

}

