<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * One channel of conversation-level sentiment data.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.ConversationLevelSentiment</code>
 */
class ConversationLevelSentiment extends \Google\Protobuf\Internal\Message
{
    /**
     * The channel of the audio that the data applies to.
     *
     * Generated from protobuf field <code>int32 channel_tag = 1;</code>
     */
    protected $channel_tag = 0;
    /**
     * Data specifying sentiment.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2;</code>
     */
    protected $sentiment_data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $channel_tag
     *           The channel of the audio that the data applies to.
     *     @type \Google\Cloud\ContactCenterInsights\V1\SentimentData $sentiment_data
     *           Data specifying sentiment.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The channel of the audio that the data applies to.
     *
     * Generated from protobuf field <code>int32 channel_tag = 1;</code>
     * @return int
     */
    public function getChannelTag()
    {
        return $this->channel_tag;
    }

    /**
     * The channel of the audio that the data applies to.
     *
     * Generated from protobuf field <code>int32 channel_tag = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setChannelTag($var)
    {
        GPBUtil::checkInt32($var);
        $this->channel_tag = $var;

        return $this;
    }

    /**
     * Data specifying sentiment.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\SentimentData|null
     */
    public function getSentimentData()
    {
        return $this->sentiment_data;
    }

    public function hasSentimentData()
    {
        return isset($this->sentiment_data);
    }

    public function clearSentimentData()
    {
        unset($this->sentiment_data);
    }

    /**
     * Data specifying sentiment.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.SentimentData sentiment_data = 2;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\SentimentData $var
     * @return $this
     */
    public function setSentimentData($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\SentimentData::class);
        $this->sentiment_data = $var;

        return $this;
    }

}

