aboutsummaryrefslogtreecommitdiffhomepage
path: root/grpc-common/php/route_guide/route_guide.php
diff options
context:
space:
mode:
Diffstat (limited to 'grpc-common/php/route_guide/route_guide.php')
-rw-r--r--grpc-common/php/route_guide/route_guide.php731
1 files changed, 731 insertions, 0 deletions
diff --git a/grpc-common/php/route_guide/route_guide.php b/grpc-common/php/route_guide/route_guide.php
new file mode 100644
index 0000000000..a836e03b55
--- /dev/null
+++ b/grpc-common/php/route_guide/route_guide.php
@@ -0,0 +1,731 @@
+<?php
+// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
+// Source: route_guide.proto
+// Date: 2015-06-12 00:32:41
+
+namespace examples {
+
+ class Point extends \DrSlump\Protobuf\Message {
+
+ /** @var int */
+ public $latitude = 0;
+
+ /** @var int */
+ public $longitude = 0;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Point');
+
+ // OPTIONAL INT32 latitude = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "latitude";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ // OPTIONAL INT32 longitude = 2
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 2;
+ $f->name = "longitude";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <latitude> has a value
+ *
+ * @return boolean
+ */
+ public function hasLatitude(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <latitude> value
+ *
+ * @return \examples\Point
+ */
+ public function clearLatitude(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <latitude> value
+ *
+ * @return int
+ */
+ public function getLatitude(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <latitude> value
+ *
+ * @param int $value
+ * @return \examples\Point
+ */
+ public function setLatitude( $value){
+ return $this->_set(1, $value);
+ }
+
+ /**
+ * Check if <longitude> has a value
+ *
+ * @return boolean
+ */
+ public function hasLongitude(){
+ return $this->_has(2);
+ }
+
+ /**
+ * Clear <longitude> value
+ *
+ * @return \examples\Point
+ */
+ public function clearLongitude(){
+ return $this->_clear(2);
+ }
+
+ /**
+ * Get <longitude> value
+ *
+ * @return int
+ */
+ public function getLongitude(){
+ return $this->_get(2);
+ }
+
+ /**
+ * Set <longitude> value
+ *
+ * @param int $value
+ * @return \examples\Point
+ */
+ public function setLongitude( $value){
+ return $this->_set(2, $value);
+ }
+ }
+}
+
+namespace examples {
+
+ class Rectangle extends \DrSlump\Protobuf\Message {
+
+ /** @var \examples\Point */
+ public $lo = null;
+
+ /** @var \examples\Point */
+ public $hi = null;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Rectangle');
+
+ // OPTIONAL MESSAGE lo = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "lo";
+ $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->reference = '\examples\Point';
+ $descriptor->addField($f);
+
+ // OPTIONAL MESSAGE hi = 2
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 2;
+ $f->name = "hi";
+ $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->reference = '\examples\Point';
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <lo> has a value
+ *
+ * @return boolean
+ */
+ public function hasLo(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <lo> value
+ *
+ * @return \examples\Rectangle
+ */
+ public function clearLo(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <lo> value
+ *
+ * @return \examples\Point
+ */
+ public function getLo(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <lo> value
+ *
+ * @param \examples\Point $value
+ * @return \examples\Rectangle
+ */
+ public function setLo(\examples\Point $value){
+ return $this->_set(1, $value);
+ }
+
+ /**
+ * Check if <hi> has a value
+ *
+ * @return boolean
+ */
+ public function hasHi(){
+ return $this->_has(2);
+ }
+
+ /**
+ * Clear <hi> value
+ *
+ * @return \examples\Rectangle
+ */
+ public function clearHi(){
+ return $this->_clear(2);
+ }
+
+ /**
+ * Get <hi> value
+ *
+ * @return \examples\Point
+ */
+ public function getHi(){
+ return $this->_get(2);
+ }
+
+ /**
+ * Set <hi> value
+ *
+ * @param \examples\Point $value
+ * @return \examples\Rectangle
+ */
+ public function setHi(\examples\Point $value){
+ return $this->_set(2, $value);
+ }
+ }
+}
+
+namespace examples {
+
+ class Feature extends \DrSlump\Protobuf\Message {
+
+ /** @var string */
+ public $name = null;
+
+ /** @var \examples\Point */
+ public $location = null;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Feature');
+
+ // OPTIONAL STRING name = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "name";
+ $f->type = \DrSlump\Protobuf::TYPE_STRING;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $descriptor->addField($f);
+
+ // OPTIONAL MESSAGE location = 2
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 2;
+ $f->name = "location";
+ $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->reference = '\examples\Point';
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <name> has a value
+ *
+ * @return boolean
+ */
+ public function hasName(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <name> value
+ *
+ * @return \examples\Feature
+ */
+ public function clearName(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <name> value
+ *
+ * @return string
+ */
+ public function getName(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <name> value
+ *
+ * @param string $value
+ * @return \examples\Feature
+ */
+ public function setName( $value){
+ return $this->_set(1, $value);
+ }
+
+ /**
+ * Check if <location> has a value
+ *
+ * @return boolean
+ */
+ public function hasLocation(){
+ return $this->_has(2);
+ }
+
+ /**
+ * Clear <location> value
+ *
+ * @return \examples\Feature
+ */
+ public function clearLocation(){
+ return $this->_clear(2);
+ }
+
+ /**
+ * Get <location> value
+ *
+ * @return \examples\Point
+ */
+ public function getLocation(){
+ return $this->_get(2);
+ }
+
+ /**
+ * Set <location> value
+ *
+ * @param \examples\Point $value
+ * @return \examples\Feature
+ */
+ public function setLocation(\examples\Point $value){
+ return $this->_set(2, $value);
+ }
+ }
+}
+
+namespace examples {
+
+ class RouteNote extends \DrSlump\Protobuf\Message {
+
+ /** @var \examples\Point */
+ public $location = null;
+
+ /** @var string */
+ public $message = null;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteNote');
+
+ // OPTIONAL MESSAGE location = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "location";
+ $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->reference = '\examples\Point';
+ $descriptor->addField($f);
+
+ // OPTIONAL STRING message = 2
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 2;
+ $f->name = "message";
+ $f->type = \DrSlump\Protobuf::TYPE_STRING;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <location> has a value
+ *
+ * @return boolean
+ */
+ public function hasLocation(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <location> value
+ *
+ * @return \examples\RouteNote
+ */
+ public function clearLocation(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <location> value
+ *
+ * @return \examples\Point
+ */
+ public function getLocation(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <location> value
+ *
+ * @param \examples\Point $value
+ * @return \examples\RouteNote
+ */
+ public function setLocation(\examples\Point $value){
+ return $this->_set(1, $value);
+ }
+
+ /**
+ * Check if <message> has a value
+ *
+ * @return boolean
+ */
+ public function hasMessage(){
+ return $this->_has(2);
+ }
+
+ /**
+ * Clear <message> value
+ *
+ * @return \examples\RouteNote
+ */
+ public function clearMessage(){
+ return $this->_clear(2);
+ }
+
+ /**
+ * Get <message> value
+ *
+ * @return string
+ */
+ public function getMessage(){
+ return $this->_get(2);
+ }
+
+ /**
+ * Set <message> value
+ *
+ * @param string $value
+ * @return \examples\RouteNote
+ */
+ public function setMessage( $value){
+ return $this->_set(2, $value);
+ }
+ }
+}
+
+namespace examples {
+
+ class RouteSummary extends \DrSlump\Protobuf\Message {
+
+ /** @var int */
+ public $point_count = 0;
+
+ /** @var int */
+ public $feature_count = 0;
+
+ /** @var int */
+ public $distance = 0;
+
+ /** @var int */
+ public $elapsed_time = 0;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteSummary');
+
+ // OPTIONAL INT32 point_count = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "point_count";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ // OPTIONAL INT32 feature_count = 2
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 2;
+ $f->name = "feature_count";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ // OPTIONAL INT32 distance = 3
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 3;
+ $f->name = "distance";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ // OPTIONAL INT32 elapsed_time = 4
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 4;
+ $f->name = "elapsed_time";
+ $f->type = \DrSlump\Protobuf::TYPE_INT32;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $f->default = 0;
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <point_count> has a value
+ *
+ * @return boolean
+ */
+ public function hasPointCount(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <point_count> value
+ *
+ * @return \examples\RouteSummary
+ */
+ public function clearPointCount(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <point_count> value
+ *
+ * @return int
+ */
+ public function getPointCount(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <point_count> value
+ *
+ * @param int $value
+ * @return \examples\RouteSummary
+ */
+ public function setPointCount( $value){
+ return $this->_set(1, $value);
+ }
+
+ /**
+ * Check if <feature_count> has a value
+ *
+ * @return boolean
+ */
+ public function hasFeatureCount(){
+ return $this->_has(2);
+ }
+
+ /**
+ * Clear <feature_count> value
+ *
+ * @return \examples\RouteSummary
+ */
+ public function clearFeatureCount(){
+ return $this->_clear(2);
+ }
+
+ /**
+ * Get <feature_count> value
+ *
+ * @return int
+ */
+ public function getFeatureCount(){
+ return $this->_get(2);
+ }
+
+ /**
+ * Set <feature_count> value
+ *
+ * @param int $value
+ * @return \examples\RouteSummary
+ */
+ public function setFeatureCount( $value){
+ return $this->_set(2, $value);
+ }
+
+ /**
+ * Check if <distance> has a value
+ *
+ * @return boolean
+ */
+ public function hasDistance(){
+ return $this->_has(3);
+ }
+
+ /**
+ * Clear <distance> value
+ *
+ * @return \examples\RouteSummary
+ */
+ public function clearDistance(){
+ return $this->_clear(3);
+ }
+
+ /**
+ * Get <distance> value
+ *
+ * @return int
+ */
+ public function getDistance(){
+ return $this->_get(3);
+ }
+
+ /**
+ * Set <distance> value
+ *
+ * @param int $value
+ * @return \examples\RouteSummary
+ */
+ public function setDistance( $value){
+ return $this->_set(3, $value);
+ }
+
+ /**
+ * Check if <elapsed_time> has a value
+ *
+ * @return boolean
+ */
+ public function hasElapsedTime(){
+ return $this->_has(4);
+ }
+
+ /**
+ * Clear <elapsed_time> value
+ *
+ * @return \examples\RouteSummary
+ */
+ public function clearElapsedTime(){
+ return $this->_clear(4);
+ }
+
+ /**
+ * Get <elapsed_time> value
+ *
+ * @return int
+ */
+ public function getElapsedTime(){
+ return $this->_get(4);
+ }
+
+ /**
+ * Set <elapsed_time> value
+ *
+ * @param int $value
+ * @return \examples\RouteSummary
+ */
+ public function setElapsedTime( $value){
+ return $this->_set(4, $value);
+ }
+ }
+}
+
+namespace examples {
+
+ class RouteGuideClient{
+
+ private $rpc_impl;
+
+ public function __construct($rpc_impl) {
+ $this->rpc_impl = $rpc_impl;
+ }
+ /**
+ * @param examples\Point $input
+ */
+ public function GetFeature(\examples\Point $argument, $metadata = array()) {
+ return $this->rpc_impl->_simpleRequest('/examples.RouteGuide/GetFeature', $argument, '\examples\Feature::deserialize', $metadata);
+ }
+ /**
+ * @param examples\Rectangle $input
+ */
+ public function ListFeatures($argument, $metadata = array()) {
+ return $this->rpc_impl->_serverStreamRequest('/examples.RouteGuide/ListFeatures', $argument, '\examples\Feature::deserialize', $metadata);
+ }
+ /**
+ * @param examples\Point $input
+ */
+ public function RecordRoute($arguments, $metadata = array()) {
+ return $this->rpc_impl->_clientStreamRequest('/examples.RouteGuide/RecordRoute', $arguments, '\examples\RouteSummary::deserialize', $metadata);
+ }
+ /**
+ * @param examples\RouteNote $input
+ */
+ public function RouteChat($metadata = array()) {
+ return $this->rpc_impl->_bidiRequest('/examples.RouteGuide/RouteChat', '\examples\RouteNote::deserialize', $metadata);
+ }
+ }
+}