Merge pull request #22712 from jtattermusch/php_generate_protos_refactor

Php generate protos refactor
pull/22763/head
Jan Tattermusch 5 years ago committed by GitHub
commit 841416456a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/csharp/generate_proto_csharp.sh
  2. 8
      src/php/README.md
  3. 29
      src/php/bin/generate_proto_php.sh
  4. 36
      src/php/tests/generated_code/GPBMetadata/Math.php
  5. 85
      src/php/tests/generated_code/Math/DivArgs.php
  6. 85
      src/php/tests/generated_code/Math/DivReply.php
  7. 58
      src/php/tests/generated_code/Math/FibArgs.php
  8. 58
      src/php/tests/generated_code/Math/FibReply.php
  9. 56
      src/php/tests/generated_code/Math/MathClient.php
  10. 58
      src/php/tests/generated_code/Math/Num.php
  11. 86
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  12. 10
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/PBEmpty.php
  13. 66
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Test.php
  14. 69
      src/php/tests/interop/Grpc/Testing/BoolValue.php
  15. 88
      src/php/tests/interop/Grpc/Testing/EchoStatus.php
  16. 18
      src/php/tests/interop/Grpc/Testing/EmptyMessage.php
  17. 38
      src/php/tests/interop/Grpc/Testing/EmptyMessageMessage.php
  18. 66
      src/php/tests/interop/Grpc/Testing/GrpclbRouteType.php
  19. 99
      src/php/tests/interop/Grpc/Testing/LoadBalancerStatsRequest.php
  20. 99
      src/php/tests/interop/Grpc/Testing/LoadBalancerStatsResponse.php
  21. 52
      src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceClient.php
  22. 101
      src/php/tests/interop/Grpc/Testing/Payload.php
  23. 47
      src/php/tests/interop/Grpc/Testing/PayloadType.php
  24. 89
      src/php/tests/interop/Grpc/Testing/ReconnectInfo.php
  25. 61
      src/php/tests/interop/Grpc/Testing/ReconnectParams.php
  26. 29
      src/php/tests/interop/Grpc/Testing/ReconnectServiceClient.php
  27. 151
      src/php/tests/interop/Grpc/Testing/ResponseParameters.php
  28. 389
      src/php/tests/interop/Grpc/Testing/SimpleRequest.php
  29. 245
      src/php/tests/interop/Grpc/Testing/SimpleResponse.php
  30. 113
      src/php/tests/interop/Grpc/Testing/StreamingInputCallRequest.php
  31. 67
      src/php/tests/interop/Grpc/Testing/StreamingInputCallResponse.php
  32. 181
      src/php/tests/interop/Grpc/Testing/StreamingOutputCallRequest.php
  33. 67
      src/php/tests/interop/Grpc/Testing/StreamingOutputCallResponse.php
  34. 152
      src/php/tests/interop/Grpc/Testing/TestServiceClient.php
  35. 18
      src/php/tests/interop/Grpc/Testing/UnimplementedServiceClient.php
  36. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php
  37. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/BenchmarkService.php
  38. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/CompilerTest.php
  39. 166
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php
  40. 43
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Echo.php
  41. 28
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EchoMessages.php
  42. 26
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EmptyService.php
  43. 81
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  44. 36
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php
  45. 26
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/PBEmpty.php
  46. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Payloads.php
  47. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php
  48. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ReportQpsScenarioService.php
  49. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php
  50. 76
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Test.php
  51. 2
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/WorkerService.php
  52. 18
      src/php/tests/qps/generated_code/Grpc/Core/Bucket.php
  53. 13
      src/php/tests/qps/generated_code/Grpc/Core/Histogram.php
  54. 17
      src/php/tests/qps/generated_code/Grpc/Core/Metric.php
  55. 13
      src/php/tests/qps/generated_code/Grpc/Core/Stats.php
  56. 16
      src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php
  57. 18
      src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php
  58. 17
      src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php
  59. 14
      src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php
  60. 141
      src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php
  61. 36
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php
  62. 15
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php
  63. 35
      src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php
  64. 12
      src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php
  65. 12
      src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php
  66. 12
      src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php
  67. 16
      src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php
  68. 16
      src/php/tests/qps/generated_code/Grpc/Testing/DebugInfo.php
  69. 18
      src/php/tests/qps/generated_code/Grpc/Testing/EchoRequest.php
  70. 18
      src/php/tests/qps/generated_code/Grpc/Testing/EchoResponse.php
  71. 18
      src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php
  72. 23
      src/php/tests/qps/generated_code/Grpc/Testing/EmptyMessage.php
  73. 7
      src/php/tests/qps/generated_code/Grpc/Testing/EmptyServiceClient.php
  74. 21
      src/php/tests/qps/generated_code/Grpc/Testing/ErrorStatus.php
  75. 51
      src/php/tests/qps/generated_code/Grpc/Testing/GaugeRequest.php
  76. 126
      src/php/tests/qps/generated_code/Grpc/Testing/GaugeResponse.php
  77. 66
      src/php/tests/qps/generated_code/Grpc/Testing/GrpclbRouteType.php
  78. 28
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php
  79. 20
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php
  80. 99
      src/php/tests/qps/generated_code/Grpc/Testing/LoadBalancerStatsRequest.php
  81. 99
      src/php/tests/qps/generated_code/Grpc/Testing/LoadBalancerStatsResponse.php
  82. 52
      src/php/tests/qps/generated_code/Grpc/Testing/LoadBalancerStatsServiceClient.php
  83. 14
      src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php
  84. 16
      src/php/tests/qps/generated_code/Grpc/Testing/Mark.php
  85. 12
      src/php/tests/qps/generated_code/Grpc/Testing/PBVoid.php
  86. 23
      src/php/tests/qps/generated_code/Grpc/Testing/Payload.php
  87. 15
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php
  88. 29
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php
  89. 16
      src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php
  90. 15
      src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php
  91. 16
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php
  92. 15
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php
  93. 6
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectServiceClient.php
  94. 12
      src/php/tests/qps/generated_code/Grpc/Testing/Request.php
  95. 154
      src/php/tests/qps/generated_code/Grpc/Testing/RequestParams.php
  96. 18
      src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php
  97. 12
      src/php/tests/qps/generated_code/Grpc/Testing/Response.php
  98. 28
      src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php
  99. 21
      src/php/tests/qps/generated_code/Grpc/Testing/ResponseParams.php
  100. 32
      src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -36,7 +36,7 @@ $PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_D
$PROTOC --plugin=$PLUGIN --csharp_out=$REFLECTION_DIR --grpc_out=$REFLECTION_DIR \
-I src/proto src/proto/grpc/reflection/v1alpha/reflection.proto
# Put grp/core/stats.proto in a subdirectory to avoid collision with grpc/testing/stats.proto
# Put grpc/core/stats.proto in a subdirectory to avoid collision with grpc/testing/stats.proto
mkdir -p $TESTING_DIR/CoreStats
$PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR/CoreStats --grpc_out=$TESTING_DIR/CoreStats \
-I src/proto src/proto/grpc/core/stats.proto

@ -275,12 +275,8 @@ $ composer install
### Client Stub
Generate client stub classes from `.proto` files
```sh
$ cd grpc/src/php
$ ./bin/generate_proto_php.sh
```
The generate client stub classes have already been generated from `.proto` files
by the `./bin/generate_proto_php.sh` script.
### Run test server

