1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: route_guide.proto
3
4package routeguide
5
6import (
7	context "context"
8	fmt "fmt"
9	proto "github.com/golang/protobuf/proto"
10	grpc "google.golang.org/grpc"
11	codes "google.golang.org/grpc/codes"
12	status "google.golang.org/grpc/status"
13	math "math"
14)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
26
27// Points are represented as latitude-longitude pairs in the E7 representation
28// (degrees multiplied by 10**7 and rounded to the nearest integer).
29// Latitudes should be in the range +/- 90 degrees and longitude should be in
30// the range +/- 180 degrees (inclusive).
31type Point struct {
32	Latitude             int32    `protobuf:"varint,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
33	Longitude            int32    `protobuf:"varint,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
34	XXX_NoUnkeyedLiteral struct{} `json:"-"`
35	XXX_unrecognized     []byte   `json:"-"`
36	XXX_sizecache        int32    `json:"-"`
37}
38
39func (m *Point) Reset()         { *m = Point{} }
40func (m *Point) String() string { return proto.CompactTextString(m) }
41func (*Point) ProtoMessage()    {}
42func (*Point) Descriptor() ([]byte, []int) {
43	return fileDescriptor_b7d679f20da65b7b, []int{0}
44}
45
46func (m *Point) XXX_Unmarshal(b []byte) error {
47	return xxx_messageInfo_Point.Unmarshal(m, b)
48}
49func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
50	return xxx_messageInfo_Point.Marshal(b, m, deterministic)
51}
52func (m *Point) XXX_Merge(src proto.Message) {
53	xxx_messageInfo_Point.Merge(m, src)
54}
55func (m *Point) XXX_Size() int {
56	return xxx_messageInfo_Point.Size(m)
57}
58func (m *Point) XXX_DiscardUnknown() {
59	xxx_messageInfo_Point.DiscardUnknown(m)
60}
61
62var xxx_messageInfo_Point proto.InternalMessageInfo
63
64func (m *Point) GetLatitude() int32 {
65	if m != nil {
66		return m.Latitude
67	}
68	return 0
69}
70
71func (m *Point) GetLongitude() int32 {
72	if m != nil {
73		return m.Longitude
74	}
75	return 0
76}
77
78// A latitude-longitude rectangle, represented as two diagonally opposite
79// points "lo" and "hi".
80type Rectangle struct {
81	// One corner of the rectangle.
82	Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"`
83	// The other corner of the rectangle.
84	Hi                   *Point   `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"`
85	XXX_NoUnkeyedLiteral struct{} `json:"-"`
86	XXX_unrecognized     []byte   `json:"-"`
87	XXX_sizecache        int32    `json:"-"`
88}
89
90func (m *Rectangle) Reset()         { *m = Rectangle{} }
91func (m *Rectangle) String() string { return proto.CompactTextString(m) }
92func (*Rectangle) ProtoMessage()    {}
93func (*Rectangle) Descriptor() ([]byte, []int) {
94	return fileDescriptor_b7d679f20da65b7b, []int{1}
95}
96
97func (m *Rectangle) XXX_Unmarshal(b []byte) error {
98	return xxx_messageInfo_Rectangle.Unmarshal(m, b)
99}
100func (m *Rectangle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
101	return xxx_messageInfo_Rectangle.Marshal(b, m, deterministic)
102}
103func (m *Rectangle) XXX_Merge(src proto.Message) {
104	xxx_messageInfo_Rectangle.Merge(m, src)
105}
106func (m *Rectangle) XXX_Size() int {
107	return xxx_messageInfo_Rectangle.Size(m)
108}
109func (m *Rectangle) XXX_DiscardUnknown() {
110	xxx_messageInfo_Rectangle.DiscardUnknown(m)
111}
112
113var xxx_messageInfo_Rectangle proto.InternalMessageInfo
114
115func (m *Rectangle) GetLo() *Point {
116	if m != nil {
117		return m.Lo
118	}
119	return nil
120}
121
122func (m *Rectangle) GetHi() *Point {
123	if m != nil {
124		return m.Hi
125	}
126	return nil
127}
128
129// A feature names something at a given point.
130//
131// If a feature could not be named, the name is empty.
132type Feature struct {
133	// The name of the feature.
134	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
135	// The point where the feature is detected.
136	Location             *Point   `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
137	XXX_NoUnkeyedLiteral struct{} `json:"-"`
138	XXX_unrecognized     []byte   `json:"-"`
139	XXX_sizecache        int32    `json:"-"`
140}
141
142func (m *Feature) Reset()         { *m = Feature{} }
143func (m *Feature) String() string { return proto.CompactTextString(m) }
144func (*Feature) ProtoMessage()    {}
145func (*Feature) Descriptor() ([]byte, []int) {
146	return fileDescriptor_b7d679f20da65b7b, []int{2}
147}
148
149func (m *Feature) XXX_Unmarshal(b []byte) error {
150	return xxx_messageInfo_Feature.Unmarshal(m, b)
151}
152func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
153	return xxx_messageInfo_Feature.Marshal(b, m, deterministic)
154}
155func (m *Feature) XXX_Merge(src proto.Message) {
156	xxx_messageInfo_Feature.Merge(m, src)
157}
158func (m *Feature) XXX_Size() int {
159	return xxx_messageInfo_Feature.Size(m)
160}
161func (m *Feature) XXX_DiscardUnknown() {
162	xxx_messageInfo_Feature.DiscardUnknown(m)
163}
164
165var xxx_messageInfo_Feature proto.InternalMessageInfo
166
167func (m *Feature) GetName() string {
168	if m != nil {
169		return m.Name
170	}
171	return ""
172}
173
174func (m *Feature) GetLocation() *Point {
175	if m != nil {
176		return m.Location
177	}
178	return nil
179}
180
181// A RouteNote is a message sent while at a given point.
182type RouteNote struct {
183	// The location from which the message is sent.
184	Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
185	// The message to be sent.
186	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
187	XXX_NoUnkeyedLiteral struct{} `json:"-"`
188	XXX_unrecognized     []byte   `json:"-"`
189	XXX_sizecache        int32    `json:"-"`
190}
191
192func (m *RouteNote) Reset()         { *m = RouteNote{} }
193func (m *RouteNote) String() string { return proto.CompactTextString(m) }
194func (*RouteNote) ProtoMessage()    {}
195func (*RouteNote) Descriptor() ([]byte, []int) {
196	return fileDescriptor_b7d679f20da65b7b, []int{3}
197}
198
199func (m *RouteNote) XXX_Unmarshal(b []byte) error {
200	return xxx_messageInfo_RouteNote.Unmarshal(m, b)
201}
202func (m *RouteNote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
203	return xxx_messageInfo_RouteNote.Marshal(b, m, deterministic)
204}
205func (m *RouteNote) XXX_Merge(src proto.Message) {
206	xxx_messageInfo_RouteNote.Merge(m, src)
207}
208func (m *RouteNote) XXX_Size() int {
209	return xxx_messageInfo_RouteNote.Size(m)
210}
211func (m *RouteNote) XXX_DiscardUnknown() {
212	xxx_messageInfo_RouteNote.DiscardUnknown(m)
213}
214
215var xxx_messageInfo_RouteNote proto.InternalMessageInfo
216
217func (m *RouteNote) GetLocation() *Point {
218	if m != nil {
219		return m.Location
220	}
221	return nil
222}
223
224func (m *RouteNote) GetMessage() string {
225	if m != nil {
226		return m.Message
227	}
228	return ""
229}
230
231// A RouteSummary is received in response to a RecordRoute rpc.
232//
233// It contains the number of individual points received, the number of
234// detected features, and the total distance covered as the cumulative sum of
235// the distance between each point.
236type RouteSummary struct {
237	// The number of points received.
238	PointCount int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"`
239	// The number of known features passed while traversing the route.
240	FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,omitempty"`
241	// The distance covered in metres.
242	Distance int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"`
243	// The duration of the traversal in seconds.
244	ElapsedTime          int32    `protobuf:"varint,4,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"`
245	XXX_NoUnkeyedLiteral struct{} `json:"-"`
246	XXX_unrecognized     []byte   `json:"-"`
247	XXX_sizecache        int32    `json:"-"`
248}
249
250func (m *RouteSummary) Reset()         { *m = RouteSummary{} }
251func (m *RouteSummary) String() string { return proto.CompactTextString(m) }
252func (*RouteSummary) ProtoMessage()    {}
253func (*RouteSummary) Descriptor() ([]byte, []int) {
254	return fileDescriptor_b7d679f20da65b7b, []int{4}
255}
256
257func (m *RouteSummary) XXX_Unmarshal(b []byte) error {
258	return xxx_messageInfo_RouteSummary.Unmarshal(m, b)
259}
260func (m *RouteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
261	return xxx_messageInfo_RouteSummary.Marshal(b, m, deterministic)
262}
263func (m *RouteSummary) XXX_Merge(src proto.Message) {
264	xxx_messageInfo_RouteSummary.Merge(m, src)
265}
266func (m *RouteSummary) XXX_Size() int {
267	return xxx_messageInfo_RouteSummary.Size(m)
268}
269func (m *RouteSummary) XXX_DiscardUnknown() {
270	xxx_messageInfo_RouteSummary.DiscardUnknown(m)
271}
272
273var xxx_messageInfo_RouteSummary proto.InternalMessageInfo
274
275func (m *RouteSummary) GetPointCount() int32 {
276	if m != nil {
277		return m.PointCount
278	}
279	return 0
280}
281
282func (m *RouteSummary) GetFeatureCount() int32 {
283	if m != nil {
284		return m.FeatureCount
285	}
286	return 0
287}
288
289func (m *RouteSummary) GetDistance() int32 {
290	if m != nil {
291		return m.Distance
292	}
293	return 0
294}
295
296func (m *RouteSummary) GetElapsedTime() int32 {
297	if m != nil {
298		return m.ElapsedTime
299	}
300	return 0
301}
302
303func init() {
304	proto.RegisterType((*Point)(nil), "routeguide.Point")
305	proto.RegisterType((*Rectangle)(nil), "routeguide.Rectangle")
306	proto.RegisterType((*Feature)(nil), "routeguide.Feature")
307	proto.RegisterType((*RouteNote)(nil), "routeguide.RouteNote")
308	proto.RegisterType((*RouteSummary)(nil), "routeguide.RouteSummary")
309}
310
311func init() { proto.RegisterFile("route_guide.proto", fileDescriptor_b7d679f20da65b7b) }
312
313var fileDescriptor_b7d679f20da65b7b = []byte{
314	// 404 bytes of a gzipped FileDescriptorProto
315	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xdd, 0xca, 0xd3, 0x40,
316	0x10, 0xfd, 0x36, 0x7e, 0x9f, 0x6d, 0x26, 0x11, 0xe9, 0x88, 0x10, 0xa2, 0xa0, 0x8d, 0x37, 0xbd,
317	0x31, 0x94, 0x0a, 0x5e, 0x56, 0x6c, 0xc1, 0xde, 0x14, 0xa9, 0xb1, 0xf7, 0x65, 0x4d, 0xc6, 0x74,
318	0x61, 0x93, 0x0d, 0xc9, 0x06, 0xf4, 0x01, 0x7c, 0x02, 0x5f, 0x58, 0xb2, 0x49, 0xda, 0x54, 0x5b,
319	0xbc, 0xdb, 0x39, 0x73, 0xce, 0xfc, 0x9c, 0x61, 0x61, 0x52, 0xaa, 0x5a, 0xd3, 0x21, 0xad, 0x45,
320	0x42, 0x61, 0x51, 0x2a, 0xad, 0x10, 0x0c, 0x64, 0x90, 0xe0, 0x23, 0x3c, 0xec, 0x94, 0xc8, 0x35,
321	0xfa, 0x30, 0x96, 0x5c, 0x0b, 0x5d, 0x27, 0xe4, 0xb1, 0xd7, 0x6c, 0xf6, 0x10, 0x9d, 0x62, 0x7c,
322	0x09, 0xb6, 0x54, 0x79, 0xda, 0x26, 0x2d, 0x93, 0x3c, 0x03, 0xc1, 0x17, 0xb0, 0x23, 0x8a, 0x35,
323	0xcf, 0x53, 0x49, 0x38, 0x05, 0x4b, 0x2a, 0x53, 0xc0, 0x59, 0x4c, 0xc2, 0x73, 0xa3, 0xd0, 0x74,
324	0x89, 0x2c, 0xa9, 0x1a, 0xca, 0x51, 0x98, 0x32, 0xd7, 0x29, 0x47, 0x11, 0x6c, 0x61, 0xf4, 0x89,
325	0xb8, 0xae, 0x4b, 0x42, 0x84, 0xfb, 0x9c, 0x67, 0xed, 0x4c, 0x76, 0x64, 0xde, 0xf8, 0x16, 0xc6,
326	0x52, 0xc5, 0x5c, 0x0b, 0x95, 0xdf, 0xae, 0x73, 0xa2, 0x04, 0x7b, 0xb0, 0xa3, 0x26, 0xfb, 0x59,
327	0xe9, 0x4b, 0x2d, 0xfb, 0xaf, 0x16, 0x3d, 0x18, 0x65, 0x54, 0x55, 0x3c, 0x6d, 0x17, 0xb7, 0xa3,
328	0x3e, 0x0c, 0x7e, 0x33, 0x70, 0x4d, 0xd9, 0xaf, 0x75, 0x96, 0xf1, 0xf2, 0x27, 0xbe, 0x02, 0xa7,
329	0x68, 0xd4, 0x87, 0x58, 0xd5, 0xb9, 0xee, 0x4c, 0x04, 0x03, 0xad, 0x1b, 0x04, 0xdf, 0xc0, 0x93,
330	0xef, 0xed, 0x56, 0x1d, 0xa5, 0xb5, 0xd2, 0xed, 0xc0, 0x96, 0xe4, 0xc3, 0x38, 0x11, 0x95, 0xe6,
331	0x79, 0x4c, 0xde, 0xa3, 0xf6, 0x0e, 0x7d, 0x8c, 0x53, 0x70, 0x49, 0xf2, 0xa2, 0xa2, 0xe4, 0xa0,
332	0x45, 0x46, 0xde, 0xbd, 0xc9, 0x3b, 0x1d, 0xb6, 0x17, 0x19, 0x2d, 0x7e, 0x59, 0x00, 0x66, 0xaa,
333	0x4d, 0xb3, 0x0e, 0xbe, 0x07, 0xd8, 0x90, 0xee, 0xbd, 0xfc, 0x77, 0x53, 0xff, 0xd9, 0x10, 0xea,
334	0x78, 0xc1, 0x1d, 0x2e, 0xc1, 0xdd, 0x8a, 0xaa, 0x17, 0x56, 0xf8, 0x7c, 0x48, 0x3b, 0x5d, 0xfb,
335	0x86, 0x7a, 0xce, 0x70, 0x09, 0x4e, 0x44, 0xb1, 0x2a, 0x13, 0x33, 0xcb, 0xb5, 0xc6, 0xde, 0x45,
336	0xc5, 0x81, 0x8f, 0xc1, 0xdd, 0x8c, 0xe1, 0x87, 0xee, 0x64, 0xeb, 0x23, 0xd7, 0x7f, 0x35, 0xef,
337	0x2f, 0xe9, 0x5f, 0x87, 0x1b, 0xf9, 0x9c, 0xad, 0xe6, 0xf0, 0x42, 0xa8, 0x30, 0x2d, 0x8b, 0x38,
338	0xa4, 0x1f, 0x3c, 0x2b, 0x24, 0x55, 0x03, 0xfa, 0xea, 0xe9, 0xd9, 0xa3, 0x5d, 0xf3, 0x27, 0x76,
339	0xec, 0xdb, 0x63, 0xf3, 0x39, 0xde, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc8, 0xe4, 0xef, 0xe6,
340	0x31, 0x03, 0x00, 0x00,
341}
342
343// Reference imports to suppress errors if they are not otherwise used.
344var _ context.Context
345var _ grpc.ClientConn
346
347// This is a compile-time assertion to ensure that this generated file
348// is compatible with the grpc package it is being compiled against.
349const _ = grpc.SupportPackageIsVersion4
350
351// RouteGuideClient is the client API for RouteGuide service.
352//
353// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
354type RouteGuideClient interface {
355	// A simple RPC.
356	//
357	// Obtains the feature at a given position.
358	//
359	// A feature with an empty name is returned if there's no feature at the given
360	// position.
361	GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error)
362	// A server-to-client streaming RPC.
363	//
364	// Obtains the Features available within the given Rectangle.  Results are
365	// streamed rather than returned at once (e.g. in a response message with a
366	// repeated field), as the rectangle may cover a large area and contain a
367	// huge number of features.
368	ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error)
369	// A client-to-server streaming RPC.
370	//
371	// Accepts a stream of Points on a route being traversed, returning a
372	// RouteSummary when traversal is completed.
373	RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error)
374	// A Bidirectional streaming RPC.
375	//
376	// Accepts a stream of RouteNotes sent while a route is being traversed,
377	// while receiving other RouteNotes (e.g. from other users).
378	RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error)
379}
380
381type routeGuideClient struct {
382	cc *grpc.ClientConn
383}
384
385func NewRouteGuideClient(cc *grpc.ClientConn) RouteGuideClient {
386	return &routeGuideClient{cc}
387}
388
389func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) {
390	out := new(Feature)
391	err := c.cc.Invoke(ctx, "/routeguide.RouteGuide/GetFeature", in, out, opts...)
392	if err != nil {
393		return nil, err
394	}
395	return out, nil
396}
397
398func (c *routeGuideClient) ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error) {
399	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[0], "/routeguide.RouteGuide/ListFeatures", opts...)
400	if err != nil {
401		return nil, err
402	}
403	x := &routeGuideListFeaturesClient{stream}
404	if err := x.ClientStream.SendMsg(in); err != nil {
405		return nil, err
406	}
407	if err := x.ClientStream.CloseSend(); err != nil {
408		return nil, err
409	}
410	return x, nil
411}
412
413type RouteGuide_ListFeaturesClient interface {
414	Recv() (*Feature, error)
415	grpc.ClientStream
416}
417
418type routeGuideListFeaturesClient struct {
419	grpc.ClientStream
420}
421
422func (x *routeGuideListFeaturesClient) Recv() (*Feature, error) {
423	m := new(Feature)
424	if err := x.ClientStream.RecvMsg(m); err != nil {
425		return nil, err
426	}
427	return m, nil
428}
429
430func (c *routeGuideClient) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) {
431	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[1], "/routeguide.RouteGuide/RecordRoute", opts...)
432	if err != nil {
433		return nil, err
434	}
435	x := &routeGuideRecordRouteClient{stream}
436	return x, nil
437}
438
439type RouteGuide_RecordRouteClient interface {
440	Send(*Point) error
441	CloseAndRecv() (*RouteSummary, error)
442	grpc.ClientStream
443}
444
445type routeGuideRecordRouteClient struct {
446	grpc.ClientStream
447}
448
449func (x *routeGuideRecordRouteClient) Send(m *Point) error {
450	return x.ClientStream.SendMsg(m)
451}
452
453func (x *routeGuideRecordRouteClient) CloseAndRecv() (*RouteSummary, error) {
454	if err := x.ClientStream.CloseSend(); err != nil {
455		return nil, err
456	}
457	m := new(RouteSummary)
458	if err := x.ClientStream.RecvMsg(m); err != nil {
459		return nil, err
460	}
461	return m, nil
462}
463
464func (c *routeGuideClient) RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error) {
465	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[2], "/routeguide.RouteGuide/RouteChat", opts...)
466	if err != nil {
467		return nil, err
468	}
469	x := &routeGuideRouteChatClient{stream}
470	return x, nil
471}
472
473type RouteGuide_RouteChatClient interface {
474	Send(*RouteNote) error
475	Recv() (*RouteNote, error)
476	grpc.ClientStream
477}
478
479type routeGuideRouteChatClient struct {
480	grpc.ClientStream
481}
482
483func (x *routeGuideRouteChatClient) Send(m *RouteNote) error {
484	return x.ClientStream.SendMsg(m)
485}
486
487func (x *routeGuideRouteChatClient) Recv() (*RouteNote, error) {
488	m := new(RouteNote)
489	if err := x.ClientStream.RecvMsg(m); err != nil {
490		return nil, err
491	}
492	return m, nil
493}
494
495// RouteGuideServer is the server API for RouteGuide service.
496type RouteGuideServer interface {
497	// A simple RPC.
498	//
499	// Obtains the feature at a given position.
500	//
501	// A feature with an empty name is returned if there's no feature at the given
502	// position.
503	GetFeature(context.Context, *Point) (*Feature, error)
504	// A server-to-client streaming RPC.
505	//
506	// Obtains the Features available within the given Rectangle.  Results are
507	// streamed rather than returned at once (e.g. in a response message with a
508	// repeated field), as the rectangle may cover a large area and contain a
509	// huge number of features.
510	ListFeatures(*Rectangle, RouteGuide_ListFeaturesServer) error
511	// A client-to-server streaming RPC.
512	//
513	// Accepts a stream of Points on a route being traversed, returning a
514	// RouteSummary when traversal is completed.
515	RecordRoute(RouteGuide_RecordRouteServer) error
516	// A Bidirectional streaming RPC.
517	//
518	// Accepts a stream of RouteNotes sent while a route is being traversed,
519	// while receiving other RouteNotes (e.g. from other users).
520	RouteChat(RouteGuide_RouteChatServer) error
521}
522
523// UnimplementedRouteGuideServer can be embedded to have forward compatible implementations.
524type UnimplementedRouteGuideServer struct {
525}
526
527func (*UnimplementedRouteGuideServer) GetFeature(ctx context.Context, req *Point) (*Feature, error) {
528	return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented")
529}
530func (*UnimplementedRouteGuideServer) ListFeatures(req *Rectangle, srv RouteGuide_ListFeaturesServer) error {
531	return status.Errorf(codes.Unimplemented, "method ListFeatures not implemented")
532}
533func (*UnimplementedRouteGuideServer) RecordRoute(srv RouteGuide_RecordRouteServer) error {
534	return status.Errorf(codes.Unimplemented, "method RecordRoute not implemented")
535}
536func (*UnimplementedRouteGuideServer) RouteChat(srv RouteGuide_RouteChatServer) error {
537	return status.Errorf(codes.Unimplemented, "method RouteChat not implemented")
538}
539
540func RegisterRouteGuideServer(s *grpc.Server, srv RouteGuideServer) {
541	s.RegisterService(&_RouteGuide_serviceDesc, srv)
542}
543
544func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
545	in := new(Point)
546	if err := dec(in); err != nil {
547		return nil, err
548	}
549	if interceptor == nil {
550		return srv.(RouteGuideServer).GetFeature(ctx, in)
551	}
552	info := &grpc.UnaryServerInfo{
553		Server:     srv,
554		FullMethod: "/routeguide.RouteGuide/GetFeature",
555	}
556	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
557		return srv.(RouteGuideServer).GetFeature(ctx, req.(*Point))
558	}
559	return interceptor(ctx, in, info, handler)
560}
561
562func _RouteGuide_ListFeatures_Handler(srv interface{}, stream grpc.ServerStream) error {
563	m := new(Rectangle)
564	if err := stream.RecvMsg(m); err != nil {
565		return err
566	}
567	return srv.(RouteGuideServer).ListFeatures(m, &routeGuideListFeaturesServer{stream})
568}
569
570type RouteGuide_ListFeaturesServer interface {
571	Send(*Feature) error
572	grpc.ServerStream
573}
574
575type routeGuideListFeaturesServer struct {
576	grpc.ServerStream
577}
578
579func (x *routeGuideListFeaturesServer) Send(m *Feature) error {
580	return x.ServerStream.SendMsg(m)
581}
582
583func _RouteGuide_RecordRoute_Handler(srv interface{}, stream grpc.ServerStream) error {
584	return srv.(RouteGuideServer).RecordRoute(&routeGuideRecordRouteServer{stream})
585}
586
587type RouteGuide_RecordRouteServer interface {
588	SendAndClose(*RouteSummary) error
589	Recv() (*Point, error)
590	grpc.ServerStream
591}
592
593type routeGuideRecordRouteServer struct {
594	grpc.ServerStream
595}
596
597func (x *routeGuideRecordRouteServer) SendAndClose(m *RouteSummary) error {
598	return x.ServerStream.SendMsg(m)
599}
600
601func (x *routeGuideRecordRouteServer) Recv() (*Point, error) {
602	m := new(Point)
603	if err := x.ServerStream.RecvMsg(m); err != nil {
604		return nil, err
605	}
606	return m, nil
607}
608
609func _RouteGuide_RouteChat_Handler(srv interface{}, stream grpc.ServerStream) error {
610	return srv.(RouteGuideServer).RouteChat(&routeGuideRouteChatServer{stream})
611}
612
613type RouteGuide_RouteChatServer interface {
614	Send(*RouteNote) error
615	Recv() (*RouteNote, error)
616	grpc.ServerStream
617}
618
619type routeGuideRouteChatServer struct {
620	grpc.ServerStream
621}
622
623func (x *routeGuideRouteChatServer) Send(m *RouteNote) error {
624	return x.ServerStream.SendMsg(m)
625}
626
627func (x *routeGuideRouteChatServer) Recv() (*RouteNote, error) {
628	m := new(RouteNote)
629	if err := x.ServerStream.RecvMsg(m); err != nil {
630		return nil, err
631	}
632	return m, nil
633}
634
635var _RouteGuide_serviceDesc = grpc.ServiceDesc{
636	ServiceName: "routeguide.RouteGuide",
637	HandlerType: (*RouteGuideServer)(nil),
638	Methods: []grpc.MethodDesc{
639		{
640			MethodName: "GetFeature",
641			Handler:    _RouteGuide_GetFeature_Handler,
642		},
643	},
644	Streams: []grpc.StreamDesc{
645		{
646			StreamName:    "ListFeatures",
647			Handler:       _RouteGuide_ListFeatures_Handler,
648			ServerStreams: true,
649		},
650		{
651			StreamName:    "RecordRoute",
652			Handler:       _RouteGuide_RecordRoute_Handler,
653			ClientStreams: true,
654		},
655		{
656			StreamName:    "RouteChat",
657			Handler:       _RouteGuide_RouteChat_Handler,
658			ServerStreams: true,
659			ClientStreams: true,
660		},
661	},
662	Metadata: "route_guide.proto",
663}
664