aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto')
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto b/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto
index 91b0372a07..16dce26a2b 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto
+++ b/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto
@@ -27,12 +27,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-syntax = "proto2";
+syntax = "proto3";
package grpc.example.routeguide;
-import "google/protobuf/objectivec-descriptor.proto";
-option (google.protobuf.objectivec_file_options).class_prefix = "RGD";
+option objc_class_prefix = "RGD";
// Interface exported by the server.
service RouteGuide {
@@ -47,19 +46,19 @@ service RouteGuide {
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
-// rpc ListFeatures(Rectangle) returns (stream Feature) {}
+ rpc ListFeatures(Rectangle) returns (stream Feature) {}
// A client-to-server streaming RPC.
//
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
-// rpc RecordRoute(stream Point) returns (RouteSummary) {}
+ rpc RecordRoute(stream Point) returns (RouteSummary) {}
// A Bidirectional streaming RPC.
//
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
-// rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
+ rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
}
// Points are represented as latitude-longitude pairs in the E7 representation
@@ -67,18 +66,18 @@ service RouteGuide {
// Latitudes should be in the range +/- 90 degrees and longitude should be in
// the range +/- 180 degrees (inclusive).
message Point {
- optional int32 latitude = 1;
- optional int32 longitude = 2;
+ int32 latitude = 1;
+ int32 longitude = 2;
}
// A latitude-longitude rectangle, represented as two diagonally opposite
// points "lo" and "hi".
message Rectangle {
// One corner of the rectangle.
- optional Point lo = 1;
+ Point lo = 1;
// The other corner of the rectangle.
- optional Point hi = 2;
+ Point hi = 2;
}
// A feature names something at a given point.
@@ -86,19 +85,19 @@ message Rectangle {
// If a feature could not be named, the name is empty.
message Feature {
// The name of the feature.
- optional string name = 1;
+ string name = 1;
// The point where the feature is detected.
- optional Point location = 2;
+ Point location = 2;
}
// A RouteNote is a message sent while at a given point.
message RouteNote {
// The location from which the message is sent.
- optional Point location = 1;
+ Point location = 1;
// The message to be sent.
- optional string message = 2;
+ string message = 2;
}
// A RouteSummary is received in response to a RecordRoute rpc.
@@ -108,14 +107,14 @@ message RouteNote {
// the distance between each point.
message RouteSummary {
// The number of points received.
- optional int32 point_count = 1;
+ int32 point_count = 1;
// The number of known features passed while traversing the route.
- optional int32 feature_count = 2;
+ int32 feature_count = 2;
// The distance covered in metres.
- optional int32 distance = 3;
+ int32 distance = 3;
// The duration of the traversal in seconds.
- optional int32 elapsed_time = 4;
-} \ No newline at end of file
+ int32 elapsed_time = 4;
+}