<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto

namespace Grpc\Testing;

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

/**
 * <pre>
 * A block of data, to simply increase gRPC message size.
 * </pre>
 *
 * Protobuf type <code>grpc.testing.Payload</code>
 */
class Payload extends \Google\Protobuf\Internal\Message
{
    /**
     * <pre>
     * DEPRECATED, don't use. To be removed shortly.
     * The type of data in body.
     * </pre>
     *
     * <code>.grpc.testing.PayloadType type = 1;</code>
     */
    private $type = 0;
    /**
     * <pre>
     * Primary contents of payload.
     * </pre>
     *
     * <code>bytes body = 2;</code>
     */
    private $body = '';

    public function __construct() {
        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
        parent::__construct();
    }

    /**
     * <pre>
     * DEPRECATED, don't use. To be removed shortly.
     * The type of data in body.
     * </pre>
     *
     * <code>.grpc.testing.PayloadType type = 1;</code>
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * <pre>
     * DEPRECATED, don't use. To be removed shortly.
     * The type of data in body.
     * </pre>
     *
     * <code>.grpc.testing.PayloadType type = 1;</code>
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
        $this->type = $var;
    }

    /**
     * <pre>
     * Primary contents of payload.
     * </pre>
     *
     * <code>bytes body = 2;</code>
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * <pre>
     * Primary contents of payload.
     * </pre>
     *
     * <code>bytes body = 2;</code>
     */
    public function setBody($var)
    {
        GPBUtil::checkString($var, False);
        $this->body = $var;
    }

}