@ -16,16 +16,15 @@
set -e
cd $(dirname $0)/../../..
# TODO(jtattermusch): unlike for e.g. ruby and csharp,
# PHP runs the code generator as part of the build, so we cannot
# easily use bazel-built "protoc" and "grpc_php_plugin" binaries.
# TODO(jtattermusch): the generated code for qps tests
# is actually checked into the repository, but for other tests
# (e.g. interop or unit tests) it's not. This should made consistent.
protoc --proto_path=src/proto/math \
# protoc and grpc_*_plugin binaries can be obtained by running
# $ bazel build @com_google_protobuf//:protoc //src/compiler:all
PROTOC=bazel-bin/external/com_google_protobuf/protoc
PLUGIN=protoc-gen-grpc=bazel-bin/src/compiler/grpc_php_plugin
$PROTOC --proto_path=src/proto/math \
--php_out=src/php/tests/generated_code \
--grpc_out=src/php/tests/generated_code \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
--plugin=$PLUGIN \
src/proto/math/math.proto
# replace the Empty message with EmptyMessage
@ -38,14 +37,23 @@ sed 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
src/proto/grpc/testing/test.proto > $output_file
mv $output_file ./src/proto/grpc/testing/test.proto
protoc --proto_path=. \
# interop test protos
$PROTOC --proto_path=. \
--php_out=src/php/tests/interop \
--grpc_out=src/php/tests/interop \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
--plugin=$PLUGIN \
src/proto/grpc/testing/messages.proto \
src/proto/grpc/testing/empty.proto \
src/proto/grpc/testing/test.proto
# qps test protos
$PROTOC --proto_path=. \
--php_out=src/php/tests/qps/generated_code \
--grpc_out=src/php/tests/qps/generated_code \
--plugin=$PLUGIN \
src/proto/grpc/core/stats.proto \
src/proto/grpc/testing/{benchmark_service,compiler_test,control,echo_messages,empty,empty_service,messages,payloads,proxy-service,report_qps_scenario_service,stats,test,worker_service}.proto
# change it back
sed 's/message EmptyMessage/message Empty/g' \
src/proto/grpc/testing/empty.proto > $output_file
@ -53,4 +61,3 @@ mv $output_file ./src/proto/grpc/testing/empty.proto
sed 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
src/proto/grpc/testing/test.proto > $output_file
mv $output_file ./src/proto/grpc/testing/test.proto

@ -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;
}
}

