<?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.ProductChangeMessage</code>
 */
class ProductChangeMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.douyin.Common common = 1;</code>
     */
    protected $common = null;
    /**
     * Generated from protobuf field <code>int64 updateTimestamp = 2;</code>
     */
    protected $updateTimestamp = 0;
    /**
     * Generated from protobuf field <code>string updateToast = 3;</code>
     */
    protected $updateToast = '';
    /**
     * Generated from protobuf field <code>repeated .douyin.ProductInfo updateProductInfoList = 4;</code>
     */
    private $updateProductInfoList;
    /**
     * Generated from protobuf field <code>int64 total = 5;</code>
     */
    protected $total = 0;
    /**
     * Generated from protobuf field <code>repeated .douyin.CategoryInfo updateCategoryInfoList = 8;</code>
     */
    private $updateCategoryInfoList;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Douyin\Common $common
     *     @type int|string $updateTimestamp
     *     @type string $updateToast
     *     @type array<\Douyin\ProductInfo>|\Google\Protobuf\Internal\RepeatedField $updateProductInfoList
     *     @type int|string $total
     *     @type array<\Douyin\CategoryInfo>|\Google\Protobuf\Internal\RepeatedField $updateCategoryInfoList
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 updateTimestamp = 2;</code>
     * @return int|string
     */
    public function getUpdateTimestamp()
    {
        return $this->updateTimestamp;
    }

    /**
     * Generated from protobuf field <code>int64 updateTimestamp = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUpdateTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->updateTimestamp = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.ProductInfo updateProductInfoList = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUpdateProductInfoList()
    {
        return $this->updateProductInfoList;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.ProductInfo updateProductInfoList = 4;</code>
     * @param array<\Douyin\ProductInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUpdateProductInfoList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Douyin\ProductInfo::class);
        $this->updateProductInfoList = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 total = 5;</code>
     * @return int|string
     */
    public function getTotal()
    {
        return $this->total;
    }

    /**
     * Generated from protobuf field <code>int64 total = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTotal($var)
    {
        GPBUtil::checkInt64($var);
        $this->total = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.CategoryInfo updateCategoryInfoList = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUpdateCategoryInfoList()
    {
        return $this->updateCategoryInfoList;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.CategoryInfo updateCategoryInfoList = 8;</code>
     * @param array<\Douyin\CategoryInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUpdateCategoryInfoList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Douyin\CategoryInfo::class);
        $this->updateCategoryInfoList = $arr;

        return $this;
    }

}

