<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: dy.proto

namespace Douyin;

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

/**
 * Generated from protobuf message <code>douyin.EpisodeChatMessage</code>
 */
class EpisodeChatMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.douyin.Message common = 1;</code>
     */
    protected $common = null;
    /**
     * Generated from protobuf field <code>.douyin.User user = 2;</code>
     */
    protected $user = null;
    /**
     * Generated from protobuf field <code>string content = 3;</code>
     */
    protected $content = '';
    /**
     * Generated from protobuf field <code>bool visibleToSende = 4;</code>
     */
    protected $visibleToSende = false;
    /**
     *   BackgroundImage backgroundImage = 5;
     *   PublicAreaCommon publicAreaCommon = 6;
     *
     * Generated from protobuf field <code>.douyin.Image giftImage = 7;</code>
     */
    protected $giftImage = null;
    /**
     * Generated from protobuf field <code>uint64 agreeMsgId = 8;</code>
     */
    protected $agreeMsgId = 0;
    /**
     * Generated from protobuf field <code>repeated string colorValueList = 9;</code>
     */
    private $colorValueList;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Douyin\Message $common
     *     @type \Douyin\User $user
     *     @type string $content
     *     @type bool $visibleToSende
     *     @type \Douyin\Image $giftImage
     *             BackgroundImage backgroundImage = 5;
     *             PublicAreaCommon publicAreaCommon = 6;
     *     @type int|string $agreeMsgId
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $colorValueList
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.douyin.Message common = 1;</code>
     * @return \Douyin\Message|null
     */
    public function getCommon()
    {
        return $this->common;
    }

    public function hasCommon()
    {
        return isset($this->common);
    }

    public function clearCommon()
    {
        unset($this->common);
    }

    /**
     * Generated from protobuf field <code>.douyin.Message common = 1;</code>
     * @param \Douyin\Message $var
     * @return $this
     */
    public function setCommon($var)
    {
        GPBUtil::checkMessage($var, \Douyin\Message::class);
        $this->common = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.douyin.User user = 2;</code>
     * @return \Douyin\User|null
     */
    public function getUser()
    {
        return $this->user;
    }

    public function hasUser()
    {
        return isset($this->user);
    }

    public function clearUser()
    {
        unset($this->user);
    }

    /**
     * Generated from protobuf field <code>.douyin.User user = 2;</code>
     * @param \Douyin\User $var
     * @return $this
     */
    public function setUser($var)
    {
        GPBUtil::checkMessage($var, \Douyin\User::class);
        $this->user = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string content = 3;</code>
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Generated from protobuf field <code>string content = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkString($var, True);
        $this->content = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool visibleToSende = 4;</code>
     * @return bool
     */
    public function getVisibleToSende()
    {
        return $this->visibleToSende;
    }

    /**
     * Generated from protobuf field <code>bool visibleToSende = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setVisibleToSende($var)
    {
        GPBUtil::checkBool($var);
        $this->visibleToSende = $var;

        return $this;
    }

    /**
     *   BackgroundImage backgroundImage = 5;
     *   PublicAreaCommon publicAreaCommon = 6;
     *
     * Generated from protobuf field <code>.douyin.Image giftImage = 7;</code>
     * @return \Douyin\Image|null
     */
    public function getGiftImage()
    {
        return $this->giftImage;
    }

    public function hasGiftImage()
    {
        return isset($this->giftImage);
    }

    public function clearGiftImage()
    {
        unset($this->giftImage);
    }

    /**
     *   BackgroundImage backgroundImage = 5;
     *   PublicAreaCommon publicAreaCommon = 6;
     *
     * Generated from protobuf field <code>.douyin.Image giftImage = 7;</code>
     * @param \Douyin\Image $var
     * @return $this
     */
    public function setGiftImage($var)
    {
        GPBUtil::checkMessage($var, \Douyin\Image::class);
        $this->giftImage = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 agreeMsgId = 8;</code>
     * @return int|string
     */
    public function getAgreeMsgId()
    {
        return $this->agreeMsgId;
    }

    /**
     * Generated from protobuf field <code>uint64 agreeMsgId = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAgreeMsgId($var)
    {
        GPBUtil::checkUint64($var);
        $this->agreeMsgId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated string colorValueList = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getColorValueList()
    {
        return $this->colorValueList;
    }

    /**
     * Generated from protobuf field <code>repeated string colorValueList = 9;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setColorValueList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->colorValueList = $arr;

        return $this;
    }

}

