@aceplus/smartace-api 2.11.0-alpha.3 → 2.11.0-alpha.5

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,122 @@
1
+ // package: Meta
2
+ // file: meta.spic_config.proto
3
+
4
+ import * as meta_spic_config_pb from "./meta.spic_config_pb";
5
+ import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
6
+ import * as spic_cabinet_pb from "./spic.cabinet_pb";
7
+ import {grpc} from "@improbable-eng/grpc-web";
8
+
9
+ type CabinetMetaGRPCRetrieve = {
10
+ readonly methodName: string;
11
+ readonly service: typeof CabinetMetaGRPC;
12
+ readonly requestStream: false;
13
+ readonly responseStream: false;
14
+ readonly requestType: typeof spic_cabinet_pb.CabinetProto.RetrieveRequest;
15
+ readonly responseType: typeof meta_spic_config_pb.CabinetLocationMeta;
16
+ };
17
+
18
+ type CabinetMetaGRPCSetTemperatureConfiguration = {
19
+ readonly methodName: string;
20
+ readonly service: typeof CabinetMetaGRPC;
21
+ readonly requestStream: false;
22
+ readonly responseStream: false;
23
+ readonly requestType: typeof meta_spic_config_pb.TemperatureConfigurationProto.SetConfigurationRequest;
24
+ readonly responseType: typeof google_protobuf_empty_pb.Empty;
25
+ };
26
+
27
+ type CabinetMetaGRPCCreateTemperatureConfigurationTemplate = {
28
+ readonly methodName: string;
29
+ readonly service: typeof CabinetMetaGRPC;
30
+ readonly requestStream: false;
31
+ readonly responseStream: false;
32
+ readonly requestType: typeof meta_spic_config_pb.TemperatureConfigurationProto.CreateTemplateRequest;
33
+ readonly responseType: typeof google_protobuf_empty_pb.Empty;
34
+ };
35
+
36
+ type CabinetMetaGRPCSearchTemperatureConfigurationTemplate = {
37
+ readonly methodName: string;
38
+ readonly service: typeof CabinetMetaGRPC;
39
+ readonly requestStream: false;
40
+ readonly responseStream: false;
41
+ readonly requestType: typeof meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateRequest;
42
+ readonly responseType: typeof meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateReply;
43
+ };
44
+
45
+ export class CabinetMetaGRPC {
46
+ static readonly serviceName: string;
47
+ static readonly Retrieve: CabinetMetaGRPCRetrieve;
48
+ static readonly SetTemperatureConfiguration: CabinetMetaGRPCSetTemperatureConfiguration;
49
+ static readonly CreateTemperatureConfigurationTemplate: CabinetMetaGRPCCreateTemperatureConfigurationTemplate;
50
+ static readonly SearchTemperatureConfigurationTemplate: CabinetMetaGRPCSearchTemperatureConfigurationTemplate;
51
+ }
52
+
53
+ export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
54
+ export type Status = { details: string, code: number; metadata: grpc.Metadata }
55
+
56
+ interface UnaryResponse {
57
+ cancel(): void;
58
+ }
59
+ interface ResponseStream<T> {
60
+ cancel(): void;
61
+ on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
62
+ on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
63
+ on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
64
+ }
65
+ interface RequestStream<T> {
66
+ write(message: T): RequestStream<T>;
67
+ end(): void;
68
+ cancel(): void;
69
+ on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
70
+ on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
71
+ }
72
+ interface BidirectionalStream<ReqT, ResT> {
73
+ write(message: ReqT): BidirectionalStream<ReqT, ResT>;
74
+ end(): void;
75
+ cancel(): void;
76
+ on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
77
+ on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
78
+ on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
79
+ }
80
+
81
+ export class CabinetMetaGRPCClient {
82
+ readonly serviceHost: string;
83
+
84
+ constructor(serviceHost: string, options?: grpc.RpcOptions);
85
+ retrieve(
86
+ requestMessage: spic_cabinet_pb.CabinetProto.RetrieveRequest,
87
+ metadata: grpc.Metadata,
88
+ callback: (error: ServiceError|null, responseMessage: meta_spic_config_pb.CabinetLocationMeta|null) => void
89
+ ): UnaryResponse;
90
+ retrieve(
91
+ requestMessage: spic_cabinet_pb.CabinetProto.RetrieveRequest,
92
+ callback: (error: ServiceError|null, responseMessage: meta_spic_config_pb.CabinetLocationMeta|null) => void
93
+ ): UnaryResponse;
94
+ setTemperatureConfiguration(
95
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.SetConfigurationRequest,
96
+ metadata: grpc.Metadata,
97
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
98
+ ): UnaryResponse;
99
+ setTemperatureConfiguration(
100
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.SetConfigurationRequest,
101
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
102
+ ): UnaryResponse;
103
+ createTemperatureConfigurationTemplate(
104
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.CreateTemplateRequest,
105
+ metadata: grpc.Metadata,
106
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
107
+ ): UnaryResponse;
108
+ createTemperatureConfigurationTemplate(
109
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.CreateTemplateRequest,
110
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
111
+ ): UnaryResponse;
112
+ searchTemperatureConfigurationTemplate(
113
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateRequest,
114
+ metadata: grpc.Metadata,
115
+ callback: (error: ServiceError|null, responseMessage: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateReply|null) => void
116
+ ): UnaryResponse;
117
+ searchTemperatureConfigurationTemplate(
118
+ requestMessage: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateRequest,
119
+ callback: (error: ServiceError|null, responseMessage: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateReply|null) => void
120
+ ): UnaryResponse;
121
+ }
122
+
@@ -0,0 +1,183 @@
1
+ // package: Meta
2
+ // file: meta.spic_config.proto
3
+
4
+ var meta_spic_config_pb = require("./meta.spic_config_pb");
5
+ var google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_pb");
6
+ var spic_cabinet_pb = require("./spic.cabinet_pb");
7
+ var grpc = require("@improbable-eng/grpc-web").grpc;
8
+
9
+ var CabinetMetaGRPC = (function () {
10
+ function CabinetMetaGRPC() {}
11
+ CabinetMetaGRPC.serviceName = "Meta.CabinetMetaGRPC";
12
+ return CabinetMetaGRPC;
13
+ }());
14
+
15
+ CabinetMetaGRPC.Retrieve = {
16
+ methodName: "Retrieve",
17
+ service: CabinetMetaGRPC,
18
+ requestStream: false,
19
+ responseStream: false,
20
+ requestType: spic_cabinet_pb.CabinetProto.RetrieveRequest,
21
+ responseType: meta_spic_config_pb.CabinetLocationMeta
22
+ };
23
+
24
+ CabinetMetaGRPC.SetTemperatureConfiguration = {
25
+ methodName: "SetTemperatureConfiguration",
26
+ service: CabinetMetaGRPC,
27
+ requestStream: false,
28
+ responseStream: false,
29
+ requestType: meta_spic_config_pb.TemperatureConfigurationProto.SetConfigurationRequest,
30
+ responseType: google_protobuf_empty_pb.Empty
31
+ };
32
+
33
+ CabinetMetaGRPC.CreateTemperatureConfigurationTemplate = {
34
+ methodName: "CreateTemperatureConfigurationTemplate",
35
+ service: CabinetMetaGRPC,
36
+ requestStream: false,
37
+ responseStream: false,
38
+ requestType: meta_spic_config_pb.TemperatureConfigurationProto.CreateTemplateRequest,
39
+ responseType: google_protobuf_empty_pb.Empty
40
+ };
41
+
42
+ CabinetMetaGRPC.SearchTemperatureConfigurationTemplate = {
43
+ methodName: "SearchTemperatureConfigurationTemplate",
44
+ service: CabinetMetaGRPC,
45
+ requestStream: false,
46
+ responseStream: false,
47
+ requestType: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateRequest,
48
+ responseType: meta_spic_config_pb.TemperatureConfigurationProto.SearchTemplateReply
49
+ };
50
+
51
+ exports.CabinetMetaGRPC = CabinetMetaGRPC;
52
+
53
+ function CabinetMetaGRPCClient(serviceHost, options) {
54
+ this.serviceHost = serviceHost;
55
+ this.options = options || {};
56
+ }
57
+
58
+ CabinetMetaGRPCClient.prototype.retrieve = function retrieve(requestMessage, metadata, callback) {
59
+ if (arguments.length === 2) {
60
+ callback = arguments[1];
61
+ }
62
+ var client = grpc.unary(CabinetMetaGRPC.Retrieve, {
63
+ request: requestMessage,
64
+ host: this.serviceHost,
65
+ metadata: metadata,
66
+ transport: this.options.transport,
67
+ debug: this.options.debug,
68
+ onEnd: function (response) {
69
+ if (callback) {
70
+ if (response.status !== grpc.Code.OK) {
71
+ var err = new Error(response.statusMessage);
72
+ err.code = response.status;
73
+ err.metadata = response.trailers;
74
+ callback(err, null);
75
+ } else {
76
+ callback(null, response.message);
77
+ }
78
+ }
79
+ }
80
+ });
81
+ return {
82
+ cancel: function () {
83
+ callback = null;
84
+ client.close();
85
+ }
86
+ };
87
+ };
88
+
89
+ CabinetMetaGRPCClient.prototype.setTemperatureConfiguration = function setTemperatureConfiguration(requestMessage, metadata, callback) {
90
+ if (arguments.length === 2) {
91
+ callback = arguments[1];
92
+ }
93
+ var client = grpc.unary(CabinetMetaGRPC.SetTemperatureConfiguration, {
94
+ request: requestMessage,
95
+ host: this.serviceHost,
96
+ metadata: metadata,
97
+ transport: this.options.transport,
98
+ debug: this.options.debug,
99
+ onEnd: function (response) {
100
+ if (callback) {
101
+ if (response.status !== grpc.Code.OK) {
102
+ var err = new Error(response.statusMessage);
103
+ err.code = response.status;
104
+ err.metadata = response.trailers;
105
+ callback(err, null);
106
+ } else {
107
+ callback(null, response.message);
108
+ }
109
+ }
110
+ }
111
+ });
112
+ return {
113
+ cancel: function () {
114
+ callback = null;
115
+ client.close();
116
+ }
117
+ };
118
+ };
119
+
120
+ CabinetMetaGRPCClient.prototype.createTemperatureConfigurationTemplate = function createTemperatureConfigurationTemplate(requestMessage, metadata, callback) {
121
+ if (arguments.length === 2) {
122
+ callback = arguments[1];
123
+ }
124
+ var client = grpc.unary(CabinetMetaGRPC.CreateTemperatureConfigurationTemplate, {
125
+ request: requestMessage,
126
+ host: this.serviceHost,
127
+ metadata: metadata,
128
+ transport: this.options.transport,
129
+ debug: this.options.debug,
130
+ onEnd: function (response) {
131
+ if (callback) {
132
+ if (response.status !== grpc.Code.OK) {
133
+ var err = new Error(response.statusMessage);
134
+ err.code = response.status;
135
+ err.metadata = response.trailers;
136
+ callback(err, null);
137
+ } else {
138
+ callback(null, response.message);
139
+ }
140
+ }
141
+ }
142
+ });
143
+ return {
144
+ cancel: function () {
145
+ callback = null;
146
+ client.close();
147
+ }
148
+ };
149
+ };
150
+
151
+ CabinetMetaGRPCClient.prototype.searchTemperatureConfigurationTemplate = function searchTemperatureConfigurationTemplate(requestMessage, metadata, callback) {
152
+ if (arguments.length === 2) {
153
+ callback = arguments[1];
154
+ }
155
+ var client = grpc.unary(CabinetMetaGRPC.SearchTemperatureConfigurationTemplate, {
156
+ request: requestMessage,
157
+ host: this.serviceHost,
158
+ metadata: metadata,
159
+ transport: this.options.transport,
160
+ debug: this.options.debug,
161
+ onEnd: function (response) {
162
+ if (callback) {
163
+ if (response.status !== grpc.Code.OK) {
164
+ var err = new Error(response.statusMessage);
165
+ err.code = response.status;
166
+ err.metadata = response.trailers;
167
+ callback(err, null);
168
+ } else {
169
+ callback(null, response.message);
170
+ }
171
+ }
172
+ }
173
+ });
174
+ return {
175
+ cancel: function () {
176
+ callback = null;
177
+ client.close();
178
+ }
179
+ };
180
+ };
181
+
182
+ exports.CabinetMetaGRPCClient = CabinetMetaGRPCClient;
183
+
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "grpc-web": "^1.4.2",
6
6
  "ts-protoc-gen": "^0.15.0"
