Debian Codegraph @

src/php/tests/interop/Grpc/Testing/ResponseParameters.php

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/messages.proto
4
5 namespace Grpc\Testing;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
10
11 /**
12 * Configuration for a particular response.
13 *
14 * Generated from protobuf message <code>grpc.testing.ResponseParameters</code>
15 */
16 class ResponseParameters extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * Desired payload sizes in responses from the server.
20 *
21 * Generated from protobuf field <code>int32 size = 1;</code>
22 */
23 protected $size = 0;
24 /**
25 * Desired interval between consecutive responses in the response stream in
26 * microseconds.
27 *
28 * Generated from protobuf field <code>int32 interval_us = 2;</code>
29 */
30 protected $interval_us = 0;
31 /**
32 * Whether to request the server to compress the response. This field is
33 * "nullable" in order to interoperate seamlessly with clients not able to
34 * implement the full compression tests by introspecting the call to verify
35 * the response's compression status.
36 *
37 * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
38 */
39 protected $compressed = null;
40
41 /**
42 * Constructor.
43 *
44 * @param array $data {
45 * Optional. Data for populating the Message object.
46 *
47 * @type int $size
48 * Desired payload sizes in responses from the server.
49 * @type int $interval_us
50 * Desired interval between consecutive responses in the response stream in
51 * microseconds.
52 * @type \Grpc\Testing\BoolValue $compressed
53 * Whether to request the server to compress the response. This field is
54 * "nullable" in order to interoperate seamlessly with clients not able to
55 * implement the full compression tests by introspecting the call to verify
56 * the response's compression status.
57 * }
58 */
59 public function __construct($data = NULL) {
60 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
61 parent::__construct($data);
62 }
63
64 /**
65 * Desired payload sizes in responses from the server.
66 *
67 * Generated from protobuf field <code>int32 size = 1;</code>
68 * @return int
69 */
70 public function getSize()
71 {
72 return $this->size;
73 }
74
75 /**
76 * Desired payload sizes in responses from the server.
77 *
78 * Generated from protobuf field <code>int32 size = 1;</code>
79 * @param int $var
80 * @return $this
81 */
82 public function setSize($var)
83 {
84 GPBUtil::checkInt32($var);
85 $this->size = $var;
86
87 return $this;
88 }
89
90 /**
91 * Desired interval between consecutive responses in the response stream in
92 * microseconds.
93 *
94 * Generated from protobuf field <code>int32 interval_us = 2;</code>
95 * @return int
96 */
97 public function getIntervalUs()
98 {
99 return $this->interval_us;
100 }
101
102 /**
103 * Desired interval between consecutive responses in the response stream in
104 * microseconds.
105 *
106 * Generated from protobuf field <code>int32 interval_us = 2;</code>
107 * @param int $var
108 * @return $this
109 */
110 public function setIntervalUs($var)
111 {
112 GPBUtil::checkInt32($var);
113 $this->interval_us = $var;
114
115 return $this;
116 }
117
118 /**
119 * Whether to request the server to compress the response. This field is
120 * "nullable" in order to interoperate seamlessly with clients not able to
121 * implement the full compression tests by introspecting the call to verify
122 * the response's compression status.
123 *
124 * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
125 * @return \Grpc\Testing\BoolValue|null
126 */
127 public function getCompressed()
128 {
129 return $this->compressed;
130 }
131
132 public function hasCompressed()
133 {
134 return isset($this->compressed);
135 }
136
137 public function clearCompressed()
138 {
139 unset($this->compressed);
140 }
141
142 /**
143 * Whether to request the server to compress the response. This field is
144 * "nullable" in order to interoperate seamlessly with clients not able to
145 * implement the full compression tests by introspecting the call to verify
146 * the response's compression status.
147 *
148 * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
149 * @param \Grpc\Testing\BoolValue $var
150 * @return $this
151 */
152 public function setCompressed($var)
153 {
154 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
155 $this->compressed = $var;
156
157 return $this;
158 }
159
160 }
161