avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/protobuf/api.proto |
| 4 | |
| 5 | namespace Google\Protobuf; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * Method represents a method of an API interface. |
| 13 | * |
| 14 | * Generated from protobuf message <code>google.protobuf.Method</code> |
| 15 | */ |
| 16 | class Method extends \Google\Protobuf\Internal\Message |
| 17 | { |
| 18 | /** |
| 19 | * The simple name of this method. |
| 20 | * |
| 21 | * Generated from protobuf field <code>string name = 1;</code> |
| 22 | */ |
| 23 | private $name = ''; |
| 24 | /** |
| 25 | * A URL of the input message type. |
| 26 | * |
| 27 | * Generated from protobuf field <code>string request_type_url = 2;</code> |
| 28 | */ |
| 29 | private $request_type_url = ''; |
| 30 | /** |
| 31 | * If true, the request is streamed. |
| 32 | * |
| 33 | * Generated from protobuf field <code>bool request_streaming = 3;</code> |
| 34 | */ |
| 35 | private $request_streaming = false; |
| 36 | /** |
| 37 | * The URL of the output message type. |
| 38 | * |
| 39 | * Generated from protobuf field <code>string response_type_url = 4;</code> |
| 40 | */ |
| 41 | private $response_type_url = ''; |
| 42 | /** |
| 43 | * If true, the response is streamed. |
| 44 | * |
| 45 | * Generated from protobuf field <code>bool response_streaming = 5;</code> |
| 46 | */ |
| 47 | private $response_streaming = false; |
| 48 | /** |
| 49 | * Any metadata attached to the method. |
| 50 | * |
| 51 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code> |
| 52 | */ |
| 53 | private $options; |
| 54 | /** |
| 55 | * The source syntax of this method. |
| 56 | * |
| 57 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> |
| 58 | */ |
| 59 | private $syntax = 0; |
| 60 | |
| 61 | /** |
| 62 | * Constructor. |
| 63 | * |
| 64 | * @param array $data { |
| 65 | * Optional. Data for populating the Message object. |
| 66 | * |
| 67 | * @type string $name |
| 68 | * The simple name of this method. |
| 69 | * @type string $request_type_url |
| 70 | * A URL of the input message type. |
| 71 | * @type bool $request_streaming |
| 72 | * If true, the request is streamed. |
| 73 | * @type string $response_type_url |
| 74 | * The URL of the output message type. |
| 75 | * @type bool $response_streaming |
| 76 | * If true, the response is streamed. |
| 77 | * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options |
| 78 | * Any metadata attached to the method. |
| 79 | * @type int $syntax |
| 80 | * The source syntax of this method. |
| 81 | * } |
| 82 | */ |
| 83 | public function __construct($data = NULL) { |
| 84 | \GPBMetadata\Google\Protobuf\Api::initOnce(); |
| 85 | parent::__construct($data); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * The simple name of this method. |
| 90 | * |
| 91 | * Generated from protobuf field <code>string name = 1;</code> |
| 92 | * @return string |
| 93 | */ |
| 94 | public function getName() |
| 95 | { |
| 96 | return $this->name; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * The simple name of this method. |
| 101 | * |
| 102 | * Generated from protobuf field <code>string name = 1;</code> |
| 103 | * @param string $var |
| 104 | * @return $this |
| 105 | */ |
| 106 | public function setName($var) |
| 107 | { |
| 108 | GPBUtil::checkString($var, True); |
| 109 | $this->name = $var; |
| 110 | |
| 111 | return $this; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * A URL of the input message type. |
| 116 | * |
| 117 | * Generated from protobuf field <code>string request_type_url = 2;</code> |
| 118 | * @return string |
| 119 | */ |
| 120 | public function getRequestTypeUrl() |
| 121 | { |
| 122 | return $this->request_type_url; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * A URL of the input message type. |
| 127 | * |
| 128 | * Generated from protobuf field <code>string request_type_url = 2;</code> |
| 129 | * @param string $var |
| 130 | * @return $this |
| 131 | */ |
| 132 | public function setRequestTypeUrl($var) |
| 133 | { |
| 134 | GPBUtil::checkString($var, True); |
| 135 | $this->request_type_url = $var; |
| 136 | |
| 137 | return $this; |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * If true, the request is streamed. |
| 142 | * |
| 143 | * Generated from protobuf field <code>bool request_streaming = 3;</code> |
| 144 | * @return bool |
| 145 | */ |
| 146 | public function getRequestStreaming() |
| 147 | { |
| 148 | return $this->request_streaming; |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * If true, the request is streamed. |
| 153 | * |
| 154 | * Generated from protobuf field <code>bool request_streaming = 3;</code> |
| 155 | * @param bool $var |
| 156 | * @return $this |
| 157 | */ |
| 158 | public function setRequestStreaming($var) |
| 159 | { |
| 160 | GPBUtil::checkBool($var); |
| 161 | $this->request_streaming = $var; |
| 162 | |
| 163 | return $this; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * The URL of the output message type. |
| 168 | * |
| 169 | * Generated from protobuf field <code>string response_type_url = 4;</code> |
| 170 | * @return string |
| 171 | */ |
| 172 | public function getResponseTypeUrl() |
| 173 | { |
| 174 | return $this->response_type_url; |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * The URL of the output message type. |
| 179 | * |
| 180 | * Generated from protobuf field <code>string response_type_url = 4;</code> |
| 181 | * @param string $var |
| 182 | * @return $this |
| 183 | */ |
| 184 | public function setResponseTypeUrl($var) |
| 185 | { |
| 186 | GPBUtil::checkString($var, True); |
| 187 | $this->response_type_url = $var; |
| 188 | |
| 189 | return $this; |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * If true, the response is streamed. |
| 194 | * |
| 195 | * Generated from protobuf field <code>bool response_streaming = 5;</code> |
| 196 | * @return bool |
| 197 | */ |
| 198 | public function getResponseStreaming() |
| 199 | { |
| 200 | return $this->response_streaming; |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * If true, the response is streamed. |
| 205 | * |
| 206 | * Generated from protobuf field <code>bool response_streaming = 5;</code> |
| 207 | * @param bool $var |
| 208 | * @return $this |
| 209 | */ |
| 210 | public function setResponseStreaming($var) |
| 211 | { |
| 212 | GPBUtil::checkBool($var); |
| 213 | $this->response_streaming = $var; |
| 214 | |
| 215 | return $this; |
| 216 | } |
| 217 | |
| 218 | /** |
| 219 | * Any metadata attached to the method. |
| 220 | * |
| 221 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code> |
| 222 | * @return \Google\Protobuf\Internal\RepeatedField |
| 223 | */ |
| 224 | public function getOptions() |
| 225 | { |
| 226 | return $this->options; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * Any metadata attached to the method. |
| 231 | * |
| 232 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code> |
| 233 | * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var |
| 234 | * @return $this |
| 235 | */ |
| 236 | public function setOptions($var) |
| 237 | { |
| 238 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class); |
| 239 | $this->options = $arr; |
| 240 | |
| 241 | return $this; |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * The source syntax of this method. |
| 246 | * |
| 247 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> |
| 248 | * @return int |
| 249 | */ |
| 250 | public function getSyntax() |
| 251 | { |
| 252 | return $this->syntax; |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * The source syntax of this method. |
| 257 | * |
| 258 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> |
| 259 | * @param int $var |
| 260 | * @return $this |
| 261 | */ |
| 262 | public function setSyntax($var) |
| 263 | { |
| 264 | GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class); |
| 265 | $this->syntax = $var; |
| 266 | |
| 267 | return $this; |
| 268 | } |
| 269 | |
| 270 | } |
| 271 | |