|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<?php |
|
|
|
|
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 |
|
|
|
|
// Source: math.proto |
|
|
|
|
// Date: 2014-11-14 00:00:41 |
|
|
|
|
// Date: 2015-04-01 01:00:50 |
|
|
|
|
|
|
|
|
|
namespace math { |
|
|
|
|
|
|
|
|
@ -21,20 +21,20 @@ namespace math { |
|
|
|
|
{ |
|
|
|
|
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.DivArgs'); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 dividend = 1 |
|
|
|
|
// OPTIONAL INT64 dividend = 1 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 1; |
|
|
|
|
$f->name = "dividend"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 divisor = 2 |
|
|
|
|
// OPTIONAL INT64 divisor = 2 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 2; |
|
|
|
|
$f->name = "divisor"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
foreach (self::$__extensions as $cb) { |
|
|
|
@ -138,20 +138,20 @@ namespace math { |
|
|
|
|
{ |
|
|
|
|
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.DivReply'); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 quotient = 1 |
|
|
|
|
// OPTIONAL INT64 quotient = 1 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 1; |
|
|
|
|
$f->name = "quotient"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 remainder = 2 |
|
|
|
|
// OPTIONAL INT64 remainder = 2 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 2; |
|
|
|
|
$f->name = "remainder"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
foreach (self::$__extensions as $cb) { |
|
|
|
@ -321,12 +321,12 @@ namespace math { |
|
|
|
|
{ |
|
|
|
|
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.Num'); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 num = 1 |
|
|
|
|
// OPTIONAL INT64 num = 1 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 1; |
|
|
|
|
$f->name = "num"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
foreach (self::$__extensions as $cb) { |
|
|
|
@ -390,12 +390,12 @@ namespace math { |
|
|
|
|
{ |
|
|
|
|
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.FibReply'); |
|
|
|
|
|
|
|
|
|
// REQUIRED INT64 count = 1 |
|
|
|
|
// OPTIONAL INT64 count = 1 |
|
|
|
|
$f = new \DrSlump\Protobuf\Field(); |
|
|
|
|
$f->number = 1; |
|
|
|
|
$f->name = "count"; |
|
|
|
|
$f->type = \DrSlump\Protobuf::TYPE_INT64; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
|
|
|
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
|
|
|
|
$descriptor->addField($f); |
|
|
|
|
|
|
|
|
|
foreach (self::$__extensions as $cb) { |
|
|
|
@ -446,34 +446,36 @@ namespace math { |
|
|
|
|
|
|
|
|
|
namespace math { |
|
|
|
|
|
|
|
|
|
class MathClient extends \Grpc\BaseStub { |
|
|
|
|
class MathClient{ |
|
|
|
|
|
|
|
|
|
private $rpc_impl; |
|
|
|
|
|
|
|
|
|
public function __construct($rpc_impl) { |
|
|
|
|
$this->rpc_impl = $rpc_impl; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @param math\DivArgs $input |
|
|
|
|
* @return math\DivReply |
|
|
|
|
*/ |
|
|
|
|
public function Div(\math\DivArgs $argument, $metadata = array()) { |
|
|
|
|
return $this->_simpleRequest('/Math/Div', $argument, '\math\DivReply::deserialize', $metadata); |
|
|
|
|
return $this->rpc_impl->_simpleRequest('/math.Math/Div', $argument, '\math\DivReply::deserialize', $metadata); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @param math\DivArgs $input |
|
|
|
|
* @return math\DivReply |
|
|
|
|
*/ |
|
|
|
|
public function DivMany($metadata = array()) { |
|
|
|
|
return $this->_bidiRequest('/Math/DivMany', '\math\DivReply::deserialize', $metadata); |
|
|
|
|
return $this->rpc_impl->_bidiRequest('/math.Math/DivMany', '\math\DivReply::deserialize', $metadata); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @param math\FibArgs $input |
|
|
|
|
* @return math\Num |
|
|
|
|
*/ |
|
|
|
|
public function Fib($argument, $metadata = array()) { |
|
|
|
|
return $this->_serverStreamRequest('/Math/Fib', $argument, '\math\Num::deserialize', $metadata); |
|
|
|
|
return $this->rpc_impl->_serverStreamRequest('/math.Math/Fib', $argument, '\math\Num::deserialize', $metadata); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @param math\Num $input |
|
|
|
|
* @return math\Num |
|
|
|
|
*/ |
|
|
|
|
public function Sum($arguments, $metadata = array()) { |
|
|
|
|
return $this->_clientStreamRequest('/Math/Sum', $arguments, '\math\Num::deserialize', $metadata); |
|
|
|
|
return $this->rpc_impl->_clientStreamRequest('/math.Math/Sum', $arguments, '\math\Num::deserialize', $metadata); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|