@ -16,11 +16,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
namespace Grpc\Testing;
namespace Math;
/**
*/
class EchoTestServiceClient extends \Grpc\BaseStub {
class MathClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
@ -32,61 +32,59 @@ class EchoTestServiceClient extends \Grpc\BaseStub {
}
/**
* @param \Grpc\Testing\EchoRequest $argument input argument
* Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
* and remainder.
* @param \Math\DivArgs $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function Echo(\Grpc\Testing\EchoRequest $argument,
public function Div(\Math\DivArgs $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.EchoTestService/Echo',
return $this->_simpleRequest('/math.Math/Div',
$argument,
['\Grpc\Testing\EchoResponse', 'decode'],
['\Math\DivReply', 'decode'],
$metadata, $options);
}
/**
* DivMany accepts an arbitrary number of division args from the client stream
* and sends back the results in the reply stream. The stream continues until
* the client closes its end; the server does the same after sending all the
* replies. The stream ends immediately if either end aborts.
* @param array $metadata metadata
* @param array $options call options
*/
public function RequestStream($metadata = [], $options = []) {
return $this->_clientStreamRequest('/grpc.testing.EchoTestService/RequestStream',
['\Grpc\Testing\EchoResponse','decode'],
public function DivMany($metadata = [], $options = []) {
return $this->_bidiRequest('/math.Math/DivMany',
['\Math\DivReply','decode'],
$metadata, $options);
}
/**
* @param \Grpc\Testing\EchoRequest $argument input argument
* Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib
* generates up to limit numbers; otherwise it continues until the call is
* canceled. Unlike Fib above, Fib has no final FibReply.
* @param \Math\FibArgs $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function ResponseStream(\Grpc\Testing\EchoRequest $argument,
public function Fib(\Math\FibArgs $argument,
$metadata = [], $options = []) {
return $this->_serverStreamRequest('/grpc.testing.EchoTestService/ResponseStream',
return $this->_serverStreamRequest('/math.Math/Fib',
$argument,
['\Grpc\Testing\EchoResponse', 'decode'],
['\Math\Num', 'decode'],
$metadata, $options);
}
/**
* Sum sums a stream of numbers, returning the final result once the stream
* is closed.
* @param array $metadata metadata
* @param array $options call options
*/
public function BidiStream($metadata = [], $options = []) {
return $this->_bidiRequest('/grpc.testing.EchoTestService/BidiStream',
['\Grpc\Testing\EchoResponse','decode'],
$metadata, $options);
}
/**
* @param \Grpc\Testing\EchoRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function Unimplemented(\Grpc\Testing\EchoRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.EchoTestService/Unimplemented',
$argument,
['\Grpc\Testing\EchoResponse', 'decode'],
public function Sum($metadata = [], $options = []) {
return $this->_clientStreamRequest('/math.Math/Sum',
['\Math\Num','decode'],
$metadata, $options);
}

@ -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;
}
}

@ -4,7 +4,7 @@
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class GPBEmpty
class PBEmpty
{
public static $is_initialized = false;
@ -15,10 +15,10 @@ class GPBEmpty
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a430a227372632f70726f746f2f677270632f74657374696e672f656d70" .
"74792e70726f746f120c677270632e74657374696e6722070a05456d7074" .
"79620670726f746f33"
));
"0a4a0a227372632f70726f746f2f677270632f74657374696e672f656d70" .
"74792e70726f746f120c677270632e74657374696e67220e0a0c456d7074" .
"794d657373616765620670726f746f33"
), 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;
}
}

@ -16,14 +16,22 @@ use Google\Protobuf\Internal\GPBUtil;
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
* };
*
* Generated from protobuf message <code>grpc.testing.Empty</code>
* Generated from protobuf message <code>grpc.testing.EmptyMessage</code>
*/
class PBEmpty extends \Google\Protobuf\Internal\Message
class EmptyMessage extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce();
parent::__construct();
/**
* 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,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;
}
}

@ -16,17 +16,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Contains the definitions for a metrics service and the type of metrics
// exposed by the service.
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
//
// Currently, 'Gauge' (i.e a metric that represents the measured value of
// something at an instant of time) is the only metric type supported by the
// service.
namespace Grpc\Testing;
/**
* A service used to control reconnect server.
*/
class MetricsServiceClient extends \Grpc\BaseStub {
class ReconnectServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
@ -38,31 +36,28 @@ class MetricsServiceClient extends \Grpc\BaseStub {
}
/**
* Returns the values of all the gauges that are currently being maintained by
* the service
* @param \Grpc\Testing\EmptyMessage $argument input argument
* @param \Grpc\Testing\ReconnectParams $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function GetAllGauges(\Grpc\Testing\EmptyMessage $argument,
public function Start(\Grpc\Testing\ReconnectParams $argument,
$metadata = [], $options = []) {
return $this->_serverStreamRequest('/grpc.testing.MetricsService/GetAllGauges',
return $this->_simpleRequest('/grpc.testing.ReconnectService/Start',
$argument,
['\Grpc\Testing\GaugeResponse', 'decode'],
['\Grpc\Testing\EmptyMessage', 'decode'],
$metadata, $options);
}
/**
* Returns the value of one gauge
* @param \Grpc\Testing\GaugeRequest $argument input argument
* @param \Grpc\Testing\EmptyMessage $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function GetGauge(\Grpc\Testing\GaugeRequest $argument,
public function Stop(\Grpc\Testing\EmptyMessage $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.MetricsService/GetGauge',
return $this->_simpleRequest('/grpc.testing.ReconnectService/Stop',
$argument,
['\Grpc\Testing\GaugeResponse', 'decode'],
['\Grpc\Testing\ReconnectInfo', 'decode'],
$metadata, $options);
}

@ -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);
}
}

@ -2,7 +2,7 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015 gRPC authors.
// 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.
@ -16,11 +16,16 @@
// 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 NOT implemented at servers so clients can test for
* that case.
*/
class UnimplementedEchoServiceClient extends \Grpc\BaseStub {
class UnimplementedServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
@ -32,15 +37,16 @@ class UnimplementedEchoServiceClient extends \Grpc\BaseStub {
}
/**
* @param \Grpc\Testing\EchoRequest $argument input argument
* A call that no server should implement
* @param \Grpc\Testing\EmptyMessage $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function Unimplemented(\Grpc\Testing\EchoRequest $argument,
public function UnimplementedCall(\Grpc\Testing\EmptyMessage $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.UnimplementedEchoService/Unimplemented',
return $this->_simpleRequest('/grpc.testing.UnimplementedService/UnimplementedCall',
$argument,
['\Grpc\Testing\EchoResponse', 'decode'],
['\Grpc\Testing\EmptyMessage', 'decode'],
$metadata, $options);
}

@ -25,7 +25,7 @@ class Stats
"6973746f6772616d480042070a0576616c7565222b0a0553746174731222" .
"0a076d65747269637318012003280b32112e677270632e636f72652e4d65" .
"74726963620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -33,7 +33,7 @@ class BenchmarkService
"6f746857617973121b2e677270632e74657374696e672e53696d706c6552" .
"6571756573741a1c2e677270632e74657374696e672e53696d706c655265" .
"73706f6e736528013001620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -29,7 +29,7 @@ class CompilerTest
"6573706f6e73652801300132450a08536572766963654212390a084d6574" .
"686f64423112152e677270632e74657374696e672e526571756573741a16" .
"2e677270632e74657374696e672e526573706f6e7365620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -17,7 +17,7 @@ class Control
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0abc1a0a247372632f70726f746f2f677270632f74657374696e672f636f" .
"0acd1b0a247372632f70726f746f2f677270632f74657374696e672f636f" .
"6e74726f6c2e70726f746f120c677270632e74657374696e671a22737263" .
"2f70726f746f2f677270632f74657374696e672f73746174732e70726f74" .
"6f22250a0d506f6973736f6e506172616d7312140a0c6f6666657265645f" .
@ -31,7 +31,7 @@ class Control
"6f7665727269646518022001280912110a09637265645f74797065180320" .
"012809224d0a0a4368616e6e656c417267120c0a046e616d651801200128" .
"0912130a097374725f76616c7565180220012809480012130a09696e745f" .
"76616c7565180320012805480042070a0576616c756522ef040a0c436c69" .
"76616c7565180320012805480042070a0576616c756522bc050a0c436c69" .
"656e74436f6e66696712160a0e7365727665725f74617267657473180120" .
"032809122d0a0b636c69656e745f7479706518022001280e32182e677270" .
"632e74657374696e672e436c69656e745479706512350a0f736563757269" .
@ -52,86 +52,90 @@ class Control
"03280b32182e677270632e74657374696e672e4368616e6e656c41726712" .
"160a0e746872656164735f7065725f6371181120012805121b0a136d6573" .
"73616765735f7065725f73747265616d18122001280512180a107573655f" .
"636f616c657363655f61706918132001280822380a0c436c69656e745374" .
"636f616c657363655f61706918132001280812310a296d656469616e5f6c" .
"6174656e63795f636f6c6c656374696f6e5f696e74657276616c5f6d696c" .
"6c697318142001280512180a10636c69656e745f70726f63657373657318" .
"152001280522380a0c436c69656e7453746174757312280a057374617473" .
"18012001280b32192e677270632e74657374696e672e436c69656e745374" .
"61747322150a044d61726b120d0a05726573657418012001280822680a0a" .
"436c69656e7441726773122b0a05736574757018012001280b321a2e6772" .
"70632e74657374696e672e436c69656e74436f6e666967480012220a046d" .
"61726b18022001280b32122e677270632e74657374696e672e4d61726b48" .
"0042090a07617267747970652297030a0c536572766572436f6e66696712" .
"2d0a0b7365727665725f7479706518012001280e32182e677270632e7465" .
"7374696e672e5365727665725479706512350a0f73656375726974795f70" .
"6172616d7318022001280b321c2e677270632e74657374696e672e536563" .
"7572697479506172616d73120c0a04706f7274180420012805121c0a1461" .
"73796e635f7365727665725f7468726561647318072001280512120a0a63" .
"6f72655f6c696d697418082001280512330a0e7061796c6f61645f636f6e" .
"66696718092001280b321b2e677270632e74657374696e672e5061796c6f" .
"6164436f6e66696712110a09636f72655f6c697374180a2003280512180a" .
"106f746865725f7365727665725f617069180b2001280912160a0e746872" .
"656164735f7065725f6371180c20012805121c0a137265736f757263655f" .
"71756f74615f73697a6518e90720012805122f0a0c6368616e6e656c5f61" .
"72677318ea072003280b32182e677270632e74657374696e672e4368616e" .
"6e656c41726712180a107365727665725f70726f63657373657318152001" .
"280522680a0a53657276657241726773122b0a0573657475701801200128" .
"0b321a2e677270632e74657374696e672e536572766572436f6e66696748" .
"0012220a046d61726b18022001280b32122e677270632e74657374696e67" .
"2e4d61726b480042090a076172677479706522550a0c5365727665725374" .
"6174757312280a05737461747318012001280b32192e677270632e746573" .
"74696e672e436c69656e74537461747322150a044d61726b120d0a057265" .
"73657418012001280822680a0a436c69656e7441726773122b0a05736574" .
"757018012001280b321a2e677270632e74657374696e672e436c69656e74" .
"436f6e666967480012220a046d61726b18022001280b32122e677270632e" .
"74657374696e672e4d61726b480042090a076172677479706522fd020a0c" .
"536572766572436f6e666967122d0a0b7365727665725f74797065180120" .
"01280e32182e677270632e74657374696e672e5365727665725479706512" .
"350a0f73656375726974795f706172616d7318022001280b321c2e677270" .
"632e74657374696e672e5365637572697479506172616d73120c0a04706f" .
"7274180420012805121c0a146173796e635f7365727665725f7468726561" .
"647318072001280512120a0a636f72655f6c696d69741808200128051233" .
"0a0e7061796c6f61645f636f6e66696718092001280b321b2e677270632e" .
"74657374696e672e5061796c6f6164436f6e66696712110a09636f72655f" .
"6c697374180a2003280512180a106f746865725f7365727665725f617069" .
"180b2001280912160a0e746872656164735f7065725f6371180c20012805" .
"121c0a137265736f757263655f71756f74615f73697a6518e90720012805" .
"122f0a0c6368616e6e656c5f6172677318ea072003280b32182e67727063" .
"2e74657374696e672e4368616e6e656c41726722680a0a53657276657241" .
"726773122b0a05736574757018012001280b321a2e677270632e74657374" .
"696e672e536572766572436f6e666967480012220a046d61726b18022001" .
"280b32122e677270632e74657374696e672e4d61726b480042090a076172" .
"677479706522550a0c53657276657253746174757312280a057374617473" .
"18012001280b32192e677270632e74657374696e672e5365727665725374" .
"617473120c0a04706f7274180220012805120d0a05636f72657318032001" .
"2805220d0a0b436f726552657175657374221d0a0c436f7265526573706f" .
"6e7365120d0a05636f72657318012001280522060a04566f696422fd010a" .
"085363656e6172696f120c0a046e616d6518012001280912310a0d636c69" .
"656e745f636f6e66696718022001280b321a2e677270632e74657374696e" .
"672e436c69656e74436f6e66696712130a0b6e756d5f636c69656e747318" .
"032001280512310a0d7365727665725f636f6e66696718042001280b321a" .
"2e677270632e74657374696e672e536572766572436f6e66696712130a0b" .
"6e756d5f7365727665727318052001280512160a0e7761726d75705f7365" .
"636f6e647318062001280512190a1162656e63686d61726b5f7365636f6e" .
"647318072001280512200a18737061776e5f6c6f63616c5f776f726b6572" .
"5f636f756e7418082001280522360a095363656e6172696f7312290a0973" .
"63656e6172696f7318012003280b32162e677270632e74657374696e672e" .
"5363656e6172696f2284040a155363656e6172696f526573756c7453756d" .
"6d617279120b0a03717073180120012801121b0a137170735f7065725f73" .
"65727665725f636f7265180220012801121a0a127365727665725f737973" .
"74656d5f74696d6518032001280112180a107365727665725f757365725f" .
"74696d65180420012801121a0a12636c69656e745f73797374656d5f7469" .
"6d6518052001280112180a10636c69656e745f757365725f74696d651806" .
"2001280112120a0a6c6174656e63795f353018072001280112120a0a6c61" .
"74656e63795f393018082001280112120a0a6c6174656e63795f39351809" .
"2001280112120a0a6c6174656e63795f3939180a2001280112130a0b6c61" .
"74656e63795f393939180b2001280112180a107365727665725f6370755f" .
"7573616765180c2001280112260a1e7375636365737366756c5f72657175" .
"657374735f7065725f7365636f6e64180d2001280112220a1a6661696c65" .
"645f72657175657374735f7065725f7365636f6e64180e2001280112200a" .
"18636c69656e745f706f6c6c735f7065725f72657175657374180f200128" .
"0112200a187365727665725f706f6c6c735f7065725f7265717565737418" .
"102001280112220a1a7365727665725f717565726965735f7065725f6370" .
"755f73656318112001280112220a1a636c69656e745f717565726965735f" .
"7065725f6370755f7365631812200128012283030a0e5363656e6172696f" .
"526573756c7412280a087363656e6172696f18012001280b32162e677270" .
"632e74657374696e672e5363656e6172696f122e0a096c6174656e636965" .
"7318022001280b321b2e677270632e74657374696e672e486973746f6772" .
"616d44617461122f0a0c636c69656e745f737461747318032003280b3219" .
"2e677270632e74657374696e672e436c69656e745374617473122f0a0c73" .
"65727665725f737461747318042003280b32192e677270632e7465737469" .
"6e672e536572766572537461747312140a0c7365727665725f636f726573" .
"18052003280512340a0773756d6d61727918062001280b32232e67727063" .
"2e74657374696e672e5363656e6172696f526573756c7453756d6d617279" .
"12160a0e636c69656e745f7375636365737318072003280812160a0e7365" .
"727665725f7375636365737318082003280812390a0f726571756573745f" .
"726573756c747318092003280b32202e677270632e74657374696e672e52" .
"657175657374526573756c74436f756e742a410a0a436c69656e74547970" .
"65120f0a0b53594e435f434c49454e54100012100a0c4153594e435f434c" .
"49454e54100112100a0c4f544845525f434c49454e5410022a5b0a0a5365" .
"7276657254797065120f0a0b53594e435f534552564552100012100a0c41" .
"53594e435f534552564552100112180a144153594e435f47454e45524943" .
"5f534552564552100212100a0c4f544845525f53455256455210032a720a" .
"075270635479706512090a05554e4152591000120d0a0953545245414d49" .
"4e47100112190a1553545245414d494e475f46524f4d5f434c49454e5410" .
"0212190a1553545245414d494e475f46524f4d5f53455256455210031217" .
"0a1353545245414d494e475f424f54485f574159531004620670726f746f" .
"33"
));
"74696e672e5365727665725374617473120c0a04706f7274180220012805" .
"120d0a05636f726573180320012805220d0a0b436f726552657175657374" .
"221d0a0c436f7265526573706f6e7365120d0a05636f7265731801200128" .
"0522060a04566f696422fd010a085363656e6172696f120c0a046e616d65" .
"18012001280912310a0d636c69656e745f636f6e66696718022001280b32" .
"1a2e677270632e74657374696e672e436c69656e74436f6e66696712130a" .
"0b6e756d5f636c69656e747318032001280512310a0d7365727665725f63" .
"6f6e66696718042001280b321a2e677270632e74657374696e672e536572" .
"766572436f6e66696712130a0b6e756d5f73657276657273180520012805" .
"12160a0e7761726d75705f7365636f6e647318062001280512190a116265" .
"6e63686d61726b5f7365636f6e647318072001280512200a18737061776e" .
"5f6c6f63616c5f776f726b65725f636f756e7418082001280522360a0953" .
"63656e6172696f7312290a097363656e6172696f7318012003280b32162e" .
"677270632e74657374696e672e5363656e6172696f2284040a155363656e" .
"6172696f526573756c7453756d6d617279120b0a03717073180120012801" .
"121b0a137170735f7065725f7365727665725f636f726518022001280112" .
"1a0a127365727665725f73797374656d5f74696d6518032001280112180a" .
"107365727665725f757365725f74696d65180420012801121a0a12636c69" .
"656e745f73797374656d5f74696d6518052001280112180a10636c69656e" .
"745f757365725f74696d6518062001280112120a0a6c6174656e63795f35" .
"3018072001280112120a0a6c6174656e63795f393018082001280112120a" .
"0a6c6174656e63795f393518092001280112120a0a6c6174656e63795f39" .
"39180a2001280112130a0b6c6174656e63795f393939180b200128011218" .
"0a107365727665725f6370755f7573616765180c2001280112260a1e7375" .
"636365737366756c5f72657175657374735f7065725f7365636f6e64180d" .
"2001280112220a1a6661696c65645f72657175657374735f7065725f7365" .
"636f6e64180e2001280112200a18636c69656e745f706f6c6c735f706572" .
"5f72657175657374180f2001280112200a187365727665725f706f6c6c73" .
"5f7065725f7265717565737418102001280112220a1a7365727665725f71" .
"7565726965735f7065725f6370755f73656318112001280112220a1a636c" .
"69656e745f717565726965735f7065725f6370755f736563181220012801" .
"2283030a0e5363656e6172696f526573756c7412280a087363656e617269" .
"6f18012001280b32162e677270632e74657374696e672e5363656e617269" .
"6f122e0a096c6174656e6369657318022001280b321b2e677270632e7465" .
"7374696e672e486973746f6772616d44617461122f0a0c636c69656e745f" .
"737461747318032003280b32192e677270632e74657374696e672e436c69" .
"656e745374617473122f0a0c7365727665725f737461747318042003280b" .
"32192e677270632e74657374696e672e536572766572537461747312140a" .
"0c7365727665725f636f72657318052003280512340a0773756d6d617279" .
"18062001280b32232e677270632e74657374696e672e5363656e6172696f" .
"526573756c7453756d6d61727912160a0e636c69656e745f737563636573" .
"7318072003280812160a0e7365727665725f737563636573731808200328" .
"0812390a0f726571756573745f726573756c747318092003280b32202e67" .
"7270632e74657374696e672e52657175657374526573756c74436f756e74" .
"2a560a0a436c69656e7454797065120f0a0b53594e435f434c49454e5410" .
"0012100a0c4153594e435f434c49454e54100112100a0c4f544845525f43" .
"4c49454e54100212130a0f43414c4c4241434b5f434c49454e5410032a70" .
"0a0a53657276657254797065120f0a0b53594e435f534552564552100012" .
"100a0c4153594e435f534552564552100112180a144153594e435f47454e" .
"455249435f534552564552100212100a0c4f544845525f53455256455210" .
"0312130a0f43414c4c4241434b5f53455256455210042a720a0752706354" .
"79706512090a05554e4152591000120d0a0953545245414d494e47100112" .
"190a1553545245414d494e475f46524f4d5f434c49454e54100212190a15" .
"53545245414d494e475f46524f4d5f534552564552100312170a13535452" .
"45414d494e475f424f54485f574159531004620670726f746f33"
), true);
static::$is_initialized = true;
}

@ -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;
}
}

@ -15,13 +15,13 @@ class EchoMessages
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a8f070a2a7372632f70726f746f2f677270632f74657374696e672f6563" .
"0afd070a2a7372632f70726f746f2f677270632f74657374696e672f6563" .
"686f5f6d657373616765732e70726f746f120c677270632e74657374696e" .
"6722320a094465627567496e666f12150a0d737461636b5f656e74726965" .
"73180120032809120e0a0664657461696c18022001280922500a0b457272" .
"6f72537461747573120c0a04636f646518012001280512150a0d6572726f" .
"725f6d657373616765180220012809121c0a1462696e6172795f6572726f" .
"725f64657461696c7318032001280922e2030a0d52657175657374506172" .
"725f64657461696c7318032001280922cb040a0d52657175657374506172" .
"616d7312150a0d6563686f5f646561646c696e65180120012808121e0a16" .
"636c69656e745f63616e63656c5f61667465725f7573180220012805121e" .
"0a167365727665725f63616e63656c5f61667465725f7573180320012805" .
@ -37,16 +37,20 @@ class EchoMessages
"20012808121c0a1462696e6172795f6572726f725f64657461696c73180d" .
"2001280912310a0e65787065637465645f6572726f72180e2001280b3219" .
"2e677270632e74657374696e672e4572726f7253746174757312170a0f73" .
"65727665725f736c6565705f7573180f20012805224a0a0b4563686f5265" .
"7175657374120f0a076d657373616765180120012809122a0a0570617261" .
"6d18022001280b321b2e677270632e74657374696e672e52657175657374" .
"506172616d7322460a0e526573706f6e7365506172616d7312180a107265" .
"71756573745f646561646c696e65180120012803120c0a04686f73741802" .
"20012809120c0a0470656572180320012809224c0a0c4563686f52657370" .
"6f6e7365120f0a076d657373616765180120012809122b0a05706172616d" .
"18022001280b321c2e677270632e74657374696e672e526573706f6e7365" .
"506172616d73620670726f746f33"
));
"65727665725f736c6565705f7573180f20012805121b0a136261636b656e" .
"645f6368616e6e656c5f696478181020012805121f0a176563686f5f6d65" .
"7461646174615f696e697469616c6c7918112001280812290a2173657276" .
"65725f6e6f746966795f636c69656e745f7768656e5f7374617274656418" .
"1220012808224a0a0b4563686f52657175657374120f0a076d6573736167" .
"65180120012809122a0a05706172616d18022001280b321b2e677270632e" .
"74657374696e672e52657175657374506172616d7322460a0e526573706f" .
"6e7365506172616d7312180a10726571756573745f646561646c696e6518" .
"0120012803120c0a04686f7374180220012809120c0a0470656572180320" .
"012809224c0a0c4563686f526573706f6e7365120f0a076d657373616765" .
"180120012809122b0a05706172616d18022001280b321c2e677270632e74" .
"657374696e672e526573706f6e7365506172616d734203f8010162067072" .
"6f746f33"
), true);
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;
}
}

@ -15,13 +15,13 @@ class Messages
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0ad50a0a257372632f70726f746f2f677270632f74657374696e672f6d65" .
"0ad70e0a257372632f70726f746f2f677270632f74657374696e672f6d65" .
"7373616765732e70726f746f120c677270632e74657374696e67221a0a09" .
"426f6f6c56616c7565120d0a0576616c756518012001280822400a075061" .
"796c6f616412270a047479706518012001280e32192e677270632e746573" .
"74696e672e5061796c6f616454797065120c0a04626f647918022001280c" .
"222b0a0a4563686f537461747573120c0a04636f6465180120012805120f" .
"0a076d65737361676518022001280922ce020a0d53696d706c6552657175" .
"0a076d6573736167651802200128092286030a0d53696d706c6552657175" .
"65737412300a0d726573706f6e73655f7479706518012001280e32192e67" .
"7270632e74657374696e672e5061796c6f61645479706512150a0d726573" .
"706f6e73655f73697a6518022001280512260a077061796c6f6164180320" .
@ -32,36 +32,53 @@ class Messages
"426f6f6c56616c756512310a0f726573706f6e73655f7374617475731807" .
"2001280b32182e677270632e74657374696e672e4563686f537461747573" .
"12320a116578706563745f636f6d7072657373656418082001280b32172e" .
"677270632e74657374696e672e426f6f6c56616c7565225f0a0e53696d70" .
"6c65526573706f6e736512260a077061796c6f616418012001280b32152e" .
"677270632e74657374696e672e5061796c6f616412100a08757365726e61" .
"6d6518022001280912130a0b6f617574685f73636f706518032001280922" .
"770a1953747265616d696e67496e70757443616c6c526571756573741226" .
"0a077061796c6f616418012001280b32152e677270632e74657374696e67" .
"2e5061796c6f616412320a116578706563745f636f6d7072657373656418" .
"022001280b32172e677270632e74657374696e672e426f6f6c56616c7565" .
"223d0a1a53747265616d696e67496e70757443616c6c526573706f6e7365" .
"121f0a17616767726567617465645f7061796c6f61645f73697a65180120" .
"01280522640a12526573706f6e7365506172616d6574657273120c0a0473" .
"697a6518012001280512130a0b696e74657276616c5f7573180220012805" .
"122b0a0a636f6d7072657373656418032001280b32172e677270632e7465" .
"7374696e672e426f6f6c56616c756522e8010a1a53747265616d696e674f" .
"757470757443616c6c5265717565737412300a0d726573706f6e73655f74" .
"79706518012001280e32192e677270632e74657374696e672e5061796c6f" .
"616454797065123d0a13726573706f6e73655f706172616d657465727318" .
"022003280b32202e677270632e74657374696e672e526573706f6e736550" .
"6172616d657465727312260a077061796c6f616418032001280b32152e67" .
"7270632e74657374696e672e5061796c6f616412310a0f726573706f6e73" .
"655f73746174757318072001280b32182e677270632e74657374696e672e" .
"4563686f53746174757322450a1b53747265616d696e674f757470757443" .
"616c6c526573706f6e736512260a077061796c6f616418012001280b3215" .
"2e677270632e74657374696e672e5061796c6f616422330a0f5265636f6e" .
"6e656374506172616d7312200a186d61785f7265636f6e6e6563745f6261" .
"636b6f66665f6d7318012001280522330a0d5265636f6e6e656374496e66" .
"6f120e0a0670617373656418012001280812120a0a6261636b6f66665f6d" .
"731802200328052a1f0a0b5061796c6f61645479706512100a0c434f4d50" .
"5245535341424c451000620670726f746f33"
));
"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;
}

@ -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;
}
}

@ -29,7 +29,7 @@ class Payloads
"0e636f6d706c65785f706172616d7318032001280b32202e677270632e74" .
"657374696e672e436f6d706c657850726f746f506172616d73480042090a" .
"077061796c6f6164620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -29,7 +29,7 @@ class ProxyService
"2801123f0a0a5265706f727448697374121b2e677270632e74657374696e" .
"672e486973746f6772616d446174611a122e677270632e74657374696e67" .
"2e566f69642801620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -22,7 +22,7 @@ class ReportQpsScenarioService
"656e6172696f5365727669636512420a0e5265706f72745363656e617269" .
"6f121c2e677270632e74657374696e672e5363656e6172696f526573756c" .
"741a122e677270632e74657374696e672e566f6964620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -41,7 +41,7 @@ class Stats
"6f756e7412150a0d63715f706f6c6c5f636f756e7418062001280412240a" .
"0a636f72655f737461747318072001280b32102e677270632e636f72652e" .
"5374617473620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -14,45 +14,51 @@ class Test
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\PBEmpty::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0a91080a217372632f70726f746f2f677270632f74657374696e672f7465" .
"0aca090a217372632f70726f746f2f677270632f74657374696e672f7465" .
"73742e70726f746f120c677270632e74657374696e671a257372632f7072" .
"6f746f2f677270632f74657374696e672f6d657373616765732e70726f74" .
"6f32cb050a0b546573745365727669636512350a09456d70747943616c6c" .
"12132e677270632e74657374696e672e456d7074791a132e677270632e74" .
"657374696e672e456d70747912460a09556e61727943616c6c121b2e6772" .
"70632e74657374696e672e53696d706c65526571756573741a1c2e677270" .
"632e74657374696e672e53696d706c65526573706f6e7365124f0a124361" .
"63686561626c65556e61727943616c6c121b2e677270632e74657374696e" .
"672e53696d706c65526571756573741a1c2e677270632e74657374696e67" .
"2e53696d706c65526573706f6e7365126c0a1353747265616d696e674f75" .
"7470757443616c6c12282e677270632e74657374696e672e53747265616d" .
"696e674f757470757443616c6c526571756573741a292e677270632e7465" .
"7374696e672e53747265616d696e674f757470757443616c6c526573706f" .
"6e7365300112690a1253747265616d696e67496e70757443616c6c12272e" .
"677270632e74657374696e672e53747265616d696e67496e70757443616c" .
"6c526571756573741a282e677270632e74657374696e672e53747265616d" .
"696e67496e70757443616c6c526573706f6e7365280112690a0e46756c6c" .
"4475706c657843616c6c12282e677270632e74657374696e672e53747265" .
"616d696e674f757470757443616c6c526571756573741a292e677270632e" .
"74657374696e672e53747265616d696e674f757470757443616c6c526573" .
"706f6e73652801300112690a0e48616c664475706c657843616c6c12282e" .
"677270632e74657374696e672e53747265616d696e674f75747075744361" .
"6c6c526571756573741a292e677270632e74657374696e672e5374726561" .
"6d696e674f757470757443616c6c526573706f6e736528013001123d0a11" .
"556e696d706c656d656e74656443616c6c12132e677270632e7465737469" .
"6e672e456d7074791a132e677270632e74657374696e672e456d70747932" .
"550a14556e696d706c656d656e74656453657276696365123d0a11556e69" .
"6d706c656d656e74656443616c6c12132e677270632e74657374696e672e" .
"456d7074791a132e677270632e74657374696e672e456d7074793289010a" .
"105265636f6e6e65637453657276696365123b0a055374617274121d2e67" .
"7270632e74657374696e672e5265636f6e6e656374506172616d731a132e" .
"677270632e74657374696e672e456d70747912380a0453746f7012132e67" .
"7270632e74657374696e672e456d7074791a1b2e677270632e7465737469" .
"6e672e5265636f6e6e656374496e666f620670726f746f33"
));
"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;
}

@ -28,7 +28,7 @@ class WorkerService
"74657374696e672e436f7265526573706f6e736512340a0a51756974576f" .
"726b657212122e677270632e74657374696e672e566f69641a122e677270" .
"632e74657374696e672e566f6964620670726f746f33"
));
), true);
static::$is_initialized = true;
}

@ -16,15 +16,25 @@ class Bucket extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>double start = 1;</code>
*/
private $start = 0.0;
protected $start = 0.0;
/**
* Generated from protobuf field <code>uint64 count = 2;</code>
*/
private $count = 0;
protected $count = 0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $start
* @type int|string $count
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -18,9 +18,18 @@ class Histogram extends \Google\Protobuf\Internal\Message
*/
private $buckets;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Core\Bucket[]|\Google\Protobuf\Internal\RepeatedField $buckets
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,12 +16,23 @@ class Metric extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>string name = 1;</code>
*/
private $name = '';
protected $name = '';
protected $value;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type int|string $count
* @type \Grpc\Core\Histogram $histogram
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -18,9 +18,18 @@ class Stats extends \Google\Protobuf\Internal\Message
*/
private $metrics;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Core\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -22,11 +22,21 @@ class BoolValue extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>bool value = 1;</code>
*/
private $value = false;
protected $value = false;
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**

@ -16,15 +16,25 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 req_size = 1;</code>
*/
private $req_size = 0;
protected $req_size = 0;
/**
* Generated from protobuf field <code>int32 resp_size = 2;</code>
*/
private $resp_size = 0;
protected $resp_size = 0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $req_size
* @type int $resp_size
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,12 +16,23 @@ class ChannelArg extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>string name = 1;</code>
*/
private $name = '';
protected $name = '';
protected $value;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type string $str_value
* @type int $int_value
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -15,9 +15,19 @@ class ClientArgs extends \Google\Protobuf\Internal\Message
{
protected $argtype;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Testing\ClientConfig $setup
* @type \Grpc\Testing\Mark $mark
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -22,49 +22,49 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
*/
private $client_type = 0;
protected $client_type = 0;
/**
* Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
private $security_params = null;
protected $security_params = null;
/**
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
*
* Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
private $outstanding_rpcs_per_channel = 0;
protected $outstanding_rpcs_per_channel = 0;
/**
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
*
* Generated from protobuf field <code>int32 client_channels = 5;</code>
*/
private $client_channels = 0;
protected $client_channels = 0;
/**
* Only for async client. Number of threads to use to start/manage RPCs.
*
* Generated from protobuf field <code>int32 async_client_threads = 7;</code>
*/
private $async_client_threads = 0;
protected $async_client_threads = 0;
/**
* Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
private $rpc_type = 0;
protected $rpc_type = 0;
/**
* The requested load for the entire client (aggregated over all the threads).
*
* Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
private $load_params = null;
protected $load_params = null;
/**
* Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
private $payload_config = null;
protected $payload_config = null;
/**
* Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
private $histogram_params = null;
protected $histogram_params = null;
/**
* Specify the cores we should run the client on, if desired
*
@ -74,13 +74,13 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 core_limit = 14;</code>
*/
private $core_limit = 0;
protected $core_limit = 0;
/**
* If we use an OTHER_CLIENT client_type, this string gives more detail
*
* Generated from protobuf field <code>string other_client_api = 15;</code>
*/
private $other_client_api = '';
protected $other_client_api = '';
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
@ -90,23 +90,78 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
*/
private $threads_per_cq = 0;
protected $threads_per_cq = 0;
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
*/
private $messages_per_stream = 0;
protected $messages_per_stream = 0;
/**
* Use coalescing API when possible.
*
* Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
*/
private $use_coalesce_api = false;
protected $use_coalesce_api = false;
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
*/
protected $median_latency_collection_interval_millis = 0;
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field <code>int32 client_processes = 21;</code>
*/
protected $client_processes = 0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string[]|\Google\Protobuf\Internal\RepeatedField $server_targets
* List of targets to connect to. At least one target needs to be specified.
* @type int $client_type
* @type \Grpc\Testing\SecurityParams $security_params
* @type int $outstanding_rpcs_per_channel
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* @type int $client_channels
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* @type int $async_client_threads
* Only for async client. Number of threads to use to start/manage RPCs.
* @type int $rpc_type
* @type \Grpc\Testing\LoadParams $load_params
* The requested load for the entire client (aggregated over all the threads).
* @type \Grpc\Testing\PayloadConfig $payload_config
* @type \Grpc\Testing\HistogramParams $histogram_params
* @type int[]|\Google\Protobuf\Internal\RepeatedField $core_list
* Specify the cores we should run the client on, if desired
* @type int $core_limit
* @type string $other_client_api
* If we use an OTHER_CLIENT client_type, this string gives more detail
* @type \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $channel_args
* @type int $threads_per_cq
* Number of threads that share each completion queue
* @type int $messages_per_stream
* Number of messages on a stream before it gets finished/restarted
* @type bool $use_coalesce_api
* Use coalescing API when possible.
* @type int $median_latency_collection_interval_millis
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
* @type int $client_processes
* Number of client processes. 0 indicates no restriction.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**
@ -527,5 +582,59 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
return $this;
}
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
* @return int
*/
public function getMedianLatencyCollectionIntervalMillis()
{
return $this->median_latency_collection_interval_millis;
}
/**
* If 0, disabled. Else, specifies the period between gathering latency
* medians in milliseconds.
*
* Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
* @param int $var
* @return $this
*/
public function setMedianLatencyCollectionIntervalMillis($var)
{
GPBUtil::checkInt32($var);
$this->median_latency_collection_interval_millis = $var;
return $this;
}
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field <code>int32 client_processes = 21;</code>
* @return int
*/
public function getClientProcesses()
{
return $this->client_processes;
}
/**
* Number of client processes. 0 indicates no restriction.
*
* Generated from protobuf field <code>int32 client_processes = 21;</code>
* @param int $var
* @return $this
*/
public function setClientProcesses($var)
{
GPBUtil::checkInt32($var);
$this->client_processes = $var;
return $this;
}
}

@ -18,21 +18,21 @@ class ClientStats extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
private $latencies = null;
protected $latencies = null;
/**
* See ServerStats for details.
*
* Generated from protobuf field <code>double time_elapsed = 2;</code>
*/
private $time_elapsed = 0.0;
protected $time_elapsed = 0.0;
/**
* Generated from protobuf field <code>double time_user = 3;</code>
*/
private $time_user = 0.0;
protected $time_user = 0.0;
/**
* Generated from protobuf field <code>double time_system = 4;</code>
*/
private $time_system = 0.0;
protected $time_system = 0.0;
/**
* Number of failed requests (one row per status code seen)
*
@ -44,17 +44,37 @@ class ClientStats extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
*/
private $cq_poll_count = 0;
protected $cq_poll_count = 0;
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
*/
private $core_stats = null;
protected $core_stats = null;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Testing\HistogramData $latencies
* Latency histogram. Data points are in nanoseconds.
* @type float $time_elapsed
* See ServerStats for details.
* @type float $time_user
* @type float $time_system
* @type \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $request_results
* Number of failed requests (one row per status code seen)
* @type int|string $cq_poll_count
* Number of polls called inside completion queue
* @type \Grpc\Core\Stats $core_stats
* Core library stats
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,11 +16,20 @@ class ClientStatus extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>.grpc.testing.ClientStats stats = 1;</code>
*/
private $stats = null;
protected $stats = null;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Testing\ClientStats $stats
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -4,8 +4,10 @@
namespace Grpc\Testing;
use UnexpectedValueException;
/**
* Protobuf enum <code>Grpc\Testing\ClientType</code>
* Protobuf type <code>grpc.testing.ClientType</code>
*/
class ClientType
{
@ -26,5 +28,36 @@ class ClientType
* Generated from protobuf enum <code>OTHER_CLIENT = 2;</code>
*/
const OTHER_CLIENT = 2;
/**
* Generated from protobuf enum <code>CALLBACK_CLIENT = 3;</code>
*/
const CALLBACK_CLIENT = 3;
private static $valueToName = [
self::SYNC_CLIENT => 'SYNC_CLIENT',
self::ASYNC_CLIENT => 'ASYNC_CLIENT',
self::OTHER_CLIENT => 'OTHER_CLIENT',
self::CALLBACK_CLIENT => 'CALLBACK_CLIENT',
];
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);
}
}

@ -17,9 +17,17 @@ use Google\Protobuf\Internal\GPBUtil;
class ClosedLoopParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -17,9 +17,17 @@ use Google\Protobuf\Internal\GPBUtil;
class ComplexProtoParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -14,9 +14,17 @@ use Google\Protobuf\Internal\GPBUtil;
class CoreRequest extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -18,11 +18,21 @@ class CoreResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>int32 cores = 1;</code>
*/
private $cores = 0;
protected $cores = 0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $cores
* Number of cores available on the server
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -22,11 +22,21 @@ class DebugInfo extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>string detail = 2;</code>
*/
private $detail = '';
protected $detail = '';
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string[]|\Google\Protobuf\Internal\RepeatedField $stack_entries
* @type string $detail
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,15 +16,25 @@ class EchoRequest extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>string message = 1;</code>
*/
private $message = '';
protected $message = '';
/**
* Generated from protobuf field <code>.grpc.testing.RequestParams param = 2;</code>
*/
private $param = null;
protected $param = null;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $message
* @type \Grpc\Testing\RequestParams $param
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,15 +16,25 @@ class EchoResponse extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>string message = 1;</code>
*/
private $message = '';
protected $message = '';
/**
* Generated from protobuf field <code>.grpc.testing.ResponseParams param = 2;</code>
*/
private $param = null;
protected $param = null;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $message
* @type \Grpc\Testing\ResponseParams $param
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -19,15 +19,25 @@ class EchoStatus extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 code = 1;</code>
*/
private $code = 0;
protected $code = 0;
/**
* Generated from protobuf field <code>string message = 2;</code>
*/
private $message = '';
protected $message = '';
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**

@ -1,6 +1,6 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/metrics.proto
# source: src/proto/grpc/testing/empty.proto
namespace Grpc\Testing;
@ -9,14 +9,29 @@ 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.EmptyMessage</code>
*/
class EmptyMessage extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce();
parent::__construct();
/**
* 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);
}
}

@ -2,7 +2,7 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015 gRPC authors.
// Copyright 2018 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -19,9 +19,10 @@
namespace Grpc\Testing;
/**
* A service without any rpc defined to test coverage.
* A service that has zero methods.
* See https://github.com/grpc/grpc/issues/15574
*/
class NoRpcServiceClient extends \Grpc\BaseStub {
class EmptyServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname

@ -18,19 +18,30 @@ class ErrorStatus extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 code = 1;</code>
*/
private $code = 0;
protected $code = 0;
/**
* Generated from protobuf field <code>string error_message = 2;</code>
*/
private $error_message = '';
protected $error_message = '';
/**
* Generated from protobuf field <code>string binary_error_details = 3;</code>
*/
private $binary_error_details = '';
protected $binary_error_details = '';
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $code
* @type string $error_message
* @type string $binary_error_details
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -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);
}
}

