<?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.PreMessage</code>
 */
class PreMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>uint32 cmd = 1;</code>
     */
    protected $cmd = 0;
    /**
     * Generated from protobuf field <code>uint32 sequenceId = 2;</code>
     */
    protected $sequenceId = 0;
    /**
     * Generated from protobuf field <code>string sdkVersion = 3;</code>
     */
    protected $sdkVersion = '';
    /**
     * Generated from protobuf field <code>string token = 4;</code>
     */
    protected $token = '';
    /**
     * Generated from protobuf field <code>uint32 refer = 5;</code>
     */
    protected $refer = 0;
    /**
     * Generated from protobuf field <code>uint32 inboxType = 6;</code>
     */
    protected $inboxType = 0;
    /**
     * Generated from protobuf field <code>string buildNumber = 7;</code>
     */
    protected $buildNumber = '';
    /**
     * Generated from protobuf field <code>.douyin.SendMessageBody sendMessageBody = 8;</code>
     */
    protected $sendMessageBody = null;
    /**
     * 字段名待定
     *
     * Generated from protobuf field <code>string aa = 9;</code>
     */
    protected $aa = '';
    /**
     * Generated from protobuf field <code>string devicePlatform = 11;</code>
     */
    protected $devicePlatform = '';
    /**
     * Generated from protobuf field <code>repeated .douyin.HeadersList headers = 15;</code>
     */
    private $headers;
    /**
     * Generated from protobuf field <code>uint32 authType = 18;</code>
     */
    protected $authType = 0;
    /**
     * Generated from protobuf field <code>string biz = 21;</code>
     */
    protected $biz = '';
    /**
     * Generated from protobuf field <code>string access = 22;</code>
     */
    protected $access = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $cmd
     *     @type int $sequenceId
     *     @type string $sdkVersion
     *     @type string $token
     *     @type int $refer
     *     @type int $inboxType
     *     @type string $buildNumber
     *     @type \Douyin\SendMessageBody $sendMessageBody
     *     @type string $aa
     *           字段名待定
     *     @type string $devicePlatform
     *     @type array<\Douyin\HeadersList>|\Google\Protobuf\Internal\RepeatedField $headers
     *     @type int $authType
     *     @type string $biz
     *     @type string $access
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>uint32 cmd = 1;</code>
     * @return int
     */
    public function getCmd()
    {
        return $this->cmd;
    }

    /**
     * Generated from protobuf field <code>uint32 cmd = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setCmd($var)
    {
        GPBUtil::checkUint32($var);
        $this->cmd = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 sequenceId = 2;</code>
     * @return int
     */
    public function getSequenceId()
    {
        return $this->sequenceId;
    }

    /**
     * Generated from protobuf field <code>uint32 sequenceId = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSequenceId($var)
    {
        GPBUtil::checkUint32($var);
        $this->sequenceId = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string token = 4;</code>
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 refer = 5;</code>
     * @return int
     */
    public function getRefer()
    {
        return $this->refer;
    }

    /**
     * Generated from protobuf field <code>uint32 refer = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRefer($var)
    {
        GPBUtil::checkUint32($var);
        $this->refer = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 inboxType = 6;</code>
     * @return int
     */
    public function getInboxType()
    {
        return $this->inboxType;
    }

    /**
     * Generated from protobuf field <code>uint32 inboxType = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setInboxType($var)
    {
        GPBUtil::checkUint32($var);
        $this->inboxType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string buildNumber = 7;</code>
     * @return string
     */
    public function getBuildNumber()
    {
        return $this->buildNumber;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.douyin.SendMessageBody sendMessageBody = 8;</code>
     * @return \Douyin\SendMessageBody|null
     */
    public function getSendMessageBody()
    {
        return $this->sendMessageBody;
    }

    public function hasSendMessageBody()
    {
        return isset($this->sendMessageBody);
    }

    public function clearSendMessageBody()
    {
        unset($this->sendMessageBody);
    }

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

        return $this;
    }

    /**
     * 字段名待定
     *
     * Generated from protobuf field <code>string aa = 9;</code>
     * @return string
     */
    public function getAa()
    {
        return $this->aa;
    }

    /**
     * 字段名待定
     *
     * Generated from protobuf field <code>string aa = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setAa($var)
    {
        GPBUtil::checkString($var, True);
        $this->aa = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string devicePlatform = 11;</code>
     * @return string
     */
    public function getDevicePlatform()
    {
        return $this->devicePlatform;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.HeadersList headers = 15;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHeaders()
    {
        return $this->headers;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 authType = 18;</code>
     * @return int
     */
    public function getAuthType()
    {
        return $this->authType;
    }

    /**
     * Generated from protobuf field <code>uint32 authType = 18;</code>
     * @param int $var
     * @return $this
     */
    public function setAuthType($var)
    {
        GPBUtil::checkUint32($var);
        $this->authType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string biz = 21;</code>
     * @return string
     */
    public function getBiz()
    {
        return $this->biz;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string access = 22;</code>
     * @return string
     */
    public function getAccess()
    {
        return $this->access;
    }

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

        return $this;
    }

}

