1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package routes
22
23 import (
24 context "context"
25 reflect "reflect"
26
27 _ "google.golang.org/genproto/googleapis/api/annotations"
28 grpc "google.golang.org/grpc"
29 codes "google.golang.org/grpc/codes"
30 status "google.golang.org/grpc/status"
31 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
32 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
33 )
34
35 const (
36
37 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
38
39 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
40 )
41
42 var File_google_maps_routes_v1_route_service_proto protoreflect.FileDescriptor
43
44 var file_google_maps_routes_v1_route_service_proto_rawDesc = []byte{
45 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f,
46 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x65,
47 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f,
48 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
49 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
50 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
51 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,
52 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
53 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31,
54 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
55 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70,
56 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70,
57 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70,
58 0x75, 0x74, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65,
59 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
60 0x1a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f,
61 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f,
62 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x71,
63 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67,
64 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76,
65 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
66 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33,
67 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74,
68 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x6f,
69 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72,
70 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73,
71 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65,
72 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
73 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbb, 0x04, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
74 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x0d, 0x43, 0x6f,
75 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x67, 0x6f,
76 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
77 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
78 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
79 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31,
80 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65,
81 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11,
82 0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
83 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65,
84 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x30, 0x2e, 0x67, 0x6f,
85 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
86 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
87 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e,
88 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74,
89 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69,
90 0x78, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b,
91 0x22, 0x16, 0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75,
92 0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3a, 0x01, 0x2a, 0x30, 0x01, 0x12, 0xa0, 0x01,
93 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52,
94 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d,
95 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f,
96 0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65,
97 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
98 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31,
99 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f,
100 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3,
101 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
102 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a,
103 0x1a, 0x61, 0xca, 0x41, 0x1e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x70, 0x72, 0x65, 0x66, 0x65,
104 0x72, 0x72, 0x65, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
105 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x3d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
106 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
107 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66,
108 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72,
109 0x72, 0x65, 0x64, 0x42, 0xa8, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
110 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76,
111 0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
112 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
113 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,
114 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d,
115 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f,
116 0x75, 0x74, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x4d, 0x52, 0x53, 0xaa, 0x02,
117 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x52, 0x6f, 0x75,
118 0x74, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c,
119 0x4d, 0x61, 0x70, 0x73, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06,
120 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
121 }
122
123 var file_google_maps_routes_v1_route_service_proto_goTypes = []interface{}{
124 (*ComputeRoutesRequest)(nil),
125 (*ComputeRouteMatrixRequest)(nil),
126 (*ComputeCustomRoutesRequest)(nil),
127 (*ComputeRoutesResponse)(nil),
128 (*RouteMatrixElement)(nil),
129 (*ComputeCustomRoutesResponse)(nil),
130 }
131 var file_google_maps_routes_v1_route_service_proto_depIdxs = []int32{
132 0,
133 1,
134 2,
135 3,
136 4,
137 5,
138 3,
139 0,
140 0,
141 0,
142 0,
143 }
144
145 func init() { file_google_maps_routes_v1_route_service_proto_init() }
146 func file_google_maps_routes_v1_route_service_proto_init() {
147 if File_google_maps_routes_v1_route_service_proto != nil {
148 return
149 }
150 file_google_maps_routes_v1_compute_custom_routes_request_proto_init()
151 file_google_maps_routes_v1_compute_custom_routes_response_proto_init()
152 file_google_maps_routes_v1_compute_route_matrix_request_proto_init()
153 file_google_maps_routes_v1_compute_routes_request_proto_init()
154 file_google_maps_routes_v1_compute_routes_response_proto_init()
155 file_google_maps_routes_v1_route_matrix_element_proto_init()
156 type x struct{}
157 out := protoimpl.TypeBuilder{
158 File: protoimpl.DescBuilder{
159 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
160 RawDescriptor: file_google_maps_routes_v1_route_service_proto_rawDesc,
161 NumEnums: 0,
162 NumMessages: 0,
163 NumExtensions: 0,
164 NumServices: 1,
165 },
166 GoTypes: file_google_maps_routes_v1_route_service_proto_goTypes,
167 DependencyIndexes: file_google_maps_routes_v1_route_service_proto_depIdxs,
168 }.Build()
169 File_google_maps_routes_v1_route_service_proto = out.File
170 file_google_maps_routes_v1_route_service_proto_rawDesc = nil
171 file_google_maps_routes_v1_route_service_proto_goTypes = nil
172 file_google_maps_routes_v1_route_service_proto_depIdxs = nil
173 }
174
175
176 var _ context.Context
177 var _ grpc.ClientConnInterface
178
179
180
181 const _ = grpc.SupportPackageIsVersion6
182
183
184
185
186 type RoutesPreferredClient interface {
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222 ComputeRoutes(ctx context.Context, in *ComputeRoutesRequest, opts ...grpc.CallOption) (*ComputeRoutesResponse, error)
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258 ComputeRouteMatrix(ctx context.Context, in *ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesPreferred_ComputeRouteMatrixClient, error)
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293 ComputeCustomRoutes(ctx context.Context, in *ComputeCustomRoutesRequest, opts ...grpc.CallOption) (*ComputeCustomRoutesResponse, error)
294 }
295
296 type routesPreferredClient struct {
297 cc grpc.ClientConnInterface
298 }
299
300 func NewRoutesPreferredClient(cc grpc.ClientConnInterface) RoutesPreferredClient {
301 return &routesPreferredClient{cc}
302 }
303
304 func (c *routesPreferredClient) ComputeRoutes(ctx context.Context, in *ComputeRoutesRequest, opts ...grpc.CallOption) (*ComputeRoutesResponse, error) {
305 out := new(ComputeRoutesResponse)
306 err := c.cc.Invoke(ctx, "/google.maps.routes.v1.RoutesPreferred/ComputeRoutes", in, out, opts...)
307 if err != nil {
308 return nil, err
309 }
310 return out, nil
311 }
312
313 func (c *routesPreferredClient) ComputeRouteMatrix(ctx context.Context, in *ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesPreferred_ComputeRouteMatrixClient, error) {
314 stream, err := c.cc.NewStream(ctx, &_RoutesPreferred_serviceDesc.Streams[0], "/google.maps.routes.v1.RoutesPreferred/ComputeRouteMatrix", opts...)
315 if err != nil {
316 return nil, err
317 }
318 x := &routesPreferredComputeRouteMatrixClient{stream}
319 if err := x.ClientStream.SendMsg(in); err != nil {
320 return nil, err
321 }
322 if err := x.ClientStream.CloseSend(); err != nil {
323 return nil, err
324 }
325 return x, nil
326 }
327
328 type RoutesPreferred_ComputeRouteMatrixClient interface {
329 Recv() (*RouteMatrixElement, error)
330 grpc.ClientStream
331 }
332
333 type routesPreferredComputeRouteMatrixClient struct {
334 grpc.ClientStream
335 }
336
337 func (x *routesPreferredComputeRouteMatrixClient) Recv() (*RouteMatrixElement, error) {
338 m := new(RouteMatrixElement)
339 if err := x.ClientStream.RecvMsg(m); err != nil {
340 return nil, err
341 }
342 return m, nil
343 }
344
345 func (c *routesPreferredClient) ComputeCustomRoutes(ctx context.Context, in *ComputeCustomRoutesRequest, opts ...grpc.CallOption) (*ComputeCustomRoutesResponse, error) {
346 out := new(ComputeCustomRoutesResponse)
347 err := c.cc.Invoke(ctx, "/google.maps.routes.v1.RoutesPreferred/ComputeCustomRoutes", in, out, opts...)
348 if err != nil {
349 return nil, err
350 }
351 return out, nil
352 }
353
354
355 type RoutesPreferredServer interface {
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391 ComputeRoutes(context.Context, *ComputeRoutesRequest) (*ComputeRoutesResponse, error)
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427 ComputeRouteMatrix(*ComputeRouteMatrixRequest, RoutesPreferred_ComputeRouteMatrixServer) error
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462 ComputeCustomRoutes(context.Context, *ComputeCustomRoutesRequest) (*ComputeCustomRoutesResponse, error)
463 }
464
465
466 type UnimplementedRoutesPreferredServer struct {
467 }
468
469 func (*UnimplementedRoutesPreferredServer) ComputeRoutes(context.Context, *ComputeRoutesRequest) (*ComputeRoutesResponse, error) {
470 return nil, status.Errorf(codes.Unimplemented, "method ComputeRoutes not implemented")
471 }
472 func (*UnimplementedRoutesPreferredServer) ComputeRouteMatrix(*ComputeRouteMatrixRequest, RoutesPreferred_ComputeRouteMatrixServer) error {
473 return status.Errorf(codes.Unimplemented, "method ComputeRouteMatrix not implemented")
474 }
475 func (*UnimplementedRoutesPreferredServer) ComputeCustomRoutes(context.Context, *ComputeCustomRoutesRequest) (*ComputeCustomRoutesResponse, error) {
476 return nil, status.Errorf(codes.Unimplemented, "method ComputeCustomRoutes not implemented")
477 }
478
479 func RegisterRoutesPreferredServer(s *grpc.Server, srv RoutesPreferredServer) {
480 s.RegisterService(&_RoutesPreferred_serviceDesc, srv)
481 }
482
483 func _RoutesPreferred_ComputeRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
484 in := new(ComputeRoutesRequest)
485 if err := dec(in); err != nil {
486 return nil, err
487 }
488 if interceptor == nil {
489 return srv.(RoutesPreferredServer).ComputeRoutes(ctx, in)
490 }
491 info := &grpc.UnaryServerInfo{
492 Server: srv,
493 FullMethod: "/google.maps.routes.v1.RoutesPreferred/ComputeRoutes",
494 }
495 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
496 return srv.(RoutesPreferredServer).ComputeRoutes(ctx, req.(*ComputeRoutesRequest))
497 }
498 return interceptor(ctx, in, info, handler)
499 }
500
501 func _RoutesPreferred_ComputeRouteMatrix_Handler(srv interface{}, stream grpc.ServerStream) error {
502 m := new(ComputeRouteMatrixRequest)
503 if err := stream.RecvMsg(m); err != nil {
504 return err
505 }
506 return srv.(RoutesPreferredServer).ComputeRouteMatrix(m, &routesPreferredComputeRouteMatrixServer{stream})
507 }
508
509 type RoutesPreferred_ComputeRouteMatrixServer interface {
510 Send(*RouteMatrixElement) error
511 grpc.ServerStream
512 }
513
514 type routesPreferredComputeRouteMatrixServer struct {
515 grpc.ServerStream
516 }
517
518 func (x *routesPreferredComputeRouteMatrixServer) Send(m *RouteMatrixElement) error {
519 return x.ServerStream.SendMsg(m)
520 }
521
522 func _RoutesPreferred_ComputeCustomRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
523 in := new(ComputeCustomRoutesRequest)
524 if err := dec(in); err != nil {
525 return nil, err
526 }
527 if interceptor == nil {
528 return srv.(RoutesPreferredServer).ComputeCustomRoutes(ctx, in)
529 }
530 info := &grpc.UnaryServerInfo{
531 Server: srv,
532 FullMethod: "/google.maps.routes.v1.RoutesPreferred/ComputeCustomRoutes",
533 }
534 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
535 return srv.(RoutesPreferredServer).ComputeCustomRoutes(ctx, req.(*ComputeCustomRoutesRequest))
536 }
537 return interceptor(ctx, in, info, handler)
538 }
539
540 var _RoutesPreferred_serviceDesc = grpc.ServiceDesc{
541 ServiceName: "google.maps.routes.v1.RoutesPreferred",
542 HandlerType: (*RoutesPreferredServer)(nil),
543 Methods: []grpc.MethodDesc{
544 {
545 MethodName: "ComputeRoutes",
546 Handler: _RoutesPreferred_ComputeRoutes_Handler,
547 },
548 {
549 MethodName: "ComputeCustomRoutes",
550 Handler: _RoutesPreferred_ComputeCustomRoutes_Handler,
551 },
552 },
553 Streams: []grpc.StreamDesc{
554 {
555 StreamName: "ComputeRouteMatrix",
556 Handler: _RoutesPreferred_ComputeRouteMatrix_Handler,
557 ServerStreams: true,
558 },
559 },
560 Metadata: "google/maps/routes/v1/route_service.proto",
561 }
562
View as plain text