@ -22,27 +22,41 @@ class HistogramData extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>double min_seen = 2;</code>
*/
private $min_seen = 0.0;
protected $min_seen = 0.0;
/**
* Generated from protobuf field <code>double max_seen = 3;</code>
*/
private $max_seen = 0.0;
protected $max_seen = 0.0;
/**
* Generated from protobuf field <code>double sum = 4;</code>
*/
private $sum = 0.0;
protected $sum = 0.0;
/**
* Generated from protobuf field <code>double sum_of_squares = 5;</code>
*/
private $sum_of_squares = 0.0;
protected $sum_of_squares = 0.0;
/**
* Generated from protobuf field <code>double count = 6;</code>
*/
private $count = 0.0;
protected $count = 0.0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int[]|\Google\Protobuf\Internal\RepeatedField $bucket
* @type float $min_seen
* @type float $max_seen
* @type float $sum
* @type float $sum_of_squares
* @type float $count
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -20,17 +20,29 @@ class HistogramParams extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>double resolution = 1;</code>
*/
private $resolution = 0.0;
protected $resolution = 0.0;
/**
* use enough buckets to allow this value
*
* Generated from protobuf field <code>double max_possible = 2;</code>
*/
private $max_possible = 0.0;
protected $max_possible = 0.0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $resolution
* first bucket is [0, 1 + resolution)
* @type float $max_possible
* use enough buckets to allow this value
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -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);
}
}

