-
Notifications
You must be signed in to change notification settings - Fork 305
/
end_device_services.pb.go
520 lines (473 loc) · 22.5 KB
/
end_device_services.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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
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
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
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
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
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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/end_device_services.proto
package ttnpb
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
golang_proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = golang_proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("lorawan-stack/api/end_device_services.proto", fileDescriptor_36b7c5a531ab03ac)
}
func init() {
golang_proto.RegisterFile("lorawan-stack/api/end_device_services.proto", fileDescriptor_36b7c5a531ab03ac)
}
var fileDescriptor_36b7c5a531ab03ac = []byte{
// 642 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x31, 0x4c, 0x14, 0x41,
0x14, 0x9d, 0x51, 0x73, 0x24, 0x6b, 0xd4, 0x38, 0x09, 0x46, 0x57, 0xf3, 0x13, 0x17, 0x35, 0x06,
0xe3, 0x8e, 0x81, 0x68, 0x0c, 0x85, 0x05, 0x70, 0x10, 0x88, 0x85, 0x31, 0xd2, 0xd8, 0x1c, 0x7b,
0x77, 0xff, 0x8e, 0xcd, 0x1d, 0xbb, 0xeb, 0xee, 0xe7, 0x08, 0x21, 0x24, 0xc4, 0x0a, 0x3b, 0xa3,
0x8d, 0x8d, 0x89, 0x8d, 0x09, 0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, 0x72, 0xbc, 0x62, 0x31,
0x17, 0xf7, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xe0, 0xb9, 0x8c, 0x2d, 0x06,
0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EndDeviceRegistryClient is the client API for EndDeviceRegistry service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EndDeviceRegistryClient interface {
// Create a new end device within an application.
//
// After registering an end device, it also needs to be registered in
// the NsEndDeviceRegistry that is exposed by the Network Server,
// the AsEndDeviceRegistry that is exposed by the Application Server,
// and the JsEndDeviceRegistry that is exposed by the Join Server.
Create(ctx context.Context, in *CreateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Get the end device with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(ctx context.Context, in *GetEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Get the identifiers of the end device that has the given EUIs registered.
GetIdentifiersForEUIs(ctx context.Context, in *GetEndDeviceIdentifiersForEUIsRequest, opts ...grpc.CallOption) (*EndDeviceIdentifiers, error)
// List end devices in the given application.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(ctx context.Context, in *ListEndDevicesRequest, opts ...grpc.CallOption) (*EndDevices, error)
// Update the OAuth client, changing the fields specified by the field mask to the provided values.
Update(ctx context.Context, in *UpdateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Delete the end device with the given IDs.
//
// Before deleting an end device it first needs to be deleted from the
// NsEndDeviceRegistry, the AsEndDeviceRegistry and the JsEndDeviceRegistry.
// This is NOT done automatically.
Delete(ctx context.Context, in *EndDeviceIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
}
type endDeviceRegistryClient struct {
cc *grpc.ClientConn
}
func NewEndDeviceRegistryClient(cc *grpc.ClientConn) EndDeviceRegistryClient {
return &endDeviceRegistryClient{cc}
}
func (c *endDeviceRegistryClient) Create(ctx context.Context, in *CreateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Get(ctx context.Context, in *GetEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) GetIdentifiersForEUIs(ctx context.Context, in *GetEndDeviceIdentifiersForEUIsRequest, opts ...grpc.CallOption) (*EndDeviceIdentifiers, error) {
out := new(EndDeviceIdentifiers)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/GetIdentifiersForEUIs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) List(ctx context.Context, in *ListEndDevicesRequest, opts ...grpc.CallOption) (*EndDevices, error) {
out := new(EndDevices)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Update(ctx context.Context, in *UpdateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Delete(ctx context.Context, in *EndDeviceIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EndDeviceRegistryServer is the server API for EndDeviceRegistry service.
type EndDeviceRegistryServer interface {
// Create a new end device within an application.
//
// After registering an end device, it also needs to be registered in
// the NsEndDeviceRegistry that is exposed by the Network Server,
// the AsEndDeviceRegistry that is exposed by the Application Server,
// and the JsEndDeviceRegistry that is exposed by the Join Server.
Create(context.Context, *CreateEndDeviceRequest) (*EndDevice, error)
// Get the end device with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(context.Context, *GetEndDeviceRequest) (*EndDevice, error)
// Get the identifiers of the end device that has the given EUIs registered.
GetIdentifiersForEUIs(context.Context, *GetEndDeviceIdentifiersForEUIsRequest) (*EndDeviceIdentifiers, error)
// List end devices in the given application.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(context.Context, *ListEndDevicesRequest) (*EndDevices, error)
// Update the OAuth client, changing the fields specified by the field mask to the provided values.
Update(context.Context, *UpdateEndDeviceRequest) (*EndDevice, error)
// Delete the end device with the given IDs.
//
// Before deleting an end device it first needs to be deleted from the
// NsEndDeviceRegistry, the AsEndDeviceRegistry and the JsEndDeviceRegistry.
// This is NOT done automatically.
Delete(context.Context, *EndDeviceIdentifiers) (*types.Empty, error)
}
// UnimplementedEndDeviceRegistryServer can be embedded to have forward compatible implementations.
type UnimplementedEndDeviceRegistryServer struct {
}
func (*UnimplementedEndDeviceRegistryServer) Create(ctx context.Context, req *CreateEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Get(ctx context.Context, req *GetEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) GetIdentifiersForEUIs(ctx context.Context, req *GetEndDeviceIdentifiersForEUIsRequest) (*EndDeviceIdentifiers, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetIdentifiersForEUIs not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) List(ctx context.Context, req *ListEndDevicesRequest) (*EndDevices, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Update(ctx context.Context, req *UpdateEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Delete(ctx context.Context, req *EndDeviceIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func RegisterEndDeviceRegistryServer(s *grpc.Server, srv EndDeviceRegistryServer) {
s.RegisterService(&_EndDeviceRegistry_serviceDesc, srv)
}
func _EndDeviceRegistry_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Create(ctx, req.(*CreateEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Get(ctx, req.(*GetEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_GetIdentifiersForEUIs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEndDeviceIdentifiersForEUIsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).GetIdentifiersForEUIs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/GetIdentifiersForEUIs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).GetIdentifiersForEUIs(ctx, req.(*GetEndDeviceIdentifiersForEUIsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListEndDevicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).List(ctx, req.(*ListEndDevicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Update(ctx, req.(*UpdateEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EndDeviceIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Delete(ctx, req.(*EndDeviceIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
var _EndDeviceRegistry_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.EndDeviceRegistry",
HandlerType: (*EndDeviceRegistryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _EndDeviceRegistry_Create_Handler,
},
{
MethodName: "Get",
Handler: _EndDeviceRegistry_Get_Handler,
},
{
MethodName: "GetIdentifiersForEUIs",
Handler: _EndDeviceRegistry_GetIdentifiersForEUIs_Handler,
},
{
MethodName: "List",
Handler: _EndDeviceRegistry_List_Handler,
},
{
MethodName: "Update",
Handler: _EndDeviceRegistry_Update_Handler,
},
{
MethodName: "Delete",
Handler: _EndDeviceRegistry_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/end_device_services.proto",
}
// EndDeviceTemplateConverterClient is the client API for EndDeviceTemplateConverter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EndDeviceTemplateConverterClient interface {
// Returns the configured formats to convert from.
ListFormats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*EndDeviceTemplateFormats, error)
// Converts the binary data to a stream of end device templates.
Convert(ctx context.Context, in *ConvertEndDeviceTemplateRequest, opts ...grpc.CallOption) (EndDeviceTemplateConverter_ConvertClient, error)
}
type endDeviceTemplateConverterClient struct {
cc *grpc.ClientConn
}
func NewEndDeviceTemplateConverterClient(cc *grpc.ClientConn) EndDeviceTemplateConverterClient {
return &endDeviceTemplateConverterClient{cc}
}
func (c *endDeviceTemplateConverterClient) ListFormats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*EndDeviceTemplateFormats, error) {
out := new(EndDeviceTemplateFormats)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceTemplateConverter/ListFormats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceTemplateConverterClient) Convert(ctx context.Context, in *ConvertEndDeviceTemplateRequest, opts ...grpc.CallOption) (EndDeviceTemplateConverter_ConvertClient, error) {
stream, err := c.cc.NewStream(ctx, &_EndDeviceTemplateConverter_serviceDesc.Streams[0], "/ttn.lorawan.v3.EndDeviceTemplateConverter/Convert", opts...)
if err != nil {
return nil, err
}
x := &endDeviceTemplateConverterConvertClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type EndDeviceTemplateConverter_ConvertClient interface {
Recv() (*EndDeviceTemplate, error)
grpc.ClientStream
}
type endDeviceTemplateConverterConvertClient struct {
grpc.ClientStream
}
func (x *endDeviceTemplateConverterConvertClient) Recv() (*EndDeviceTemplate, error) {
m := new(EndDeviceTemplate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// EndDeviceTemplateConverterServer is the server API for EndDeviceTemplateConverter service.
type EndDeviceTemplateConverterServer interface {
// Returns the configured formats to convert from.
ListFormats(context.Context, *types.Empty) (*EndDeviceTemplateFormats, error)
// Converts the binary data to a stream of end device templates.
Convert(*ConvertEndDeviceTemplateRequest, EndDeviceTemplateConverter_ConvertServer) error
}
// UnimplementedEndDeviceTemplateConverterServer can be embedded to have forward compatible implementations.
type UnimplementedEndDeviceTemplateConverterServer struct {
}
func (*UnimplementedEndDeviceTemplateConverterServer) ListFormats(ctx context.Context, req *types.Empty) (*EndDeviceTemplateFormats, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListFormats not implemented")
}
func (*UnimplementedEndDeviceTemplateConverterServer) Convert(req *ConvertEndDeviceTemplateRequest, srv EndDeviceTemplateConverter_ConvertServer) error {
return status.Errorf(codes.Unimplemented, "method Convert not implemented")
}
func RegisterEndDeviceTemplateConverterServer(s *grpc.Server, srv EndDeviceTemplateConverterServer) {
s.RegisterService(&_EndDeviceTemplateConverter_serviceDesc, srv)
}
func _EndDeviceTemplateConverter_ListFormats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(types.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceTemplateConverterServer).ListFormats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceTemplateConverter/ListFormats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceTemplateConverterServer).ListFormats(ctx, req.(*types.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceTemplateConverter_Convert_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ConvertEndDeviceTemplateRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EndDeviceTemplateConverterServer).Convert(m, &endDeviceTemplateConverterConvertServer{stream})
}
type EndDeviceTemplateConverter_ConvertServer interface {
Send(*EndDeviceTemplate) error
grpc.ServerStream
}
type endDeviceTemplateConverterConvertServer struct {
grpc.ServerStream
}
func (x *endDeviceTemplateConverterConvertServer) Send(m *EndDeviceTemplate) error {
return x.ServerStream.SendMsg(m)
}
var _EndDeviceTemplateConverter_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.EndDeviceTemplateConverter",
HandlerType: (*EndDeviceTemplateConverterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListFormats",
Handler: _EndDeviceTemplateConverter_ListFormats_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Convert",
Handler: _EndDeviceTemplateConverter_Convert_Handler,
ServerStreams: true,
},
},
Metadata: "lorawan-stack/api/end_device_services.proto",
}