-
Notifications
You must be signed in to change notification settings - Fork 3
/
history_grpc.pb.go
598 lines (521 loc) · 24.8 KB
/
history_grpc.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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.25.2
// source: history.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
HistoryAdminApi_CreateHistoryRecord_FullMethodName = "/smartcore.bos.HistoryAdminApi/CreateHistoryRecord"
HistoryAdminApi_ListHistoryRecords_FullMethodName = "/smartcore.bos.HistoryAdminApi/ListHistoryRecords"
)
// HistoryAdminApiClient is the client API for HistoryAdminApi service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type HistoryAdminApiClient interface {
CreateHistoryRecord(ctx context.Context, in *CreateHistoryRecordRequest, opts ...grpc.CallOption) (*HistoryRecord, error)
ListHistoryRecords(ctx context.Context, in *ListHistoryRecordsRequest, opts ...grpc.CallOption) (*ListHistoryRecordsResponse, error)
}
type historyAdminApiClient struct {
cc grpc.ClientConnInterface
}
func NewHistoryAdminApiClient(cc grpc.ClientConnInterface) HistoryAdminApiClient {
return &historyAdminApiClient{cc}
}
func (c *historyAdminApiClient) CreateHistoryRecord(ctx context.Context, in *CreateHistoryRecordRequest, opts ...grpc.CallOption) (*HistoryRecord, error) {
out := new(HistoryRecord)
err := c.cc.Invoke(ctx, HistoryAdminApi_CreateHistoryRecord_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *historyAdminApiClient) ListHistoryRecords(ctx context.Context, in *ListHistoryRecordsRequest, opts ...grpc.CallOption) (*ListHistoryRecordsResponse, error) {
out := new(ListHistoryRecordsResponse)
err := c.cc.Invoke(ctx, HistoryAdminApi_ListHistoryRecords_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HistoryAdminApiServer is the server API for HistoryAdminApi service.
// All implementations must embed UnimplementedHistoryAdminApiServer
// for forward compatibility
type HistoryAdminApiServer interface {
CreateHistoryRecord(context.Context, *CreateHistoryRecordRequest) (*HistoryRecord, error)
ListHistoryRecords(context.Context, *ListHistoryRecordsRequest) (*ListHistoryRecordsResponse, error)
mustEmbedUnimplementedHistoryAdminApiServer()
}
// UnimplementedHistoryAdminApiServer must be embedded to have forward compatible implementations.
type UnimplementedHistoryAdminApiServer struct {
}
func (UnimplementedHistoryAdminApiServer) CreateHistoryRecord(context.Context, *CreateHistoryRecordRequest) (*HistoryRecord, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateHistoryRecord not implemented")
}
func (UnimplementedHistoryAdminApiServer) ListHistoryRecords(context.Context, *ListHistoryRecordsRequest) (*ListHistoryRecordsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListHistoryRecords not implemented")
}
func (UnimplementedHistoryAdminApiServer) mustEmbedUnimplementedHistoryAdminApiServer() {}
// UnsafeHistoryAdminApiServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HistoryAdminApiServer will
// result in compilation errors.
type UnsafeHistoryAdminApiServer interface {
mustEmbedUnimplementedHistoryAdminApiServer()
}
func RegisterHistoryAdminApiServer(s grpc.ServiceRegistrar, srv HistoryAdminApiServer) {
s.RegisterService(&HistoryAdminApi_ServiceDesc, srv)
}
func _HistoryAdminApi_CreateHistoryRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateHistoryRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HistoryAdminApiServer).CreateHistoryRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HistoryAdminApi_CreateHistoryRecord_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HistoryAdminApiServer).CreateHistoryRecord(ctx, req.(*CreateHistoryRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HistoryAdminApi_ListHistoryRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListHistoryRecordsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HistoryAdminApiServer).ListHistoryRecords(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HistoryAdminApi_ListHistoryRecords_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HistoryAdminApiServer).ListHistoryRecords(ctx, req.(*ListHistoryRecordsRequest))
}
return interceptor(ctx, in, info, handler)
}
// HistoryAdminApi_ServiceDesc is the grpc.ServiceDesc for HistoryAdminApi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HistoryAdminApi_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.HistoryAdminApi",
HandlerType: (*HistoryAdminApiServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateHistoryRecord",
Handler: _HistoryAdminApi_CreateHistoryRecord_Handler,
},
{
MethodName: "ListHistoryRecords",
Handler: _HistoryAdminApi_ListHistoryRecords_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}
const (
AirTemperatureHistory_ListAirTemperatureHistory_FullMethodName = "/smartcore.bos.AirTemperatureHistory/ListAirTemperatureHistory"
)
// AirTemperatureHistoryClient is the client API for AirTemperatureHistory service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AirTemperatureHistoryClient interface {
ListAirTemperatureHistory(ctx context.Context, in *ListAirTemperatureHistoryRequest, opts ...grpc.CallOption) (*ListAirTemperatureHistoryResponse, error)
}
type airTemperatureHistoryClient struct {
cc grpc.ClientConnInterface
}
func NewAirTemperatureHistoryClient(cc grpc.ClientConnInterface) AirTemperatureHistoryClient {
return &airTemperatureHistoryClient{cc}
}
func (c *airTemperatureHistoryClient) ListAirTemperatureHistory(ctx context.Context, in *ListAirTemperatureHistoryRequest, opts ...grpc.CallOption) (*ListAirTemperatureHistoryResponse, error) {
out := new(ListAirTemperatureHistoryResponse)
err := c.cc.Invoke(ctx, AirTemperatureHistory_ListAirTemperatureHistory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AirTemperatureHistoryServer is the server API for AirTemperatureHistory service.
// All implementations must embed UnimplementedAirTemperatureHistoryServer
// for forward compatibility
type AirTemperatureHistoryServer interface {
ListAirTemperatureHistory(context.Context, *ListAirTemperatureHistoryRequest) (*ListAirTemperatureHistoryResponse, error)
mustEmbedUnimplementedAirTemperatureHistoryServer()
}
// UnimplementedAirTemperatureHistoryServer must be embedded to have forward compatible implementations.
type UnimplementedAirTemperatureHistoryServer struct {
}
func (UnimplementedAirTemperatureHistoryServer) ListAirTemperatureHistory(context.Context, *ListAirTemperatureHistoryRequest) (*ListAirTemperatureHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAirTemperatureHistory not implemented")
}
func (UnimplementedAirTemperatureHistoryServer) mustEmbedUnimplementedAirTemperatureHistoryServer() {}
// UnsafeAirTemperatureHistoryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AirTemperatureHistoryServer will
// result in compilation errors.
type UnsafeAirTemperatureHistoryServer interface {
mustEmbedUnimplementedAirTemperatureHistoryServer()
}
func RegisterAirTemperatureHistoryServer(s grpc.ServiceRegistrar, srv AirTemperatureHistoryServer) {
s.RegisterService(&AirTemperatureHistory_ServiceDesc, srv)
}
func _AirTemperatureHistory_ListAirTemperatureHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAirTemperatureHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AirTemperatureHistoryServer).ListAirTemperatureHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AirTemperatureHistory_ListAirTemperatureHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AirTemperatureHistoryServer).ListAirTemperatureHistory(ctx, req.(*ListAirTemperatureHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// AirTemperatureHistory_ServiceDesc is the grpc.ServiceDesc for AirTemperatureHistory service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AirTemperatureHistory_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.AirTemperatureHistory",
HandlerType: (*AirTemperatureHistoryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListAirTemperatureHistory",
Handler: _AirTemperatureHistory_ListAirTemperatureHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}
const (
MeterHistory_ListMeterReadingHistory_FullMethodName = "/smartcore.bos.MeterHistory/ListMeterReadingHistory"
)
// MeterHistoryClient is the client API for MeterHistory service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MeterHistoryClient interface {
ListMeterReadingHistory(ctx context.Context, in *ListMeterReadingHistoryRequest, opts ...grpc.CallOption) (*ListMeterReadingHistoryResponse, error)
}
type meterHistoryClient struct {
cc grpc.ClientConnInterface
}
func NewMeterHistoryClient(cc grpc.ClientConnInterface) MeterHistoryClient {
return &meterHistoryClient{cc}
}
func (c *meterHistoryClient) ListMeterReadingHistory(ctx context.Context, in *ListMeterReadingHistoryRequest, opts ...grpc.CallOption) (*ListMeterReadingHistoryResponse, error) {
out := new(ListMeterReadingHistoryResponse)
err := c.cc.Invoke(ctx, MeterHistory_ListMeterReadingHistory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MeterHistoryServer is the server API for MeterHistory service.
// All implementations must embed UnimplementedMeterHistoryServer
// for forward compatibility
type MeterHistoryServer interface {
ListMeterReadingHistory(context.Context, *ListMeterReadingHistoryRequest) (*ListMeterReadingHistoryResponse, error)
mustEmbedUnimplementedMeterHistoryServer()
}
// UnimplementedMeterHistoryServer must be embedded to have forward compatible implementations.
type UnimplementedMeterHistoryServer struct {
}
func (UnimplementedMeterHistoryServer) ListMeterReadingHistory(context.Context, *ListMeterReadingHistoryRequest) (*ListMeterReadingHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListMeterReadingHistory not implemented")
}
func (UnimplementedMeterHistoryServer) mustEmbedUnimplementedMeterHistoryServer() {}
// UnsafeMeterHistoryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MeterHistoryServer will
// result in compilation errors.
type UnsafeMeterHistoryServer interface {
mustEmbedUnimplementedMeterHistoryServer()
}
func RegisterMeterHistoryServer(s grpc.ServiceRegistrar, srv MeterHistoryServer) {
s.RegisterService(&MeterHistory_ServiceDesc, srv)
}
func _MeterHistory_ListMeterReadingHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListMeterReadingHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MeterHistoryServer).ListMeterReadingHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MeterHistory_ListMeterReadingHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MeterHistoryServer).ListMeterReadingHistory(ctx, req.(*ListMeterReadingHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// MeterHistory_ServiceDesc is the grpc.ServiceDesc for MeterHistory service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MeterHistory_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.MeterHistory",
HandlerType: (*MeterHistoryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListMeterReadingHistory",
Handler: _MeterHistory_ListMeterReadingHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}
const (
ElectricHistory_ListElectricDemandHistory_FullMethodName = "/smartcore.bos.ElectricHistory/ListElectricDemandHistory"
)
// ElectricHistoryClient is the client API for ElectricHistory service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ElectricHistoryClient interface {
ListElectricDemandHistory(ctx context.Context, in *ListElectricDemandHistoryRequest, opts ...grpc.CallOption) (*ListElectricDemandHistoryResponse, error)
}
type electricHistoryClient struct {
cc grpc.ClientConnInterface
}
func NewElectricHistoryClient(cc grpc.ClientConnInterface) ElectricHistoryClient {
return &electricHistoryClient{cc}
}
func (c *electricHistoryClient) ListElectricDemandHistory(ctx context.Context, in *ListElectricDemandHistoryRequest, opts ...grpc.CallOption) (*ListElectricDemandHistoryResponse, error) {
out := new(ListElectricDemandHistoryResponse)
err := c.cc.Invoke(ctx, ElectricHistory_ListElectricDemandHistory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ElectricHistoryServer is the server API for ElectricHistory service.
// All implementations must embed UnimplementedElectricHistoryServer
// for forward compatibility
type ElectricHistoryServer interface {
ListElectricDemandHistory(context.Context, *ListElectricDemandHistoryRequest) (*ListElectricDemandHistoryResponse, error)
mustEmbedUnimplementedElectricHistoryServer()
}
// UnimplementedElectricHistoryServer must be embedded to have forward compatible implementations.
type UnimplementedElectricHistoryServer struct {
}
func (UnimplementedElectricHistoryServer) ListElectricDemandHistory(context.Context, *ListElectricDemandHistoryRequest) (*ListElectricDemandHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListElectricDemandHistory not implemented")
}
func (UnimplementedElectricHistoryServer) mustEmbedUnimplementedElectricHistoryServer() {}
// UnsafeElectricHistoryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ElectricHistoryServer will
// result in compilation errors.
type UnsafeElectricHistoryServer interface {
mustEmbedUnimplementedElectricHistoryServer()
}
func RegisterElectricHistoryServer(s grpc.ServiceRegistrar, srv ElectricHistoryServer) {
s.RegisterService(&ElectricHistory_ServiceDesc, srv)
}
func _ElectricHistory_ListElectricDemandHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListElectricDemandHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ElectricHistoryServer).ListElectricDemandHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ElectricHistory_ListElectricDemandHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ElectricHistoryServer).ListElectricDemandHistory(ctx, req.(*ListElectricDemandHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// ElectricHistory_ServiceDesc is the grpc.ServiceDesc for ElectricHistory service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ElectricHistory_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.ElectricHistory",
HandlerType: (*ElectricHistoryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListElectricDemandHistory",
Handler: _ElectricHistory_ListElectricDemandHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}
const (
OccupancySensorHistory_ListOccupancyHistory_FullMethodName = "/smartcore.bos.OccupancySensorHistory/ListOccupancyHistory"
)
// OccupancySensorHistoryClient is the client API for OccupancySensorHistory service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type OccupancySensorHistoryClient interface {
ListOccupancyHistory(ctx context.Context, in *ListOccupancyHistoryRequest, opts ...grpc.CallOption) (*ListOccupancyHistoryResponse, error)
}
type occupancySensorHistoryClient struct {
cc grpc.ClientConnInterface
}
func NewOccupancySensorHistoryClient(cc grpc.ClientConnInterface) OccupancySensorHistoryClient {
return &occupancySensorHistoryClient{cc}
}
func (c *occupancySensorHistoryClient) ListOccupancyHistory(ctx context.Context, in *ListOccupancyHistoryRequest, opts ...grpc.CallOption) (*ListOccupancyHistoryResponse, error) {
out := new(ListOccupancyHistoryResponse)
err := c.cc.Invoke(ctx, OccupancySensorHistory_ListOccupancyHistory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OccupancySensorHistoryServer is the server API for OccupancySensorHistory service.
// All implementations must embed UnimplementedOccupancySensorHistoryServer
// for forward compatibility
type OccupancySensorHistoryServer interface {
ListOccupancyHistory(context.Context, *ListOccupancyHistoryRequest) (*ListOccupancyHistoryResponse, error)
mustEmbedUnimplementedOccupancySensorHistoryServer()
}
// UnimplementedOccupancySensorHistoryServer must be embedded to have forward compatible implementations.
type UnimplementedOccupancySensorHistoryServer struct {
}
func (UnimplementedOccupancySensorHistoryServer) ListOccupancyHistory(context.Context, *ListOccupancyHistoryRequest) (*ListOccupancyHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListOccupancyHistory not implemented")
}
func (UnimplementedOccupancySensorHistoryServer) mustEmbedUnimplementedOccupancySensorHistoryServer() {
}
// UnsafeOccupancySensorHistoryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to OccupancySensorHistoryServer will
// result in compilation errors.
type UnsafeOccupancySensorHistoryServer interface {
mustEmbedUnimplementedOccupancySensorHistoryServer()
}
func RegisterOccupancySensorHistoryServer(s grpc.ServiceRegistrar, srv OccupancySensorHistoryServer) {
s.RegisterService(&OccupancySensorHistory_ServiceDesc, srv)
}
func _OccupancySensorHistory_ListOccupancyHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListOccupancyHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OccupancySensorHistoryServer).ListOccupancyHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: OccupancySensorHistory_ListOccupancyHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OccupancySensorHistoryServer).ListOccupancyHistory(ctx, req.(*ListOccupancyHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// OccupancySensorHistory_ServiceDesc is the grpc.ServiceDesc for OccupancySensorHistory service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OccupancySensorHistory_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.OccupancySensorHistory",
HandlerType: (*OccupancySensorHistoryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListOccupancyHistory",
Handler: _OccupancySensorHistory_ListOccupancyHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}
const (
AirQualitySensorHistory_ListAirQualityHistory_FullMethodName = "/smartcore.bos.AirQualitySensorHistory/ListAirQualityHistory"
)
// AirQualitySensorHistoryClient is the client API for AirQualitySensorHistory service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AirQualitySensorHistoryClient interface {
ListAirQualityHistory(ctx context.Context, in *ListAirQualityHistoryRequest, opts ...grpc.CallOption) (*ListAirQualityHistoryResponse, error)
}
type airQualitySensorHistoryClient struct {
cc grpc.ClientConnInterface
}
func NewAirQualitySensorHistoryClient(cc grpc.ClientConnInterface) AirQualitySensorHistoryClient {
return &airQualitySensorHistoryClient{cc}
}
func (c *airQualitySensorHistoryClient) ListAirQualityHistory(ctx context.Context, in *ListAirQualityHistoryRequest, opts ...grpc.CallOption) (*ListAirQualityHistoryResponse, error) {
out := new(ListAirQualityHistoryResponse)
err := c.cc.Invoke(ctx, AirQualitySensorHistory_ListAirQualityHistory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AirQualitySensorHistoryServer is the server API for AirQualitySensorHistory service.
// All implementations must embed UnimplementedAirQualitySensorHistoryServer
// for forward compatibility
type AirQualitySensorHistoryServer interface {
ListAirQualityHistory(context.Context, *ListAirQualityHistoryRequest) (*ListAirQualityHistoryResponse, error)
mustEmbedUnimplementedAirQualitySensorHistoryServer()
}
// UnimplementedAirQualitySensorHistoryServer must be embedded to have forward compatible implementations.
type UnimplementedAirQualitySensorHistoryServer struct {
}
func (UnimplementedAirQualitySensorHistoryServer) ListAirQualityHistory(context.Context, *ListAirQualityHistoryRequest) (*ListAirQualityHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAirQualityHistory not implemented")
}
func (UnimplementedAirQualitySensorHistoryServer) mustEmbedUnimplementedAirQualitySensorHistoryServer() {
}
// UnsafeAirQualitySensorHistoryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AirQualitySensorHistoryServer will
// result in compilation errors.
type UnsafeAirQualitySensorHistoryServer interface {
mustEmbedUnimplementedAirQualitySensorHistoryServer()
}
func RegisterAirQualitySensorHistoryServer(s grpc.ServiceRegistrar, srv AirQualitySensorHistoryServer) {
s.RegisterService(&AirQualitySensorHistory_ServiceDesc, srv)
}
func _AirQualitySensorHistory_ListAirQualityHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAirQualityHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AirQualitySensorHistoryServer).ListAirQualityHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AirQualitySensorHistory_ListAirQualityHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AirQualitySensorHistoryServer).ListAirQualityHistory(ctx, req.(*ListAirQualityHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// AirQualitySensorHistory_ServiceDesc is the grpc.ServiceDesc for AirQualitySensorHistory service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AirQualitySensorHistory_ServiceDesc = grpc.ServiceDesc{
ServiceName: "smartcore.bos.AirQualitySensorHistory",
HandlerType: (*AirQualitySensorHistoryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListAirQualityHistory",
Handler: _AirQualitySensorHistory_ListAirQualityHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "history.proto",
}