@ -15,9 +15,19 @@ class LoadParams extends \Google\Protobuf\Internal\Message
{
protected $load;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Testing\ClosedLoopParams $closed_loop
* @type \Grpc\Testing\PoissonParams $poisson
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -20,11 +20,21 @@ class Mark extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>bool reset = 1;</code>
*/
private $reset = false;
protected $reset = false;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type bool $reset
* if true, the stats will be reset after taking their snapshot.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -14,9 +14,17 @@ use Google\Protobuf\Internal\GPBUtil;
class PBVoid extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -16,26 +16,36 @@ use Google\Protobuf\Internal\GPBUtil;
class Payload extends \Google\Protobuf\Internal\Message
{
/**
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
*
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>
*/
private $type = 0;
protected $type = 0;
/**
* Primary contents of payload.
*
* Generated from protobuf field <code>bytes body = 2;</code>
*/
private $body = '';
protected $body = '';
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
*
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>
@ -47,7 +57,6 @@ class Payload extends \Google\Protobuf\Internal\Message
}
/**
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
*
* Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>

@ -15,9 +15,20 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message
{
protected $payload;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Grpc\Testing\ByteBufferParams $bytebuf_params
* @type \Grpc\Testing\SimpleProtoParams $simple_params
* @type \Grpc\Testing\ComplexProtoParams $complex_params
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -4,11 +4,12 @@
namespace Grpc\Testing;
use UnexpectedValueException;
/**
* DEPRECATED, don't use. To be removed shortly.
* The type of payload that should be returned.
*
* Protobuf enum <code>Grpc\Testing\PayloadType</code>
* Protobuf type <code>grpc.testing.PayloadType</code>
*/
class PayloadType
{
@ -18,5 +19,29 @@ class PayloadType
* 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);
}
}

