@aceplus/smartace-api 3.6.0-alpha.8 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,101 @@
1
+ // package: Spic
2
+ // file: spic.alarm.proto
3
+
4
+ import * as spic_alarm_pb from "./spic.alarm_pb";
5
+ import {grpc} from "@improbable-eng/grpc-web";
6
+
7
+ type AlarmGRPCSearchAlarms = {
8
+ readonly methodName: string;
9
+ readonly service: typeof AlarmGRPC;
10
+ readonly requestStream: false;
11
+ readonly responseStream: false;
12
+ readonly requestType: typeof spic_alarm_pb.AlarmProto.SearchRequest;
13
+ readonly responseType: typeof spic_alarm_pb.AlarmProto.SearchReply;
14
+ };
15
+
16
+ type AlarmGRPCAlarmAddAction = {
17
+ readonly methodName: string;
18
+ readonly service: typeof AlarmGRPC;
19
+ readonly requestStream: false;
20
+ readonly responseStream: false;
21
+ readonly requestType: typeof spic_alarm_pb.AlarmProto.AddActionRequest;
22
+ readonly responseType: typeof spic_alarm_pb.AlarmProto.AlarmAction;
23
+ };
24
+
25
+ type AlarmGRPCSearchEvents = {
26
+ readonly methodName: string;
27
+ readonly service: typeof AlarmGRPC;
28
+ readonly requestStream: false;
29
+ readonly responseStream: false;
30
+ readonly requestType: typeof spic_alarm_pb.AlarmProto.Event.SearchRequest;
31
+ readonly responseType: typeof spic_alarm_pb.AlarmProto.Event.SearchReply;
32
+ };
33
+
34
+ export class AlarmGRPC {
35
+ static readonly serviceName: string;
36
+ static readonly SearchAlarms: AlarmGRPCSearchAlarms;
37
+ static readonly AlarmAddAction: AlarmGRPCAlarmAddAction;
38
+ static readonly SearchEvents: AlarmGRPCSearchEvents;
39
+ }
40
+
41
+ export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
42
+ export type Status = { details: string, code: number; metadata: grpc.Metadata }
43
+
44
+ interface UnaryResponse {
45
+ cancel(): void;
46
+ }
47
+ interface ResponseStream<T> {
48
+ cancel(): void;
49
+ on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
50
+ on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
51
+ on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
52
+ }
53
+ interface RequestStream<T> {
54
+ write(message: T): RequestStream<T>;
55
+ end(): void;
56
+ cancel(): void;
57
+ on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
58
+ on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
59
+ }
60
+ interface BidirectionalStream<ReqT, ResT> {
61
+ write(message: ReqT): BidirectionalStream<ReqT, ResT>;
62
+ end(): void;
63
+ cancel(): void;
64
+ on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
65
+ on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
66
+ on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
67
+ }
68
+
69
+ export class AlarmGRPCClient {
70
+ readonly serviceHost: string;
71
+
72
+ constructor(serviceHost: string, options?: grpc.RpcOptions);
73
+ searchAlarms(
74
+ requestMessage: spic_alarm_pb.AlarmProto.SearchRequest,
75
+ metadata: grpc.Metadata,
76
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.SearchReply|null) => void
77
+ ): UnaryResponse;
78
+ searchAlarms(
79
+ requestMessage: spic_alarm_pb.AlarmProto.SearchRequest,
80
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.SearchReply|null) => void
81
+ ): UnaryResponse;
82
+ alarmAddAction(
83
+ requestMessage: spic_alarm_pb.AlarmProto.AddActionRequest,
84
+ metadata: grpc.Metadata,
85
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.AlarmAction|null) => void
86
+ ): UnaryResponse;
87
+ alarmAddAction(
88
+ requestMessage: spic_alarm_pb.AlarmProto.AddActionRequest,
89
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.AlarmAction|null) => void
90
+ ): UnaryResponse;
91
+ searchEvents(
92
+ requestMessage: spic_alarm_pb.AlarmProto.Event.SearchRequest,
93
+ metadata: grpc.Metadata,
94
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.Event.SearchReply|null) => void
95
+ ): UnaryResponse;
96
+ searchEvents(
97
+ requestMessage: spic_alarm_pb.AlarmProto.Event.SearchRequest,
98
+ callback: (error: ServiceError|null, responseMessage: spic_alarm_pb.AlarmProto.Event.SearchReply|null) => void
99
+ ): UnaryResponse;
100
+ }
101
+
@@ -0,0 +1,141 @@
1
+ // package: Spic
2
+ // file: spic.alarm.proto
3
+
4
+ var spic_alarm_pb = require("./spic.alarm_pb");
5
+ var grpc = require("@improbable-eng/grpc-web").grpc;
6
+
7
+ var AlarmGRPC = (function () {
8
+ function AlarmGRPC() {}
9
+ AlarmGRPC.serviceName = "Spic.AlarmGRPC";
10
+ return AlarmGRPC;
11
+ }());
12
+
13
+ AlarmGRPC.SearchAlarms = {
14
+ methodName: "SearchAlarms",
15
+ service: AlarmGRPC,
16
+ requestStream: false,
17
+ responseStream: false,
18
+ requestType: spic_alarm_pb.AlarmProto.SearchRequest,
19
+ responseType: spic_alarm_pb.AlarmProto.SearchReply
20
+ };
21
+
22
+ AlarmGRPC.AlarmAddAction = {
23
+ methodName: "AlarmAddAction",
24
+ service: AlarmGRPC,
25
+ requestStream: false,
26
+ responseStream: false,
27
+ requestType: spic_alarm_pb.AlarmProto.AddActionRequest,
28
+ responseType: spic_alarm_pb.AlarmProto.AlarmAction
29
+ };
30
+
31
+ AlarmGRPC.SearchEvents = {
32
+ methodName: "SearchEvents",
33
+ service: AlarmGRPC,
34
+ requestStream: false,
35
+ responseStream: false,
36
+ requestType: spic_alarm_pb.AlarmProto.Event.SearchRequest,
37
+ responseType: spic_alarm_pb.AlarmProto.Event.SearchReply
38
+ };
39
+
40
+ exports.AlarmGRPC = AlarmGRPC;
41
+
42
+ function AlarmGRPCClient(serviceHost, options) {
43
+ this.serviceHost = serviceHost;
44
+ this.options = options || {};
45
+ }
46
+
47
+ AlarmGRPCClient.prototype.searchAlarms = function searchAlarms(requestMessage, metadata, callback) {
48
+ if (arguments.length === 2) {
49
+ callback = arguments[1];
50
+ }
51
+ var client = grpc.unary(AlarmGRPC.SearchAlarms, {
52
+ request: requestMessage,
53
+ host: this.serviceHost,
54
+ metadata: metadata,
55
+ transport: this.options.transport,
56
+ debug: this.options.debug,
57
+ onEnd: function (response) {
58
+ if (callback) {
59
+ if (response.status !== grpc.Code.OK) {
60
+ var err = new Error(response.statusMessage);
61
+ err.code = response.status;
62
+ err.metadata = response.trailers;
63
+ callback(err, null);
64
+ } else {
65
+ callback(null, response.message);
66
+ }
67
+ }
68
+ }
69
+ });
70
+ return {
71
+ cancel: function () {
72
+ callback = null;
73
+ client.close();
74
+ }
75
+ };
76
+ };
77
+
78
+ AlarmGRPCClient.prototype.alarmAddAction = function alarmAddAction(requestMessage, metadata, callback) {
79
+ if (arguments.length === 2) {
80
+ callback = arguments[1];
81
+ }
82
+ var client = grpc.unary(AlarmGRPC.AlarmAddAction, {
83
+ request: requestMessage,
84
+ host: this.serviceHost,
85
+ metadata: metadata,
86
+ transport: this.options.transport,
87
+ debug: this.options.debug,
88
+ onEnd: function (response) {
89
+ if (callback) {
90
+ if (response.status !== grpc.Code.OK) {
91
+ var err = new Error(response.statusMessage);
92
+ err.code = response.status;
93
+ err.metadata = response.trailers;
94
+ callback(err, null);
95
+ } else {
96
+ callback(null, response.message);
97
+ }
98
+ }
99
+ }
100
+ });
101
+ return {
102
+ cancel: function () {
103
+ callback = null;
104
+ client.close();
105
+ }
106
+ };
107
+ };
108
+
109
+ AlarmGRPCClient.prototype.searchEvents = function searchEvents(requestMessage, metadata, callback) {
110
+ if (arguments.length === 2) {
111
+ callback = arguments[1];
112
+ }
113
+ var client = grpc.unary(AlarmGRPC.SearchEvents, {
114
+ request: requestMessage,
115
+ host: this.serviceHost,
116
+ metadata: metadata,
117
+ transport: this.options.transport,
118
+ debug: this.options.debug,
119
+ onEnd: function (response) {
120
+ if (callback) {
121
+ if (response.status !== grpc.Code.OK) {
122
+ var err = new Error(response.statusMessage);
123
+ err.code = response.status;
124
+ err.metadata = response.trailers;
125
+ callback(err, null);
126
+ } else {
127
+ callback(null, response.message);
128
+ }
129
+ }
130
+ }
131
+ });
132
+ return {
133
+ cancel: function () {
134
+ callback = null;
135
+ client.close();
136
+ }
137
+ };
138
+ };
139
+
140
+ exports.AlarmGRPCClient = AlarmGRPCClient;
141
+
@@ -505,6 +505,9 @@ export namespace AssetProto {
505
505
  clearAttributesMap(): void;
506
506
  getMetadataMap(): jspb.Map<string, string>;
507
507
  clearMetadataMap(): void;
508
+ getDeviceType(): AssetProto.DeviceTypeMap[keyof AssetProto.DeviceTypeMap];
509
+ setDeviceType(value: AssetProto.DeviceTypeMap[keyof AssetProto.DeviceTypeMap]): void;
510
+
508
511
  serializeBinary(): Uint8Array;
509
512
  toObject(includeInstance?: boolean): ComponentState.AsObject;
510
513
  static toObject(includeInstance: boolean, msg: ComponentState): ComponentState.AsObject;
@@ -527,6 +530,37 @@ export namespace AssetProto {
527
530
  lastReported?: google_protobuf_timestamp_pb.Timestamp.AsObject,
528
531
  attributesMap: Array<[string, string]>,
529
532
  metadataMap: Array<[string, string]>,
533
+ deviceType: AssetProto.DeviceTypeMap[keyof AssetProto.DeviceTypeMap],
534
+ }
535
+ }
536
+
537
+ export class StateChangedEvent extends jspb.Message {
538
+ hasState(): boolean;
539
+ clearState(): void;
540
+ getState(): AssetProto.ComponentState | undefined;
541
+ setState(value?: AssetProto.ComponentState): void;
542
+
543
+ getOnlyMetadataUpdated(): boolean;
544
+ setOnlyMetadataUpdated(value: boolean): void;
545
+
546
+ getOnlyAttributesUpdated(): boolean;
547
+ setOnlyAttributesUpdated(value: boolean): void;
548
+
549
+ serializeBinary(): Uint8Array;
550
+ toObject(includeInstance?: boolean): StateChangedEvent.AsObject;
551
+ static toObject(includeInstance: boolean, msg: StateChangedEvent): StateChangedEvent.AsObject;
552
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
553
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
554
+ static serializeBinaryToWriter(message: StateChangedEvent, writer: jspb.BinaryWriter): void;
555
+ static deserializeBinary(bytes: Uint8Array): StateChangedEvent;
556
+ static deserializeBinaryFromReader(message: StateChangedEvent, reader: jspb.BinaryReader): StateChangedEvent;
557
+ }
558
+
559
+ export namespace StateChangedEvent {
560
+ export type AsObject = {
561
+ state?: AssetProto.ComponentState.AsObject,
562
+ onlyMetadataUpdated: boolean,
563
+ onlyAttributesUpdated: boolean,
530
564
  }
531
565
  }
