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

namespace Data;

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

/**
 * Generated from protobuf message <code>data.Body</code>
 */
class Body extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 payloadType = 1;</code>
     */
    protected $payloadType = 0;
    /**
     * Generated from protobuf field <code>int32 compressionType = 2;</code>
     */
    protected $compressionType = 0;
    /**
     * Generated from protobuf field <code>bytes payload = 3;</code>
     */
    protected $payload = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $payloadType
     *     @type int $compressionType
     *     @type string $payload
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Kuaishou::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>int32 payloadType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPayloadType($var)
    {
        GPBUtil::checkInt32($var);
        $this->payloadType = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int32 compressionType = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCompressionType($var)
    {
        GPBUtil::checkInt32($var);
        $this->compressionType = $var;

        return $this;
    }

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

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

        return $this;
    }

}

