1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/messages.proto 4 5namespace Grpc\Testing; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * A block of data, to simply increase gRPC message size. 13 * 14 * Generated from protobuf message <code>grpc.testing.Payload</code> 15 */ 16class Payload extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * DEPRECATED, don't use. To be removed shortly. 20 * The type of data in body. 21 * 22 * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> 23 */ 24 private $type = 0; 25 /** 26 * Primary contents of payload. 27 * 28 * Generated from protobuf field <code>bytes body = 2;</code> 29 */ 30 private $body = ''; 31 32 public function __construct() { 33 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); 34 parent::__construct(); 35 } 36 37 /** 38 * DEPRECATED, don't use. To be removed shortly. 39 * The type of data in body. 40 * 41 * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> 42 * @return int 43 */ 44 public function getType() 45 { 46 return $this->type; 47 } 48 49 /** 50 * DEPRECATED, don't use. To be removed shortly. 51 * The type of data in body. 52 * 53 * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> 54 * @param int $var 55 * @return $this 56 */ 57 public function setType($var) 58 { 59 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); 60 $this->type = $var; 61 62 return $this; 63 } 64 65 /** 66 * Primary contents of payload. 67 * 68 * Generated from protobuf field <code>bytes body = 2;</code> 69 * @return string 70 */ 71 public function getBody() 72 { 73 return $this->body; 74 } 75 76 /** 77 * Primary contents of payload. 78 * 79 * Generated from protobuf field <code>bytes body = 2;</code> 80 * @param string $var 81 * @return $this 82 */ 83 public function setBody($var) 84 { 85 GPBUtil::checkString($var, False); 86 $this->body = $var; 87 88 return $this; 89 } 90 91} 92 93