532
566
 
@@ -540,8 +574,8 @@ export namespace AssetProto {
540
574
  export const BatteryStatus: BatteryStatusMap;
541
575
 
542
576
  export interface DeviceTypeMap {
543
- SPICV2_PASSIVE_CABINET: 0;
544
- SPICV2_MANHOLE: 1;
577
+ SPICV2_MANHOLE: 0;
578
+ SPICV2_PASSIVE_CABINET: 1;
545
579
  }
546
580
 
547
581
  export const DeviceType: DeviceTypeMap;
@@ -646,6 +680,9 @@ export interface ComponentIdentifierMap {
646
680
  EXT_ALARM_3: 33;
647
681
  MANHOLE_COVER: 40;
648
682
  MANHOLE_CLOSURE_OPEN: 41;
683
+ MANHOLE_COVER_SENSOR: 42;
684
+ HEARTBEAT_TIMEOUT: 50;
685
+ MAINBOARD_BATTERY_PERCENTAGE: 51;
649
686
  }
650
687
 
651
688
  export const ComponentIdentifier: ComponentIdentifierMap;
package/spic.asset_pb.js CHANGED
@@ -51,6 +51,7 @@ goog.exportSymbol('proto.Spic.AssetProto.RetrieveRequest', null, global);
51
51
  goog.exportSymbol('proto.Spic.AssetProto.RetrieveRequest.SearchCase', null, global);
52
52
  goog.exportSymbol('proto.Spic.AssetProto.SearchReply', null, global);
53
53
  goog.exportSymbol('proto.Spic.AssetProto.SearchRequest', null, global);
54
+ goog.exportSymbol('proto.Spic.AssetProto.StateChangedEvent', null, global);
54
55
  goog.exportSymbol('proto.Spic.AssetProto.UpdateRequest', null, global);
55
56
  goog.exportSymbol('proto.Spic.AssetWithLocation', null, global);
56
57
  goog.exportSymbol('proto.Spic.AssetWithLocationAndDistance', null, global);
@@ -349,6 +350,27 @@ if (goog.DEBUG && !COMPILED) {
349
350
  */
350
351
  proto.Spic.AssetProto.ComponentState.displayName = 'proto.Spic.AssetProto.ComponentState';
351
352
  }
353
+ /**
354
+ * Generated by JsPbCodeGenerator.
355
+ * @param {Array=} opt_data Optional initial data array, typically from a
356
+ * server response, or constructed directly in Javascript. The array is used
357
+ * in place and becomes part of the constructed object. It is not cloned.
358
+ * If no data is provided, the constructed object will be empty, but still
359
+ * valid.
360
+ * @extends {jspb.Message}
361
+ * @constructor
362
+ */
363
+ proto.Spic.AssetProto.StateChangedEvent = function(opt_data) {
364
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
365
+ };
366
+ goog.inherits(proto.Spic.AssetProto.StateChangedEvent, jspb.Message);
367
+ if (goog.DEBUG && !COMPILED) {
368
+ /**
369
+ * @public
370
+ * @override
371
+ */
372
+ proto.Spic.AssetProto.StateChangedEvent.displayName = 'proto.Spic.AssetProto.StateChangedEvent';
373
+ }
352
374
  /**
353
375
  * Generated by JsPbCodeGenerator.
354
376
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -749,8 +771,8 @@ proto.Spic.AssetProto.BatteryStatus = {
749
771
  * @enum {number}
750
772
  */
751
773
  proto.Spic.AssetProto.DeviceType = {
752
- SPICV2_PASSIVE_CABINET: 0,
753
- SPICV2_MANHOLE: 1
774
+ SPICV2_MANHOLE: 0,
775
+ SPICV2_PASSIVE_CABINET: 1
754
776
  };
755
777
 
756
778
  /**
@@ -3295,7 +3317,8 @@ proto.Spic.AssetProto.ComponentState.toObject = function(includeInstance, msg) {
3295
3317
  lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3296
3318
  lastReported: (f = msg.getLastReported()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3297
3319
  attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
3298
- metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
3320
+ metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [],
3321
+ deviceType: jspb.Message.getFieldWithDefault(msg, 11, 0)
3299
3322
  };
3300
3323
 
3301
3324
  if (includeInstance) {
@@ -3379,6 +3402,10 @@ proto.Spic.AssetProto.ComponentState.deserializeBinaryFromReader = function(msg,
3379
3402
  jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3380
3403
  });
3381
3404
  break;
3405
+ case 11:
3406
+ var value = /** @type {!proto.Spic.AssetProto.DeviceType} */ (reader.readEnum());
3407
+ msg.setDeviceType(value);
3408
+ break;
3382
3409
  default:
3383
3410
  reader.skipField();
3384
3411
  break;
@@ -3475,6 +3502,13 @@ proto.Spic.AssetProto.ComponentState.serializeBinaryToWriter = function(message,
3475
3502
  if (f && f.getLength() > 0) {
3476
3503
  f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3477
3504
  }
3505
+ f = message.getDeviceType();
3506
+ if (f !== 0.0) {
3507
+ writer.writeEnum(
3508
+ 11,
3509
+ f
3510
+ );
3511
+ }
3478
3512
  };
3479
3513
 
3480
3514
 
@@ -3725,6 +3759,235 @@ proto.Spic.AssetProto.ComponentState.prototype.clearMetadataMap = function() {
3725
3759
  };
3726
3760
 
3727
3761
 
3762
+ /**
3763
+ * optional DeviceType device_type = 11;
3764
+ * @return {!proto.Spic.AssetProto.DeviceType}
3765
+ */
3766
+ proto.Spic.AssetProto.ComponentState.prototype.getDeviceType = function() {
3767
+ return /** @type {!proto.Spic.AssetProto.DeviceType} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
3768
+ };
3769
+
3770
+
3771
+ /**
3772
+ * @param {!proto.Spic.AssetProto.DeviceType} value
3773
+ * @return {!proto.Spic.AssetProto.ComponentState} returns this
3774
+ */
3775
+ proto.Spic.AssetProto.ComponentState.prototype.setDeviceType = function(value) {
3776
+ return jspb.Message.setProto3EnumField(this, 11, value);
3777
+ };
3778
+
3779
+
3780
+
3781
+
3782
+
3783
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3784
+ /**
3785
+ * Creates an object representation of this proto.
3786
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3787
+ * Optional fields that are not set will be set to undefined.
3788
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3789
+ * For the list of reserved names please see:
3790
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3791
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3792
+ * JSPB instance for transitional soy proto support:
3793
+ * http://goto/soy-param-migration
3794
+ * @return {!Object}
3795
+ */
3796
+ proto.Spic.AssetProto.StateChangedEvent.prototype.toObject = function(opt_includeInstance) {
3797
+ return proto.Spic.AssetProto.StateChangedEvent.toObject(opt_includeInstance, this);
3798
+ };
3799
+
3800
+
3801
+ /**
3802
+ * Static version of the {@see toObject} method.
3803
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3804
+ * the JSPB instance for transitional soy proto support:
3805
+ * http://goto/soy-param-migration
3806
+ * @param {!proto.Spic.AssetProto.StateChangedEvent} msg The msg instance to transform.
3807
+ * @return {!Object}
3808
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3809
+ */
3810
+ proto.Spic.AssetProto.StateChangedEvent.toObject = function(includeInstance, msg) {
3811
+ var f, obj = {
3812
+ state: (f = msg.getState()) && proto.Spic.AssetProto.ComponentState.toObject(includeInstance, f),
3813
+ onlyMetadataUpdated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
3814
+ onlyAttributesUpdated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
3815
+ };
3816
+
3817
+ if (includeInstance) {
3818
+ obj.$jspbMessageInstance = msg;
3819
+ }
3820
+ return obj;
3821
+ };
3822
+ }
3823
+
3824
+
3825
+ /**
3826
+ * Deserializes binary data (in protobuf wire format).
3827
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3828
+ * @return {!proto.Spic.AssetProto.StateChangedEvent}
3829
+ */
3830
+ proto.Spic.AssetProto.StateChangedEvent.deserializeBinary = function(bytes) {
3831
+ var reader = new jspb.BinaryReader(bytes);
3832
+ var msg = new proto.Spic.AssetProto.StateChangedEvent;
3833
+ return proto.Spic.AssetProto.StateChangedEvent.deserializeBinaryFromReader(msg, reader);
3834
+ };
3835
+
3836
+
3837
+ /**
3838
+ * Deserializes binary data (in protobuf wire format) from the
3839
+ * given reader into the given message object.
3840
+ * @param {!proto.Spic.AssetProto.StateChangedEvent} msg The message object to deserialize into.
3841
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3842
+ * @return {!proto.Spic.AssetProto.StateChangedEvent}
3843
+ */
3844
+ proto.Spic.AssetProto.StateChangedEvent.deserializeBinaryFromReader = function(msg, reader) {
3845
+ while (reader.nextField()) {
3846
+ if (reader.isEndGroup()) {
3847
+ break;
3848
+ }
3849
+ var field = reader.getFieldNumber();
3850
+ switch (field) {
3851
+ case 1:
3852
+ var value = new proto.Spic.AssetProto.ComponentState;
3853
+ reader.readMessage(value,proto.Spic.AssetProto.ComponentState.deserializeBinaryFromReader);
3854
+ msg.setState(value);
3855
+ break;
3856
+ case 2:
3857
+ var value = /** @type {boolean} */ (reader.readBool());
3858
+ msg.setOnlyMetadataUpdated(value);
3859
+ break;
3860
+ case 3:
3861
+ var value = /** @type {boolean} */ (reader.readBool());
3862
+ msg.setOnlyAttributesUpdated(value);
3863
+ break;
3864
+ default:
3865
+ reader.skipField();
3866
+ break;
3867
+ }
3868
+ }
3869
+ return msg;
3870
+ };
3871
+
3872
+
3873
+ /**
3874
+ * Serializes the message to binary data (in protobuf wire format).
3875
+ * @return {!Uint8Array}
3876
+ */
3877
+ proto.Spic.AssetProto.StateChangedEvent.prototype.serializeBinary = function() {
3878
+ var writer = new jspb.BinaryWriter();
3879
+ proto.Spic.AssetProto.StateChangedEvent.serializeBinaryToWriter(this, writer);
3880
+ return writer.getResultBuffer();
3881
+ };
3882
+
3883
+
3884
+ /**
3885
+ * Serializes the given message to binary data (in protobuf wire
3886
+ * format), writing to the given BinaryWriter.
3887
+ * @param {!proto.Spic.AssetProto.StateChangedEvent} message
3888
+ * @param {!jspb.BinaryWriter} writer
3889
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3890
+ */
3891
+ proto.Spic.AssetProto.StateChangedEvent.serializeBinaryToWriter = function(message, writer) {
3892
+ var f = undefined;
3893
+ f = message.getState();
3894
+ if (f != null) {
3895
+ writer.writeMessage(
3896
+ 1,
3897
+ f,
3898
+ proto.Spic.AssetProto.ComponentState.serializeBinaryToWriter
3899
+ );
3900
+ }
3901
+ f = message.getOnlyMetadataUpdated();
3902
+ if (f) {
3903
+ writer.writeBool(
3904
+ 2,
3905
+ f
3906
+ );
3907
+ }
3908
+ f = message.getOnlyAttributesUpdated();
3909
+ if (f) {
3910
+ writer.writeBool(
3911
+ 3,
3912
+ f
3913
+ );
3914
+ }
3915
+ };
3916
+
3917
+
3918
+ /**
3919
+ * optional ComponentState state = 1;
3920
+ * @return {?proto.Spic.AssetProto.ComponentState}
3921
+ */
3922
+ proto.Spic.AssetProto.StateChangedEvent.prototype.getState = function() {
3923
+ return /** @type{?proto.Spic.AssetProto.ComponentState} */ (
3924
+ jspb.Message.getWrapperField(this, proto.Spic.AssetProto.ComponentState, 1));
3925
+ };
3926
+
3927
+
3928
+ /**
3929
+ * @param {?proto.Spic.AssetProto.ComponentState|undefined} value
3930
+ * @return {!proto.Spic.AssetProto.StateChangedEvent} returns this
3931
+ */
3932
+ proto.Spic.AssetProto.StateChangedEvent.prototype.setState = function(value) {
3933
+ return jspb.Message.setWrapperField(this, 1, value);
3934
+ };
3935
+
3936
+
3937
+ /**
3938
+ * Clears the message field making it undefined.
3939
+ * @return {!proto.Spic.AssetProto.StateChangedEvent} returns this
3940
+ */
3941
+ proto.Spic.AssetProto.StateChangedEvent.prototype.clearState = function() {
3942
+ return this.setState(undefined);
3943
+ };
3944
+
3945
+
3946
+ /**
3947
+ * Returns whether this field is set.
3948
+ * @return {boolean}
3949
+ */
3950
+ proto.Spic.AssetProto.StateChangedEvent.prototype.hasState = function() {
3951
+ return jspb.Message.getField(this, 1) != null;
3952
+ };
3953
+
3954
+
3955
+ /**
3956
+ * optional bool only_metadata_updated = 2;
3957
+ * @return {boolean}
3958
+ */
3959
+ proto.Spic.AssetProto.StateChangedEvent.prototype.getOnlyMetadataUpdated = function() {
3960
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
3961
+ };
3962
+
3963
+
3964
+ /**
3965
+ * @param {boolean} value
3966
+ * @return {!proto.Spic.AssetProto.StateChangedEvent} returns this
3967
+ */
3968
+ proto.Spic.AssetProto.StateChangedEvent.prototype.setOnlyMetadataUpdated = function(value) {
3969
+ return jspb.Message.setProto3BooleanField(this, 2, value);
3970
+ };
3971
+
3972
+
3973
+ /**
3974
+ * optional bool only_attributes_updated = 3;
3975
+ * @return {boolean}
3976
+ */
3977
+ proto.Spic.AssetProto.StateChangedEvent.prototype.getOnlyAttributesUpdated = function() {
3978
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
3979
+ };
3980
+
3981
+
3982
+ /**
3983
+ * @param {boolean} value
3984
+ * @return {!proto.Spic.AssetProto.StateChangedEvent} returns this
3985
+ */
3986
+ proto.Spic.AssetProto.StateChangedEvent.prototype.setOnlyAttributesUpdated = function(value) {
3987
+ return jspb.Message.setProto3BooleanField(this, 3, value);
3988
+ };
3989
+
3990
+
3728
3991
  /**
3729
3992
  * optional int64 id = 1;
3730
3993
  * @return {number}
@@ -4663,7 +4926,10 @@ proto.Spic.ComponentIdentifier = {
4663
4926
  EXT_ALARM_2: 32,
4664
4927
  EXT_ALARM_3: 33,
4665
4928
  MANHOLE_COVER: 40,
4666
- MANHOLE_CLOSURE_OPEN: 41
4929
+ MANHOLE_CLOSURE_OPEN: 41,
4930
+ MANHOLE_COVER_SENSOR: 42,
4931
+ HEARTBEAT_TIMEOUT: 50,
4932
+ MAINBOARD_BATTERY_PERCENTAGE: 51
4667
4933
  };
4668
4934
 
4669
4935
  goog.object.extend(exports, proto.Spic);
@@ -21,8 +21,8 @@ export class CabinetProto extends jspb.Message {
21
21
  getUid(): string;
22
22
  setUid(value: string): void;
23
23
 
24
- getStatus(): number;
25
- setStatus(value: number): void;
24
+ getStatus(): CabinetProto.StatusTypeMap[keyof CabinetProto.StatusTypeMap];
25
+ setStatus(value: CabinetProto.StatusTypeMap[keyof CabinetProto.StatusTypeMap]): void;
26
26
 
27
27
  clearAlarmsList(): void;
28
28
  getAlarmsList(): Array<CabinetProto.AlarmTypeMap[keyof CabinetProto.AlarmTypeMap]>;
@@ -96,7 +96,7 @@ export namespace CabinetProto {
96
96
  name: string,
97
97
  locationId: number,
98
98
  uid: string,
99
- status: number,
99
+ status: CabinetProto.StatusTypeMap[keyof CabinetProto.StatusTypeMap],
100
100
  alarmsList: Array<CabinetProto.AlarmTypeMap[keyof CabinetProto.AlarmTypeMap]>,
101
101
  lastStatusUpdate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
102
102
  replaceBattery: boolean,
@@ -881,6 +881,9 @@ export namespace CabinetProto {
881
881
  getCabinetId(): number;
882
882
  setCabinetId(value: number): void;
883
883
 
884
+ getRequesterId(): number;
885
+ setRequesterId(value: number): void;
886
+
884
887
  hasRequestTime(): boolean;
885
888
  clearRequestTime(): void;
886
889
  getRequestTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
@@ -919,6 +922,7 @@ export namespace CabinetProto {
919
922
  export namespace CreateRequest {
920
923
  export type AsObject = {
921
924
  cabinetId: number,
925
+ requesterId: number,
922
926
  requestTime?: google_protobuf_timestamp_pb.Timestamp.AsObject,
923
927
  validUntil?: google_protobuf_timestamp_pb.Timestamp.AsObject,
924
928
  longitude: number,