7
7
  },
8
- "version": "2.11.0-alpha.3",
8
+ "version": "2.11.0-alpha.5",
9
9
  "description": "Generated proto files.",
10
10
  "author": "TKF",
11
11
  "files": [
@@ -56,6 +56,17 @@ export class CabinetProto extends jspb.Message {
56
56
  getImageBlob(): string;
57
57
  setImageBlob(value: string): void;
58
58
 
59
+ hasBatteryPlaced(): boolean;
60
+ clearBatteryPlaced(): void;
61
+ getBatteryPlaced(): google_protobuf_timestamp_pb.Timestamp | undefined;
62
+ setBatteryPlaced(value?: google_protobuf_timestamp_pb.Timestamp): void;
63
+
64
+ getBatteryPercentage(): number;
65
+ setBatteryPercentage(value: number): void;
66
+
67
+ getCommunicationTime(): number;
68
+ setCommunicationTime(value: number): void;
69
+
59
70
  serializeBinary(): Uint8Array;
60
71
  toObject(includeInstance?: boolean): CabinetProto.AsObject;
61
72
  static toObject(includeInstance: boolean, msg: CabinetProto): CabinetProto.AsObject;
@@ -82,6 +93,9 @@ export namespace CabinetProto {
82
93
  clientId: number,
83
94
  isMaintenance: boolean,
84
95
  imageBlob: string,
96
+ batteryPlaced?: google_protobuf_timestamp_pb.Timestamp.AsObject,
97
+ batteryPercentage: number,
98
+ communicationTime: number,
85
99
  }
86
100
 
87
101
  export class CreateRequest extends jspb.Message {
@@ -396,6 +410,26 @@ export namespace CabinetProto {
396
410
  }
397
411
  }
398
412
 
413
+ export class ReplaceBatteryRequest extends jspb.Message {
414
+ getId(): number;
415
+ setId(value: number): void;
416
+
417
+ serializeBinary(): Uint8Array;
418
+ toObject(includeInstance?: boolean): ReplaceBatteryRequest.AsObject;
419
+ static toObject(includeInstance: boolean, msg: ReplaceBatteryRequest): ReplaceBatteryRequest.AsObject;
420
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
421
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
422
+ static serializeBinaryToWriter(message: ReplaceBatteryRequest, writer: jspb.BinaryWriter): void;
423
+ static deserializeBinary(bytes: Uint8Array): ReplaceBatteryRequest;
424
+ static deserializeBinaryFromReader(message: ReplaceBatteryRequest, reader: jspb.BinaryReader): ReplaceBatteryRequest;
425
+ }
426
+
427
+ export namespace ReplaceBatteryRequest {
428
+ export type AsObject = {
429
+ id: number,
430
+ }
431
+ }
432
+
399
433
  export class Image extends jspb.Message {
400
434
  serializeBinary(): Uint8Array;
401
435
  toObject(includeInstance?: boolean): Image.AsObject;
@@ -58,6 +58,7 @@ goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.DeactivateRequest', null,
58
58
  goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.OpenRequestType', null, global);
59
59
  goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.SearchReply', null, global);
60
60
  goog.exportSymbol('proto.Spic.CabinetProto.OpenRequest.SearchRequest', null, global);
61
+ goog.exportSymbol('proto.Spic.CabinetProto.ReplaceBatteryRequest', null, global);
61
62
  goog.exportSymbol('proto.Spic.CabinetProto.RetrieveRequest', null, global);
62
63
  goog.exportSymbol('proto.Spic.CabinetProto.RetrieveRequest.SearchCase', null, global);
63
64
  goog.exportSymbol('proto.Spic.CabinetProto.SearchReply', null, global);
@@ -279,6 +280,27 @@ if (goog.DEBUG && !COMPILED) {
279
280
  */
280
281
  proto.Spic.CabinetProto.LocationSearchReply.displayName = 'proto.Spic.CabinetProto.LocationSearchReply';
281
282
  }
283
+ /**
284
+ * Generated by JsPbCodeGenerator.
285
+ * @param {Array=} opt_data Optional initial data array, typically from a
286
+ * server response, or constructed directly in Javascript. The array is used
287
+ * in place and becomes part of the constructed object. It is not cloned.
288
+ * If no data is provided, the constructed object will be empty, but still
289
+ * valid.
290
+ * @extends {jspb.Message}
291
+ * @constructor
292
+ */
293
+ proto.Spic.CabinetProto.ReplaceBatteryRequest = function(opt_data) {
294
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
295
+ };
296
+ goog.inherits(proto.Spic.CabinetProto.ReplaceBatteryRequest, jspb.Message);
297
+ if (goog.DEBUG && !COMPILED) {
298
+ /**
299
+ * @public
300
+ * @override
301
+ */
302
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.displayName = 'proto.Spic.CabinetProto.ReplaceBatteryRequest';
303
+ }
282
304
  /**
283
305
  * Generated by JsPbCodeGenerator.
284
306
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -751,7 +773,10 @@ proto.Spic.CabinetProto.toObject = function(includeInstance, msg) {
751
773
  groupId: jspb.Message.getFieldWithDefault(msg, 11, ""),
752
774
  clientId: jspb.Message.getFieldWithDefault(msg, 12, 0),
753
775
  isMaintenance: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),
754
- imageBlob: jspb.Message.getFieldWithDefault(msg, 14, "")
776
+ imageBlob: jspb.Message.getFieldWithDefault(msg, 14, ""),
777
+ batteryPlaced: (f = msg.getBatteryPlaced()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
778
+ batteryPercentage: jspb.Message.getFieldWithDefault(msg, 16, 0),
779
+ communicationTime: jspb.Message.getFieldWithDefault(msg, 17, 0)
755
780
  };
756
781
 
757
782
  if (includeInstance) {
@@ -847,6 +872,19 @@ proto.Spic.CabinetProto.deserializeBinaryFromReader = function(msg, reader) {
847
872
  var value = /** @type {string} */ (reader.readString());
848
873
  msg.setImageBlob(value);
849
874
  break;
875
+ case 15:
876
+ var value = new google_protobuf_timestamp_pb.Timestamp;
877
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
878
+ msg.setBatteryPlaced(value);
879
+ break;
880
+ case 16:
881
+ var value = /** @type {number} */ (reader.readInt32());
882
+ msg.setBatteryPercentage(value);
883
+ break;
884
+ case 17:
885
+ var value = /** @type {number} */ (reader.readInt64());
886
+ msg.setCommunicationTime(value);
887
+ break;
850
888
  default:
851
889
  reader.skipField();
852
890
  break;
@@ -975,6 +1013,28 @@ proto.Spic.CabinetProto.serializeBinaryToWriter = function(message, writer) {
975
1013
  f
976
1014
  );
977
1015
  }
1016
+ f = message.getBatteryPlaced();
1017
+ if (f != null) {
1018
+ writer.writeMessage(
1019
+ 15,
1020
+ f,
1021
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1022
+ );
1023
+ }
1024
+ f = message.getBatteryPercentage();
1025
+ if (f !== 0) {
1026
+ writer.writeInt32(
1027
+ 16,
1028
+ f
1029
+ );
1030
+ }
1031
+ f = message.getCommunicationTime();
1032
+ if (f !== 0) {
1033
+ writer.writeInt64(
1034
+ 17,
1035
+ f
1036
+ );
1037
+ }
978
1038
  };
979
1039
 
980
1040
 
@@ -3184,6 +3244,136 @@ proto.Spic.CabinetProto.LocationSearchReply.prototype.clearCabinetsList = functi
3184
3244
 
3185
3245
 
3186
3246
 
3247
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3248
+ /**
3249
+ * Creates an object representation of this proto.
3250
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3251
+ * Optional fields that are not set will be set to undefined.
3252
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3253
+ * For the list of reserved names please see:
3254
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3255
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3256
+ * JSPB instance for transitional soy proto support:
3257
+ * http://goto/soy-param-migration
3258
+ * @return {!Object}
3259
+ */
3260
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.toObject = function(opt_includeInstance) {
3261
+ return proto.Spic.CabinetProto.ReplaceBatteryRequest.toObject(opt_includeInstance, this);
3262
+ };
3263
+
3264
+
3265
+ /**
3266
+ * Static version of the {@see toObject} method.
3267
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3268
+ * the JSPB instance for transitional soy proto support:
3269
+ * http://goto/soy-param-migration
3270
+ * @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} msg The msg instance to transform.
3271
+ * @return {!Object}
3272
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3273
+ */
3274
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.toObject = function(includeInstance, msg) {
3275
+ var f, obj = {
3276
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
3277
+ };
3278
+
3279
+ if (includeInstance) {
3280
+ obj.$jspbMessageInstance = msg;
3281
+ }
3282
+ return obj;
3283
+ };
3284
+ }
3285
+
3286
+
3287
+ /**
3288
+ * Deserializes binary data (in protobuf wire format).
3289
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3290
+ * @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest}
3291
+ */
3292
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinary = function(bytes) {
3293
+ var reader = new jspb.BinaryReader(bytes);
3294
+ var msg = new proto.Spic.CabinetProto.ReplaceBatteryRequest;
3295
+ return proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinaryFromReader(msg, reader);
3296
+ };
3297
+
3298
+
3299
+ /**
3300
+ * Deserializes binary data (in protobuf wire format) from the
3301
+ * given reader into the given message object.
3302
+ * @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} msg The message object to deserialize into.
3303
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3304
+ * @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest}
3305
+ */
3306
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.deserializeBinaryFromReader = function(msg, reader) {
3307
+ while (reader.nextField()) {
3308
+ if (reader.isEndGroup()) {
3309
+ break;
3310
+ }
3311
+ var field = reader.getFieldNumber();
3312
+ switch (field) {
3313
+ case 1:
3314
+ var value = /** @type {number} */ (reader.readInt64());
3315
+ msg.setId(value);
3316
+ break;
3317
+ default:
3318
+ reader.skipField();
3319
+ break;
3320
+ }
3321
+ }
3322
+ return msg;
3323
+ };
3324
+
3325
+
3326
+ /**
3327
+ * Serializes the message to binary data (in protobuf wire format).
3328
+ * @return {!Uint8Array}
3329
+ */
3330
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.serializeBinary = function() {
3331
+ var writer = new jspb.BinaryWriter();
3332
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.serializeBinaryToWriter(this, writer);
3333
+ return writer.getResultBuffer();
3334
+ };
3335
+
3336
+
3337
+ /**
3338
+ * Serializes the given message to binary data (in protobuf wire
3339
+ * format), writing to the given BinaryWriter.
3340
+ * @param {!proto.Spic.CabinetProto.ReplaceBatteryRequest} message
3341
+ * @param {!jspb.BinaryWriter} writer
3342
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3343
+ */
3344
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.serializeBinaryToWriter = function(message, writer) {
3345
+ var f = undefined;
3346
+ f = message.getId();
3347
+ if (f !== 0) {
3348
+ writer.writeInt64(
3349
+ 1,
3350
+ f
3351
+ );
3352
+ }
3353
+ };
3354
+
3355
+
3356
+ /**
3357
+ * optional int64 id = 1;
3358
+ * @return {number}
3359
+ */
3360
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.getId = function() {
3361
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3362
+ };
3363
+
3364
+
3365
+ /**
3366
+ * @param {number} value
3367
+ * @return {!proto.Spic.CabinetProto.ReplaceBatteryRequest} returns this
3368
+ */
3369
+ proto.Spic.CabinetProto.ReplaceBatteryRequest.prototype.setId = function(value) {
3370
+ return jspb.Message.setProto3IntField(this, 1, value);
3371
+ };
3372
+
3373
+
3374
+
3375
+
3376
+
3187
3377
  if (jspb.Message.GENERATE_TO_OBJECT) {
3188
3378
  /**
3189
3379
  * Creates an object representation of this proto.
@@ -8962,6 +9152,79 @@ proto.Spic.CabinetProto.prototype.setImageBlob = function(value) {
8962
9152
  };
8963
9153
 
8964
9154
 
9155
+ /**
9156
+ * optional google.protobuf.Timestamp battery_placed = 15;
9157
+ * @return {?proto.google.protobuf.Timestamp}
9158
+ */
9159
+ proto.Spic.CabinetProto.prototype.getBatteryPlaced = function() {
9160
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
9161
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15));
9162
+ };
9163
+
9164
+
9165
+ /**
9166
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
9167
+ * @return {!proto.Spic.CabinetProto} returns this
9168
+ */
9169
+ proto.Spic.CabinetProto.prototype.setBatteryPlaced = function(value) {
9170
+ return jspb.Message.setWrapperField(this, 15, value);
9171
+ };
9172
+
9173
+
9174
+ /**
9175
+ * Clears the message field making it undefined.
9176
+ * @return {!proto.Spic.CabinetProto} returns this
9177
+ */
9178
+ proto.Spic.CabinetProto.prototype.clearBatteryPlaced = function() {
9179
+ return this.setBatteryPlaced(undefined);
9180
+ };
9181
+
9182
+
9183
+ /**
9184
+ * Returns whether this field is set.
9185
+ * @return {boolean}
9186
+ */
9187
+ proto.Spic.CabinetProto.prototype.hasBatteryPlaced = function() {
9188
+ return jspb.Message.getField(this, 15) != null;
9189
+ };
9190
+
9191
+
9192
+ /**
9193
+ * optional int32 battery_percentage = 16;
9194
+ * @return {number}
9195
+ */
9196
+ proto.Spic.CabinetProto.prototype.getBatteryPercentage = function() {
9197
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
9198
+ };
9199
+
9200
+
9201
+ /**
9202
+ * @param {number} value
9203
+ * @return {!proto.Spic.CabinetProto} returns this
9204
+ */
9205
+ proto.Spic.CabinetProto.prototype.setBatteryPercentage = function(value) {
9206
+ return jspb.Message.setProto3IntField(this, 16, value);
9207
+ };
9208
+
9209
+
9210
+ /**
9211
+ * optional int64 communication_time = 17;
9212
+ * @return {number}
9213
+ */
9214
+ proto.Spic.CabinetProto.prototype.getCommunicationTime = function() {
9215
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
9216
+ };
9217
+
9218
+
9219
+ /**
9220
+ * @param {number} value
9221
+ * @return {!proto.Spic.CabinetProto} returns this
9222
+ */
9223
+ proto.Spic.CabinetProto.prototype.setCommunicationTime = function(value) {
9224
+ return jspb.Message.setProto3IntField(this, 17, value);
9225
+ };
9226
+
9227
+
8965
9228
 
8966
9229
 
8967
9230