@ -21,11 +21,21 @@ class PoissonParams extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>double offered_load = 1;</code>
*/
private $offered_load = 0.0;
protected $offered_load = 0.0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $offered_load
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -16,11 +16,20 @@ class ProxyStat extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>double latency = 1;</code>
*/
private $latency = 0.0;
protected $latency = 0.0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $latency
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\ProxyService::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -20,15 +20,25 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>bool passed = 1;</code>
*/
private $passed = false;
protected $passed = false;
/**
* Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
*/
private $backoff_ms;
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**

@ -19,11 +19,20 @@ class ReconnectParams extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code>
*/
private $max_reconnect_backoff_ms = 0;
protected $max_reconnect_backoff_ms = 0;
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**

@ -44,16 +44,16 @@ class ReconnectServiceClient extends \Grpc\BaseStub {
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.ReconnectService/Start',
$argument,
['\Grpc\Testing\PBEmpty', 'decode'],
['\Grpc\Testing\EmptyMessage', 'decode'],
$metadata, $options);
}
/**
* @param \Grpc\Testing\PBEmpty $argument input argument
* @param \Grpc\Testing\EmptyMessage $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function Stop(\Grpc\Testing\PBEmpty $argument,
public function Stop(\Grpc\Testing\EmptyMessage $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.ReconnectService/Stop',
$argument,

@ -14,9 +14,17 @@ use Google\Protobuf\Internal\GPBUtil;
class Request extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -16,73 +16,117 @@ class RequestParams extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>bool echo_deadline = 1;</code>
*/
private $echo_deadline = false;
protected $echo_deadline = false;
/**
* Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
*/
private $client_cancel_after_us = 0;
protected $client_cancel_after_us = 0;
/**
* Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
*/
private $server_cancel_after_us = 0;
protected $server_cancel_after_us = 0;
/**
* Generated from protobuf field <code>bool echo_metadata = 4;</code>
*/
private $echo_metadata = false;
protected $echo_metadata = false;
/**
* Generated from protobuf field <code>bool check_auth_context = 5;</code>
*/
private $check_auth_context = false;
protected $check_auth_context = false;
/**
* Generated from protobuf field <code>int32 response_message_length = 6;</code>
*/
private $response_message_length = 0;
protected $response_message_length = 0;
/**
* Generated from protobuf field <code>bool echo_peer = 7;</code>
*/
private $echo_peer = false;
protected $echo_peer = false;
/**
* will force check_auth_context.
*
* Generated from protobuf field <code>string expected_client_identity = 8;</code>
*/
private $expected_client_identity = '';
protected $expected_client_identity = '';
/**
* Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
*/
private $skip_cancelled_check = false;
protected $skip_cancelled_check = false;
/**
* Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
*/
private $expected_transport_security_type = '';
protected $expected_transport_security_type = '';
/**
* Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
*/
private $debug_info = null;
protected $debug_info = null;
/**
* Server should not see a request with this set.
*
* Generated from protobuf field <code>bool server_die = 12;</code>
*/
private $server_die = false;
protected $server_die = false;
/**
* Generated from protobuf field <code>string binary_error_details = 13;</code>
*/
private $binary_error_details = '';
protected $binary_error_details = '';
/**
* Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
*/
private $expected_error = null;
protected $expected_error = null;
/**
* Amount to sleep when invoking server
* sleep when invoking server for deadline tests
*
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
*/
private $server_sleep_us = 0;
protected $server_sleep_us = 0;
/**
* which backend to send request to
*
* Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
*/
protected $backend_channel_idx = 0;
/**
* Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
*/
protected $echo_metadata_initially = false;
/**
* Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
*/
protected $server_notify_client_when_started = false;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type bool $echo_deadline
* @type int $client_cancel_after_us
* @type int $server_cancel_after_us
* @type bool $echo_metadata
* @type bool $check_auth_context
* @type int $response_message_length
* @type bool $echo_peer
* @type string $expected_client_identity
* will force check_auth_context.
* @type bool $skip_cancelled_check
* @type string $expected_transport_security_type
* @type \Grpc\Testing\DebugInfo $debug_info
* @type bool $server_die
* Server should not see a request with this set.
* @type string $binary_error_details
* @type \Grpc\Testing\ErrorStatus $expected_error
* @type int $server_sleep_us
* sleep when invoking server for deadline tests
* @type int $backend_channel_idx
* which backend to send request to
* @type bool $echo_metadata_initially
* @type bool $server_notify_client_when_started
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**
@ -402,7 +446,7 @@ class RequestParams extends \Google\Protobuf\Internal\Message
}
/**
* Amount to sleep when invoking server
* sleep when invoking server for deadline tests
*
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
* @return int
@ -413,7 +457,7 @@ class RequestParams extends \Google\Protobuf\Internal\Message
}
/**
* Amount to sleep when invoking server
* sleep when invoking server for deadline tests
*
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
* @param int $var
@ -427,5 +471,75 @@ class RequestParams extends \Google\Protobuf\Internal\Message
return $this;
}
/**
* which backend to send request to
*
* Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
* @return int
*/
public function getBackendChannelIdx()
{
return $this->backend_channel_idx;
}
/**
* which backend to send request to
*
* Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
* @param int $var
* @return $this
*/
public function setBackendChannelIdx($var)
{
GPBUtil::checkInt32($var);
$this->backend_channel_idx = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
* @return bool
*/
public function getEchoMetadataInitially()
{
return $this->echo_metadata_initially;
}
/**
* Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
* @param bool $var
* @return $this
*/
public function setEchoMetadataInitially($var)
{
GPBUtil::checkBool($var);
$this->echo_metadata_initially = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
* @return bool
*/
public function getServerNotifyClientWhenStarted()
{
return $this->server_notify_client_when_started;
}
/**
* Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
* @param bool $var
* @return $this
*/
public function setServerNotifyClientWhenStarted($var)
{
GPBUtil::checkBool($var);
$this->server_notify_client_when_started = $var;
return $this;
}
}

@ -16,15 +16,25 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int32 status_code = 1;</code>
*/
private $status_code = 0;
protected $status_code = 0;
/**
* Generated from protobuf field <code>int64 count = 2;</code>
*/
private $count = 0;
protected $count = 0;
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $status_code
* @type int|string $count
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -14,9 +14,17 @@ use Google\Protobuf\Internal\GPBUtil;
class Response extends \Google\Protobuf\Internal\Message
{
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce();
parent::__construct();
parent::__construct($data);
}
}

