mirror of https://github.com/grpc/grpc.git
Merge pull request #22712 from jtattermusch/php_generate_protos_refactor
Php generate protos refactorpull/22763/head
commit
841416456a
121 changed files with 4916 additions and 820 deletions
@ -0,0 +1,36 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace GPBMetadata; |
||||
|
||||
class Math |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0ae9020a0a6d6174682e70726f746f12046d617468222c0a074469764172" . |
||||
"677312100a086469766964656e64180120012803120f0a0764697669736f" . |
||||
"72180220012803222f0a084469765265706c7912100a0871756f7469656e" . |
||||
"7418012001280312110a0972656d61696e64657218022001280322180a07" . |
||||
"46696241726773120d0a056c696d697418012001280322120a034e756d12" . |
||||
"0b0a036e756d18012001280322190a084669625265706c79120d0a05636f" . |
||||
"756e7418012001280332a4010a044d61746812260a03446976120d2e6d61" . |
||||
"74682e446976417267731a0e2e6d6174682e4469765265706c792200122e" . |
||||
"0a074469764d616e79120d2e6d6174682e446976417267731a0e2e6d6174" . |
||||
"682e4469765265706c7922002801300112230a03466962120d2e6d617468" . |
||||
"2e466962417267731a092e6d6174682e4e756d22003001121f0a0353756d" . |
||||
"12092e6d6174682e4e756d1a092e6d6174682e4e756d2200280162067072" . |
||||
"6f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,85 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace Math; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>math.DivArgs</code> |
||||
*/ |
||||
class DivArgs extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 dividend = 1;</code> |
||||
*/ |
||||
protected $dividend = 0; |
||||
/** |
||||
* Generated from protobuf field <code>int64 divisor = 2;</code> |
||||
*/ |
||||
protected $divisor = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int|string $dividend |
||||
* @type int|string $divisor |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Math::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 dividend = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getDividend() |
||||
{ |
||||
return $this->dividend; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 dividend = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setDividend($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->dividend = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 divisor = 2;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getDivisor() |
||||
{ |
||||
return $this->divisor; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 divisor = 2;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setDivisor($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->divisor = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,85 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace Math; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>math.DivReply</code> |
||||
*/ |
||||
class DivReply extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 quotient = 1;</code> |
||||
*/ |
||||
protected $quotient = 0; |
||||
/** |
||||
* Generated from protobuf field <code>int64 remainder = 2;</code> |
||||
*/ |
||||
protected $remainder = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int|string $quotient |
||||
* @type int|string $remainder |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Math::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 quotient = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getQuotient() |
||||
{ |
||||
return $this->quotient; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 quotient = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setQuotient($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->quotient = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 remainder = 2;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getRemainder() |
||||
{ |
||||
return $this->remainder; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 remainder = 2;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setRemainder($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->remainder = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,58 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace Math; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>math.FibArgs</code> |
||||
*/ |
||||
class FibArgs extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 limit = 1;</code> |
||||
*/ |
||||
protected $limit = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int|string $limit |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Math::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 limit = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getLimit() |
||||
{ |
||||
return $this->limit; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 limit = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setLimit($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->limit = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,58 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace Math; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>math.FibReply</code> |
||||
*/ |
||||
class FibReply extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 count = 1;</code> |
||||
*/ |
||||
protected $count = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int|string $count |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Math::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 count = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getCount() |
||||
{ |
||||
return $this->count; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 count = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setCount($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->count = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,58 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
namespace Math; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>math.Num</code> |
||||
*/ |
||||
class Num extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 num = 1;</code> |
||||
*/ |
||||
protected $num = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int|string $num |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Math::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 num = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getNum() |
||||
{ |
||||
return $this->num; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 num = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setNum($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->num = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,86 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Messages |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0ad70e0a257372632f70726f746f2f677270632f74657374696e672f6d65" . |
||||
"7373616765732e70726f746f120c677270632e74657374696e67221a0a09" . |
||||
"426f6f6c56616c7565120d0a0576616c756518012001280822400a075061" . |
||||
"796c6f616412270a047479706518012001280e32192e677270632e746573" . |
||||
"74696e672e5061796c6f616454797065120c0a04626f647918022001280c" . |
||||
"222b0a0a4563686f537461747573120c0a04636f6465180120012805120f" . |
||||
"0a076d6573736167651802200128092286030a0d53696d706c6552657175" . |
||||
"65737412300a0d726573706f6e73655f7479706518012001280e32192e67" . |
||||
"7270632e74657374696e672e5061796c6f61645479706512150a0d726573" . |
||||
"706f6e73655f73697a6518022001280512260a077061796c6f6164180320" . |
||||
"01280b32152e677270632e74657374696e672e5061796c6f616412150a0d" . |
||||
"66696c6c5f757365726e616d6518042001280812180a1066696c6c5f6f61" . |
||||
"7574685f73636f706518052001280812340a13726573706f6e73655f636f" . |
||||
"6d7072657373656418062001280b32172e677270632e74657374696e672e" . |
||||
"426f6f6c56616c756512310a0f726573706f6e73655f7374617475731807" . |
||||
"2001280b32182e677270632e74657374696e672e4563686f537461747573" . |
||||
"12320a116578706563745f636f6d7072657373656418082001280b32172e" . |
||||
"677270632e74657374696e672e426f6f6c56616c756512160a0e66696c6c" . |
||||
"5f7365727665725f6964180920012808121e0a1666696c6c5f677270636c" . |
||||
"625f726f7574655f74797065180a2001280822be010a0e53696d706c6552" . |
||||
"6573706f6e736512260a077061796c6f616418012001280b32152e677270" . |
||||
"632e74657374696e672e5061796c6f616412100a08757365726e616d6518" . |
||||
"022001280912130a0b6f617574685f73636f706518032001280912110a09" . |
||||
"7365727665725f696418042001280912380a11677270636c625f726f7574" . |
||||
"655f7479706518052001280e321d2e677270632e74657374696e672e4772" . |
||||
"70636c62526f7574655479706512100a08686f73746e616d651806200128" . |
||||
"0922770a1953747265616d696e67496e70757443616c6c52657175657374" . |
||||
"12260a077061796c6f616418012001280b32152e677270632e7465737469" . |
||||
"6e672e5061796c6f616412320a116578706563745f636f6d707265737365" . |
||||
"6418022001280b32172e677270632e74657374696e672e426f6f6c56616c" . |
||||
"7565223d0a1a53747265616d696e67496e70757443616c6c526573706f6e" . |
||||
"7365121f0a17616767726567617465645f7061796c6f61645f73697a6518" . |
||||
"012001280522640a12526573706f6e7365506172616d6574657273120c0a" . |
||||
"0473697a6518012001280512130a0b696e74657276616c5f757318022001" . |
||||
"2805122b0a0a636f6d7072657373656418032001280b32172e677270632e" . |
||||
"74657374696e672e426f6f6c56616c756522e8010a1a53747265616d696e" . |
||||
"674f757470757443616c6c5265717565737412300a0d726573706f6e7365" . |
||||
"5f7479706518012001280e32192e677270632e74657374696e672e506179" . |
||||
"6c6f616454797065123d0a13726573706f6e73655f706172616d65746572" . |
||||
"7318022003280b32202e677270632e74657374696e672e526573706f6e73" . |
||||
"65506172616d657465727312260a077061796c6f616418032001280b3215" . |
||||
"2e677270632e74657374696e672e5061796c6f616412310a0f726573706f" . |
||||
"6e73655f73746174757318072001280b32182e677270632e74657374696e" . |
||||
"672e4563686f53746174757322450a1b53747265616d696e674f75747075" . |
||||
"7443616c6c526573706f6e736512260a077061796c6f616418012001280b" . |
||||
"32152e677270632e74657374696e672e5061796c6f616422330a0f526563" . |
||||
"6f6e6e656374506172616d7312200a186d61785f7265636f6e6e6563745f" . |
||||
"6261636b6f66665f6d7318012001280522330a0d5265636f6e6e65637449" . |
||||
"6e666f120e0a0670617373656418012001280812120a0a6261636b6f6666" . |
||||
"5f6d7318022003280522410a184c6f616442616c616e6365725374617473" . |
||||
"5265717565737412100a086e756d5f7270637318012001280512130a0b74" . |
||||
"696d656f75745f73656318022001280522b3010a194c6f616442616c616e" . |
||||
"6365725374617473526573706f6e7365124d0a0c727063735f62795f7065" . |
||||
"657218012003280b32372e677270632e74657374696e672e4c6f61644261" . |
||||
"6c616e6365725374617473526573706f6e73652e52706373427950656572" . |
||||
"456e74727912140a0c6e756d5f6661696c757265731802200128051a310a" . |
||||
"0f52706373427950656572456e747279120b0a036b657918012001280912" . |
||||
"0d0a0576616c75651802200128053a0238012a1f0a0b5061796c6f616454" . |
||||
"79706512100a0c434f4d505245535341424c4510002a6f0a0f477270636c" . |
||||
"62526f75746554797065121d0a19475250434c425f524f5554455f545950" . |
||||
"455f554e4b4e4f574e1000121e0a1a475250434c425f524f5554455f5459" . |
||||
"50455f46414c4c4241434b1001121d0a19475250434c425f524f5554455f" . |
||||
"545950455f4241434b454e441002620670726f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,66 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/test.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Test |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\PBEmpty::initOnce(); |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aca090a217372632f70726f746f2f677270632f74657374696e672f7465" . |
||||
"73742e70726f746f120c677270632e74657374696e671a257372632f7072" . |
||||
"6f746f2f677270632f74657374696e672f6d657373616765732e70726f74" . |
||||
"6f32e7050a0b546573745365727669636512430a09456d70747943616c6c" . |
||||
"121a2e677270632e74657374696e672e456d7074794d6573736167651a1a" . |
||||
"2e677270632e74657374696e672e456d7074794d65737361676512460a09" . |
||||
"556e61727943616c6c121b2e677270632e74657374696e672e53696d706c" . |
||||
"65526571756573741a1c2e677270632e74657374696e672e53696d706c65" . |
||||
"526573706f6e7365124f0a12436163686561626c65556e61727943616c6c" . |
||||
"121b2e677270632e74657374696e672e53696d706c65526571756573741a" . |
||||
"1c2e677270632e74657374696e672e53696d706c65526573706f6e736512" . |
||||
"6c0a1353747265616d696e674f757470757443616c6c12282e677270632e" . |
||||
"74657374696e672e53747265616d696e674f757470757443616c6c526571" . |
||||
"756573741a292e677270632e74657374696e672e53747265616d696e674f" . |
||||
"757470757443616c6c526573706f6e7365300112690a1253747265616d69" . |
||||
"6e67496e70757443616c6c12272e677270632e74657374696e672e537472" . |
||||
"65616d696e67496e70757443616c6c526571756573741a282e677270632e" . |
||||
"74657374696e672e53747265616d696e67496e70757443616c6c52657370" . |
||||
"6f6e7365280112690a0e46756c6c4475706c657843616c6c12282e677270" . |
||||
"632e74657374696e672e53747265616d696e674f757470757443616c6c52" . |
||||
"6571756573741a292e677270632e74657374696e672e53747265616d696e" . |
||||
"674f757470757443616c6c526573706f6e73652801300112690a0e48616c" . |
||||
"664475706c657843616c6c12282e677270632e74657374696e672e537472" . |
||||
"65616d696e674f757470757443616c6c526571756573741a292e67727063" . |
||||
"2e74657374696e672e53747265616d696e674f757470757443616c6c5265" . |
||||
"73706f6e736528013001124b0a11556e696d706c656d656e74656443616c" . |
||||
"6c121a2e677270632e74657374696e672e456d7074794d6573736167651a" . |
||||
"1a2e677270632e74657374696e672e456d7074794d65737361676532630a" . |
||||
"14556e696d706c656d656e74656453657276696365124b0a11556e696d70" . |
||||
"6c656d656e74656443616c6c121a2e677270632e74657374696e672e456d" . |
||||
"7074794d6573736167651a1a2e677270632e74657374696e672e456d7074" . |
||||
"794d6573736167653297010a105265636f6e6e6563745365727669636512" . |
||||
"420a055374617274121d2e677270632e74657374696e672e5265636f6e6e" . |
||||
"656374506172616d731a1a2e677270632e74657374696e672e456d707479" . |
||||
"4d657373616765123f0a0453746f70121a2e677270632e74657374696e67" . |
||||
"2e456d7074794d6573736167651a1b2e677270632e74657374696e672e52" . |
||||
"65636f6e6e656374496e666f327f0a184c6f616442616c616e6365725374" . |
||||
"6174735365727669636512630a0e476574436c69656e7453746174731226" . |
||||
"2e677270632e74657374696e672e4c6f616442616c616e63657253746174" . |
||||
"73526571756573741a272e677270632e74657374696e672e4c6f61644261" . |
||||
"6c616e6365725374617473526573706f6e73652200620670726f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,69 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* TODO(dgq): Go back to using well-known types once |
||||
* https://github.com/grpc/grpc/issues/6980 has been fixed. |
||||
* import "google/protobuf/wrappers.proto"; |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.BoolValue</code> |
||||
*/ |
||||
class BoolValue extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* The bool value. |
||||
* |
||||
* Generated from protobuf field <code>bool value = 1;</code> |
||||
*/ |
||||
protected $value = false; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type bool $value |
||||
* The bool value. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* The bool value. |
||||
* |
||||
* Generated from protobuf field <code>bool value = 1;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getValue() |
||||
{ |
||||
return $this->value; |
||||
} |
||||
|
||||
/** |
||||
* The bool value. |
||||
* |
||||
* Generated from protobuf field <code>bool value = 1;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setValue($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->value = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,88 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* A protobuf representation for grpc status. This is used by test |
||||
* clients to specify a status that the server should attempt to return. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.EchoStatus</code> |
||||
*/ |
||||
class EchoStatus extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
*/ |
||||
protected $code = 0; |
||||
/** |
||||
* Generated from protobuf field <code>string message = 2;</code> |
||||
*/ |
||||
protected $message = ''; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $code |
||||
* @type string $message |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getCode() |
||||
{ |
||||
return $this->code; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setCode($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->code = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getMessage() |
||||
{ |
||||
return $this->message; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setMessage($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->message = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,38 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* An empty message that you can re-use to avoid defining duplicated empty |
||||
* messages in your project. A typical example is to use it as argument or the |
||||
* return value of a service API. For instance: |
||||
* service Foo { |
||||
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; |
||||
* }; |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.EmptyMessageMessage</code> |
||||
*/ |
||||
class EmptyMessageMessage extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\PBEmpty::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,66 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use UnexpectedValueException; |
||||
|
||||
/** |
||||
* The type of route that a client took to reach a server w.r.t. gRPCLB. |
||||
* The server must fill in "fallback" if it detects that the RPC reached |
||||
* the server via the "gRPCLB fallback" path, and "backend" if it detects |
||||
* that the RPC reached the server via "gRPCLB backend" path (i.e. if it got |
||||
* the address of this server from the gRPCLB server BalanceLoad RPC). Exactly |
||||
* how this detection is done is context and server dependent. |
||||
* |
||||
* Protobuf type <code>grpc.testing.GrpclbRouteType</code> |
||||
*/ |
||||
class GrpclbRouteType |
||||
{ |
||||
/** |
||||
* Server didn't detect the route that a client took to reach it. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_UNKNOWN = 0;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_UNKNOWN = 0; |
||||
/** |
||||
* Indicates that a client reached a server via gRPCLB fallback. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_FALLBACK = 1;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_FALLBACK = 1; |
||||
/** |
||||
* Indicates that a client reached a server as a gRPCLB-given backend. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_BACKEND = 2;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_BACKEND = 2; |
||||
|
||||
private static $valueToName = [ |
||||
self::GRPCLB_ROUTE_TYPE_UNKNOWN => 'GRPCLB_ROUTE_TYPE_UNKNOWN', |
||||
self::GRPCLB_ROUTE_TYPE_FALLBACK => 'GRPCLB_ROUTE_TYPE_FALLBACK', |
||||
self::GRPCLB_ROUTE_TYPE_BACKEND => 'GRPCLB_ROUTE_TYPE_BACKEND', |
||||
]; |
||||
|
||||
public static function name($value) |
||||
{ |
||||
if (!isset(self::$valueToName[$value])) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no name defined for value %s', __CLASS__, $value)); |
||||
} |
||||
return self::$valueToName[$value]; |
||||
} |
||||
|
||||
|
||||
public static function value($name) |
||||
{ |
||||
$const = __CLASS__ . '::' . strtoupper($name); |
||||
if (!defined($const)) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no value defined for name %s', __CLASS__, $name)); |
||||
} |
||||
return constant($const); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsRequest</code> |
||||
*/ |
||||
class LoadBalancerStatsRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
*/ |
||||
protected $num_rpcs = 0; |
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
*/ |
||||
protected $timeout_sec = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $num_rpcs |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* @type int $timeout_sec |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumRpcs() |
||||
{ |
||||
return $this->num_rpcs; |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumRpcs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_rpcs = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getTimeoutSec() |
||||
{ |
||||
return $this->timeout_sec; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setTimeoutSec($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->timeout_sec = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse</code> |
||||
*/ |
||||
class LoadBalancerStatsResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
*/ |
||||
private $rpcs_by_peer; |
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
*/ |
||||
protected $num_failures = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type array|\Google\Protobuf\Internal\MapField $rpcs_by_peer |
||||
* The number of completed RPCs for each peer. |
||||
* @type int $num_failures |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @return \Google\Protobuf\Internal\MapField |
||||
*/ |
||||
public function getRpcsByPeer() |
||||
{ |
||||
return $this->rpcs_by_peer; |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @param array|\Google\Protobuf\Internal\MapField $var |
||||
* @return $this |
||||
*/ |
||||
public function setRpcsByPeer($var) |
||||
{ |
||||
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); |
||||
$this->rpcs_by_peer = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumFailures() |
||||
{ |
||||
return $this->num_failures; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumFailures($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_failures = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,52 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A service used to obtain stats for verifying LB behavior. |
||||
*/ |
||||
class LoadBalancerStatsServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* Gets the backend distribution for RPCs sent by a test client. |
||||
* @param \Grpc\Testing\LoadBalancerStatsRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetClientStats(\Grpc\Testing\LoadBalancerStatsRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.LoadBalancerStatsService/GetClientStats', |
||||
$argument, |
||||
['\Grpc\Testing\LoadBalancerStatsResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,101 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* A block of data, to simply increase gRPC message size. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.Payload</code> |
||||
*/ |
||||
class Payload extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* The type of data in body. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> |
||||
*/ |
||||
protected $type = 0; |
||||
/** |
||||
* Primary contents of payload. |
||||
* |
||||
* Generated from protobuf field <code>bytes body = 2;</code> |
||||
*/ |
||||
protected $body = ''; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $type |
||||
* The type of data in body. |
||||
* @type string $body |
||||
* Primary contents of payload. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* The type of data in body. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getType() |
||||
{ |
||||
return $this->type; |
||||
} |
||||
|
||||
/** |
||||
* The type of data in body. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setType($var) |
||||
{ |
||||
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); |
||||
$this->type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Primary contents of payload. |
||||
* |
||||
* Generated from protobuf field <code>bytes body = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getBody() |
||||
{ |
||||
return $this->body; |
||||
} |
||||
|
||||
/** |
||||
* Primary contents of payload. |
||||
* |
||||
* Generated from protobuf field <code>bytes body = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setBody($var) |
||||
{ |
||||
GPBUtil::checkString($var, False); |
||||
$this->body = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,47 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use UnexpectedValueException; |
||||
|
||||
/** |
||||
* The type of payload that should be returned. |
||||
* |
||||
* Protobuf type <code>grpc.testing.PayloadType</code> |
||||
*/ |
||||
class PayloadType |
||||
{ |
||||
/** |
||||
* Compressable text format. |
||||
* |
||||
* Generated from protobuf enum <code>COMPRESSABLE = 0;</code> |
||||
*/ |
||||
const COMPRESSABLE = 0; |
||||
|
||||
private static $valueToName = [ |
||||
self::COMPRESSABLE => 'COMPRESSABLE', |
||||
]; |
||||
|
||||
public static function name($value) |
||||
{ |
||||
if (!isset(self::$valueToName[$value])) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no name defined for value %s', __CLASS__, $value)); |
||||
} |
||||
return self::$valueToName[$value]; |
||||
} |
||||
|
||||
|
||||
public static function value($name) |
||||
{ |
||||
$const = __CLASS__ . '::' . strtoupper($name); |
||||
if (!defined($const)) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no value defined for name %s', __CLASS__, $name)); |
||||
} |
||||
return constant($const); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,89 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* For reconnect interop test only. |
||||
* Server tells client whether its reconnects are following the spec and the |
||||
* reconnect backoffs it saw. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.ReconnectInfo</code> |
||||
*/ |
||||
class ReconnectInfo extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>bool passed = 1;</code> |
||||
*/ |
||||
protected $passed = false; |
||||
/** |
||||
* Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code> |
||||
*/ |
||||
private $backoff_ms; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type bool $passed |
||||
* @type int[]|\Google\Protobuf\Internal\RepeatedField $backoff_ms |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool passed = 1;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getPassed() |
||||
{ |
||||
return $this->passed; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool passed = 1;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setPassed($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->passed = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code> |
||||
* @return \Google\Protobuf\Internal\RepeatedField |
||||
*/ |
||||
public function getBackoffMs() |
||||
{ |
||||
return $this->backoff_ms; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code> |
||||
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var |
||||
* @return $this |
||||
*/ |
||||
public function setBackoffMs($var) |
||||
{ |
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); |
||||
$this->backoff_ms = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,61 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* For reconnect interop test only. |
||||
* Client tells server what reconnection parameters it used. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.ReconnectParams</code> |
||||
*/ |
||||
class ReconnectParams extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code> |
||||
*/ |
||||
protected $max_reconnect_backoff_ms = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $max_reconnect_backoff_ms |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getMaxReconnectBackoffMs() |
||||
{ |
||||
return $this->max_reconnect_backoff_ms; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setMaxReconnectBackoffMs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->max_reconnect_backoff_ms = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,151 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Configuration for a particular response. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.ResponseParameters</code> |
||||
*/ |
||||
class ResponseParameters extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Desired payload sizes in responses from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 size = 1;</code> |
||||
*/ |
||||
protected $size = 0; |
||||
/** |
||||
* Desired interval between consecutive responses in the response stream in |
||||
* microseconds. |
||||
* |
||||
* Generated from protobuf field <code>int32 interval_us = 2;</code> |
||||
*/ |
||||
protected $interval_us = 0; |
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code> |
||||
*/ |
||||
protected $compressed = null; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $size |
||||
* Desired payload sizes in responses from the server. |
||||
* @type int $interval_us |
||||
* Desired interval between consecutive responses in the response stream in |
||||
* microseconds. |
||||
* @type \Grpc\Testing\BoolValue $compressed |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Desired payload sizes in responses from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 size = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getSize() |
||||
{ |
||||
return $this->size; |
||||
} |
||||
|
||||
/** |
||||
* Desired payload sizes in responses from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 size = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setSize($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->size = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Desired interval between consecutive responses in the response stream in |
||||
* microseconds. |
||||
* |
||||
* Generated from protobuf field <code>int32 interval_us = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getIntervalUs() |
||||
{ |
||||
return $this->interval_us; |
||||
} |
||||
|
||||
/** |
||||
* Desired interval between consecutive responses in the response stream in |
||||
* microseconds. |
||||
* |
||||
* Generated from protobuf field <code>int32 interval_us = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setIntervalUs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->interval_us = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code> |
||||
* @return \Grpc\Testing\BoolValue |
||||
*/ |
||||
public function getCompressed() |
||||
{ |
||||
return $this->compressed; |
||||
} |
||||
|
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code> |
||||
* @param \Grpc\Testing\BoolValue $var |
||||
* @return $this |
||||
*/ |
||||
public function setCompressed($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); |
||||
$this->compressed = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,389 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Unary request. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.SimpleRequest</code> |
||||
*/ |
||||
class SimpleRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, server randomly chooses one from other formats. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
*/ |
||||
protected $response_type = 0; |
||||
/** |
||||
* Desired payload size in the response from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 response_size = 2;</code> |
||||
*/ |
||||
protected $response_size = 0; |
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
*/ |
||||
protected $payload = null; |
||||
/** |
||||
* Whether SimpleResponse should include username. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_username = 4;</code> |
||||
*/ |
||||
protected $fill_username = false; |
||||
/** |
||||
* Whether SimpleResponse should include OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> |
||||
*/ |
||||
protected $fill_oauth_scope = false; |
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> |
||||
*/ |
||||
protected $response_compressed = null; |
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
*/ |
||||
protected $response_status = null; |
||||
/** |
||||
* Whether the server should expect this request to be compressed. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> |
||||
*/ |
||||
protected $expect_compressed = null; |
||||
/** |
||||
* Whether SimpleResponse should include server_id. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_server_id = 9;</code> |
||||
*/ |
||||
protected $fill_server_id = false; |
||||
/** |
||||
* Whether SimpleResponse should include grpclb_route_type. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> |
||||
*/ |
||||
protected $fill_grpclb_route_type = false; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $response_type |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, server randomly chooses one from other formats. |
||||
* @type int $response_size |
||||
* Desired payload size in the response from the server. |
||||
* @type \Grpc\Testing\Payload $payload |
||||
* Optional input payload sent along with the request. |
||||
* @type bool $fill_username |
||||
* Whether SimpleResponse should include username. |
||||
* @type bool $fill_oauth_scope |
||||
* Whether SimpleResponse should include OAuth scope. |
||||
* @type \Grpc\Testing\BoolValue $response_compressed |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* @type \Grpc\Testing\EchoStatus $response_status |
||||
* Whether server should return a given status |
||||
* @type \Grpc\Testing\BoolValue $expect_compressed |
||||
* Whether the server should expect this request to be compressed. |
||||
* @type bool $fill_server_id |
||||
* Whether SimpleResponse should include server_id. |
||||
* @type bool $fill_grpclb_route_type |
||||
* Whether SimpleResponse should include grpclb_route_type. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, server randomly chooses one from other formats. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getResponseType() |
||||
{ |
||||
return $this->response_type; |
||||
} |
||||
|
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, server randomly chooses one from other formats. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseType($var) |
||||
{ |
||||
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); |
||||
$this->response_type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Desired payload size in the response from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 response_size = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getResponseSize() |
||||
{ |
||||
return $this->response_size; |
||||
} |
||||
|
||||
/** |
||||
* Desired payload size in the response from the server. |
||||
* |
||||
* Generated from protobuf field <code>int32 response_size = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseSize($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->response_size = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
* @return \Grpc\Testing\Payload |
||||
*/ |
||||
public function getPayload() |
||||
{ |
||||
return $this->payload; |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
* @param \Grpc\Testing\Payload $var |
||||
* @return $this |
||||
*/ |
||||
public function setPayload($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); |
||||
$this->payload = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include username. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_username = 4;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getFillUsername() |
||||
{ |
||||
return $this->fill_username; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include username. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_username = 4;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setFillUsername($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->fill_username = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getFillOauthScope() |
||||
{ |
||||
return $this->fill_oauth_scope; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setFillOauthScope($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->fill_oauth_scope = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> |
||||
* @return \Grpc\Testing\BoolValue |
||||
*/ |
||||
public function getResponseCompressed() |
||||
{ |
||||
return $this->response_compressed; |
||||
} |
||||
|
||||
/** |
||||
* Whether to request the server to compress the response. This field is |
||||
* "nullable" in order to interoperate seamlessly with clients not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the response's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> |
||||
* @param \Grpc\Testing\BoolValue $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseCompressed($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); |
||||
$this->response_compressed = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
* @return \Grpc\Testing\EchoStatus |
||||
*/ |
||||
public function getResponseStatus() |
||||
{ |
||||
return $this->response_status; |
||||
} |
||||
|
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
* @param \Grpc\Testing\EchoStatus $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseStatus($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); |
||||
$this->response_status = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether the server should expect this request to be compressed. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> |
||||
* @return \Grpc\Testing\BoolValue |
||||
*/ |
||||
public function getExpectCompressed() |
||||
{ |
||||
return $this->expect_compressed; |
||||
} |
||||
|
||||
/** |
||||
* Whether the server should expect this request to be compressed. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> |
||||
* @param \Grpc\Testing\BoolValue $var |
||||
* @return $this |
||||
*/ |
||||
public function setExpectCompressed($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); |
||||
$this->expect_compressed = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include server_id. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_server_id = 9;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getFillServerId() |
||||
{ |
||||
return $this->fill_server_id; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include server_id. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_server_id = 9;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setFillServerId($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->fill_server_id = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include grpclb_route_type. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getFillGrpclbRouteType() |
||||
{ |
||||
return $this->fill_grpclb_route_type; |
||||
} |
||||
|
||||
/** |
||||
* Whether SimpleResponse should include grpclb_route_type. |
||||
* |
||||
* Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setFillGrpclbRouteType($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->fill_grpclb_route_type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,245 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Unary response, as configured by the request. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.SimpleResponse</code> |
||||
*/ |
||||
class SimpleResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Payload to increase message size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
*/ |
||||
protected $payload = null; |
||||
/** |
||||
* The user the request came from, for verifying authentication was |
||||
* successful when the client expected it. |
||||
* |
||||
* Generated from protobuf field <code>string username = 2;</code> |
||||
*/ |
||||
protected $username = ''; |
||||
/** |
||||
* OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>string oauth_scope = 3;</code> |
||||
*/ |
||||
protected $oauth_scope = ''; |
||||
/** |
||||
* Server ID. This must be unique among different server instances, |
||||
* but the same across all RPC's made to a particular server instance. |
||||
* |
||||
* Generated from protobuf field <code>string server_id = 4;</code> |
||||
*/ |
||||
protected $server_id = ''; |
||||
/** |
||||
* gRPCLB Path. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code> |
||||
*/ |
||||
protected $grpclb_route_type = 0; |
||||
/** |
||||
* Server hostname. |
||||
* |
||||
* Generated from protobuf field <code>string hostname = 6;</code> |
||||
*/ |
||||
protected $hostname = ''; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type \Grpc\Testing\Payload $payload |
||||
* Payload to increase message size. |
||||
* @type string $username |
||||
* The user the request came from, for verifying authentication was |
||||
* successful when the client expected it. |
||||
* @type string $oauth_scope |
||||
* OAuth scope. |
||||
* @type string $server_id |
||||
* Server ID. This must be unique among different server instances, |
||||
* but the same across all RPC's made to a particular server instance. |
||||
* @type int $grpclb_route_type |
||||
* gRPCLB Path. |
||||
* @type string $hostname |
||||
* Server hostname. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Payload to increase message size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @return \Grpc\Testing\Payload |
||||
*/ |
||||
public function getPayload() |
||||
{ |
||||
return $this->payload; |
||||
} |
||||
|
||||
/** |
||||
* Payload to increase message size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @param \Grpc\Testing\Payload $var |
||||
* @return $this |
||||
*/ |
||||
public function setPayload($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); |
||||
$this->payload = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* The user the request came from, for verifying authentication was |
||||
* successful when the client expected it. |
||||
* |
||||
* Generated from protobuf field <code>string username = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getUsername() |
||||
{ |
||||
return $this->username; |
||||
} |
||||
|
||||
/** |
||||
* The user the request came from, for verifying authentication was |
||||
* successful when the client expected it. |
||||
* |
||||
* Generated from protobuf field <code>string username = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setUsername($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->username = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>string oauth_scope = 3;</code> |
||||
* @return string |
||||
*/ |
||||
public function getOauthScope() |
||||
{ |
||||
return $this->oauth_scope; |
||||
} |
||||
|
||||
/** |
||||
* OAuth scope. |
||||
* |
||||
* Generated from protobuf field <code>string oauth_scope = 3;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setOauthScope($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->oauth_scope = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Server ID. This must be unique among different server instances, |
||||
* but the same across all RPC's made to a particular server instance. |
||||
* |
||||
* Generated from protobuf field <code>string server_id = 4;</code> |
||||
* @return string |
||||
*/ |
||||
public function getServerId() |
||||
{ |
||||
return $this->server_id; |
||||
} |
||||
|
||||
/** |
||||
* Server ID. This must be unique among different server instances, |
||||
* but the same across all RPC's made to a particular server instance. |
||||
* |
||||
* Generated from protobuf field <code>string server_id = 4;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setServerId($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->server_id = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* gRPCLB Path. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code> |
||||
* @return int |
||||
*/ |
||||
public function getGrpclbRouteType() |
||||
{ |
||||
return $this->grpclb_route_type; |
||||
} |
||||
|
||||
/** |
||||
* gRPCLB Path. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setGrpclbRouteType($var) |
||||
{ |
||||
GPBUtil::checkEnum($var, \Grpc\Testing\GrpclbRouteType::class); |
||||
$this->grpclb_route_type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Server hostname. |
||||
* |
||||
* Generated from protobuf field <code>string hostname = 6;</code> |
||||
* @return string |
||||
*/ |
||||
public function getHostname() |
||||
{ |
||||
return $this->hostname; |
||||
} |
||||
|
||||
/** |
||||
* Server hostname. |
||||
* |
||||
* Generated from protobuf field <code>string hostname = 6;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setHostname($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->hostname = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,113 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Client-streaming request. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.StreamingInputCallRequest</code> |
||||
*/ |
||||
class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
*/ |
||||
protected $payload = null; |
||||
/** |
||||
* Whether the server should expect this request to be compressed. This field |
||||
* is "nullable" in order to interoperate seamlessly with servers not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the request's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code> |
||||
*/ |
||||
protected $expect_compressed = null; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type \Grpc\Testing\Payload $payload |
||||
* Optional input payload sent along with the request. |
||||
* @type \Grpc\Testing\BoolValue $expect_compressed |
||||
* Whether the server should expect this request to be compressed. This field |
||||
* is "nullable" in order to interoperate seamlessly with servers not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the request's compression status. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @return \Grpc\Testing\Payload |
||||
*/ |
||||
public function getPayload() |
||||
{ |
||||
return $this->payload; |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @param \Grpc\Testing\Payload $var |
||||
* @return $this |
||||
*/ |
||||
public function setPayload($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); |
||||
$this->payload = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether the server should expect this request to be compressed. This field |
||||
* is "nullable" in order to interoperate seamlessly with servers not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the request's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code> |
||||
* @return \Grpc\Testing\BoolValue |
||||
*/ |
||||
public function getExpectCompressed() |
||||
{ |
||||
return $this->expect_compressed; |
||||
} |
||||
|
||||
/** |
||||
* Whether the server should expect this request to be compressed. This field |
||||
* is "nullable" in order to interoperate seamlessly with servers not able to |
||||
* implement the full compression tests by introspecting the call to verify |
||||
* the request's compression status. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code> |
||||
* @param \Grpc\Testing\BoolValue $var |
||||
* @return $this |
||||
*/ |
||||
public function setExpectCompressed($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); |
||||
$this->expect_compressed = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,67 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Client-streaming response. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.StreamingInputCallResponse</code> |
||||
*/ |
||||
class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Aggregated size of payloads received from the client. |
||||
* |
||||
* Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code> |
||||
*/ |
||||
protected $aggregated_payload_size = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $aggregated_payload_size |
||||
* Aggregated size of payloads received from the client. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Aggregated size of payloads received from the client. |
||||
* |
||||
* Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getAggregatedPayloadSize() |
||||
{ |
||||
return $this->aggregated_payload_size; |
||||
} |
||||
|
||||
/** |
||||
* Aggregated size of payloads received from the client. |
||||
* |
||||
* Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setAggregatedPayloadSize($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->aggregated_payload_size = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,181 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Server-streaming request. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code> |
||||
*/ |
||||
class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, the payload from each response in the stream |
||||
* might be of different types. This is to simulate a mixed type of payload |
||||
* stream. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
*/ |
||||
protected $response_type = 0; |
||||
/** |
||||
* Configuration for each expected response message. |
||||
* |
||||
* Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> |
||||
*/ |
||||
private $response_parameters; |
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
*/ |
||||
protected $payload = null; |
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
*/ |
||||
protected $response_status = null; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $response_type |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, the payload from each response in the stream |
||||
* might be of different types. This is to simulate a mixed type of payload |
||||
* stream. |
||||
* @type \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $response_parameters |
||||
* Configuration for each expected response message. |
||||
* @type \Grpc\Testing\Payload $payload |
||||
* Optional input payload sent along with the request. |
||||
* @type \Grpc\Testing\EchoStatus $response_status |
||||
* Whether server should return a given status |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, the payload from each response in the stream |
||||
* might be of different types. This is to simulate a mixed type of payload |
||||
* stream. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getResponseType() |
||||
{ |
||||
return $this->response_type; |
||||
} |
||||
|
||||
/** |
||||
* Desired payload type in the response from the server. |
||||
* If response_type is RANDOM, the payload from each response in the stream |
||||
* might be of different types. This is to simulate a mixed type of payload |
||||
* stream. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseType($var) |
||||
{ |
||||
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); |
||||
$this->response_type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Configuration for each expected response message. |
||||
* |
||||
* Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> |
||||
* @return \Google\Protobuf\Internal\RepeatedField |
||||
*/ |
||||
public function getResponseParameters() |
||||
{ |
||||
return $this->response_parameters; |
||||
} |
||||
|
||||
/** |
||||
* Configuration for each expected response message. |
||||
* |
||||
* Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> |
||||
* @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseParameters($var) |
||||
{ |
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class); |
||||
$this->response_parameters = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
* @return \Grpc\Testing\Payload |
||||
*/ |
||||
public function getPayload() |
||||
{ |
||||
return $this->payload; |
||||
} |
||||
|
||||
/** |
||||
* Optional input payload sent along with the request. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> |
||||
* @param \Grpc\Testing\Payload $var |
||||
* @return $this |
||||
*/ |
||||
public function setPayload($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); |
||||
$this->payload = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
* @return \Grpc\Testing\EchoStatus |
||||
*/ |
||||
public function getResponseStatus() |
||||
{ |
||||
return $this->response_status; |
||||
} |
||||
|
||||
/** |
||||
* Whether server should return a given status |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> |
||||
* @param \Grpc\Testing\EchoStatus $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseStatus($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); |
||||
$this->response_status = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,67 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Server-streaming response, as configured by the request and parameters. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.StreamingOutputCallResponse</code> |
||||
*/ |
||||
class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Payload to increase response size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
*/ |
||||
protected $payload = null; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type \Grpc\Testing\Payload $payload |
||||
* Payload to increase response size. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Payload to increase response size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @return \Grpc\Testing\Payload |
||||
*/ |
||||
public function getPayload() |
||||
{ |
||||
return $this->payload; |
||||
} |
||||
|
||||
/** |
||||
* Payload to increase response size. |
||||
* |
||||
* Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code> |
||||
* @param \Grpc\Testing\Payload $var |
||||
* @return $this |
||||
*/ |
||||
public function setPayload($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); |
||||
$this->payload = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,152 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A simple service to test the various types of RPCs and experiment with |
||||
* performance with various types of payload. |
||||
*/ |
||||
class TestServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* One empty request followed by one empty response. |
||||
* @param \Grpc\Testing\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function EmptyCall(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/EmptyCall', |
||||
$argument, |
||||
['\Grpc\Testing\EmptyMessage', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by one response. |
||||
* @param \Grpc\Testing\SimpleRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function UnaryCall(\Grpc\Testing\SimpleRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/UnaryCall', |
||||
$argument, |
||||
['\Grpc\Testing\SimpleResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by one response. Response has cache control |
||||
* headers set such that a caching HTTP proxy (such as GFE) can |
||||
* satisfy subsequent requests. |
||||
* @param \Grpc\Testing\SimpleRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function CacheableUnaryCall(\Grpc\Testing\SimpleRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/CacheableUnaryCall', |
||||
$argument, |
||||
['\Grpc\Testing\SimpleResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by a sequence of responses (streamed download). |
||||
* The server returns the payload with client desired type and sizes. |
||||
* @param \Grpc\Testing\StreamingOutputCallRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function StreamingOutputCall(\Grpc\Testing\StreamingOutputCallRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', |
||||
$argument, |
||||
['\Grpc\Testing\StreamingOutputCallResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests followed by one response (streamed upload). |
||||
* The server returns the aggregated size of client payload as the result. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function StreamingInputCall($metadata = [], $options = []) { |
||||
return $this->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', |
||||
['\Grpc\Testing\StreamingInputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests with each request served by the server immediately. |
||||
* As one request could lead to multiple responses, this interface |
||||
* demonstrates the idea of full duplexing. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function FullDuplexCall($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', |
||||
['\Grpc\Testing\StreamingOutputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests followed by a sequence of responses. |
||||
* The server buffers all the client requests and then serves them in order. A |
||||
* stream of responses are returned to the client when the server starts with |
||||
* first request. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function HalfDuplexCall($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', |
||||
['\Grpc\Testing\StreamingOutputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* The test server will not implement this method. It will be used |
||||
* to test the behavior when clients call unimplemented methods. |
||||
* @param \Grpc\Testing\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function UnimplementedCall(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/UnimplementedCall', |
||||
$argument, |
||||
['\Grpc\Testing\EmptyMessage', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -1,43 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Echo |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aa6040a217372632f70726f746f2f677270632f74657374696e672f6563" . |
||||
"686f2e70726f746f120c677270632e74657374696e6732f6020a0f456368" . |
||||
"6f5465737453657276696365123d0a044563686f12192e677270632e7465" . |
||||
"7374696e672e4563686f526571756573741a1a2e677270632e7465737469" . |
||||
"6e672e4563686f526573706f6e736512480a0d5265717565737453747265" . |
||||
"616d12192e677270632e74657374696e672e4563686f526571756573741a" . |
||||
"1a2e677270632e74657374696e672e4563686f526573706f6e7365280112" . |
||||
"490a0e526573706f6e736553747265616d12192e677270632e7465737469" . |
||||
"6e672e4563686f526571756573741a1a2e677270632e74657374696e672e" . |
||||
"4563686f526573706f6e7365300112470a0a4269646953747265616d1219" . |
||||
"2e677270632e74657374696e672e4563686f526571756573741a1a2e6772" . |
||||
"70632e74657374696e672e4563686f526573706f6e73652801300112460a" . |
||||
"0d556e696d706c656d656e74656412192e677270632e74657374696e672e" . |
||||
"4563686f526571756573741a1a2e677270632e74657374696e672e456368" . |
||||
"6f526573706f6e736532620a18556e696d706c656d656e7465644563686f" . |
||||
"5365727669636512460a0d556e696d706c656d656e74656412192e677270" . |
||||
"632e74657374696e672e4563686f526571756573741a1a2e677270632e74" . |
||||
"657374696e672e4563686f526573706f6e7365320e0a0c4e6f5270635365" . |
||||
"7276696365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty_service.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class EmptyService |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a520a2a7372632f70726f746f2f677270632f74657374696e672f656d70" . |
||||
"74795f736572766963652e70726f746f120c677270632e74657374696e67" . |
||||
"320e0a0c456d70747953657276696365620670726f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -1,36 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Metrics |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0afb020a247372632f70726f746f2f677270632f74657374696e672f6d65" . |
||||
"74726963732e70726f746f120c677270632e74657374696e67226c0a0d47" . |
||||
"61756765526573706f6e7365120c0a046e616d6518012001280912140a0a" . |
||||
"6c6f6e675f76616c7565180220012803480012160a0c646f75626c655f76" . |
||||
"616c7565180320012801480012160a0c737472696e675f76616c75651804" . |
||||
"20012809480042070a0576616c7565221c0a0c4761756765526571756573" . |
||||
"74120c0a046e616d65180120012809220e0a0c456d7074794d6573736167" . |
||||
"6532a0010a0e4d6574726963735365727669636512490a0c476574416c6c" . |
||||
"476175676573121a2e677270632e74657374696e672e456d7074794d6573" . |
||||
"736167651a1b2e677270632e74657374696e672e4761756765526573706f" . |
||||
"6e7365300112430a084765744761756765121a2e677270632e7465737469" . |
||||
"6e672e4761756765526571756573741a1b2e677270632e74657374696e67" . |
||||
"2e4761756765526573706f6e7365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class PBEmpty |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a4a0a227372632f70726f746f2f677270632f74657374696e672f656d70" . |
||||
"74792e70726f746f120c677270632e74657374696e67220e0a0c456d7074" . |
||||
"794d657373616765620670726f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -1,51 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Request message containing the gauge name |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeRequest</code> |
||||
*/ |
||||
class GaugeRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -1,126 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Response message containing the gauge name and value |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeResponse</code> |
||||
*/ |
||||
class GaugeResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
protected $value; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getLongValue() |
||||
{ |
||||
return $this->readOneof(2); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setLongValue($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->writeOneof(2, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @return float |
||||
*/ |
||||
public function getDoubleValue() |
||||
{ |
||||
return $this->readOneof(3); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @param float $var |
||||
* @return $this |
||||
*/ |
||||
public function setDoubleValue($var) |
||||
{ |
||||
GPBUtil::checkDouble($var); |
||||
$this->writeOneof(3, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @return string |
||||
*/ |
||||
public function getStringValue() |
||||
{ |
||||
return $this->readOneof(4); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setStringValue($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->writeOneof(4, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getValue() |
||||
{ |
||||
return $this->whichOneof("value"); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,66 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use UnexpectedValueException; |
||||
|
||||
/** |
||||
* The type of route that a client took to reach a server w.r.t. gRPCLB. |
||||
* The server must fill in "fallback" if it detects that the RPC reached |
||||
* the server via the "gRPCLB fallback" path, and "backend" if it detects |
||||
* that the RPC reached the server via "gRPCLB backend" path (i.e. if it got |
||||
* the address of this server from the gRPCLB server BalanceLoad RPC). Exactly |
||||
* how this detection is done is context and server dependent. |
||||
* |
||||
* Protobuf type <code>grpc.testing.GrpclbRouteType</code> |
||||
*/ |
||||
class GrpclbRouteType |
||||
{ |
||||
/** |
||||
* Server didn't detect the route that a client took to reach it. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_UNKNOWN = 0;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_UNKNOWN = 0; |
||||
/** |
||||
* Indicates that a client reached a server via gRPCLB fallback. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_FALLBACK = 1;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_FALLBACK = 1; |
||||
/** |
||||
* Indicates that a client reached a server as a gRPCLB-given backend. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_BACKEND = 2;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_BACKEND = 2; |
||||
|
||||
private static $valueToName = [ |
||||
self::GRPCLB_ROUTE_TYPE_UNKNOWN => 'GRPCLB_ROUTE_TYPE_UNKNOWN', |
||||
self::GRPCLB_ROUTE_TYPE_FALLBACK => 'GRPCLB_ROUTE_TYPE_FALLBACK', |
||||
self::GRPCLB_ROUTE_TYPE_BACKEND => 'GRPCLB_ROUTE_TYPE_BACKEND', |
||||
]; |
||||
|
||||
public static function name($value) |
||||
{ |
||||
if (!isset(self::$valueToName[$value])) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no name defined for value %s', __CLASS__, $value)); |
||||
} |
||||
return self::$valueToName[$value]; |
||||
} |
||||
|
||||
|
||||
public static function value($name) |
||||
{ |
||||
$const = __CLASS__ . '::' . strtoupper($name); |
||||
if (!defined($const)) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no value defined for name %s', __CLASS__, $name)); |
||||
} |
||||
return constant($const); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsRequest</code> |
||||
*/ |
||||
class LoadBalancerStatsRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
*/ |
||||
protected $num_rpcs = 0; |
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
*/ |
||||
protected $timeout_sec = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $num_rpcs |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* @type int $timeout_sec |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumRpcs() |
||||
{ |
||||
return $this->num_rpcs; |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumRpcs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_rpcs = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getTimeoutSec() |
||||
{ |
||||
return $this->timeout_sec; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setTimeoutSec($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->timeout_sec = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?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; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse</code> |
||||
*/ |
||||
class LoadBalancerStatsResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
*/ |
||||
private $rpcs_by_peer; |
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
*/ |
||||
protected $num_failures = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type array|\Google\Protobuf\Internal\MapField $rpcs_by_peer |
||||
* The number of completed RPCs for each peer. |
||||
* @type int $num_failures |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @return \Google\Protobuf\Internal\MapField |
||||
*/ |
||||
public function getRpcsByPeer() |
||||
{ |
||||
return $this->rpcs_by_peer; |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @param array|\Google\Protobuf\Internal\MapField $var |
||||
* @return $this |
||||
*/ |
||||
public function setRpcsByPeer($var) |
||||
{ |
||||
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); |
||||
$this->rpcs_by_peer = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumFailures() |
||||
{ |
||||
return $this->num_failures; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumFailures($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_failures = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,52 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A service used to obtain stats for verifying LB behavior. |
||||
*/ |
||||
class LoadBalancerStatsServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* Gets the backend distribution for RPCs sent by a test client. |
||||
* @param \Grpc\Testing\LoadBalancerStatsRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetClientStats(\Grpc\Testing\LoadBalancerStatsRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.LoadBalancerStatsService/GetClientStats', |
||||
$argument, |
||||
['\Grpc\Testing\LoadBalancerStatsResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue