| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/api/backend.proto |
| 5 |
namespace Dudlewebs\WPMCS\Google\Api; |
| 6 |
|
| 7 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 |
/** |
| 11 |
* A backend rule provides configuration for an individual API element. |
| 12 |
* |
| 13 |
* Generated from protobuf message <code>google.api.BackendRule</code> |
| 14 |
*/ |
| 15 |
class BackendRule extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 16 |
{ |
| 17 |
/** |
| 18 |
* Selects the methods to which this rule applies. |
| 19 |
* Refer to [selector][google.api.DocumentationRule.selector] for syntax |
| 20 |
* details. |
| 21 |
* |
| 22 |
* Generated from protobuf field <code>string selector = 1;</code> |
| 23 |
*/ |
| 24 |
protected $selector = ''; |
| 25 |
/** |
| 26 |
* The address of the API backend. |
| 27 |
* The scheme is used to determine the backend protocol and security. |
| 28 |
* The following schemes are accepted: |
| 29 |
* SCHEME PROTOCOL SECURITY |
| 30 |
* http:// HTTP None |
| 31 |
* https:// HTTP TLS |
| 32 |
* grpc:// gRPC None |
| 33 |
* grpcs:// gRPC TLS |
| 34 |
* It is recommended to explicitly include a scheme. Leaving out the scheme |
| 35 |
* may cause constrasting behaviors across platforms. |
| 36 |
* If the port is unspecified, the default is: |
| 37 |
* - 80 for schemes without TLS |
| 38 |
* - 443 for schemes with TLS |
| 39 |
* For HTTP backends, use [protocol][google.api.BackendRule.protocol] |
| 40 |
* to specify the protocol version. |
| 41 |
* |
| 42 |
* Generated from protobuf field <code>string address = 2;</code> |
| 43 |
*/ |
| 44 |
protected $address = ''; |
| 45 |
/** |
| 46 |
* The number of seconds to wait for a response from a request. The default |
| 47 |
* varies based on the request protocol and deployment environment. |
| 48 |
* |
| 49 |
* Generated from protobuf field <code>double deadline = 3;</code> |
| 50 |
*/ |
| 51 |
protected $deadline = 0.0; |
| 52 |
/** |
| 53 |
* Deprecated, do not use. |
| 54 |
* |
| 55 |
* Generated from protobuf field <code>double min_deadline = 4 [deprecated = true];</code> |
| 56 |
* @deprecated |
| 57 |
*/ |
| 58 |
protected $min_deadline = 0.0; |
| 59 |
/** |
| 60 |
* The number of seconds to wait for the completion of a long running |
| 61 |
* operation. The default is no deadline. |
| 62 |
* |
| 63 |
* Generated from protobuf field <code>double operation_deadline = 5;</code> |
| 64 |
*/ |
| 65 |
protected $operation_deadline = 0.0; |
| 66 |
/** |
| 67 |
* Generated from protobuf field <code>.google.api.BackendRule.PathTranslation path_translation = 6;</code> |
| 68 |
*/ |
| 69 |
protected $path_translation = 0; |
| 70 |
/** |
| 71 |
* The protocol used for sending a request to the backend. |
| 72 |
* The supported values are "http/1.1" and "h2". |
| 73 |
* The default value is inferred from the scheme in the |
| 74 |
* [address][google.api.BackendRule.address] field: |
| 75 |
* SCHEME PROTOCOL |
| 76 |
* http:// http/1.1 |
| 77 |
* https:// http/1.1 |
| 78 |
* grpc:// h2 |
| 79 |
* grpcs:// h2 |
| 80 |
* For secure HTTP backends (https://) that support HTTP/2, set this field |
| 81 |
* to "h2" for improved performance. |
| 82 |
* Configuring this field to non-default values is only supported for secure |
| 83 |
* HTTP backends. This field will be ignored for all other backends. |
| 84 |
* See |
| 85 |
* https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 86 |
* for more details on the supported values. |
| 87 |
* |
| 88 |
* Generated from protobuf field <code>string protocol = 9;</code> |
| 89 |
*/ |
| 90 |
protected $protocol = ''; |
| 91 |
/** |
| 92 |
* The map between request protocol and the backend address. |
| 93 |
* |
| 94 |
* Generated from protobuf field <code>map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;</code> |
| 95 |
*/ |
| 96 |
private $overrides_by_request_protocol; |
| 97 |
protected $authentication; |
| 98 |
/** |
| 99 |
* Constructor. |
| 100 |
* |
| 101 |
* @param array $data { |
| 102 |
* Optional. Data for populating the Message object. |
| 103 |
* |
| 104 |
* @type string $selector |
| 105 |
* Selects the methods to which this rule applies. |
| 106 |
* Refer to [selector][google.api.DocumentationRule.selector] for syntax |
| 107 |
* details. |
| 108 |
* @type string $address |
| 109 |
* The address of the API backend. |
| 110 |
* The scheme is used to determine the backend protocol and security. |
| 111 |
* The following schemes are accepted: |
| 112 |
* SCHEME PROTOCOL SECURITY |
| 113 |
* http:// HTTP None |
| 114 |
* https:// HTTP TLS |
| 115 |
* grpc:// gRPC None |
| 116 |
* grpcs:// gRPC TLS |
| 117 |
* It is recommended to explicitly include a scheme. Leaving out the scheme |
| 118 |
* may cause constrasting behaviors across platforms. |
| 119 |
* If the port is unspecified, the default is: |
| 120 |
* - 80 for schemes without TLS |
| 121 |
* - 443 for schemes with TLS |
| 122 |
* For HTTP backends, use [protocol][google.api.BackendRule.protocol] |
| 123 |
* to specify the protocol version. |
| 124 |
* @type float $deadline |
| 125 |
* The number of seconds to wait for a response from a request. The default |
| 126 |
* varies based on the request protocol and deployment environment. |
| 127 |
* @type float $min_deadline |
| 128 |
* Deprecated, do not use. |
| 129 |
* @type float $operation_deadline |
| 130 |
* The number of seconds to wait for the completion of a long running |
| 131 |
* operation. The default is no deadline. |
| 132 |
* @type int $path_translation |
| 133 |
* @type string $jwt_audience |
| 134 |
* The JWT audience is used when generating a JWT ID token for the backend. |
| 135 |
* This ID token will be added in the HTTP "authorization" header, and sent |
| 136 |
* to the backend. |
| 137 |
* @type bool $disable_auth |
| 138 |
* When disable_auth is true, a JWT ID token won't be generated and the |
| 139 |
* original "Authorization" HTTP header will be preserved. If the header is |
| 140 |
* used to carry the original token and is expected by the backend, this |
| 141 |
* field must be set to true to preserve the header. |
| 142 |
* @type string $protocol |
| 143 |
* The protocol used for sending a request to the backend. |
| 144 |
* The supported values are "http/1.1" and "h2". |
| 145 |
* The default value is inferred from the scheme in the |
| 146 |
* [address][google.api.BackendRule.address] field: |
| 147 |
* SCHEME PROTOCOL |
| 148 |
* http:// http/1.1 |
| 149 |
* https:// http/1.1 |
| 150 |
* grpc:// h2 |
| 151 |
* grpcs:// h2 |
| 152 |
* For secure HTTP backends (https://) that support HTTP/2, set this field |
| 153 |
* to "h2" for improved performance. |
| 154 |
* Configuring this field to non-default values is only supported for secure |
| 155 |
* HTTP backends. This field will be ignored for all other backends. |
| 156 |
* See |
| 157 |
* https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 158 |
* for more details on the supported values. |
| 159 |
* @type array|\Google\Protobuf\Internal\MapField $overrides_by_request_protocol |
| 160 |
* The map between request protocol and the backend address. |
| 161 |
* } |
| 162 |
*/ |
| 163 |
public function __construct($data = NULL) |
| 164 |
{ |
| 165 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Api\Backend::initOnce(); |
| 166 |
parent::__construct($data); |
| 167 |
} |
| 168 |
/** |
| 169 |
* Selects the methods to which this rule applies. |
| 170 |
* Refer to [selector][google.api.DocumentationRule.selector] for syntax |
| 171 |
* details. |
| 172 |
* |
| 173 |
* Generated from protobuf field <code>string selector = 1;</code> |
| 174 |
* @return string |
| 175 |
*/ |
| 176 |
public function getSelector() |
| 177 |
{ |
| 178 |
return $this->selector; |
| 179 |
} |
| 180 |
/** |
| 181 |
* Selects the methods to which this rule applies. |
| 182 |
* Refer to [selector][google.api.DocumentationRule.selector] for syntax |
| 183 |
* details. |
| 184 |
* |
| 185 |
* Generated from protobuf field <code>string selector = 1;</code> |
| 186 |
* @param string $var |
| 187 |
* @return $this |
| 188 |
*/ |
| 189 |
public function setSelector($var) |
| 190 |
{ |
| 191 |
GPBUtil::checkString($var, True); |
| 192 |
$this->selector = $var; |
| 193 |
return $this; |
| 194 |
} |
| 195 |
/** |
| 196 |
* The address of the API backend. |
| 197 |
* The scheme is used to determine the backend protocol and security. |
| 198 |
* The following schemes are accepted: |
| 199 |
* SCHEME PROTOCOL SECURITY |
| 200 |
* http:// HTTP None |
| 201 |
* https:// HTTP TLS |
| 202 |
* grpc:// gRPC None |
| 203 |
* grpcs:// gRPC TLS |
| 204 |
* It is recommended to explicitly include a scheme. Leaving out the scheme |
| 205 |
* may cause constrasting behaviors across platforms. |
| 206 |
* If the port is unspecified, the default is: |
| 207 |
* - 80 for schemes without TLS |
| 208 |
* - 443 for schemes with TLS |
| 209 |
* For HTTP backends, use [protocol][google.api.BackendRule.protocol] |
| 210 |
* to specify the protocol version. |
| 211 |
* |
| 212 |
* Generated from protobuf field <code>string address = 2;</code> |
| 213 |
* @return string |
| 214 |
*/ |
| 215 |
public function getAddress() |
| 216 |
{ |
| 217 |
return $this->address; |
| 218 |
} |
| 219 |
/** |
| 220 |
* The address of the API backend. |
| 221 |
* The scheme is used to determine the backend protocol and security. |
| 222 |
* The following schemes are accepted: |
| 223 |
* SCHEME PROTOCOL SECURITY |
| 224 |
* http:// HTTP None |
| 225 |
* https:// HTTP TLS |
| 226 |
* grpc:// gRPC None |
| 227 |
* grpcs:// gRPC TLS |
| 228 |
* It is recommended to explicitly include a scheme. Leaving out the scheme |
| 229 |
* may cause constrasting behaviors across platforms. |
| 230 |
* If the port is unspecified, the default is: |
| 231 |
* - 80 for schemes without TLS |
| 232 |
* - 443 for schemes with TLS |
| 233 |
* For HTTP backends, use [protocol][google.api.BackendRule.protocol] |
| 234 |
* to specify the protocol version. |
| 235 |
* |
| 236 |
* Generated from protobuf field <code>string address = 2;</code> |
| 237 |
* @param string $var |
| 238 |
* @return $this |
| 239 |
*/ |
| 240 |
public function setAddress($var) |
| 241 |
{ |
| 242 |
GPBUtil::checkString($var, True); |
| 243 |
$this->address = $var; |
| 244 |
return $this; |
| 245 |
} |
| 246 |
/** |
| 247 |
* The number of seconds to wait for a response from a request. The default |
| 248 |
* varies based on the request protocol and deployment environment. |
| 249 |
* |
| 250 |
* Generated from protobuf field <code>double deadline = 3;</code> |
| 251 |
* @return float |
| 252 |
*/ |
| 253 |
public function getDeadline() |
| 254 |
{ |
| 255 |
return $this->deadline; |
| 256 |
} |
| 257 |
/** |
| 258 |
* The number of seconds to wait for a response from a request. The default |
| 259 |
* varies based on the request protocol and deployment environment. |
| 260 |
* |
| 261 |
* Generated from protobuf field <code>double deadline = 3;</code> |
| 262 |
* @param float $var |
| 263 |
* @return $this |
| 264 |
*/ |
| 265 |
public function setDeadline($var) |
| 266 |
{ |
| 267 |
GPBUtil::checkDouble($var); |
| 268 |
$this->deadline = $var; |
| 269 |
return $this; |
| 270 |
} |
| 271 |
/** |
| 272 |
* Deprecated, do not use. |
| 273 |
* |
| 274 |
* Generated from protobuf field <code>double min_deadline = 4 [deprecated = true];</code> |
| 275 |
* @return float |
| 276 |
* @deprecated |
| 277 |
*/ |
| 278 |
public function getMinDeadline() |
| 279 |
{ |
| 280 |
@trigger_error('min_deadline is deprecated.', \E_USER_DEPRECATED); |
| 281 |
return $this->min_deadline; |
| 282 |
} |
| 283 |
/** |
| 284 |
* Deprecated, do not use. |
| 285 |
* |
| 286 |
* Generated from protobuf field <code>double min_deadline = 4 [deprecated = true];</code> |
| 287 |
* @param float $var |
| 288 |
* @return $this |
| 289 |
* @deprecated |
| 290 |
*/ |
| 291 |
public function setMinDeadline($var) |
| 292 |
{ |
| 293 |
@trigger_error('min_deadline is deprecated.', \E_USER_DEPRECATED); |
| 294 |
GPBUtil::checkDouble($var); |
| 295 |
$this->min_deadline = $var; |
| 296 |
return $this; |
| 297 |
} |
| 298 |
/** |
| 299 |
* The number of seconds to wait for the completion of a long running |
| 300 |
* operation. The default is no deadline. |
| 301 |
* |
| 302 |
* Generated from protobuf field <code>double operation_deadline = 5;</code> |
| 303 |
* @return float |
| 304 |
*/ |
| 305 |
public function getOperationDeadline() |
| 306 |
{ |
| 307 |
return $this->operation_deadline; |
| 308 |
} |
| 309 |
/** |
| 310 |
* The number of seconds to wait for the completion of a long running |
| 311 |
* operation. The default is no deadline. |
| 312 |
* |
| 313 |
* Generated from protobuf field <code>double operation_deadline = 5;</code> |
| 314 |
* @param float $var |
| 315 |
* @return $this |
| 316 |
*/ |
| 317 |
public function setOperationDeadline($var) |
| 318 |
{ |
| 319 |
GPBUtil::checkDouble($var); |
| 320 |
$this->operation_deadline = $var; |
| 321 |
return $this; |
| 322 |
} |
| 323 |
/** |
| 324 |
* Generated from protobuf field <code>.google.api.BackendRule.PathTranslation path_translation = 6;</code> |
| 325 |
* @return int |
| 326 |
*/ |
| 327 |
public function getPathTranslation() |
| 328 |
{ |
| 329 |
return $this->path_translation; |
| 330 |
} |
| 331 |
/** |
| 332 |
* Generated from protobuf field <code>.google.api.BackendRule.PathTranslation path_translation = 6;</code> |
| 333 |
* @param int $var |
| 334 |
* @return $this |
| 335 |
*/ |
| 336 |
public function setPathTranslation($var) |
| 337 |
{ |
| 338 |
GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Api\BackendRule\PathTranslation::class); |
| 339 |
$this->path_translation = $var; |
| 340 |
return $this; |
| 341 |
} |
| 342 |
/** |
| 343 |
* The JWT audience is used when generating a JWT ID token for the backend. |
| 344 |
* This ID token will be added in the HTTP "authorization" header, and sent |
| 345 |
* to the backend. |
| 346 |
* |
| 347 |
* Generated from protobuf field <code>string jwt_audience = 7;</code> |
| 348 |
* @return string |
| 349 |
*/ |
| 350 |
public function getJwtAudience() |
| 351 |
{ |
| 352 |
return $this->readOneof(7); |
| 353 |
} |
| 354 |
public function hasJwtAudience() |
| 355 |
{ |
| 356 |
return $this->hasOneof(7); |
| 357 |
} |
| 358 |
/** |
| 359 |
* The JWT audience is used when generating a JWT ID token for the backend. |
| 360 |
* This ID token will be added in the HTTP "authorization" header, and sent |
| 361 |
* to the backend. |
| 362 |
* |
| 363 |
* Generated from protobuf field <code>string jwt_audience = 7;</code> |
| 364 |
* @param string $var |
| 365 |
* @return $this |
| 366 |
*/ |
| 367 |
public function setJwtAudience($var) |
| 368 |
{ |
| 369 |
GPBUtil::checkString($var, True); |
| 370 |
$this->writeOneof(7, $var); |
| 371 |
return $this; |
| 372 |
} |
| 373 |
/** |
| 374 |
* When disable_auth is true, a JWT ID token won't be generated and the |
| 375 |
* original "Authorization" HTTP header will be preserved. If the header is |
| 376 |
* used to carry the original token and is expected by the backend, this |
| 377 |
* field must be set to true to preserve the header. |
| 378 |
* |
| 379 |
* Generated from protobuf field <code>bool disable_auth = 8;</code> |
| 380 |
* @return bool |
| 381 |
*/ |
| 382 |
public function getDisableAuth() |
| 383 |
{ |
| 384 |
return $this->readOneof(8); |
| 385 |
} |
| 386 |
public function hasDisableAuth() |
| 387 |
{ |
| 388 |
return $this->hasOneof(8); |
| 389 |
} |
| 390 |
/** |
| 391 |
* When disable_auth is true, a JWT ID token won't be generated and the |
| 392 |
* original "Authorization" HTTP header will be preserved. If the header is |
| 393 |
* used to carry the original token and is expected by the backend, this |
| 394 |
* field must be set to true to preserve the header. |
| 395 |
* |
| 396 |
* Generated from protobuf field <code>bool disable_auth = 8;</code> |
| 397 |
* @param bool $var |
| 398 |
* @return $this |
| 399 |
*/ |
| 400 |
public function setDisableAuth($var) |
| 401 |
{ |
| 402 |
GPBUtil::checkBool($var); |
| 403 |
$this->writeOneof(8, $var); |
| 404 |
return $this; |
| 405 |
} |
| 406 |
/** |
| 407 |
* The protocol used for sending a request to the backend. |
| 408 |
* The supported values are "http/1.1" and "h2". |
| 409 |
* The default value is inferred from the scheme in the |
| 410 |
* [address][google.api.BackendRule.address] field: |
| 411 |
* SCHEME PROTOCOL |
| 412 |
* http:// http/1.1 |
| 413 |
* https:// http/1.1 |
| 414 |
* grpc:// h2 |
| 415 |
* grpcs:// h2 |
| 416 |
* For secure HTTP backends (https://) that support HTTP/2, set this field |
| 417 |
* to "h2" for improved performance. |
| 418 |
* Configuring this field to non-default values is only supported for secure |
| 419 |
* HTTP backends. This field will be ignored for all other backends. |
| 420 |
* See |
| 421 |
* https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 422 |
* for more details on the supported values. |
| 423 |
* |
| 424 |
* Generated from protobuf field <code>string protocol = 9;</code> |
| 425 |
* @return string |
| 426 |
*/ |
| 427 |
public function getProtocol() |
| 428 |
{ |
| 429 |
return $this->protocol; |
| 430 |
} |
| 431 |
/** |
| 432 |
* The protocol used for sending a request to the backend. |
| 433 |
* The supported values are "http/1.1" and "h2". |
| 434 |
* The default value is inferred from the scheme in the |
| 435 |
* [address][google.api.BackendRule.address] field: |
| 436 |
* SCHEME PROTOCOL |
| 437 |
* http:// http/1.1 |
| 438 |
* https:// http/1.1 |
| 439 |
* grpc:// h2 |
| 440 |
* grpcs:// h2 |
| 441 |
* For secure HTTP backends (https://) that support HTTP/2, set this field |
| 442 |
* to "h2" for improved performance. |
| 443 |
* Configuring this field to non-default values is only supported for secure |
| 444 |
* HTTP backends. This field will be ignored for all other backends. |
| 445 |
* See |
| 446 |
* https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 447 |
* for more details on the supported values. |
| 448 |
* |
| 449 |
* Generated from protobuf field <code>string protocol = 9;</code> |
| 450 |
* @param string $var |
| 451 |
* @return $this |
| 452 |
*/ |
| 453 |
public function setProtocol($var) |
| 454 |
{ |
| 455 |
GPBUtil::checkString($var, True); |
| 456 |
$this->protocol = $var; |
| 457 |
return $this; |
| 458 |
} |
| 459 |
/** |
| 460 |
* The map between request protocol and the backend address. |
| 461 |
* |
| 462 |
* Generated from protobuf field <code>map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;</code> |
| 463 |
* @return \Google\Protobuf\Internal\MapField |
| 464 |
*/ |
| 465 |
public function getOverridesByRequestProtocol() |
| 466 |
{ |
| 467 |
return $this->overrides_by_request_protocol; |
| 468 |
} |
| 469 |
/** |
| 470 |
* The map between request protocol and the backend address. |
| 471 |
* |
| 472 |
* Generated from protobuf field <code>map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;</code> |
| 473 |
* @param array|\Google\Protobuf\Internal\MapField $var |
| 474 |
* @return $this |
| 475 |
*/ |
| 476 |
public function setOverridesByRequestProtocol($var) |
| 477 |
{ |
| 478 |
$arr = GPBUtil::checkMapField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\BackendRule::class); |
| 479 |
$this->overrides_by_request_protocol = $arr; |
| 480 |
return $this; |
| 481 |
} |
| 482 |
/** |
| 483 |
* @return string |
| 484 |
*/ |
| 485 |
public function getAuthentication() |
| 486 |
{ |
| 487 |
return $this->whichOneof("authentication"); |
| 488 |
} |
| 489 |
} |
| 490 |
|