@ -20,14 +20,14 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>int32 size = 1;</code>
*/
private $size = 0;
protected $size = 0;
/**
* Desired interval between consecutive responses in the response stream in
* microseconds.
*
* Generated from protobuf field <code>int32 interval_us = 2;</code>
*/
private $interval_us = 0;
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
@ -36,11 +36,29 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
*/
private $compressed = null;
protected $compressed = null;
public function __construct() {
/**
* 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();
parent::__construct($data);
}
/**

@ -16,19 +16,30 @@ class ResponseParams extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field <code>int64 request_deadline = 1;</code>
*/
private $request_deadline = 0;
protected $request_deadline = 0;
/**
* Generated from protobuf field <code>string host = 2;</code>
*/
private $host = '';
protected $host = '';
/**
* Generated from protobuf field <code>string peer = 3;</code>
*/
private $peer = '';
protected $peer = '';
public function __construct() {
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $request_deadline
* @type string $host
* @type string $peer
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
parent::__construct();
parent::__construct($data);
}
/**

@ -4,8 +4,10 @@
namespace Grpc\Testing;
use UnexpectedValueException;
/**
* Protobuf enum <code>Grpc\Testing\RpcType</code>
* Protobuf type <code>grpc.testing.RpcType</code>
*/
class RpcType
{
@ -29,5 +31,33 @@ class RpcType
* Generated from protobuf enum <code>STREAMING_BOTH_WAYS = 4;</code>
*/
const STREAMING_BOTH_WAYS = 4;
private static $valueToName = [
self::UNARY => 'UNARY',
self::STREAMING => 'STREAMING',
self::STREAMING_FROM_CLIENT => 'STREAMING_FROM_CLIENT',
self::STREAMING_FROM_SERVER => 'STREAMING_FROM_SERVER',
self::STREAMING_BOTH_WAYS => 'STREAMING_BOTH_WAYS',
];
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);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save