run generate_proto_php.sh, before add php server

pull/25309/head
root 4 years ago
parent c7e4954975
commit 82f472c4a5
  1. BIN
      src/php/tests/generated_code/GPBMetadata/Math.php
  2. BIN
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  3. 9
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/PBEmpty.php
  4. BIN
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Test.php
  5. 38
      src/php/tests/interop/Grpc/Testing/ClientConfigureRequest.php
  6. 68
      src/php/tests/interop/Grpc/Testing/LoadBalancerAccumulatedStatsResponse.php
  7. 106
      src/php/tests/interop/Grpc/Testing/LoadBalancerAccumulatedStatsResponse/MethodStats.php
  8. 16
      src/php/tests/interop/Grpc/Testing/LoadBalancerAccumulatedStatsResponse_MethodStats.php

@ -14,12 +14,9 @@ class PBEmpty
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(
'
J
"src/proto/grpc/testing/empty.proto grpc.testing"
EmptyMessagebproto3'
, true);
$pool->internalAddGeneratedFile(hex2bin(
"0a4a0a227372632f70726f746f2f677270632f74657374696e672f656d7074792e70726f746f120c677270632e74657374696e67220e0a0c456d7074794d657373616765620670726f746f33"
), true);
static::$is_initialized = true;
}

@ -27,6 +27,13 @@ class ClientConfigureRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field <code>repeated .grpc.testing.ClientConfigureRequest.Metadata metadata = 2;</code>
*/
private $metadata;
/**
* The deadline to use, in seconds, for all RPCs. If unset or zero, the
* client will use the default from the command-line.
*
* Generated from protobuf field <code>int32 timeout_sec = 3;</code>
*/
protected $timeout_sec = 0;
/**
* Constructor.
@ -38,6 +45,9 @@ class ClientConfigureRequest extends \Google\Protobuf\Internal\Message
* The types of RPCs the client sends.
* @type \Grpc\Testing\ClientConfigureRequest\Metadata[]|\Google\Protobuf\Internal\RepeatedField $metadata
* The collection of custom metadata to be attached to RPCs sent by the client.
* @type int $timeout_sec
* The deadline to use, in seconds, for all RPCs. If unset or zero, the
* client will use the default from the command-line.
* }
*/
public function __construct($data = NULL) {
@ -97,5 +107,33 @@ class ClientConfigureRequest extends \Google\Protobuf\Internal\Message
return $this;
}
/**
* The deadline to use, in seconds, for all RPCs. If unset or zero, the
* client will use the default from the command-line.
*
* Generated from protobuf field <code>int32 timeout_sec = 3;</code>
* @return int
*/
public function getTimeoutSec()
{
return $this->timeout_sec;
}
/**
* The deadline to use, in seconds, for all RPCs. If unset or zero, the
* client will use the default from the command-line.
*
* Generated from protobuf field <code>int32 timeout_sec = 3;</code>
* @param int $var
* @return $this
*/
public function setTimeoutSec($var)
{
GPBUtil::checkInt32($var);
$this->timeout_sec = $var;
return $this;
}
}

@ -17,22 +17,32 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
{
/**
* The total number of RPCs have ever issued for each type.
* Deprecated: use stats_per_method.rpcs_started instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1 [deprecated = true];</code>
*/
private $num_rpcs_started_by_method;
/**
* The total number of RPCs have ever completed successfully for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2 [deprecated = true];</code>
*/
private $num_rpcs_succeeded_by_method;
/**
* The total number of RPCs have ever failed for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3 [deprecated = true];</code>
*/
private $num_rpcs_failed_by_method;
/**
* Per-method RPC statistics. The key is the full method path; i.e.
* "/proto.package.ServiceName/MethodName".
*
* Generated from protobuf field <code>map<string, .grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats> stats_per_method = 4;</code>
*/
private $stats_per_method;
/**
* Constructor.
@ -42,10 +52,16 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
*
* @type array|\Google\Protobuf\Internal\MapField $num_rpcs_started_by_method
* The total number of RPCs have ever issued for each type.
* Deprecated: use stats_per_method.rpcs_started instead.
* @type array|\Google\Protobuf\Internal\MapField $num_rpcs_succeeded_by_method
* The total number of RPCs have ever completed successfully for each type.
* Deprecated: use stats_per_method.result instead.
* @type array|\Google\Protobuf\Internal\MapField $num_rpcs_failed_by_method
* The total number of RPCs have ever failed for each type.
* Deprecated: use stats_per_method.result instead.
* @type array|\Google\Protobuf\Internal\MapField $stats_per_method
* Per-method RPC statistics. The key is the full method path; i.e.
* "/proto.package.ServiceName/MethodName".
* }
*/
public function __construct($data = NULL) {
@ -55,8 +71,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever issued for each type.
* Deprecated: use stats_per_method.rpcs_started instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1 [deprecated = true];</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getNumRpcsStartedByMethod()
@ -66,8 +83,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever issued for each type.
* Deprecated: use stats_per_method.rpcs_started instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_started_by_method = 1 [deprecated = true];</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
@ -81,8 +99,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever completed successfully for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2 [deprecated = true];</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getNumRpcsSucceededByMethod()
@ -92,8 +111,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever completed successfully for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_succeeded_by_method = 2 [deprecated = true];</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
@ -107,8 +127,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever failed for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3 [deprecated = true];</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getNumRpcsFailedByMethod()
@ -118,8 +139,9 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
/**
* The total number of RPCs have ever failed for each type.
* Deprecated: use stats_per_method.result instead.
*
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3;</code>
* Generated from protobuf field <code>map<string, int32> num_rpcs_failed_by_method = 3 [deprecated = true];</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
@ -131,5 +153,33 @@ class LoadBalancerAccumulatedStatsResponse extends \Google\Protobuf\Internal\Mes
return $this;
}
/**
* Per-method RPC statistics. The key is the full method path; i.e.
* "/proto.package.ServiceName/MethodName".
*
* Generated from protobuf field <code>map<string, .grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats> stats_per_method = 4;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getStatsPerMethod()
{
return $this->stats_per_method;
}
/**
* Per-method RPC statistics. The key is the full method path; i.e.
* "/proto.package.ServiceName/MethodName".
*
* Generated from protobuf field <code>map<string, .grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats> stats_per_method = 4;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setStatsPerMethod($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\LoadBalancerAccumulatedStatsResponse\MethodStats::class);
$this->stats_per_method = $arr;
return $this;
}
}

@ -0,0 +1,106 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing\LoadBalancerAccumulatedStatsResponse;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats</code>
*/
class MethodStats extends \Google\Protobuf\Internal\Message
{
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field <code>int32 rpcs_started = 1;</code>
*/
protected $rpcs_started = 0;
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field <code>map<int32, int32> result = 2;</code>
*/
private $result;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $rpcs_started
* The number of RPCs that were started for this method.
* @type array|\Google\Protobuf\Internal\MapField $result
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct($data);
}
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field <code>int32 rpcs_started = 1;</code>
* @return int
*/
public function getRpcsStarted()
{
return $this->rpcs_started;
}
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field <code>int32 rpcs_started = 1;</code>
* @param int $var
* @return $this
*/
public function setRpcsStarted($var)
{
GPBUtil::checkInt32($var);
$this->rpcs_started = $var;
return $this;
}
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field <code>map<int32, int32> result = 2;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getResult()
{
return $this->result;
}
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field <code>map<int32, int32> result = 2;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setResult($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32);
$this->result = $arr;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MethodStats::class, \Grpc\Testing\LoadBalancerAccumulatedStatsResponse_MethodStats::class);

@ -0,0 +1,16 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
if (false) {
/**
* This class is deprecated. Use Grpc\Testing\LoadBalancerAccumulatedStatsResponse\MethodStats instead.
* @deprecated
*/
class LoadBalancerAccumulatedStatsResponse_MethodStats {}
}
class_exists(LoadBalancerAccumulatedStatsResponse\MethodStats::class);
@trigger_error('Grpc\Testing\LoadBalancerAccumulatedStatsResponse_MethodStats is deprecated and will be removed in the next major release. Use Grpc\Testing\LoadBalancerAccumulatedStatsResponse\MethodStats instead', E_USER_DEPRECATED);
Loading…
Cancel
Save