aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-05-16 11:22:53 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-05-17 16:21:20 -0700
commit2410f9916114b7ce6b78c7fb195e9c811b8b1454 (patch)
tree522fda49192a677bb7c95c1edff4730009ba3505 /src/objective-c
parent44fb295d9f7e39bf0b4874666fec940d5f38ec9a (diff)
Regenerates RouteGuide library as proto3
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h134
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m355
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h43
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m72
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h387
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m1435
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec19
-rw-r--r--src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto37
8 files changed, 635 insertions, 1847 deletions
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h
new file mode 100644
index 0000000000..6efaec7f02
--- /dev/null
+++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h
@@ -0,0 +1,134 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: route_guide.proto
+
+#import "GPBProtocolBuffers.h"
+
+#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000
+#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources.
+#endif
+
+CF_EXTERN_C_BEGIN
+
+@class RGDFeature;
+@class RGDPoint;
+@class RGDRectangle;
+@class RGDRouteNote;
+@class RGDRouteSummary;
+
+
+#pragma mark - RGDRouteGuideRoot
+
+@interface RGDRouteGuideRoot : GPBRootObject
+@end
+
+#pragma mark - RGDPoint
+
+typedef GPB_ENUM(RGDPoint_FieldNumber) {
+ RGDPoint_FieldNumber_Latitude = 1,
+ RGDPoint_FieldNumber_Longitude = 2,
+};
+
+// Points are represented as latitude-longitude pairs in the E7 representation
+// (degrees multiplied by 10**7 and rounded to the nearest integer).
+// Latitudes should be in the range +/- 90 degrees and longitude should be in
+// the range +/- 180 degrees (inclusive).
+@interface RGDPoint : GPBMessage
+
+@property(nonatomic, readwrite) int32_t latitude;
+
+@property(nonatomic, readwrite) int32_t longitude;
+
+@end
+
+#pragma mark - RGDRectangle
+
+typedef GPB_ENUM(RGDRectangle_FieldNumber) {
+ RGDRectangle_FieldNumber_Lo = 1,
+ RGDRectangle_FieldNumber_Hi = 2,
+};
+
+// A latitude-longitude rectangle, represented as two diagonally opposite
+// points "lo" and "hi".
+@interface RGDRectangle : GPBMessage
+
+// One corner of the rectangle.
+@property(nonatomic, readwrite) BOOL hasLo;
+@property(nonatomic, readwrite, strong) RGDPoint *lo;
+
+// The other corner of the rectangle.
+@property(nonatomic, readwrite) BOOL hasHi;
+@property(nonatomic, readwrite, strong) RGDPoint *hi;
+
+@end
+
+#pragma mark - RGDFeature
+
+typedef GPB_ENUM(RGDFeature_FieldNumber) {
+ RGDFeature_FieldNumber_Name = 1,
+ RGDFeature_FieldNumber_Location = 2,
+};
+
+// A feature names something at a given point.
+//
+// If a feature could not be named, the name is empty.
+@interface RGDFeature : GPBMessage
+
+// The name of the feature.
+@property(nonatomic, readwrite, copy) NSString *name;
+
+// The point where the feature is detected.
+@property(nonatomic, readwrite) BOOL hasLocation;
+@property(nonatomic, readwrite, strong) RGDPoint *location;
+
+@end
+
+#pragma mark - RGDRouteNote
+
+typedef GPB_ENUM(RGDRouteNote_FieldNumber) {
+ RGDRouteNote_FieldNumber_Location = 1,
+ RGDRouteNote_FieldNumber_Message = 2,
+};
+
+// A RouteNote is a message sent while at a given point.
+@interface RGDRouteNote : GPBMessage
+
+// The location from which the message is sent.
+@property(nonatomic, readwrite) BOOL hasLocation;
+@property(nonatomic, readwrite, strong) RGDPoint *location;
+
+// The message to be sent.
+@property(nonatomic, readwrite, copy) NSString *message;
+
+@end
+
+#pragma mark - RGDRouteSummary
+
+typedef GPB_ENUM(RGDRouteSummary_FieldNumber) {
+ RGDRouteSummary_FieldNumber_PointCount = 1,
+ RGDRouteSummary_FieldNumber_FeatureCount = 2,
+ RGDRouteSummary_FieldNumber_Distance = 3,
+ RGDRouteSummary_FieldNumber_ElapsedTime = 4,
+};
+
+// A RouteSummary is received in response to a RecordRoute rpc.
+//
+// It contains the number of individual points received, the number of
+// detected features, and the total distance covered as the cumulative sum of
+// the distance between each point.
+@interface RGDRouteSummary : GPBMessage
+
+// The number of points received.
+@property(nonatomic, readwrite) int32_t pointCount;
+
+// The number of known features passed while traversing the route.
+@property(nonatomic, readwrite) int32_t featureCount;
+
+// The distance covered in metres.
+@property(nonatomic, readwrite) int32_t distance;
+
+// The duration of the traversal in seconds.
+@property(nonatomic, readwrite) int32_t elapsedTime;
+
+@end
+
+CF_EXTERN_C_END
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m
new file mode 100644
index 0000000000..16f291a61c
--- /dev/null
+++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m
@@ -0,0 +1,355 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: route_guide.proto
+
+#import "GPBProtocolBuffers_RuntimeSupport.h"
+
+#import "RouteGuide.pbobjc.h"
+
+#pragma mark - RGDRouteGuideRoot
+
+@implementation RGDRouteGuideRoot
+
+@end
+
+static GPBFileDescriptor *RGDRouteGuideRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"grpc.example.routeguide"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - RGDPoint
+
+@implementation RGDPoint
+
+@dynamic latitude;
+@dynamic longitude;
+
+typedef struct RGDPoint_Storage {
+ uint32_t _has_storage_[1];
+ int32_t latitude;
+ int32_t longitude;
+} RGDPoint_Storage;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "latitude",
+ .number = RGDPoint_FieldNumber_Latitude,
+ .hasIndex = 0,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDPoint_Storage, latitude),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "longitude",
+ .number = RGDPoint_FieldNumber_Longitude,
+ .hasIndex = 1,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDPoint_Storage, longitude),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ };
+ descriptor = [GPBDescriptor allocDescriptorForClass:[RGDPoint class]
+ rootClass:[RGDRouteGuideRoot class]
+ file:RGDRouteGuideRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(RGDPoint_Storage)
+ wireFormat:NO];
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - RGDRectangle
+
+@implementation RGDRectangle
+
+@dynamic hasLo, lo;
+@dynamic hasHi, hi;
+
+typedef struct RGDRectangle_Storage {
+ uint32_t _has_storage_[1];
+ RGDPoint *lo;
+ RGDPoint *hi;
+} RGDRectangle_Storage;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "lo",
+ .number = RGDRectangle_FieldNumber_Lo,
+ .hasIndex = 0,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeMessage,
+ .offset = offsetof(RGDRectangle_Storage, lo),
+ .defaultValue.valueMessage = nil,
+ .typeSpecific.className = GPBStringifySymbol(RGDPoint),
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "hi",
+ .number = RGDRectangle_FieldNumber_Hi,
+ .hasIndex = 1,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeMessage,
+ .offset = offsetof(RGDRectangle_Storage, hi),
+ .defaultValue.valueMessage = nil,
+ .typeSpecific.className = GPBStringifySymbol(RGDPoint),
+ .fieldOptions = NULL,
+ },
+ };
+ descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRectangle class]
+ rootClass:[RGDRouteGuideRoot class]
+ file:RGDRouteGuideRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(RGDRectangle_Storage)
+ wireFormat:NO];
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - RGDFeature
+
+@implementation RGDFeature
+
+@dynamic name;
+@dynamic hasLocation, location;
+
+typedef struct RGDFeature_Storage {
+ uint32_t _has_storage_[1];
+ NSString *name;
+ RGDPoint *location;
+} RGDFeature_Storage;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "name",
+ .number = RGDFeature_FieldNumber_Name,
+ .hasIndex = 0,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeString,
+ .offset = offsetof(RGDFeature_Storage, name),
+ .defaultValue.valueString = nil,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "location",
+ .number = RGDFeature_FieldNumber_Location,
+ .hasIndex = 1,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeMessage,
+ .offset = offsetof(RGDFeature_Storage, location),
+ .defaultValue.valueMessage = nil,
+ .typeSpecific.className = GPBStringifySymbol(RGDPoint),
+ .fieldOptions = NULL,
+ },
+ };
+ descriptor = [GPBDescriptor allocDescriptorForClass:[RGDFeature class]
+ rootClass:[RGDRouteGuideRoot class]
+ file:RGDRouteGuideRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(RGDFeature_Storage)
+ wireFormat:NO];
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - RGDRouteNote
+
+@implementation RGDRouteNote
+
+@dynamic hasLocation, location;
+@dynamic message;
+
+typedef struct RGDRouteNote_Storage {
+ uint32_t _has_storage_[1];
+ RGDPoint *location;
+ NSString *message;
+} RGDRouteNote_Storage;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "location",
+ .number = RGDRouteNote_FieldNumber_Location,
+ .hasIndex = 0,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeMessage,
+ .offset = offsetof(RGDRouteNote_Storage, location),
+ .defaultValue.valueMessage = nil,
+ .typeSpecific.className = GPBStringifySymbol(RGDPoint),
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "message",
+ .number = RGDRouteNote_FieldNumber_Message,
+ .hasIndex = 1,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeString,
+ .offset = offsetof(RGDRouteNote_Storage, message),
+ .defaultValue.valueString = nil,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ };
+ descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteNote class]
+ rootClass:[RGDRouteGuideRoot class]
+ file:RGDRouteGuideRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(RGDRouteNote_Storage)
+ wireFormat:NO];
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - RGDRouteSummary
+
+@implementation RGDRouteSummary
+
+@dynamic pointCount;
+@dynamic featureCount;
+@dynamic distance;
+@dynamic elapsedTime;
+
+typedef struct RGDRouteSummary_Storage {
+ uint32_t _has_storage_[1];
+ int32_t pointCount;
+ int32_t featureCount;
+ int32_t distance;
+ int32_t elapsedTime;
+} RGDRouteSummary_Storage;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "pointCount",
+ .number = RGDRouteSummary_FieldNumber_PointCount,
+ .hasIndex = 0,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDRouteSummary_Storage, pointCount),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "featureCount",
+ .number = RGDRouteSummary_FieldNumber_FeatureCount,
+ .hasIndex = 1,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDRouteSummary_Storage, featureCount),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "distance",
+ .number = RGDRouteSummary_FieldNumber_Distance,
+ .hasIndex = 2,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDRouteSummary_Storage, distance),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ {
+ .name = "elapsedTime",
+ .number = RGDRouteSummary_FieldNumber_ElapsedTime,
+ .hasIndex = 3,
+ .flags = GPBFieldOptional,
+ .type = GPBTypeInt32,
+ .offset = offsetof(RGDRouteSummary_Storage, elapsedTime),
+ .defaultValue.valueInt32 = 0,
+ .typeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
+ };
+ descriptor = [GPBDescriptor allocDescriptorForClass:[RGDRouteSummary class]
+ rootClass:[RGDRouteGuideRoot class]
+ file:RGDRouteGuideRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(RGDRouteSummary_Storage)
+ wireFormat:NO];
+ }
+ return descriptor;
+}
+
+@end
+
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h
new file mode 100644
index 0000000000..9e60865d98
--- /dev/null
+++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h
@@ -0,0 +1,43 @@
+#import "RouteGuide.pbobjc.h"
+#import <gRPC/ProtoService.h>
+
+
+@protocol GRXWriteable;
+@protocol GRXWriter;
+
+@protocol RGDRouteGuide <NSObject>
+
+#pragma mark GetFeature(Point) returns (Feature)
+
+- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler;
+
+- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler;
+
+
+#pragma mark ListFeatures(Rectangle) returns (stream Feature)
+
+- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler;
+
+- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler;
+
+
+#pragma mark RecordRoute(stream Point) returns (RouteSummary)
+
+- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler;
+
+- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler;
+
+
+#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote)
+
+- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler;
+
+- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler;
+
+
+@end
+
+// Basic service implementation, over gRPC, that only does marshalling and parsing.
+@interface RGDRouteGuide : ProtoService<RGDRouteGuide>
+- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER;
+@end
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m
new file mode 100644
index 0000000000..2ca3dc6768
--- /dev/null
+++ b/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m
@@ -0,0 +1,72 @@
+#import "RouteGuide.pbrpc.h"
+#import <gRPC/GRXWriteable.h>
+#import <gRPC/GRXWriter+Immediate.h>
+#import <gRPC/ProtoRPC.h>
+
+static NSString *const kPackageName = @"grpc.example.routeguide";
+static NSString *const kServiceName = @"RouteGuide";
+
+@implementation RGDRouteGuide
+
+// Designated initializer
+- (instancetype)initWithHost:(NSString *)host {
+ return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]);
+}
+
+// Override superclass initializer to disallow different package and service names.
+- (instancetype)initWithHost:(NSString *)host
+ packageName:(NSString *)packageName
+ serviceName:(NSString *)serviceName {
+ return [self initWithHost:host];
+}
+
+
+#pragma mark GetFeature(Point) returns (Feature)
+
+- (void)getFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{
+ [[self RPCToGetFeatureWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+- (ProtoRPC *)RPCToGetFeatureWithRequest:(RGDPoint *)request handler:(void(^)(RGDFeature *response, NSError *error))handler{
+ return [self RPCToMethod:@"GetFeature"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[RGDFeature class]
+ responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]];
+}
+#pragma mark ListFeatures(Rectangle) returns (stream Feature)
+
+- (void)listFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{
+ [[self RPCToListFeaturesWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+- (ProtoRPC *)RPCToListFeaturesWithRequest:(RGDRectangle *)request handler:(void(^)(BOOL done, RGDFeature *response, NSError *error))handler{
+ return [self RPCToMethod:@"ListFeatures"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[RGDFeature class]
+ responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]];
+}
+#pragma mark RecordRoute(stream Point) returns (RouteSummary)
+
+- (void)recordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{
+ [[self RPCToRecordRouteWithRequestsWriter:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+- (ProtoRPC *)RPCToRecordRouteWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(RGDRouteSummary *response, NSError *error))handler{
+ return [self RPCToMethod:@"RecordRoute"
+ requestsWriter:request
+ responseClass:[RGDRouteSummary class]
+ responsesWriteable:[GRXWriteable writeableWithSingleValueHandler:handler]];
+}
+#pragma mark RouteChat(stream RouteNote) returns (stream RouteNote)
+
+- (void)routeChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{
+ [[self RPCToRouteChatWithRequestsWriter:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+- (ProtoRPC *)RPCToRouteChatWithRequestsWriter:(id<GRXWriter>)request handler:(void(^)(BOOL done, RGDRouteNote *response, NSError *error))handler{
+ return [self RPCToMethod:@"RouteChat"
+ requestsWriter:request
+ responseClass:[RGDRouteNote class]
+ responsesWriteable:[GRXWriteable writeableWithStreamHandler:handler]];
+}
+@end
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h
deleted file mode 100644
index 194bfc5f2a..0000000000
--- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.h
+++ /dev/null
@@ -1,387 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-
-#import <ProtocolBuffers/ProtocolBuffers.h>
-
-// @@protoc_insertion_point(imports)
-
-@class ObjectiveCFileOptions;
-@class ObjectiveCFileOptionsBuilder;
-@class PBDescriptorProto;
-@class PBDescriptorProtoBuilder;
-@class PBDescriptorProtoExtensionRange;
-@class PBDescriptorProtoExtensionRangeBuilder;
-@class PBEnumDescriptorProto;
-@class PBEnumDescriptorProtoBuilder;
-@class PBEnumOptions;
-@class PBEnumOptionsBuilder;
-@class PBEnumValueDescriptorProto;
-@class PBEnumValueDescriptorProtoBuilder;
-@class PBEnumValueOptions;
-@class PBEnumValueOptionsBuilder;
-@class PBFieldDescriptorProto;
-@class PBFieldDescriptorProtoBuilder;
-@class PBFieldOptions;
-@class PBFieldOptionsBuilder;
-@class PBFileDescriptorProto;
-@class PBFileDescriptorProtoBuilder;
-@class PBFileDescriptorSet;
-@class PBFileDescriptorSetBuilder;
-@class PBFileOptions;
-@class PBFileOptionsBuilder;
-@class PBMessageOptions;
-@class PBMessageOptionsBuilder;
-@class PBMethodDescriptorProto;
-@class PBMethodDescriptorProtoBuilder;
-@class PBMethodOptions;
-@class PBMethodOptionsBuilder;
-@class PBOneofDescriptorProto;
-@class PBOneofDescriptorProtoBuilder;
-@class PBServiceDescriptorProto;
-@class PBServiceDescriptorProtoBuilder;
-@class PBServiceOptions;
-@class PBServiceOptionsBuilder;
-@class PBSourceCodeInfo;
-@class PBSourceCodeInfoBuilder;
-@class PBSourceCodeInfoLocation;
-@class PBSourceCodeInfoLocationBuilder;
-@class PBUninterpretedOption;
-@class PBUninterpretedOptionBuilder;
-@class PBUninterpretedOptionNamePart;
-@class PBUninterpretedOptionNamePartBuilder;
-@class RGDFeature;
-@class RGDFeatureBuilder;
-@class RGDPoint;
-@class RGDPointBuilder;
-@class RGDRectangle;
-@class RGDRectangleBuilder;
-@class RGDRouteNote;
-@class RGDRouteNoteBuilder;
-@class RGDRouteSummary;
-@class RGDRouteSummaryBuilder;
-
-
-
-@interface RGDRouteGuideRoot : NSObject {
-}
-+ (PBExtensionRegistry*) extensionRegistry;
-+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry;
-@end
-
-@interface RGDPoint : PBGeneratedMessage<GeneratedMessageProtocol> {
-@private
- BOOL hasLatitude_:1;
- BOOL hasLongitude_:1;
- SInt32 latitude;
- SInt32 longitude;
-}
-- (BOOL) hasLatitude;
-- (BOOL) hasLongitude;
-@property (readonly) SInt32 latitude;
-@property (readonly) SInt32 longitude;
-
-+ (instancetype) defaultInstance;
-- (instancetype) defaultInstance;
-
-- (BOOL) isInitialized;
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
-- (RGDPointBuilder*) builder;
-+ (RGDPointBuilder*) builder;
-+ (RGDPointBuilder*) builderWithPrototype:(RGDPoint*) prototype;
-- (RGDPointBuilder*) toBuilder;
-
-+ (RGDPoint*) parseFromData:(NSData*) data;
-+ (RGDPoint*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input;
-+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input;
-+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-@end
-
-@interface RGDPointBuilder : PBGeneratedMessageBuilder {
-@private
- RGDPoint* resultPoint;
-}
-
-- (RGDPoint*) defaultInstance;
-
-- (RGDPointBuilder*) clear;
-- (RGDPointBuilder*) clone;
-
-- (RGDPoint*) build;
-- (RGDPoint*) buildPartial;
-
-- (RGDPointBuilder*) mergeFrom:(RGDPoint*) other;
-- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
-- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-
-- (BOOL) hasLatitude;
-- (SInt32) latitude;
-- (RGDPointBuilder*) setLatitude:(SInt32) value;
-- (RGDPointBuilder*) clearLatitude;
-
-- (BOOL) hasLongitude;
-- (SInt32) longitude;
-- (RGDPointBuilder*) setLongitude:(SInt32) value;
-- (RGDPointBuilder*) clearLongitude;
-@end
-
-@interface RGDRectangle : PBGeneratedMessage<GeneratedMessageProtocol> {
-@private
- BOOL hasLo_:1;
- BOOL hasHi_:1;
- RGDPoint* lo;
- RGDPoint* hi;
-}
-- (BOOL) hasLo;
-- (BOOL) hasHi;
-@property (readonly, strong) RGDPoint* lo;
-@property (readonly, strong) RGDPoint* hi;
-
-+ (instancetype) defaultInstance;
-- (instancetype) defaultInstance;
-
-- (BOOL) isInitialized;
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
-- (RGDRectangleBuilder*) builder;
-+ (RGDRectangleBuilder*) builder;
-+ (RGDRectangleBuilder*) builderWithPrototype:(RGDRectangle*) prototype;
-- (RGDRectangleBuilder*) toBuilder;
-
-+ (RGDRectangle*) parseFromData:(NSData*) data;
-+ (RGDRectangle*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input;
-+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input;
-+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-@end
-
-@interface RGDRectangleBuilder : PBGeneratedMessageBuilder {
-@private
- RGDRectangle* resultRectangle;
-}
-
-- (RGDRectangle*) defaultInstance;
-
-- (RGDRectangleBuilder*) clear;
-- (RGDRectangleBuilder*) clone;
-
-- (RGDRectangle*) build;
-- (RGDRectangle*) buildPartial;
-
-- (RGDRectangleBuilder*) mergeFrom:(RGDRectangle*) other;
-- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
-- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-
-- (BOOL) hasLo;
-- (RGDPoint*) lo;
-- (RGDRectangleBuilder*) setLo:(RGDPoint*) value;
-- (RGDRectangleBuilder*) setLoBuilder:(RGDPointBuilder*) builderForValue;
-- (RGDRectangleBuilder*) mergeLo:(RGDPoint*) value;
-- (RGDRectangleBuilder*) clearLo;
-
-- (BOOL) hasHi;
-- (RGDPoint*) hi;
-- (RGDRectangleBuilder*) setHi:(RGDPoint*) value;
-- (RGDRectangleBuilder*) setHiBuilder:(RGDPointBuilder*) builderForValue;
-- (RGDRectangleBuilder*) mergeHi:(RGDPoint*) value;
-- (RGDRectangleBuilder*) clearHi;
-@end
-
-@interface RGDFeature : PBGeneratedMessage<GeneratedMessageProtocol> {
-@private
- BOOL hasName_:1;
- BOOL hasLocation_:1;
- NSString* name;
- RGDPoint* location;
-}
-- (BOOL) hasName;
-- (BOOL) hasLocation;
-@property (readonly, strong) NSString* name;
-@property (readonly, strong) RGDPoint* location;
-
-+ (instancetype) defaultInstance;
-- (instancetype) defaultInstance;
-
-- (BOOL) isInitialized;
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
-- (RGDFeatureBuilder*) builder;
-+ (RGDFeatureBuilder*) builder;
-+ (RGDFeatureBuilder*) builderWithPrototype:(RGDFeature*) prototype;
-- (RGDFeatureBuilder*) toBuilder;
-
-+ (RGDFeature*) parseFromData:(NSData*) data;
-+ (RGDFeature*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input;
-+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input;
-+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-@end
-
-@interface RGDFeatureBuilder : PBGeneratedMessageBuilder {
-@private
- RGDFeature* resultFeature;
-}
-
-- (RGDFeature*) defaultInstance;
-
-- (RGDFeatureBuilder*) clear;
-- (RGDFeatureBuilder*) clone;
-
-- (RGDFeature*) build;
-- (RGDFeature*) buildPartial;
-
-- (RGDFeatureBuilder*) mergeFrom:(RGDFeature*) other;
-- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
-- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-
-- (BOOL) hasName;
-- (NSString*) name;
-- (RGDFeatureBuilder*) setName:(NSString*) value;
-- (RGDFeatureBuilder*) clearName;
-
-- (BOOL) hasLocation;
-- (RGDPoint*) location;
-- (RGDFeatureBuilder*) setLocation:(RGDPoint*) value;
-- (RGDFeatureBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue;
-- (RGDFeatureBuilder*) mergeLocation:(RGDPoint*) value;
-- (RGDFeatureBuilder*) clearLocation;
-@end
-
-@interface RGDRouteNote : PBGeneratedMessage<GeneratedMessageProtocol> {
-@private
- BOOL hasMessage_:1;
- BOOL hasLocation_:1;
- NSString* message;
- RGDPoint* location;
-}
-- (BOOL) hasLocation;
-- (BOOL) hasMessage;
-@property (readonly, strong) RGDPoint* location;
-@property (readonly, strong) NSString* message;
-
-+ (instancetype) defaultInstance;
-- (instancetype) defaultInstance;
-
-- (BOOL) isInitialized;
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
-- (RGDRouteNoteBuilder*) builder;
-+ (RGDRouteNoteBuilder*) builder;
-+ (RGDRouteNoteBuilder*) builderWithPrototype:(RGDRouteNote*) prototype;
-- (RGDRouteNoteBuilder*) toBuilder;
-
-+ (RGDRouteNote*) parseFromData:(NSData*) data;
-+ (RGDRouteNote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input;
-+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input;
-+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-@end
-
-@interface RGDRouteNoteBuilder : PBGeneratedMessageBuilder {
-@private
- RGDRouteNote* resultRouteNote;
-}
-
-- (RGDRouteNote*) defaultInstance;
-
-- (RGDRouteNoteBuilder*) clear;
-- (RGDRouteNoteBuilder*) clone;
-
-- (RGDRouteNote*) build;
-- (RGDRouteNote*) buildPartial;
-
-- (RGDRouteNoteBuilder*) mergeFrom:(RGDRouteNote*) other;
-- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
-- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-
-- (BOOL) hasLocation;
-- (RGDPoint*) location;
-- (RGDRouteNoteBuilder*) setLocation:(RGDPoint*) value;
-- (RGDRouteNoteBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue;
-- (RGDRouteNoteBuilder*) mergeLocation:(RGDPoint*) value;
-- (RGDRouteNoteBuilder*) clearLocation;
-
-- (BOOL) hasMessage;
-- (NSString*) message;
-- (RGDRouteNoteBuilder*) setMessage:(NSString*) value;
-- (RGDRouteNoteBuilder*) clearMessage;
-@end
-
-@interface RGDRouteSummary : PBGeneratedMessage<GeneratedMessageProtocol> {
-@private
- BOOL hasPointCount_:1;
- BOOL hasFeatureCount_:1;
- BOOL hasDistance_:1;
- BOOL hasElapsedTime_:1;
- SInt32 pointCount;
- SInt32 featureCount;
- SInt32 distance;
- SInt32 elapsedTime;
-}
-- (BOOL) hasPointCount;
-- (BOOL) hasFeatureCount;
-- (BOOL) hasDistance;
-- (BOOL) hasElapsedTime;
-@property (readonly) SInt32 pointCount;
-@property (readonly) SInt32 featureCount;
-@property (readonly) SInt32 distance;
-@property (readonly) SInt32 elapsedTime;
-
-+ (instancetype) defaultInstance;
-- (instancetype) defaultInstance;
-
-- (BOOL) isInitialized;
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
-- (RGDRouteSummaryBuilder*) builder;
-+ (RGDRouteSummaryBuilder*) builder;
-+ (RGDRouteSummaryBuilder*) builderWithPrototype:(RGDRouteSummary*) prototype;
-- (RGDRouteSummaryBuilder*) toBuilder;
-
-+ (RGDRouteSummary*) parseFromData:(NSData*) data;
-+ (RGDRouteSummary*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input;
-+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input;
-+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-@end
-
-@interface RGDRouteSummaryBuilder : PBGeneratedMessageBuilder {
-@private
- RGDRouteSummary* resultRouteSummary;
-}
-
-- (RGDRouteSummary*) defaultInstance;
-
-- (RGDRouteSummaryBuilder*) clear;
-- (RGDRouteSummaryBuilder*) clone;
-
-- (RGDRouteSummary*) build;
-- (RGDRouteSummary*) buildPartial;
-
-- (RGDRouteSummaryBuilder*) mergeFrom:(RGDRouteSummary*) other;
-- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
-- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
-
-- (BOOL) hasPointCount;
-- (SInt32) pointCount;
-- (RGDRouteSummaryBuilder*) setPointCount:(SInt32) value;
-- (RGDRouteSummaryBuilder*) clearPointCount;
-
-- (BOOL) hasFeatureCount;
-- (SInt32) featureCount;
-- (RGDRouteSummaryBuilder*) setFeatureCount:(SInt32) value;
-- (RGDRouteSummaryBuilder*) clearFeatureCount;
-
-- (BOOL) hasDistance;
-- (SInt32) distance;
-- (RGDRouteSummaryBuilder*) setDistance:(SInt32) value;
-- (RGDRouteSummaryBuilder*) clearDistance;
-
-- (BOOL) hasElapsedTime;
-- (SInt32) elapsedTime;
-- (RGDRouteSummaryBuilder*) setElapsedTime:(SInt32) value;
-- (RGDRouteSummaryBuilder*) clearElapsedTime;
-@end
-
-
-// @@protoc_insertion_point(global_scope)
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m
deleted file mode 100644
index 63cdd00206..0000000000
--- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.pb.m
+++ /dev/null
@@ -1,1435 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-
-#import "Route_guide.pb.h"
-// @@protoc_insertion_point(imports)
-
-@implementation RGDRouteGuideRoot
-static PBExtensionRegistry* extensionRegistry = nil;
-+ (PBExtensionRegistry*) extensionRegistry {
- return extensionRegistry;
-}
-
-+ (void) initialize {
- if (self == [RGDRouteGuideRoot class]) {
- PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry];
- [self registerAllExtensions:registry];
- [ObjectivecDescriptorRoot registerAllExtensions:registry];
- extensionRegistry = registry;
- }
-}
-+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry {
-}
-@end
-
-@interface RGDPoint ()
-@property SInt32 latitude;
-@property SInt32 longitude;
-@end
-
-@implementation RGDPoint
-
-- (BOOL) hasLatitude {
- return !!hasLatitude_;
-}
-- (void) setHasLatitude:(BOOL) _value_ {
- hasLatitude_ = !!_value_;
-}
-@synthesize latitude;
-- (BOOL) hasLongitude {
- return !!hasLongitude_;
-}
-- (void) setHasLongitude:(BOOL) _value_ {
- hasLongitude_ = !!_value_;
-}
-@synthesize longitude;
-- (instancetype) init {
- if ((self = [super init])) {
- self.latitude = 0;
- self.longitude = 0;
- }
- return self;
-}
-static RGDPoint* defaultRGDPointInstance = nil;
-+ (void) initialize {
- if (self == [RGDPoint class]) {
- defaultRGDPointInstance = [[RGDPoint alloc] init];
- }
-}
-+ (instancetype) defaultInstance {
- return defaultRGDPointInstance;
-}
-- (instancetype) defaultInstance {
- return defaultRGDPointInstance;
-}
-- (BOOL) isInitialized {
- return YES;
-}
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
- if (self.hasLatitude) {
- [output writeInt32:1 value:self.latitude];
- }
- if (self.hasLongitude) {
- [output writeInt32:2 value:self.longitude];
- }
- [self.unknownFields writeToCodedOutputStream:output];
-}
-- (SInt32) serializedSize {
- __block SInt32 size_ = memoizedSerializedSize;
- if (size_ != -1) {
- return size_;
- }
-
- size_ = 0;
- if (self.hasLatitude) {
- size_ += computeInt32Size(1, self.latitude);
- }
- if (self.hasLongitude) {
- size_ += computeInt32Size(2, self.longitude);
- }
- size_ += self.unknownFields.serializedSize;
- memoizedSerializedSize = size_;
- return size_;
-}
-+ (RGDPoint*) parseFromData:(NSData*) data {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromData:data] build];
-}
-+ (RGDPoint*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
-}
-+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromInputStream:input] build];
-}
-+ (RGDPoint*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromCodedInputStream:input] build];
-}
-+ (RGDPoint*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDPoint*)[[[RGDPoint builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDPointBuilder*) builder {
- return [[RGDPointBuilder alloc] init];
-}
-+ (RGDPointBuilder*) builderWithPrototype:(RGDPoint*) prototype {
- return [[RGDPoint builder] mergeFrom:prototype];
-}
-- (RGDPointBuilder*) builder {
- return [RGDPoint builder];
-}
-- (RGDPointBuilder*) toBuilder {
- return [RGDPoint builderWithPrototype:self];
-}
-- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
- if (self.hasLatitude) {
- [output appendFormat:@"%@%@: %@\n", indent, @"latitude", [NSNumber numberWithInteger:self.latitude]];
- }
- if (self.hasLongitude) {
- [output appendFormat:@"%@%@: %@\n", indent, @"longitude", [NSNumber numberWithInteger:self.longitude]];
- }
- [self.unknownFields writeDescriptionTo:output withIndent:indent];
-}
-- (BOOL) isEqual:(id)other {
- if (other == self) {
- return YES;
- }
- if (![other isKindOfClass:[RGDPoint class]]) {
- return NO;
- }
- RGDPoint *otherMessage = other;
- return
- self.hasLatitude == otherMessage.hasLatitude &&
- (!self.hasLatitude || self.latitude == otherMessage.latitude) &&
- self.hasLongitude == otherMessage.hasLongitude &&
- (!self.hasLongitude || self.longitude == otherMessage.longitude) &&
- (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
-}
-- (NSUInteger) hash {
- __block NSUInteger hashCode = 7;
- if (self.hasLatitude) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.latitude] hash];
- }
- if (self.hasLongitude) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.longitude] hash];
- }
- hashCode = hashCode * 31 + [self.unknownFields hash];
- return hashCode;
-}
-@end
-
-@interface RGDPointBuilder()
-@property (strong) RGDPoint* resultPoint;
-@end
-
-@implementation RGDPointBuilder
-@synthesize resultPoint;
-- (instancetype) init {
- if ((self = [super init])) {
- self.resultPoint = [[RGDPoint alloc] init];
- }
- return self;
-}
-- (PBGeneratedMessage*) internalGetResult {
- return resultPoint;
-}
-- (RGDPointBuilder*) clear {
- self.resultPoint = [[RGDPoint alloc] init];
- return self;
-}
-- (RGDPointBuilder*) clone {
- return [RGDPoint builderWithPrototype:resultPoint];
-}
-- (RGDPoint*) defaultInstance {
- return [RGDPoint defaultInstance];
-}
-- (RGDPoint*) build {
- [self checkInitialized];
- return [self buildPartial];
-}
-- (RGDPoint*) buildPartial {
- RGDPoint* returnMe = resultPoint;
- self.resultPoint = nil;
- return returnMe;
-}
-- (RGDPointBuilder*) mergeFrom:(RGDPoint*) other {
- if (other == [RGDPoint defaultInstance]) {
- return self;
- }
- if (other.hasLatitude) {
- [self setLatitude:other.latitude];
- }
- if (other.hasLongitude) {
- [self setLongitude:other.longitude];
- }
- [self mergeUnknownFields:other.unknownFields];
- return self;
-}
-- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
- return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
-}
-- (RGDPointBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
- while (YES) {
- SInt32 tag = [input readTag];
- switch (tag) {
- case 0:
- [self setUnknownFields:[unknownFields build]];
- return self;
- default: {
- if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
- [self setUnknownFields:[unknownFields build]];
- return self;
- }
- break;
- }
- case 8: {
- [self setLatitude:[input readInt32]];
- break;
- }
- case 16: {
- [self setLongitude:[input readInt32]];
- break;
- }
- }
- }
-}
-- (BOOL) hasLatitude {
- return resultPoint.hasLatitude;
-}
-- (SInt32) latitude {
- return resultPoint.latitude;
-}
-- (RGDPointBuilder*) setLatitude:(SInt32) value {
- resultPoint.hasLatitude = YES;
- resultPoint.latitude = value;
- return self;
-}
-- (RGDPointBuilder*) clearLatitude {
- resultPoint.hasLatitude = NO;
- resultPoint.latitude = 0;
- return self;
-}
-- (BOOL) hasLongitude {
- return resultPoint.hasLongitude;
-}
-- (SInt32) longitude {
- return resultPoint.longitude;
-}
-- (RGDPointBuilder*) setLongitude:(SInt32) value {
- resultPoint.hasLongitude = YES;
- resultPoint.longitude = value;
- return self;
-}
-- (RGDPointBuilder*) clearLongitude {
- resultPoint.hasLongitude = NO;
- resultPoint.longitude = 0;
- return self;
-}
-@end
-
-@interface RGDRectangle ()
-@property (strong) RGDPoint* lo;
-@property (strong) RGDPoint* hi;
-@end
-
-@implementation RGDRectangle
-
-- (BOOL) hasLo {
- return !!hasLo_;
-}
-- (void) setHasLo:(BOOL) _value_ {
- hasLo_ = !!_value_;
-}
-@synthesize lo;
-- (BOOL) hasHi {
- return !!hasHi_;
-}
-- (void) setHasHi:(BOOL) _value_ {
- hasHi_ = !!_value_;
-}
-@synthesize hi;
-- (instancetype) init {
- if ((self = [super init])) {
- self.lo = [RGDPoint defaultInstance];
- self.hi = [RGDPoint defaultInstance];
- }
- return self;
-}
-static RGDRectangle* defaultRGDRectangleInstance = nil;
-+ (void) initialize {
- if (self == [RGDRectangle class]) {
- defaultRGDRectangleInstance = [[RGDRectangle alloc] init];
- }
-}
-+ (instancetype) defaultInstance {
- return defaultRGDRectangleInstance;
-}
-- (instancetype) defaultInstance {
- return defaultRGDRectangleInstance;
-}
-- (BOOL) isInitialized {
- return YES;
-}
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
- if (self.hasLo) {
- [output writeMessage:1 value:self.lo];
- }
- if (self.hasHi) {
- [output writeMessage:2 value:self.hi];
- }
- [self.unknownFields writeToCodedOutputStream:output];
-}
-- (SInt32) serializedSize {
- __block SInt32 size_ = memoizedSerializedSize;
- if (size_ != -1) {
- return size_;
- }
-
- size_ = 0;
- if (self.hasLo) {
- size_ += computeMessageSize(1, self.lo);
- }
- if (self.hasHi) {
- size_ += computeMessageSize(2, self.hi);
- }
- size_ += self.unknownFields.serializedSize;
- memoizedSerializedSize = size_;
- return size_;
-}
-+ (RGDRectangle*) parseFromData:(NSData*) data {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromData:data] build];
-}
-+ (RGDRectangle*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromInputStream:input] build];
-}
-+ (RGDRectangle*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromCodedInputStream:input] build];
-}
-+ (RGDRectangle*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRectangle*)[[[RGDRectangle builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRectangleBuilder*) builder {
- return [[RGDRectangleBuilder alloc] init];
-}
-+ (RGDRectangleBuilder*) builderWithPrototype:(RGDRectangle*) prototype {
- return [[RGDRectangle builder] mergeFrom:prototype];
-}
-- (RGDRectangleBuilder*) builder {
- return [RGDRectangle builder];
-}
-- (RGDRectangleBuilder*) toBuilder {
- return [RGDRectangle builderWithPrototype:self];
-}
-- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
- if (self.hasLo) {
- [output appendFormat:@"%@%@ {\n", indent, @"lo"];
- [self.lo writeDescriptionTo:output
- withIndent:[NSString stringWithFormat:@"%@ ", indent]];
- [output appendFormat:@"%@}\n", indent];
- }
- if (self.hasHi) {
- [output appendFormat:@"%@%@ {\n", indent, @"hi"];
- [self.hi writeDescriptionTo:output
- withIndent:[NSString stringWithFormat:@"%@ ", indent]];
- [output appendFormat:@"%@}\n", indent];
- }
- [self.unknownFields writeDescriptionTo:output withIndent:indent];
-}
-- (BOOL) isEqual:(id)other {
- if (other == self) {
- return YES;
- }
- if (![other isKindOfClass:[RGDRectangle class]]) {
- return NO;
- }
- RGDRectangle *otherMessage = other;
- return
- self.hasLo == otherMessage.hasLo &&
- (!self.hasLo || [self.lo isEqual:otherMessage.lo]) &&
- self.hasHi == otherMessage.hasHi &&
- (!self.hasHi || [self.hi isEqual:otherMessage.hi]) &&
- (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
-}
-- (NSUInteger) hash {
- __block NSUInteger hashCode = 7;
- if (self.hasLo) {
- hashCode = hashCode * 31 + [self.lo hash];
- }
- if (self.hasHi) {
- hashCode = hashCode * 31 + [self.hi hash];
- }
- hashCode = hashCode * 31 + [self.unknownFields hash];
- return hashCode;
-}
-@end
-
-@interface RGDRectangleBuilder()
-@property (strong) RGDRectangle* resultRectangle;
-@end
-
-@implementation RGDRectangleBuilder
-@synthesize resultRectangle;
-- (instancetype) init {
- if ((self = [super init])) {
- self.resultRectangle = [[RGDRectangle alloc] init];
- }
- return self;
-}
-- (PBGeneratedMessage*) internalGetResult {
- return resultRectangle;
-}
-- (RGDRectangleBuilder*) clear {
- self.resultRectangle = [[RGDRectangle alloc] init];
- return self;
-}
-- (RGDRectangleBuilder*) clone {
- return [RGDRectangle builderWithPrototype:resultRectangle];
-}
-- (RGDRectangle*) defaultInstance {
- return [RGDRectangle defaultInstance];
-}
-- (RGDRectangle*) build {
- [self checkInitialized];
- return [self buildPartial];
-}
-- (RGDRectangle*) buildPartial {
- RGDRectangle* returnMe = resultRectangle;
- self.resultRectangle = nil;
- return returnMe;
-}
-- (RGDRectangleBuilder*) mergeFrom:(RGDRectangle*) other {
- if (other == [RGDRectangle defaultInstance]) {
- return self;
- }
- if (other.hasLo) {
- [self mergeLo:other.lo];
- }
- if (other.hasHi) {
- [self mergeHi:other.hi];
- }
- [self mergeUnknownFields:other.unknownFields];
- return self;
-}
-- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
- return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
-}
-- (RGDRectangleBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
- while (YES) {
- SInt32 tag = [input readTag];
- switch (tag) {
- case 0:
- [self setUnknownFields:[unknownFields build]];
- return self;
- default: {
- if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
- [self setUnknownFields:[unknownFields build]];
- return self;
- }
- break;
- }
- case 10: {
- RGDPointBuilder* subBuilder = [RGDPoint builder];
- if (self.hasLo) {
- [subBuilder mergeFrom:self.lo];
- }
- [input readMessage:subBuilder extensionRegistry:extensionRegistry];
- [self setLo:[subBuilder buildPartial]];
- break;
- }
- case 18: {
- RGDPointBuilder* subBuilder = [RGDPoint builder];
- if (self.hasHi) {
- [subBuilder mergeFrom:self.hi];
- }
- [input readMessage:subBuilder extensionRegistry:extensionRegistry];
- [self setHi:[subBuilder buildPartial]];
- break;
- }
- }
- }
-}
-- (BOOL) hasLo {
- return resultRectangle.hasLo;
-}
-- (RGDPoint*) lo {
- return resultRectangle.lo;
-}
-- (RGDRectangleBuilder*) setLo:(RGDPoint*) value {
- resultRectangle.hasLo = YES;
- resultRectangle.lo = value;
- return self;
-}
-- (RGDRectangleBuilder*) setLoBuilder:(RGDPointBuilder*) builderForValue {
- return [self setLo:[builderForValue build]];
-}
-- (RGDRectangleBuilder*) mergeLo:(RGDPoint*) value {
- if (resultRectangle.hasLo &&
- resultRectangle.lo != [RGDPoint defaultInstance]) {
- resultRectangle.lo =
- [[[RGDPoint builderWithPrototype:resultRectangle.lo] mergeFrom:value] buildPartial];
- } else {
- resultRectangle.lo = value;
- }
- resultRectangle.hasLo = YES;
- return self;
-}
-- (RGDRectangleBuilder*) clearLo {
- resultRectangle.hasLo = NO;
- resultRectangle.lo = [RGDPoint defaultInstance];
- return self;
-}
-- (BOOL) hasHi {
- return resultRectangle.hasHi;
-}
-- (RGDPoint*) hi {
- return resultRectangle.hi;
-}
-- (RGDRectangleBuilder*) setHi:(RGDPoint*) value {
- resultRectangle.hasHi = YES;
- resultRectangle.hi = value;
- return self;
-}
-- (RGDRectangleBuilder*) setHiBuilder:(RGDPointBuilder*) builderForValue {
- return [self setHi:[builderForValue build]];
-}
-- (RGDRectangleBuilder*) mergeHi:(RGDPoint*) value {
- if (resultRectangle.hasHi &&
- resultRectangle.hi != [RGDPoint defaultInstance]) {
- resultRectangle.hi =
- [[[RGDPoint builderWithPrototype:resultRectangle.hi] mergeFrom:value] buildPartial];
- } else {
- resultRectangle.hi = value;
- }
- resultRectangle.hasHi = YES;
- return self;
-}
-- (RGDRectangleBuilder*) clearHi {
- resultRectangle.hasHi = NO;
- resultRectangle.hi = [RGDPoint defaultInstance];
- return self;
-}
-@end
-
-@interface RGDFeature ()
-@property (strong) NSString* name;
-@property (strong) RGDPoint* location;
-@end
-
-@implementation RGDFeature
-
-- (BOOL) hasName {
- return !!hasName_;
-}
-- (void) setHasName:(BOOL) _value_ {
- hasName_ = !!_value_;
-}
-@synthesize name;
-- (BOOL) hasLocation {
- return !!hasLocation_;
-}
-- (void) setHasLocation:(BOOL) _value_ {
- hasLocation_ = !!_value_;
-}
-@synthesize location;
-- (instancetype) init {
- if ((self = [super init])) {
- self.name = @"";
- self.location = [RGDPoint defaultInstance];
- }
- return self;
-}
-static RGDFeature* defaultRGDFeatureInstance = nil;
-+ (void) initialize {
- if (self == [RGDFeature class]) {
- defaultRGDFeatureInstance = [[RGDFeature alloc] init];
- }
-}
-+ (instancetype) defaultInstance {
- return defaultRGDFeatureInstance;
-}
-- (instancetype) defaultInstance {
- return defaultRGDFeatureInstance;
-}
-- (BOOL) isInitialized {
- return YES;
-}
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
- if (self.hasName) {
- [output writeString:1 value:self.name];
- }
- if (self.hasLocation) {
- [output writeMessage:2 value:self.location];
- }
- [self.unknownFields writeToCodedOutputStream:output];
-}
-- (SInt32) serializedSize {
- __block SInt32 size_ = memoizedSerializedSize;
- if (size_ != -1) {
- return size_;
- }
-
- size_ = 0;
- if (self.hasName) {
- size_ += computeStringSize(1, self.name);
- }
- if (self.hasLocation) {
- size_ += computeMessageSize(2, self.location);
- }
- size_ += self.unknownFields.serializedSize;
- memoizedSerializedSize = size_;
- return size_;
-}
-+ (RGDFeature*) parseFromData:(NSData*) data {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromData:data] build];
-}
-+ (RGDFeature*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
-}
-+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromInputStream:input] build];
-}
-+ (RGDFeature*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromCodedInputStream:input] build];
-}
-+ (RGDFeature*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDFeature*)[[[RGDFeature builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDFeatureBuilder*) builder {
- return [[RGDFeatureBuilder alloc] init];
-}
-+ (RGDFeatureBuilder*) builderWithPrototype:(RGDFeature*) prototype {
- return [[RGDFeature builder] mergeFrom:prototype];
-}
-- (RGDFeatureBuilder*) builder {
- return [RGDFeature builder];
-}
-- (RGDFeatureBuilder*) toBuilder {
- return [RGDFeature builderWithPrototype:self];
-}
-- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
- if (self.hasName) {
- [output appendFormat:@"%@%@: %@\n", indent, @"name", self.name];
- }
- if (self.hasLocation) {
- [output appendFormat:@"%@%@ {\n", indent, @"location"];
- [self.location writeDescriptionTo:output
- withIndent:[NSString stringWithFormat:@"%@ ", indent]];
- [output appendFormat:@"%@}\n", indent];
- }
- [self.unknownFields writeDescriptionTo:output withIndent:indent];
-}
-- (BOOL) isEqual:(id)other {
- if (other == self) {
- return YES;
- }
- if (![other isKindOfClass:[RGDFeature class]]) {
- return NO;
- }
- RGDFeature *otherMessage = other;
- return
- self.hasName == otherMessage.hasName &&
- (!self.hasName || [self.name isEqual:otherMessage.name]) &&
- self.hasLocation == otherMessage.hasLocation &&
- (!self.hasLocation || [self.location isEqual:otherMessage.location]) &&
- (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
-}
-- (NSUInteger) hash {
- __block NSUInteger hashCode = 7;
- if (self.hasName) {
- hashCode = hashCode * 31 + [self.name hash];
- }
- if (self.hasLocation) {
- hashCode = hashCode * 31 + [self.location hash];
- }
- hashCode = hashCode * 31 + [self.unknownFields hash];
- return hashCode;
-}
-@end
-
-@interface RGDFeatureBuilder()
-@property (strong) RGDFeature* resultFeature;
-@end
-
-@implementation RGDFeatureBuilder
-@synthesize resultFeature;
-- (instancetype) init {
- if ((self = [super init])) {
- self.resultFeature = [[RGDFeature alloc] init];
- }
- return self;
-}
-- (PBGeneratedMessage*) internalGetResult {
- return resultFeature;
-}
-- (RGDFeatureBuilder*) clear {
- self.resultFeature = [[RGDFeature alloc] init];
- return self;
-}
-- (RGDFeatureBuilder*) clone {
- return [RGDFeature builderWithPrototype:resultFeature];
-}
-- (RGDFeature*) defaultInstance {
- return [RGDFeature defaultInstance];
-}
-- (RGDFeature*) build {
- [self checkInitialized];
- return [self buildPartial];
-}
-- (RGDFeature*) buildPartial {
- RGDFeature* returnMe = resultFeature;
- self.resultFeature = nil;
- return returnMe;
-}
-- (RGDFeatureBuilder*) mergeFrom:(RGDFeature*) other {
- if (other == [RGDFeature defaultInstance]) {
- return self;
- }
- if (other.hasName) {
- [self setName:other.name];
- }
- if (other.hasLocation) {
- [self mergeLocation:other.location];
- }
- [self mergeUnknownFields:other.unknownFields];
- return self;
-}
-- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
- return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
-}
-- (RGDFeatureBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
- while (YES) {
- SInt32 tag = [input readTag];
- switch (tag) {
- case 0:
- [self setUnknownFields:[unknownFields build]];
- return self;
- default: {
- if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
- [self setUnknownFields:[unknownFields build]];
- return self;
- }
- break;
- }
- case 10: {
- [self setName:[input readString]];
- break;
- }
- case 18: {
- RGDPointBuilder* subBuilder = [RGDPoint builder];
- if (self.hasLocation) {
- [subBuilder mergeFrom:self.location];
- }
- [input readMessage:subBuilder extensionRegistry:extensionRegistry];
- [self setLocation:[subBuilder buildPartial]];
- break;
- }
- }
- }
-}
-- (BOOL) hasName {
- return resultFeature.hasName;
-}
-- (NSString*) name {
- return resultFeature.name;
-}
-- (RGDFeatureBuilder*) setName:(NSString*) value {
- resultFeature.hasName = YES;
- resultFeature.name = value;
- return self;
-}
-- (RGDFeatureBuilder*) clearName {
- resultFeature.hasName = NO;
- resultFeature.name = @"";
- return self;
-}
-- (BOOL) hasLocation {
- return resultFeature.hasLocation;
-}
-- (RGDPoint*) location {
- return resultFeature.location;
-}
-- (RGDFeatureBuilder*) setLocation:(RGDPoint*) value {
- resultFeature.hasLocation = YES;
- resultFeature.location = value;
- return self;
-}
-- (RGDFeatureBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue {
- return [self setLocation:[builderForValue build]];
-}
-- (RGDFeatureBuilder*) mergeLocation:(RGDPoint*) value {
- if (resultFeature.hasLocation &&
- resultFeature.location != [RGDPoint defaultInstance]) {
- resultFeature.location =
- [[[RGDPoint builderWithPrototype:resultFeature.location] mergeFrom:value] buildPartial];
- } else {
- resultFeature.location = value;
- }
- resultFeature.hasLocation = YES;
- return self;
-}
-- (RGDFeatureBuilder*) clearLocation {
- resultFeature.hasLocation = NO;
- resultFeature.location = [RGDPoint defaultInstance];
- return self;
-}
-@end
-
-@interface RGDRouteNote ()
-@property (strong) RGDPoint* location;
-@property (strong) NSString* message;
-@end
-
-@implementation RGDRouteNote
-
-- (BOOL) hasLocation {
- return !!hasLocation_;
-}
-- (void) setHasLocation:(BOOL) _value_ {
- hasLocation_ = !!_value_;
-}
-@synthesize location;
-- (BOOL) hasMessage {
- return !!hasMessage_;
-}
-- (void) setHasMessage:(BOOL) _value_ {
- hasMessage_ = !!_value_;
-}
-@synthesize message;
-- (instancetype) init {
- if ((self = [super init])) {
- self.location = [RGDPoint defaultInstance];
- self.message = @"";
- }
- return self;
-}
-static RGDRouteNote* defaultRGDRouteNoteInstance = nil;
-+ (void) initialize {
- if (self == [RGDRouteNote class]) {
- defaultRGDRouteNoteInstance = [[RGDRouteNote alloc] init];
- }
-}
-+ (instancetype) defaultInstance {
- return defaultRGDRouteNoteInstance;
-}
-- (instancetype) defaultInstance {
- return defaultRGDRouteNoteInstance;
-}
-- (BOOL) isInitialized {
- return YES;
-}
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
- if (self.hasLocation) {
- [output writeMessage:1 value:self.location];
- }
- if (self.hasMessage) {
- [output writeString:2 value:self.message];
- }
- [self.unknownFields writeToCodedOutputStream:output];
-}
-- (SInt32) serializedSize {
- __block SInt32 size_ = memoizedSerializedSize;
- if (size_ != -1) {
- return size_;
- }
-
- size_ = 0;
- if (self.hasLocation) {
- size_ += computeMessageSize(1, self.location);
- }
- if (self.hasMessage) {
- size_ += computeStringSize(2, self.message);
- }
- size_ += self.unknownFields.serializedSize;
- memoizedSerializedSize = size_;
- return size_;
-}
-+ (RGDRouteNote*) parseFromData:(NSData*) data {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromData:data] build];
-}
-+ (RGDRouteNote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromInputStream:input] build];
-}
-+ (RGDRouteNote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromCodedInputStream:input] build];
-}
-+ (RGDRouteNote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteNote*)[[[RGDRouteNote builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteNoteBuilder*) builder {
- return [[RGDRouteNoteBuilder alloc] init];
-}
-+ (RGDRouteNoteBuilder*) builderWithPrototype:(RGDRouteNote*) prototype {
- return [[RGDRouteNote builder] mergeFrom:prototype];
-}
-- (RGDRouteNoteBuilder*) builder {
- return [RGDRouteNote builder];
-}
-- (RGDRouteNoteBuilder*) toBuilder {
- return [RGDRouteNote builderWithPrototype:self];
-}
-- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
- if (self.hasLocation) {
- [output appendFormat:@"%@%@ {\n", indent, @"location"];
- [self.location writeDescriptionTo:output
- withIndent:[NSString stringWithFormat:@"%@ ", indent]];
- [output appendFormat:@"%@}\n", indent];
- }
- if (self.hasMessage) {
- [output appendFormat:@"%@%@: %@\n", indent, @"message", self.message];
- }
- [self.unknownFields writeDescriptionTo:output withIndent:indent];
-}
-- (BOOL) isEqual:(id)other {
- if (other == self) {
- return YES;
- }
- if (![other isKindOfClass:[RGDRouteNote class]]) {
- return NO;
- }
- RGDRouteNote *otherMessage = other;
- return
- self.hasLocation == otherMessage.hasLocation &&
- (!self.hasLocation || [self.location isEqual:otherMessage.location]) &&
- self.hasMessage == otherMessage.hasMessage &&
- (!self.hasMessage || [self.message isEqual:otherMessage.message]) &&
- (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
-}
-- (NSUInteger) hash {
- __block NSUInteger hashCode = 7;
- if (self.hasLocation) {
- hashCode = hashCode * 31 + [self.location hash];
- }
- if (self.hasMessage) {
- hashCode = hashCode * 31 + [self.message hash];
- }
- hashCode = hashCode * 31 + [self.unknownFields hash];
- return hashCode;
-}
-@end
-
-@interface RGDRouteNoteBuilder()
-@property (strong) RGDRouteNote* resultRouteNote;
-@end
-
-@implementation RGDRouteNoteBuilder
-@synthesize resultRouteNote;
-- (instancetype) init {
- if ((self = [super init])) {
- self.resultRouteNote = [[RGDRouteNote alloc] init];
- }
- return self;
-}
-- (PBGeneratedMessage*) internalGetResult {
- return resultRouteNote;
-}
-- (RGDRouteNoteBuilder*) clear {
- self.resultRouteNote = [[RGDRouteNote alloc] init];
- return self;
-}
-- (RGDRouteNoteBuilder*) clone {
- return [RGDRouteNote builderWithPrototype:resultRouteNote];
-}
-- (RGDRouteNote*) defaultInstance {
- return [RGDRouteNote defaultInstance];
-}
-- (RGDRouteNote*) build {
- [self checkInitialized];
- return [self buildPartial];
-}
-- (RGDRouteNote*) buildPartial {
- RGDRouteNote* returnMe = resultRouteNote;
- self.resultRouteNote = nil;
- return returnMe;
-}
-- (RGDRouteNoteBuilder*) mergeFrom:(RGDRouteNote*) other {
- if (other == [RGDRouteNote defaultInstance]) {
- return self;
- }
- if (other.hasLocation) {
- [self mergeLocation:other.location];
- }
- if (other.hasMessage) {
- [self setMessage:other.message];
- }
- [self mergeUnknownFields:other.unknownFields];
- return self;
-}
-- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
- return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
-}
-- (RGDRouteNoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
- while (YES) {
- SInt32 tag = [input readTag];
- switch (tag) {
- case 0:
- [self setUnknownFields:[unknownFields build]];
- return self;
- default: {
- if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
- [self setUnknownFields:[unknownFields build]];
- return self;
- }
- break;
- }
- case 10: {
- RGDPointBuilder* subBuilder = [RGDPoint builder];
- if (self.hasLocation) {
- [subBuilder mergeFrom:self.location];
- }
- [input readMessage:subBuilder extensionRegistry:extensionRegistry];
- [self setLocation:[subBuilder buildPartial]];
- break;
- }
- case 18: {
- [self setMessage:[input readString]];
- break;
- }
- }
- }
-}
-- (BOOL) hasLocation {
- return resultRouteNote.hasLocation;
-}
-- (RGDPoint*) location {
- return resultRouteNote.location;
-}
-- (RGDRouteNoteBuilder*) setLocation:(RGDPoint*) value {
- resultRouteNote.hasLocation = YES;
- resultRouteNote.location = value;
- return self;
-}
-- (RGDRouteNoteBuilder*) setLocationBuilder:(RGDPointBuilder*) builderForValue {
- return [self setLocation:[builderForValue build]];
-}
-- (RGDRouteNoteBuilder*) mergeLocation:(RGDPoint*) value {
- if (resultRouteNote.hasLocation &&
- resultRouteNote.location != [RGDPoint defaultInstance]) {
- resultRouteNote.location =
- [[[RGDPoint builderWithPrototype:resultRouteNote.location] mergeFrom:value] buildPartial];
- } else {
- resultRouteNote.location = value;
- }
- resultRouteNote.hasLocation = YES;
- return self;
-}
-- (RGDRouteNoteBuilder*) clearLocation {
- resultRouteNote.hasLocation = NO;
- resultRouteNote.location = [RGDPoint defaultInstance];
- return self;
-}
-- (BOOL) hasMessage {
- return resultRouteNote.hasMessage;
-}
-- (NSString*) message {
- return resultRouteNote.message;
-}
-- (RGDRouteNoteBuilder*) setMessage:(NSString*) value {
- resultRouteNote.hasMessage = YES;
- resultRouteNote.message = value;
- return self;
-}
-- (RGDRouteNoteBuilder*) clearMessage {
- resultRouteNote.hasMessage = NO;
- resultRouteNote.message = @"";
- return self;
-}
-@end
-
-@interface RGDRouteSummary ()
-@property SInt32 pointCount;
-@property SInt32 featureCount;
-@property SInt32 distance;
-@property SInt32 elapsedTime;
-@end
-
-@implementation RGDRouteSummary
-
-- (BOOL) hasPointCount {
- return !!hasPointCount_;
-}
-- (void) setHasPointCount:(BOOL) _value_ {
- hasPointCount_ = !!_value_;
-}
-@synthesize pointCount;
-- (BOOL) hasFeatureCount {
- return !!hasFeatureCount_;
-}
-- (void) setHasFeatureCount:(BOOL) _value_ {
- hasFeatureCount_ = !!_value_;
-}
-@synthesize featureCount;
-- (BOOL) hasDistance {
- return !!hasDistance_;
-}
-- (void) setHasDistance:(BOOL) _value_ {
- hasDistance_ = !!_value_;
-}
-@synthesize distance;
-- (BOOL) hasElapsedTime {
- return !!hasElapsedTime_;
-}
-- (void) setHasElapsedTime:(BOOL) _value_ {
- hasElapsedTime_ = !!_value_;
-}
-@synthesize elapsedTime;
-- (instancetype) init {
- if ((self = [super init])) {
- self.pointCount = 0;
- self.featureCount = 0;
- self.distance = 0;
- self.elapsedTime = 0;
- }
- return self;
-}
-static RGDRouteSummary* defaultRGDRouteSummaryInstance = nil;
-+ (void) initialize {
- if (self == [RGDRouteSummary class]) {
- defaultRGDRouteSummaryInstance = [[RGDRouteSummary alloc] init];
- }
-}
-+ (instancetype) defaultInstance {
- return defaultRGDRouteSummaryInstance;
-}
-- (instancetype) defaultInstance {
- return defaultRGDRouteSummaryInstance;
-}
-- (BOOL) isInitialized {
- return YES;
-}
-- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
- if (self.hasPointCount) {
- [output writeInt32:1 value:self.pointCount];
- }
- if (self.hasFeatureCount) {
- [output writeInt32:2 value:self.featureCount];
- }
- if (self.hasDistance) {
- [output writeInt32:3 value:self.distance];
- }
- if (self.hasElapsedTime) {
- [output writeInt32:4 value:self.elapsedTime];
- }
- [self.unknownFields writeToCodedOutputStream:output];
-}
-- (SInt32) serializedSize {
- __block SInt32 size_ = memoizedSerializedSize;
- if (size_ != -1) {
- return size_;
- }
-
- size_ = 0;
- if (self.hasPointCount) {
- size_ += computeInt32Size(1, self.pointCount);
- }
- if (self.hasFeatureCount) {
- size_ += computeInt32Size(2, self.featureCount);
- }
- if (self.hasDistance) {
- size_ += computeInt32Size(3, self.distance);
- }
- if (self.hasElapsedTime) {
- size_ += computeInt32Size(4, self.elapsedTime);
- }
- size_ += self.unknownFields.serializedSize;
- memoizedSerializedSize = size_;
- return size_;
-}
-+ (RGDRouteSummary*) parseFromData:(NSData*) data {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromData:data] build];
-}
-+ (RGDRouteSummary*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromInputStream:input] build];
-}
-+ (RGDRouteSummary*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromCodedInputStream:input] build];
-}
-+ (RGDRouteSummary*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- return (RGDRouteSummary*)[[[RGDRouteSummary builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
-}
-+ (RGDRouteSummaryBuilder*) builder {
- return [[RGDRouteSummaryBuilder alloc] init];
-}
-+ (RGDRouteSummaryBuilder*) builderWithPrototype:(RGDRouteSummary*) prototype {
- return [[RGDRouteSummary builder] mergeFrom:prototype];
-}
-- (RGDRouteSummaryBuilder*) builder {
- return [RGDRouteSummary builder];
-}
-- (RGDRouteSummaryBuilder*) toBuilder {
- return [RGDRouteSummary builderWithPrototype:self];
-}
-- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
- if (self.hasPointCount) {
- [output appendFormat:@"%@%@: %@\n", indent, @"pointCount", [NSNumber numberWithInteger:self.pointCount]];
- }
- if (self.hasFeatureCount) {
- [output appendFormat:@"%@%@: %@\n", indent, @"featureCount", [NSNumber numberWithInteger:self.featureCount]];
- }
- if (self.hasDistance) {
- [output appendFormat:@"%@%@: %@\n", indent, @"distance", [NSNumber numberWithInteger:self.distance]];
- }
- if (self.hasElapsedTime) {
- [output appendFormat:@"%@%@: %@\n", indent, @"elapsedTime", [NSNumber numberWithInteger:self.elapsedTime]];
- }
- [self.unknownFields writeDescriptionTo:output withIndent:indent];
-}
-- (BOOL) isEqual:(id)other {
- if (other == self) {
- return YES;
- }
- if (![other isKindOfClass:[RGDRouteSummary class]]) {
- return NO;
- }
- RGDRouteSummary *otherMessage = other;
- return
- self.hasPointCount == otherMessage.hasPointCount &&
- (!self.hasPointCount || self.pointCount == otherMessage.pointCount) &&
- self.hasFeatureCount == otherMessage.hasFeatureCount &&
- (!self.hasFeatureCount || self.featureCount == otherMessage.featureCount) &&
- self.hasDistance == otherMessage.hasDistance &&
- (!self.hasDistance || self.distance == otherMessage.distance) &&
- self.hasElapsedTime == otherMessage.hasElapsedTime &&
- (!self.hasElapsedTime || self.elapsedTime == otherMessage.elapsedTime) &&
- (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
-}
-- (NSUInteger) hash {
- __block NSUInteger hashCode = 7;
- if (self.hasPointCount) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.pointCount] hash];
- }
- if (self.hasFeatureCount) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.featureCount] hash];
- }
- if (self.hasDistance) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.distance] hash];
- }
- if (self.hasElapsedTime) {
- hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.elapsedTime] hash];
- }
- hashCode = hashCode * 31 + [self.unknownFields hash];
- return hashCode;
-}
-@end
-
-@interface RGDRouteSummaryBuilder()
-@property (strong) RGDRouteSummary* resultRouteSummary;
-@end
-
-@implementation RGDRouteSummaryBuilder
-@synthesize resultRouteSummary;
-- (instancetype) init {
- if ((self = [super init])) {
- self.resultRouteSummary = [[RGDRouteSummary alloc] init];
- }
- return self;
-}
-- (PBGeneratedMessage*) internalGetResult {
- return resultRouteSummary;
-}
-- (RGDRouteSummaryBuilder*) clear {
- self.resultRouteSummary = [[RGDRouteSummary alloc] init];
- return self;
-}
-- (RGDRouteSummaryBuilder*) clone {
- return [RGDRouteSummary builderWithPrototype:resultRouteSummary];
-}
-- (RGDRouteSummary*) defaultInstance {
- return [RGDRouteSummary defaultInstance];
-}
-- (RGDRouteSummary*) build {
- [self checkInitialized];
- return [self buildPartial];
-}
-- (RGDRouteSummary*) buildPartial {
- RGDRouteSummary* returnMe = resultRouteSummary;
- self.resultRouteSummary = nil;
- return returnMe;
-}
-- (RGDRouteSummaryBuilder*) mergeFrom:(RGDRouteSummary*) other {
- if (other == [RGDRouteSummary defaultInstance]) {
- return self;
- }
- if (other.hasPointCount) {
- [self setPointCount:other.pointCount];
- }
- if (other.hasFeatureCount) {
- [self setFeatureCount:other.featureCount];
- }
- if (other.hasDistance) {
- [self setDistance:other.distance];
- }
- if (other.hasElapsedTime) {
- [self setElapsedTime:other.elapsedTime];
- }
- [self mergeUnknownFields:other.unknownFields];
- return self;
-}
-- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
- return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
-}
-- (RGDRouteSummaryBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
- PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
- while (YES) {
- SInt32 tag = [input readTag];
- switch (tag) {
- case 0:
- [self setUnknownFields:[unknownFields build]];
- return self;
- default: {
- if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
- [self setUnknownFields:[unknownFields build]];
- return self;
- }
- break;
- }
- case 8: {
- [self setPointCount:[input readInt32]];
- break;
- }
- case 16: {
- [self setFeatureCount:[input readInt32]];
- break;
- }
- case 24: {
- [self setDistance:[input readInt32]];
- break;
- }
- case 32: {
- [self setElapsedTime:[input readInt32]];
- break;
- }
- }
- }
-}
-- (BOOL) hasPointCount {
- return resultRouteSummary.hasPointCount;
-}
-- (SInt32) pointCount {
- return resultRouteSummary.pointCount;
-}
-- (RGDRouteSummaryBuilder*) setPointCount:(SInt32) value {
- resultRouteSummary.hasPointCount = YES;
- resultRouteSummary.pointCount = value;
- return self;
-}
-- (RGDRouteSummaryBuilder*) clearPointCount {
- resultRouteSummary.hasPointCount = NO;
- resultRouteSummary.pointCount = 0;
- return self;
-}
-- (BOOL) hasFeatureCount {
- return resultRouteSummary.hasFeatureCount;
-}
-- (SInt32) featureCount {
- return resultRouteSummary.featureCount;
-}
-- (RGDRouteSummaryBuilder*) setFeatureCount:(SInt32) value {
- resultRouteSummary.hasFeatureCount = YES;
- resultRouteSummary.featureCount = value;
- return self;
-}
-- (RGDRouteSummaryBuilder*) clearFeatureCount {
- resultRouteSummary.hasFeatureCount = NO;
- resultRouteSummary.featureCount = 0;
- return self;
-}
-- (BOOL) hasDistance {
- return resultRouteSummary.hasDistance;
-}
-- (SInt32) distance {
- return resultRouteSummary.distance;
-}
-- (RGDRouteSummaryBuilder*) setDistance:(SInt32) value {
- resultRouteSummary.hasDistance = YES;
- resultRouteSummary.distance = value;
- return self;
-}
-- (RGDRouteSummaryBuilder*) clearDistance {
- resultRouteSummary.hasDistance = NO;
- resultRouteSummary.distance = 0;
- return self;
-}
-- (BOOL) hasElapsedTime {
- return resultRouteSummary.hasElapsedTime;
-}
-- (SInt32) elapsedTime {
- return resultRouteSummary.elapsedTime;
-}
-- (RGDRouteSummaryBuilder*) setElapsedTime:(SInt32) value {
- resultRouteSummary.hasElapsedTime = YES;
- resultRouteSummary.elapsedTime = value;
- return self;
-}
-- (RGDRouteSummaryBuilder*) clearElapsedTime {
- resultRouteSummary.hasElapsedTime = NO;
- resultRouteSummary.elapsedTime = 0;
- return self;
-}
-@end
-
-
-// @@protoc_insertion_point(global_scope)
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec
index 04d847bf8f..5b1a68aad5 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec
+++ b/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec
@@ -6,12 +6,19 @@ Pod::Spec.new do |s|
s.license = 'New BSD'
s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' }
- s.source_files = '*.pb.{h,m}'
- s.public_header_files = '*.pb.h'
-
- s.platform = :ios
s.ios.deployment_target = '6.0'
- s.requires_arc = true
+ s.osx.deployment_target = '10.8'
+
+ s.subspec 'Messages' do |ms|
+ ms.source_files = '*.pbobjc.{h,m}'
+ ms.requires_arc = false
+ ms.dependency 'Protobuf', '~> 3.0'
+ end
- s.dependency 'ProtocolBuffers', '~> 1.9'
+ s.subspec 'Services' do |ss|
+ ss.source_files = '*.pbrpc.{h,m}'
+ ss.requires_arc = true
+ ss.dependency 'gRPC', '~> 0.0'
+ ss.dependency 'Route_guide/Messages'
+ end
end
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;
+}