@superblocksteam/sabs-types-js 0.683.0 → 0.685.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,3465 @@
1
+ // source: scan/v1/service.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = globalThis;
17
+
18
+ var google_api_annotations_pb = require('../../google/api/annotations_pb');
19
+ goog.object.extend(proto, google_api_annotations_pb);
20
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb');
21
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
22
+ var protoc$gen$openapiv2_options_annotations_pb = require('../../protoc-gen-openapiv2/options/annotations_pb');
23
+ goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb);
24
+ goog.exportSymbol('proto.scan.v1.PolicyGateContext', null, global);
25
+ goog.exportSymbol('proto.scan.v1.ScanApplicationMetadata', null, global);
26
+ goog.exportSymbol('proto.scan.v1.ScanListRequest', null, global);
27
+ goog.exportSymbol('proto.scan.v1.ScanListResponse', null, global);
28
+ goog.exportSymbol('proto.scan.v1.ScanRequest', null, global);
29
+ goog.exportSymbol('proto.scan.v1.ScanResponse', null, global);
30
+ goog.exportSymbol('proto.scan.v1.ScanStatus', null, global);
31
+ goog.exportSymbol('proto.scan.v1.ScanStatusRequest', null, global);
32
+ goog.exportSymbol('proto.scan.v1.ScanStatusResponse', null, global);
33
+ goog.exportSymbol('proto.scan.v1.ScanStepTimings', null, global);
34
+ goog.exportSymbol('proto.scan.v1.ScanSummary', null, global);
35
+ goog.exportSymbol('proto.scan.v1.ScanTerminateRequest', null, global);
36
+ goog.exportSymbol('proto.scan.v1.ScanTerminateResponse', null, global);
37
+ /**
38
+ * Generated by JsPbCodeGenerator.
39
+ * @param {Array=} opt_data Optional initial data array, typically from a
40
+ * server response, or constructed directly in Javascript. The array is used
41
+ * in place and becomes part of the constructed object. It is not cloned.
42
+ * If no data is provided, the constructed object will be empty, but still
43
+ * valid.
44
+ * @extends {jspb.Message}
45
+ * @constructor
46
+ */
47
+ proto.scan.v1.ScanRequest = function(opt_data) {
48
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
49
+ };
50
+ goog.inherits(proto.scan.v1.ScanRequest, jspb.Message);
51
+ if (goog.DEBUG && !COMPILED) {
52
+ /**
53
+ * @public
54
+ * @override
55
+ */
56
+ proto.scan.v1.ScanRequest.displayName = 'proto.scan.v1.ScanRequest';
57
+ }
58
+ /**
59
+ * Generated by JsPbCodeGenerator.
60
+ * @param {Array=} opt_data Optional initial data array, typically from a
61
+ * server response, or constructed directly in Javascript. The array is used
62
+ * in place and becomes part of the constructed object. It is not cloned.
63
+ * If no data is provided, the constructed object will be empty, but still
64
+ * valid.
65
+ * @extends {jspb.Message}
66
+ * @constructor
67
+ */
68
+ proto.scan.v1.ScanApplicationMetadata = function(opt_data) {
69
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
70
+ };
71
+ goog.inherits(proto.scan.v1.ScanApplicationMetadata, jspb.Message);
72
+ if (goog.DEBUG && !COMPILED) {
73
+ /**
74
+ * @public
75
+ * @override
76
+ */
77
+ proto.scan.v1.ScanApplicationMetadata.displayName = 'proto.scan.v1.ScanApplicationMetadata';
78
+ }
79
+ /**
80
+ * Generated by JsPbCodeGenerator.
81
+ * @param {Array=} opt_data Optional initial data array, typically from a
82
+ * server response, or constructed directly in Javascript. The array is used
83
+ * in place and becomes part of the constructed object. It is not cloned.
84
+ * If no data is provided, the constructed object will be empty, but still
85
+ * valid.
86
+ * @extends {jspb.Message}
87
+ * @constructor
88
+ */
89
+ proto.scan.v1.PolicyGateContext = function(opt_data) {
90
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
91
+ };
92
+ goog.inherits(proto.scan.v1.PolicyGateContext, jspb.Message);
93
+ if (goog.DEBUG && !COMPILED) {
94
+ /**
95
+ * @public
96
+ * @override
97
+ */
98
+ proto.scan.v1.PolicyGateContext.displayName = 'proto.scan.v1.PolicyGateContext';
99
+ }
100
+ /**
101
+ * Generated by JsPbCodeGenerator.
102
+ * @param {Array=} opt_data Optional initial data array, typically from a
103
+ * server response, or constructed directly in Javascript. The array is used
104
+ * in place and becomes part of the constructed object. It is not cloned.
105
+ * If no data is provided, the constructed object will be empty, but still
106
+ * valid.
107
+ * @extends {jspb.Message}
108
+ * @constructor
109
+ */
110
+ proto.scan.v1.ScanResponse = function(opt_data) {
111
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
112
+ };
113
+ goog.inherits(proto.scan.v1.ScanResponse, jspb.Message);
114
+ if (goog.DEBUG && !COMPILED) {
115
+ /**
116
+ * @public
117
+ * @override
118
+ */
119
+ proto.scan.v1.ScanResponse.displayName = 'proto.scan.v1.ScanResponse';
120
+ }
121
+ /**
122
+ * Generated by JsPbCodeGenerator.
123
+ * @param {Array=} opt_data Optional initial data array, typically from a
124
+ * server response, or constructed directly in Javascript. The array is used
125
+ * in place and becomes part of the constructed object. It is not cloned.
126
+ * If no data is provided, the constructed object will be empty, but still
127
+ * valid.
128
+ * @extends {jspb.Message}
129
+ * @constructor
130
+ */
131
+ proto.scan.v1.ScanStatusRequest = function(opt_data) {
132
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
133
+ };
134
+ goog.inherits(proto.scan.v1.ScanStatusRequest, jspb.Message);
135
+ if (goog.DEBUG && !COMPILED) {
136
+ /**
137
+ * @public
138
+ * @override
139
+ */
140
+ proto.scan.v1.ScanStatusRequest.displayName = 'proto.scan.v1.ScanStatusRequest';
141
+ }
142
+ /**
143
+ * Generated by JsPbCodeGenerator.
144
+ * @param {Array=} opt_data Optional initial data array, typically from a
145
+ * server response, or constructed directly in Javascript. The array is used
146
+ * in place and becomes part of the constructed object. It is not cloned.
147
+ * If no data is provided, the constructed object will be empty, but still
148
+ * valid.
149
+ * @extends {jspb.Message}
150
+ * @constructor
151
+ */
152
+ proto.scan.v1.ScanStatusResponse = function(opt_data) {
153
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
154
+ };
155
+ goog.inherits(proto.scan.v1.ScanStatusResponse, jspb.Message);
156
+ if (goog.DEBUG && !COMPILED) {
157
+ /**
158
+ * @public
159
+ * @override
160
+ */
161
+ proto.scan.v1.ScanStatusResponse.displayName = 'proto.scan.v1.ScanStatusResponse';
162
+ }
163
+ /**
164
+ * Generated by JsPbCodeGenerator.
165
+ * @param {Array=} opt_data Optional initial data array, typically from a
166
+ * server response, or constructed directly in Javascript. The array is used
167
+ * in place and becomes part of the constructed object. It is not cloned.
168
+ * If no data is provided, the constructed object will be empty, but still
169
+ * valid.
170
+ * @extends {jspb.Message}
171
+ * @constructor
172
+ */
173
+ proto.scan.v1.ScanListRequest = function(opt_data) {
174
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
175
+ };
176
+ goog.inherits(proto.scan.v1.ScanListRequest, jspb.Message);
177
+ if (goog.DEBUG && !COMPILED) {
178
+ /**
179
+ * @public
180
+ * @override
181
+ */
182
+ proto.scan.v1.ScanListRequest.displayName = 'proto.scan.v1.ScanListRequest';
183
+ }
184
+ /**
185
+ * Generated by JsPbCodeGenerator.
186
+ * @param {Array=} opt_data Optional initial data array, typically from a
187
+ * server response, or constructed directly in Javascript. The array is used
188
+ * in place and becomes part of the constructed object. It is not cloned.
189
+ * If no data is provided, the constructed object will be empty, but still
190
+ * valid.
191
+ * @extends {jspb.Message}
192
+ * @constructor
193
+ */
194
+ proto.scan.v1.ScanListResponse = function(opt_data) {
195
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scan.v1.ScanListResponse.repeatedFields_, null);
196
+ };
197
+ goog.inherits(proto.scan.v1.ScanListResponse, jspb.Message);
198
+ if (goog.DEBUG && !COMPILED) {
199
+ /**
200
+ * @public
201
+ * @override
202
+ */
203
+ proto.scan.v1.ScanListResponse.displayName = 'proto.scan.v1.ScanListResponse';
204
+ }
205
+ /**
206
+ * Generated by JsPbCodeGenerator.
207
+ * @param {Array=} opt_data Optional initial data array, typically from a
208
+ * server response, or constructed directly in Javascript. The array is used
209
+ * in place and becomes part of the constructed object. It is not cloned.
210
+ * If no data is provided, the constructed object will be empty, but still
211
+ * valid.
212
+ * @extends {jspb.Message}
213
+ * @constructor
214
+ */
215
+ proto.scan.v1.ScanSummary = function(opt_data) {
216
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
217
+ };
218
+ goog.inherits(proto.scan.v1.ScanSummary, jspb.Message);
219
+ if (goog.DEBUG && !COMPILED) {
220
+ /**
221
+ * @public
222
+ * @override
223
+ */
224
+ proto.scan.v1.ScanSummary.displayName = 'proto.scan.v1.ScanSummary';
225
+ }
226
+ /**
227
+ * Generated by JsPbCodeGenerator.
228
+ * @param {Array=} opt_data Optional initial data array, typically from a
229
+ * server response, or constructed directly in Javascript. The array is used
230
+ * in place and becomes part of the constructed object. It is not cloned.
231
+ * If no data is provided, the constructed object will be empty, but still
232
+ * valid.
233
+ * @extends {jspb.Message}
234
+ * @constructor
235
+ */
236
+ proto.scan.v1.ScanStepTimings = function(opt_data) {
237
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
238
+ };
239
+ goog.inherits(proto.scan.v1.ScanStepTimings, jspb.Message);
240
+ if (goog.DEBUG && !COMPILED) {
241
+ /**
242
+ * @public
243
+ * @override
244
+ */
245
+ proto.scan.v1.ScanStepTimings.displayName = 'proto.scan.v1.ScanStepTimings';
246
+ }
247
+ /**
248
+ * Generated by JsPbCodeGenerator.
249
+ * @param {Array=} opt_data Optional initial data array, typically from a
250
+ * server response, or constructed directly in Javascript. The array is used
251
+ * in place and becomes part of the constructed object. It is not cloned.
252
+ * If no data is provided, the constructed object will be empty, but still
253
+ * valid.
254
+ * @extends {jspb.Message}
255
+ * @constructor
256
+ */
257
+ proto.scan.v1.ScanTerminateRequest = function(opt_data) {
258
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
259
+ };
260
+ goog.inherits(proto.scan.v1.ScanTerminateRequest, jspb.Message);
261
+ if (goog.DEBUG && !COMPILED) {
262
+ /**
263
+ * @public
264
+ * @override
265
+ */
266
+ proto.scan.v1.ScanTerminateRequest.displayName = 'proto.scan.v1.ScanTerminateRequest';
267
+ }
268
+ /**
269
+ * Generated by JsPbCodeGenerator.
270
+ * @param {Array=} opt_data Optional initial data array, typically from a
271
+ * server response, or constructed directly in Javascript. The array is used
272
+ * in place and becomes part of the constructed object. It is not cloned.
273
+ * If no data is provided, the constructed object will be empty, but still
274
+ * valid.
275
+ * @extends {jspb.Message}
276
+ * @constructor
277
+ */
278
+ proto.scan.v1.ScanTerminateResponse = function(opt_data) {
279
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
280
+ };
281
+ goog.inherits(proto.scan.v1.ScanTerminateResponse, jspb.Message);
282
+ if (goog.DEBUG && !COMPILED) {
283
+ /**
284
+ * @public
285
+ * @override
286
+ */
287
+ proto.scan.v1.ScanTerminateResponse.displayName = 'proto.scan.v1.ScanTerminateResponse';
288
+ }
289
+
290
+
291
+
292
+ if (jspb.Message.GENERATE_TO_OBJECT) {
293
+ /**
294
+ * Creates an object representation of this proto.
295
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
296
+ * Optional fields that are not set will be set to undefined.
297
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
298
+ * For the list of reserved names please see:
299
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
300
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
301
+ * JSPB instance for transitional soy proto support:
302
+ * http://goto/soy-param-migration
303
+ * @return {!Object}
304
+ */
305
+ proto.scan.v1.ScanRequest.prototype.toObject = function(opt_includeInstance) {
306
+ return proto.scan.v1.ScanRequest.toObject(opt_includeInstance, this);
307
+ };
308
+
309
+
310
+ /**
311
+ * Static version of the {@see toObject} method.
312
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
313
+ * the JSPB instance for transitional soy proto support:
314
+ * http://goto/soy-param-migration
315
+ * @param {!proto.scan.v1.ScanRequest} msg The msg instance to transform.
316
+ * @return {!Object}
317
+ * @suppress {unusedLocalVariables} f is only used for nested messages
318
+ */
319
+ proto.scan.v1.ScanRequest.toObject = function(includeInstance, msg) {
320
+ var f, obj = {
321
+ directoryHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
322
+ applicationMetadata: (f = msg.getApplicationMetadata()) && proto.scan.v1.ScanApplicationMetadata.toObject(includeInstance, f),
323
+ scanKey: jspb.Message.getFieldWithDefault(msg, 3, ""),
324
+ policyGate: (f = msg.getPolicyGate()) && proto.scan.v1.PolicyGateContext.toObject(includeInstance, f),
325
+ artifactReadToken: jspb.Message.getFieldWithDefault(msg, 5, "")
326
+ };
327
+
328
+ if (includeInstance) {
329
+ obj.$jspbMessageInstance = msg;
330
+ }
331
+ return obj;
332
+ };
333
+ }
334
+
335
+
336
+ /**
337
+ * Deserializes binary data (in protobuf wire format).
338
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
339
+ * @return {!proto.scan.v1.ScanRequest}
340
+ */
341
+ proto.scan.v1.ScanRequest.deserializeBinary = function(bytes) {
342
+ var reader = new jspb.BinaryReader(bytes);
343
+ var msg = new proto.scan.v1.ScanRequest;
344
+ return proto.scan.v1.ScanRequest.deserializeBinaryFromReader(msg, reader);
345
+ };
346
+
347
+
348
+ /**
349
+ * Deserializes binary data (in protobuf wire format) from the
350
+ * given reader into the given message object.
351
+ * @param {!proto.scan.v1.ScanRequest} msg The message object to deserialize into.
352
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
353
+ * @return {!proto.scan.v1.ScanRequest}
354
+ */
355
+ proto.scan.v1.ScanRequest.deserializeBinaryFromReader = function(msg, reader) {
356
+ while (reader.nextField()) {
357
+ if (reader.isEndGroup()) {
358
+ break;
359
+ }
360
+ var field = reader.getFieldNumber();
361
+ switch (field) {
362
+ case 1:
363
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
364
+ msg.setDirectoryHash(value);
365
+ break;
366
+ case 2:
367
+ var value = new proto.scan.v1.ScanApplicationMetadata;
368
+ reader.readMessage(value,proto.scan.v1.ScanApplicationMetadata.deserializeBinaryFromReader);
369
+ msg.setApplicationMetadata(value);
370
+ break;
371
+ case 3:
372
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
373
+ msg.setScanKey(value);
374
+ break;
375
+ case 4:
376
+ var value = new proto.scan.v1.PolicyGateContext;
377
+ reader.readMessage(value,proto.scan.v1.PolicyGateContext.deserializeBinaryFromReader);
378
+ msg.setPolicyGate(value);
379
+ break;
380
+ case 5:
381
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
382
+ msg.setArtifactReadToken(value);
383
+ break;
384
+ default:
385
+ reader.skipField();
386
+ break;
387
+ }
388
+ }
389
+ return msg;
390
+ };
391
+
392
+
393
+ /**
394
+ * Serializes the message to binary data (in protobuf wire format).
395
+ * @return {!Uint8Array}
396
+ */
397
+ proto.scan.v1.ScanRequest.prototype.serializeBinary = function() {
398
+ var writer = new jspb.BinaryWriter();
399
+ proto.scan.v1.ScanRequest.serializeBinaryToWriter(this, writer);
400
+ return writer.getResultBuffer();
401
+ };
402
+
403
+
404
+ /**
405
+ * Serializes the given message to binary data (in protobuf wire
406
+ * format), writing to the given BinaryWriter.
407
+ * @param {!proto.scan.v1.ScanRequest} message
408
+ * @param {!jspb.BinaryWriter} writer
409
+ * @suppress {unusedLocalVariables} f is only used for nested messages
410
+ */
411
+ proto.scan.v1.ScanRequest.serializeBinaryToWriter = function(message, writer) {
412
+ var f = undefined;
413
+ f = message.getDirectoryHash();
414
+ if (f.length > 0) {
415
+ writer.writeString(
416
+ 1,
417
+ f
418
+ );
419
+ }
420
+ f = message.getApplicationMetadata();
421
+ if (f != null) {
422
+ writer.writeMessage(
423
+ 2,
424
+ f,
425
+ proto.scan.v1.ScanApplicationMetadata.serializeBinaryToWriter
426
+ );
427
+ }
428
+ f = message.getScanKey();
429
+ if (f.length > 0) {
430
+ writer.writeString(
431
+ 3,
432
+ f
433
+ );
434
+ }
435
+ f = message.getPolicyGate();
436
+ if (f != null) {
437
+ writer.writeMessage(
438
+ 4,
439
+ f,
440
+ proto.scan.v1.PolicyGateContext.serializeBinaryToWriter
441
+ );
442
+ }
443
+ f = message.getArtifactReadToken();
444
+ if (f.length > 0) {
445
+ writer.writeString(
446
+ 5,
447
+ f
448
+ );
449
+ }
450
+ };
451
+
452
+
453
+ /**
454
+ * optional string directory_hash = 1;
455
+ * @return {string}
456
+ */
457
+ proto.scan.v1.ScanRequest.prototype.getDirectoryHash = function() {
458
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
459
+ };
460
+
461
+
462
+ /**
463
+ * @param {string} value
464
+ * @return {!proto.scan.v1.ScanRequest} returns this
465
+ */
466
+ proto.scan.v1.ScanRequest.prototype.setDirectoryHash = function(value) {
467
+ return jspb.Message.setProto3StringField(this, 1, value);
468
+ };
469
+
470
+
471
+ /**
472
+ * optional ScanApplicationMetadata application_metadata = 2;
473
+ * @return {?proto.scan.v1.ScanApplicationMetadata}
474
+ */
475
+ proto.scan.v1.ScanRequest.prototype.getApplicationMetadata = function() {
476
+ return /** @type{?proto.scan.v1.ScanApplicationMetadata} */ (
477
+ jspb.Message.getWrapperField(this, proto.scan.v1.ScanApplicationMetadata, 2));
478
+ };
479
+
480
+
481
+ /**
482
+ * @param {?proto.scan.v1.ScanApplicationMetadata|undefined} value
483
+ * @return {!proto.scan.v1.ScanRequest} returns this
484
+ */
485
+ proto.scan.v1.ScanRequest.prototype.setApplicationMetadata = function(value) {
486
+ return jspb.Message.setWrapperField(this, 2, value);
487
+ };
488
+
489
+
490
+ /**
491
+ * Clears the message field making it undefined.
492
+ * @return {!proto.scan.v1.ScanRequest} returns this
493
+ */
494
+ proto.scan.v1.ScanRequest.prototype.clearApplicationMetadata = function() {
495
+ return this.setApplicationMetadata(undefined);
496
+ };
497
+
498
+
499
+ /**
500
+ * Returns whether this field is set.
501
+ * @return {boolean}
502
+ */
503
+ proto.scan.v1.ScanRequest.prototype.hasApplicationMetadata = function() {
504
+ return jspb.Message.getField(this, 2) != null;
505
+ };
506
+
507
+
508
+ /**
509
+ * optional string scan_key = 3;
510
+ * @return {string}
511
+ */
512
+ proto.scan.v1.ScanRequest.prototype.getScanKey = function() {
513
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
514
+ };
515
+
516
+
517
+ /**
518
+ * @param {string} value
519
+ * @return {!proto.scan.v1.ScanRequest} returns this
520
+ */
521
+ proto.scan.v1.ScanRequest.prototype.setScanKey = function(value) {
522
+ return jspb.Message.setProto3StringField(this, 3, value);
523
+ };
524
+
525
+
526
+ /**
527
+ * optional PolicyGateContext policy_gate = 4;
528
+ * @return {?proto.scan.v1.PolicyGateContext}
529
+ */
530
+ proto.scan.v1.ScanRequest.prototype.getPolicyGate = function() {
531
+ return /** @type{?proto.scan.v1.PolicyGateContext} */ (
532
+ jspb.Message.getWrapperField(this, proto.scan.v1.PolicyGateContext, 4));
533
+ };
534
+
535
+
536
+ /**
537
+ * @param {?proto.scan.v1.PolicyGateContext|undefined} value
538
+ * @return {!proto.scan.v1.ScanRequest} returns this
539
+ */
540
+ proto.scan.v1.ScanRequest.prototype.setPolicyGate = function(value) {
541
+ return jspb.Message.setWrapperField(this, 4, value);
542
+ };
543
+
544
+
545
+ /**
546
+ * Clears the message field making it undefined.
547
+ * @return {!proto.scan.v1.ScanRequest} returns this
548
+ */
549
+ proto.scan.v1.ScanRequest.prototype.clearPolicyGate = function() {
550
+ return this.setPolicyGate(undefined);
551
+ };
552
+
553
+
554
+ /**
555
+ * Returns whether this field is set.
556
+ * @return {boolean}
557
+ */
558
+ proto.scan.v1.ScanRequest.prototype.hasPolicyGate = function() {
559
+ return jspb.Message.getField(this, 4) != null;
560
+ };
561
+
562
+
563
+ /**
564
+ * optional string artifact_read_token = 5;
565
+ * @return {string}
566
+ */
567
+ proto.scan.v1.ScanRequest.prototype.getArtifactReadToken = function() {
568
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
569
+ };
570
+
571
+
572
+ /**
573
+ * @param {string} value
574
+ * @return {!proto.scan.v1.ScanRequest} returns this
575
+ */
576
+ proto.scan.v1.ScanRequest.prototype.setArtifactReadToken = function(value) {
577
+ return jspb.Message.setProto3StringField(this, 5, value);
578
+ };
579
+
580
+
581
+
582
+
583
+
584
+ if (jspb.Message.GENERATE_TO_OBJECT) {
585
+ /**
586
+ * Creates an object representation of this proto.
587
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
588
+ * Optional fields that are not set will be set to undefined.
589
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
590
+ * For the list of reserved names please see:
591
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
592
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
593
+ * JSPB instance for transitional soy proto support:
594
+ * http://goto/soy-param-migration
595
+ * @return {!Object}
596
+ */
597
+ proto.scan.v1.ScanApplicationMetadata.prototype.toObject = function(opt_includeInstance) {
598
+ return proto.scan.v1.ScanApplicationMetadata.toObject(opt_includeInstance, this);
599
+ };
600
+
601
+
602
+ /**
603
+ * Static version of the {@see toObject} method.
604
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
605
+ * the JSPB instance for transitional soy proto support:
606
+ * http://goto/soy-param-migration
607
+ * @param {!proto.scan.v1.ScanApplicationMetadata} msg The msg instance to transform.
608
+ * @return {!Object}
609
+ * @suppress {unusedLocalVariables} f is only used for nested messages
610
+ */
611
+ proto.scan.v1.ScanApplicationMetadata.toObject = function(includeInstance, msg) {
612
+ var f, obj = {
613
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
614
+ organizationId: jspb.Message.getFieldWithDefault(msg, 2, "")
615
+ };
616
+
617
+ if (includeInstance) {
618
+ obj.$jspbMessageInstance = msg;
619
+ }
620
+ return obj;
621
+ };
622
+ }
623
+
624
+
625
+ /**
626
+ * Deserializes binary data (in protobuf wire format).
627
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
628
+ * @return {!proto.scan.v1.ScanApplicationMetadata}
629
+ */
630
+ proto.scan.v1.ScanApplicationMetadata.deserializeBinary = function(bytes) {
631
+ var reader = new jspb.BinaryReader(bytes);
632
+ var msg = new proto.scan.v1.ScanApplicationMetadata;
633
+ return proto.scan.v1.ScanApplicationMetadata.deserializeBinaryFromReader(msg, reader);
634
+ };
635
+
636
+
637
+ /**
638
+ * Deserializes binary data (in protobuf wire format) from the
639
+ * given reader into the given message object.
640
+ * @param {!proto.scan.v1.ScanApplicationMetadata} msg The message object to deserialize into.
641
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
642
+ * @return {!proto.scan.v1.ScanApplicationMetadata}
643
+ */
644
+ proto.scan.v1.ScanApplicationMetadata.deserializeBinaryFromReader = function(msg, reader) {
645
+ while (reader.nextField()) {
646
+ if (reader.isEndGroup()) {
647
+ break;
648
+ }
649
+ var field = reader.getFieldNumber();
650
+ switch (field) {
651
+ case 1:
652
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
653
+ msg.setId(value);
654
+ break;
655
+ case 2:
656
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
657
+ msg.setOrganizationId(value);
658
+ break;
659
+ default:
660
+ reader.skipField();
661
+ break;
662
+ }
663
+ }
664
+ return msg;
665
+ };
666
+
667
+
668
+ /**
669
+ * Serializes the message to binary data (in protobuf wire format).
670
+ * @return {!Uint8Array}
671
+ */
672
+ proto.scan.v1.ScanApplicationMetadata.prototype.serializeBinary = function() {
673
+ var writer = new jspb.BinaryWriter();
674
+ proto.scan.v1.ScanApplicationMetadata.serializeBinaryToWriter(this, writer);
675
+ return writer.getResultBuffer();
676
+ };
677
+
678
+
679
+ /**
680
+ * Serializes the given message to binary data (in protobuf wire
681
+ * format), writing to the given BinaryWriter.
682
+ * @param {!proto.scan.v1.ScanApplicationMetadata} message
683
+ * @param {!jspb.BinaryWriter} writer
684
+ * @suppress {unusedLocalVariables} f is only used for nested messages
685
+ */
686
+ proto.scan.v1.ScanApplicationMetadata.serializeBinaryToWriter = function(message, writer) {
687
+ var f = undefined;
688
+ f = message.getId();
689
+ if (f.length > 0) {
690
+ writer.writeString(
691
+ 1,
692
+ f
693
+ );
694
+ }
695
+ f = message.getOrganizationId();
696
+ if (f.length > 0) {
697
+ writer.writeString(
698
+ 2,
699
+ f
700
+ );
701
+ }
702
+ };
703
+
704
+
705
+ /**
706
+ * optional string id = 1;
707
+ * @return {string}
708
+ */
709
+ proto.scan.v1.ScanApplicationMetadata.prototype.getId = function() {
710
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
711
+ };
712
+
713
+
714
+ /**
715
+ * @param {string} value
716
+ * @return {!proto.scan.v1.ScanApplicationMetadata} returns this
717
+ */
718
+ proto.scan.v1.ScanApplicationMetadata.prototype.setId = function(value) {
719
+ return jspb.Message.setProto3StringField(this, 1, value);
720
+ };
721
+
722
+
723
+ /**
724
+ * optional string organization_id = 2;
725
+ * @return {string}
726
+ */
727
+ proto.scan.v1.ScanApplicationMetadata.prototype.getOrganizationId = function() {
728
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
729
+ };
730
+
731
+
732
+ /**
733
+ * @param {string} value
734
+ * @return {!proto.scan.v1.ScanApplicationMetadata} returns this
735
+ */
736
+ proto.scan.v1.ScanApplicationMetadata.prototype.setOrganizationId = function(value) {
737
+ return jspb.Message.setProto3StringField(this, 2, value);
738
+ };
739
+
740
+
741
+
742
+
743
+
744
+ if (jspb.Message.GENERATE_TO_OBJECT) {
745
+ /**
746
+ * Creates an object representation of this proto.
747
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
748
+ * Optional fields that are not set will be set to undefined.
749
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
750
+ * For the list of reserved names please see:
751
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
752
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
753
+ * JSPB instance for transitional soy proto support:
754
+ * http://goto/soy-param-migration
755
+ * @return {!Object}
756
+ */
757
+ proto.scan.v1.PolicyGateContext.prototype.toObject = function(opt_includeInstance) {
758
+ return proto.scan.v1.PolicyGateContext.toObject(opt_includeInstance, this);
759
+ };
760
+
761
+
762
+ /**
763
+ * Static version of the {@see toObject} method.
764
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
765
+ * the JSPB instance for transitional soy proto support:
766
+ * http://goto/soy-param-migration
767
+ * @param {!proto.scan.v1.PolicyGateContext} msg The msg instance to transform.
768
+ * @return {!Object}
769
+ * @suppress {unusedLocalVariables} f is only used for nested messages
770
+ */
771
+ proto.scan.v1.PolicyGateContext.toObject = function(includeInstance, msg) {
772
+ var f, obj = {
773
+ aiAgentRunId: jspb.Message.getFieldWithDefault(msg, 1, ""),
774
+ applicationCommitId: jspb.Message.getFieldWithDefault(msg, 2, ""),
775
+ executionContext: jspb.Message.getFieldWithDefault(msg, 3, ""),
776
+ profileId: jspb.Message.getFieldWithDefault(msg, 4, ""),
777
+ reviewPolicyId: jspb.Message.getFieldWithDefault(msg, 5, ""),
778
+ reviewPolicyVersionId: jspb.Message.getFieldWithDefault(msg, 6, ""),
779
+ runnerType: jspb.Message.getFieldWithDefault(msg, 7, ""),
780
+ runtime: jspb.Message.getFieldWithDefault(msg, 8, ""),
781
+ trigger: jspb.Message.getFieldWithDefault(msg, 9, ""),
782
+ token: jspb.Message.getFieldWithDefault(msg, 10, "")
783
+ };
784
+
785
+ if (includeInstance) {
786
+ obj.$jspbMessageInstance = msg;
787
+ }
788
+ return obj;
789
+ };
790
+ }
791
+
792
+
793
+ /**
794
+ * Deserializes binary data (in protobuf wire format).
795
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
796
+ * @return {!proto.scan.v1.PolicyGateContext}
797
+ */
798
+ proto.scan.v1.PolicyGateContext.deserializeBinary = function(bytes) {
799
+ var reader = new jspb.BinaryReader(bytes);
800
+ var msg = new proto.scan.v1.PolicyGateContext;
801
+ return proto.scan.v1.PolicyGateContext.deserializeBinaryFromReader(msg, reader);
802
+ };
803
+
804
+
805
+ /**
806
+ * Deserializes binary data (in protobuf wire format) from the
807
+ * given reader into the given message object.
808
+ * @param {!proto.scan.v1.PolicyGateContext} msg The message object to deserialize into.
809
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
810
+ * @return {!proto.scan.v1.PolicyGateContext}
811
+ */
812
+ proto.scan.v1.PolicyGateContext.deserializeBinaryFromReader = function(msg, reader) {
813
+ while (reader.nextField()) {
814
+ if (reader.isEndGroup()) {
815
+ break;
816
+ }
817
+ var field = reader.getFieldNumber();
818
+ switch (field) {
819
+ case 1:
820
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
821
+ msg.setAiAgentRunId(value);
822
+ break;
823
+ case 2:
824
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
825
+ msg.setApplicationCommitId(value);
826
+ break;
827
+ case 3:
828
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
829
+ msg.setExecutionContext(value);
830
+ break;
831
+ case 4:
832
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
833
+ msg.setProfileId(value);
834
+ break;
835
+ case 5:
836
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
837
+ msg.setReviewPolicyId(value);
838
+ break;
839
+ case 6:
840
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
841
+ msg.setReviewPolicyVersionId(value);
842
+ break;
843
+ case 7:
844
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
845
+ msg.setRunnerType(value);
846
+ break;
847
+ case 8:
848
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
849
+ msg.setRuntime(value);
850
+ break;
851
+ case 9:
852
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
853
+ msg.setTrigger(value);
854
+ break;
855
+ case 10:
856
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
857
+ msg.setToken(value);
858
+ break;
859
+ default:
860
+ reader.skipField();
861
+ break;
862
+ }
863
+ }
864
+ return msg;
865
+ };
866
+
867
+
868
+ /**
869
+ * Serializes the message to binary data (in protobuf wire format).
870
+ * @return {!Uint8Array}
871
+ */
872
+ proto.scan.v1.PolicyGateContext.prototype.serializeBinary = function() {
873
+ var writer = new jspb.BinaryWriter();
874
+ proto.scan.v1.PolicyGateContext.serializeBinaryToWriter(this, writer);
875
+ return writer.getResultBuffer();
876
+ };
877
+
878
+
879
+ /**
880
+ * Serializes the given message to binary data (in protobuf wire
881
+ * format), writing to the given BinaryWriter.
882
+ * @param {!proto.scan.v1.PolicyGateContext} message
883
+ * @param {!jspb.BinaryWriter} writer
884
+ * @suppress {unusedLocalVariables} f is only used for nested messages
885
+ */
886
+ proto.scan.v1.PolicyGateContext.serializeBinaryToWriter = function(message, writer) {
887
+ var f = undefined;
888
+ f = message.getAiAgentRunId();
889
+ if (f.length > 0) {
890
+ writer.writeString(
891
+ 1,
892
+ f
893
+ );
894
+ }
895
+ f = message.getApplicationCommitId();
896
+ if (f.length > 0) {
897
+ writer.writeString(
898
+ 2,
899
+ f
900
+ );
901
+ }
902
+ f = message.getExecutionContext();
903
+ if (f.length > 0) {
904
+ writer.writeString(
905
+ 3,
906
+ f
907
+ );
908
+ }
909
+ f = message.getProfileId();
910
+ if (f.length > 0) {
911
+ writer.writeString(
912
+ 4,
913
+ f
914
+ );
915
+ }
916
+ f = message.getReviewPolicyId();
917
+ if (f.length > 0) {
918
+ writer.writeString(
919
+ 5,
920
+ f
921
+ );
922
+ }
923
+ f = message.getReviewPolicyVersionId();
924
+ if (f.length > 0) {
925
+ writer.writeString(
926
+ 6,
927
+ f
928
+ );
929
+ }
930
+ f = message.getRunnerType();
931
+ if (f.length > 0) {
932
+ writer.writeString(
933
+ 7,
934
+ f
935
+ );
936
+ }
937
+ f = message.getRuntime();
938
+ if (f.length > 0) {
939
+ writer.writeString(
940
+ 8,
941
+ f
942
+ );
943
+ }
944
+ f = message.getTrigger();
945
+ if (f.length > 0) {
946
+ writer.writeString(
947
+ 9,
948
+ f
949
+ );
950
+ }
951
+ f = message.getToken();
952
+ if (f.length > 0) {
953
+ writer.writeString(
954
+ 10,
955
+ f
956
+ );
957
+ }
958
+ };
959
+
960
+
961
+ /**
962
+ * optional string ai_agent_run_id = 1;
963
+ * @return {string}
964
+ */
965
+ proto.scan.v1.PolicyGateContext.prototype.getAiAgentRunId = function() {
966
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
967
+ };
968
+
969
+
970
+ /**
971
+ * @param {string} value
972
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
973
+ */
974
+ proto.scan.v1.PolicyGateContext.prototype.setAiAgentRunId = function(value) {
975
+ return jspb.Message.setProto3StringField(this, 1, value);
976
+ };
977
+
978
+
979
+ /**
980
+ * optional string application_commit_id = 2;
981
+ * @return {string}
982
+ */
983
+ proto.scan.v1.PolicyGateContext.prototype.getApplicationCommitId = function() {
984
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
985
+ };
986
+
987
+
988
+ /**
989
+ * @param {string} value
990
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
991
+ */
992
+ proto.scan.v1.PolicyGateContext.prototype.setApplicationCommitId = function(value) {
993
+ return jspb.Message.setProto3StringField(this, 2, value);
994
+ };
995
+
996
+
997
+ /**
998
+ * optional string execution_context = 3;
999
+ * @return {string}
1000
+ */
1001
+ proto.scan.v1.PolicyGateContext.prototype.getExecutionContext = function() {
1002
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1003
+ };
1004
+
1005
+
1006
+ /**
1007
+ * @param {string} value
1008
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1009
+ */
1010
+ proto.scan.v1.PolicyGateContext.prototype.setExecutionContext = function(value) {
1011
+ return jspb.Message.setProto3StringField(this, 3, value);
1012
+ };
1013
+
1014
+
1015
+ /**
1016
+ * optional string profile_id = 4;
1017
+ * @return {string}
1018
+ */
1019
+ proto.scan.v1.PolicyGateContext.prototype.getProfileId = function() {
1020
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1021
+ };
1022
+
1023
+
1024
+ /**
1025
+ * @param {string} value
1026
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1027
+ */
1028
+ proto.scan.v1.PolicyGateContext.prototype.setProfileId = function(value) {
1029
+ return jspb.Message.setProto3StringField(this, 4, value);
1030
+ };
1031
+
1032
+
1033
+ /**
1034
+ * optional string review_policy_id = 5;
1035
+ * @return {string}
1036
+ */
1037
+ proto.scan.v1.PolicyGateContext.prototype.getReviewPolicyId = function() {
1038
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1039
+ };
1040
+
1041
+
1042
+ /**
1043
+ * @param {string} value
1044
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1045
+ */
1046
+ proto.scan.v1.PolicyGateContext.prototype.setReviewPolicyId = function(value) {
1047
+ return jspb.Message.setProto3StringField(this, 5, value);
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * optional string review_policy_version_id = 6;
1053
+ * @return {string}
1054
+ */
1055
+ proto.scan.v1.PolicyGateContext.prototype.getReviewPolicyVersionId = function() {
1056
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1057
+ };
1058
+
1059
+
1060
+ /**
1061
+ * @param {string} value
1062
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1063
+ */
1064
+ proto.scan.v1.PolicyGateContext.prototype.setReviewPolicyVersionId = function(value) {
1065
+ return jspb.Message.setProto3StringField(this, 6, value);
1066
+ };
1067
+
1068
+
1069
+ /**
1070
+ * optional string runner_type = 7;
1071
+ * @return {string}
1072
+ */
1073
+ proto.scan.v1.PolicyGateContext.prototype.getRunnerType = function() {
1074
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1075
+ };
1076
+
1077
+
1078
+ /**
1079
+ * @param {string} value
1080
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1081
+ */
1082
+ proto.scan.v1.PolicyGateContext.prototype.setRunnerType = function(value) {
1083
+ return jspb.Message.setProto3StringField(this, 7, value);
1084
+ };
1085
+
1086
+
1087
+ /**
1088
+ * optional string runtime = 8;
1089
+ * @return {string}
1090
+ */
1091
+ proto.scan.v1.PolicyGateContext.prototype.getRuntime = function() {
1092
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
1093
+ };
1094
+
1095
+
1096
+ /**
1097
+ * @param {string} value
1098
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1099
+ */
1100
+ proto.scan.v1.PolicyGateContext.prototype.setRuntime = function(value) {
1101
+ return jspb.Message.setProto3StringField(this, 8, value);
1102
+ };
1103
+
1104
+
1105
+ /**
1106
+ * optional string trigger = 9;
1107
+ * @return {string}
1108
+ */
1109
+ proto.scan.v1.PolicyGateContext.prototype.getTrigger = function() {
1110
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
1111
+ };
1112
+
1113
+
1114
+ /**
1115
+ * @param {string} value
1116
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1117
+ */
1118
+ proto.scan.v1.PolicyGateContext.prototype.setTrigger = function(value) {
1119
+ return jspb.Message.setProto3StringField(this, 9, value);
1120
+ };
1121
+
1122
+
1123
+ /**
1124
+ * optional string token = 10;
1125
+ * @return {string}
1126
+ */
1127
+ proto.scan.v1.PolicyGateContext.prototype.getToken = function() {
1128
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
1129
+ };
1130
+
1131
+
1132
+ /**
1133
+ * @param {string} value
1134
+ * @return {!proto.scan.v1.PolicyGateContext} returns this
1135
+ */
1136
+ proto.scan.v1.PolicyGateContext.prototype.setToken = function(value) {
1137
+ return jspb.Message.setProto3StringField(this, 10, value);
1138
+ };
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1145
+ /**
1146
+ * Creates an object representation of this proto.
1147
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1148
+ * Optional fields that are not set will be set to undefined.
1149
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1150
+ * For the list of reserved names please see:
1151
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1152
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1153
+ * JSPB instance for transitional soy proto support:
1154
+ * http://goto/soy-param-migration
1155
+ * @return {!Object}
1156
+ */
1157
+ proto.scan.v1.ScanResponse.prototype.toObject = function(opt_includeInstance) {
1158
+ return proto.scan.v1.ScanResponse.toObject(opt_includeInstance, this);
1159
+ };
1160
+
1161
+
1162
+ /**
1163
+ * Static version of the {@see toObject} method.
1164
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1165
+ * the JSPB instance for transitional soy proto support:
1166
+ * http://goto/soy-param-migration
1167
+ * @param {!proto.scan.v1.ScanResponse} msg The msg instance to transform.
1168
+ * @return {!Object}
1169
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1170
+ */
1171
+ proto.scan.v1.ScanResponse.toObject = function(includeInstance, msg) {
1172
+ var f, obj = {
1173
+ scanId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1174
+ created: (f = msg.getCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1175
+ updated: (f = msg.getUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1176
+ };
1177
+
1178
+ if (includeInstance) {
1179
+ obj.$jspbMessageInstance = msg;
1180
+ }
1181
+ return obj;
1182
+ };
1183
+ }
1184
+
1185
+
1186
+ /**
1187
+ * Deserializes binary data (in protobuf wire format).
1188
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1189
+ * @return {!proto.scan.v1.ScanResponse}
1190
+ */
1191
+ proto.scan.v1.ScanResponse.deserializeBinary = function(bytes) {
1192
+ var reader = new jspb.BinaryReader(bytes);
1193
+ var msg = new proto.scan.v1.ScanResponse;
1194
+ return proto.scan.v1.ScanResponse.deserializeBinaryFromReader(msg, reader);
1195
+ };
1196
+
1197
+
1198
+ /**
1199
+ * Deserializes binary data (in protobuf wire format) from the
1200
+ * given reader into the given message object.
1201
+ * @param {!proto.scan.v1.ScanResponse} msg The message object to deserialize into.
1202
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1203
+ * @return {!proto.scan.v1.ScanResponse}
1204
+ */
1205
+ proto.scan.v1.ScanResponse.deserializeBinaryFromReader = function(msg, reader) {
1206
+ while (reader.nextField()) {
1207
+ if (reader.isEndGroup()) {
1208
+ break;
1209
+ }
1210
+ var field = reader.getFieldNumber();
1211
+ switch (field) {
1212
+ case 1:
1213
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1214
+ msg.setScanId(value);
1215
+ break;
1216
+ case 2:
1217
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1218
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1219
+ msg.setCreated(value);
1220
+ break;
1221
+ case 3:
1222
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1223
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1224
+ msg.setUpdated(value);
1225
+ break;
1226
+ default:
1227
+ reader.skipField();
1228
+ break;
1229
+ }
1230
+ }
1231
+ return msg;
1232
+ };
1233
+
1234
+
1235
+ /**
1236
+ * Serializes the message to binary data (in protobuf wire format).
1237
+ * @return {!Uint8Array}
1238
+ */
1239
+ proto.scan.v1.ScanResponse.prototype.serializeBinary = function() {
1240
+ var writer = new jspb.BinaryWriter();
1241
+ proto.scan.v1.ScanResponse.serializeBinaryToWriter(this, writer);
1242
+ return writer.getResultBuffer();
1243
+ };
1244
+
1245
+
1246
+ /**
1247
+ * Serializes the given message to binary data (in protobuf wire
1248
+ * format), writing to the given BinaryWriter.
1249
+ * @param {!proto.scan.v1.ScanResponse} message
1250
+ * @param {!jspb.BinaryWriter} writer
1251
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1252
+ */
1253
+ proto.scan.v1.ScanResponse.serializeBinaryToWriter = function(message, writer) {
1254
+ var f = undefined;
1255
+ f = message.getScanId();
1256
+ if (f.length > 0) {
1257
+ writer.writeString(
1258
+ 1,
1259
+ f
1260
+ );
1261
+ }
1262
+ f = message.getCreated();
1263
+ if (f != null) {
1264
+ writer.writeMessage(
1265
+ 2,
1266
+ f,
1267
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1268
+ );
1269
+ }
1270
+ f = message.getUpdated();
1271
+ if (f != null) {
1272
+ writer.writeMessage(
1273
+ 3,
1274
+ f,
1275
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1276
+ );
1277
+ }
1278
+ };
1279
+
1280
+
1281
+ /**
1282
+ * optional string scan_id = 1;
1283
+ * @return {string}
1284
+ */
1285
+ proto.scan.v1.ScanResponse.prototype.getScanId = function() {
1286
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1287
+ };
1288
+
1289
+
1290
+ /**
1291
+ * @param {string} value
1292
+ * @return {!proto.scan.v1.ScanResponse} returns this
1293
+ */
1294
+ proto.scan.v1.ScanResponse.prototype.setScanId = function(value) {
1295
+ return jspb.Message.setProto3StringField(this, 1, value);
1296
+ };
1297
+
1298
+
1299
+ /**
1300
+ * optional google.protobuf.Timestamp created = 2;
1301
+ * @return {?proto.google.protobuf.Timestamp}
1302
+ */
1303
+ proto.scan.v1.ScanResponse.prototype.getCreated = function() {
1304
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1305
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
1306
+ };
1307
+
1308
+
1309
+ /**
1310
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1311
+ * @return {!proto.scan.v1.ScanResponse} returns this
1312
+ */
1313
+ proto.scan.v1.ScanResponse.prototype.setCreated = function(value) {
1314
+ return jspb.Message.setWrapperField(this, 2, value);
1315
+ };
1316
+
1317
+
1318
+ /**
1319
+ * Clears the message field making it undefined.
1320
+ * @return {!proto.scan.v1.ScanResponse} returns this
1321
+ */
1322
+ proto.scan.v1.ScanResponse.prototype.clearCreated = function() {
1323
+ return this.setCreated(undefined);
1324
+ };
1325
+
1326
+
1327
+ /**
1328
+ * Returns whether this field is set.
1329
+ * @return {boolean}
1330
+ */
1331
+ proto.scan.v1.ScanResponse.prototype.hasCreated = function() {
1332
+ return jspb.Message.getField(this, 2) != null;
1333
+ };
1334
+
1335
+
1336
+ /**
1337
+ * optional google.protobuf.Timestamp updated = 3;
1338
+ * @return {?proto.google.protobuf.Timestamp}
1339
+ */
1340
+ proto.scan.v1.ScanResponse.prototype.getUpdated = function() {
1341
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1342
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
1343
+ };
1344
+
1345
+
1346
+ /**
1347
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1348
+ * @return {!proto.scan.v1.ScanResponse} returns this
1349
+ */
1350
+ proto.scan.v1.ScanResponse.prototype.setUpdated = function(value) {
1351
+ return jspb.Message.setWrapperField(this, 3, value);
1352
+ };
1353
+
1354
+
1355
+ /**
1356
+ * Clears the message field making it undefined.
1357
+ * @return {!proto.scan.v1.ScanResponse} returns this
1358
+ */
1359
+ proto.scan.v1.ScanResponse.prototype.clearUpdated = function() {
1360
+ return this.setUpdated(undefined);
1361
+ };
1362
+
1363
+
1364
+ /**
1365
+ * Returns whether this field is set.
1366
+ * @return {boolean}
1367
+ */
1368
+ proto.scan.v1.ScanResponse.prototype.hasUpdated = function() {
1369
+ return jspb.Message.getField(this, 3) != null;
1370
+ };
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1377
+ /**
1378
+ * Creates an object representation of this proto.
1379
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1380
+ * Optional fields that are not set will be set to undefined.
1381
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1382
+ * For the list of reserved names please see:
1383
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1384
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1385
+ * JSPB instance for transitional soy proto support:
1386
+ * http://goto/soy-param-migration
1387
+ * @return {!Object}
1388
+ */
1389
+ proto.scan.v1.ScanStatusRequest.prototype.toObject = function(opt_includeInstance) {
1390
+ return proto.scan.v1.ScanStatusRequest.toObject(opt_includeInstance, this);
1391
+ };
1392
+
1393
+
1394
+ /**
1395
+ * Static version of the {@see toObject} method.
1396
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1397
+ * the JSPB instance for transitional soy proto support:
1398
+ * http://goto/soy-param-migration
1399
+ * @param {!proto.scan.v1.ScanStatusRequest} msg The msg instance to transform.
1400
+ * @return {!Object}
1401
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1402
+ */
1403
+ proto.scan.v1.ScanStatusRequest.toObject = function(includeInstance, msg) {
1404
+ var f, obj = {
1405
+ scanId: jspb.Message.getFieldWithDefault(msg, 1, "")
1406
+ };
1407
+
1408
+ if (includeInstance) {
1409
+ obj.$jspbMessageInstance = msg;
1410
+ }
1411
+ return obj;
1412
+ };
1413
+ }
1414
+
1415
+
1416
+ /**
1417
+ * Deserializes binary data (in protobuf wire format).
1418
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1419
+ * @return {!proto.scan.v1.ScanStatusRequest}
1420
+ */
1421
+ proto.scan.v1.ScanStatusRequest.deserializeBinary = function(bytes) {
1422
+ var reader = new jspb.BinaryReader(bytes);
1423
+ var msg = new proto.scan.v1.ScanStatusRequest;
1424
+ return proto.scan.v1.ScanStatusRequest.deserializeBinaryFromReader(msg, reader);
1425
+ };
1426
+
1427
+
1428
+ /**
1429
+ * Deserializes binary data (in protobuf wire format) from the
1430
+ * given reader into the given message object.
1431
+ * @param {!proto.scan.v1.ScanStatusRequest} msg The message object to deserialize into.
1432
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1433
+ * @return {!proto.scan.v1.ScanStatusRequest}
1434
+ */
1435
+ proto.scan.v1.ScanStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
1436
+ while (reader.nextField()) {
1437
+ if (reader.isEndGroup()) {
1438
+ break;
1439
+ }
1440
+ var field = reader.getFieldNumber();
1441
+ switch (field) {
1442
+ case 1:
1443
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1444
+ msg.setScanId(value);
1445
+ break;
1446
+ default:
1447
+ reader.skipField();
1448
+ break;
1449
+ }
1450
+ }
1451
+ return msg;
1452
+ };
1453
+
1454
+
1455
+ /**
1456
+ * Serializes the message to binary data (in protobuf wire format).
1457
+ * @return {!Uint8Array}
1458
+ */
1459
+ proto.scan.v1.ScanStatusRequest.prototype.serializeBinary = function() {
1460
+ var writer = new jspb.BinaryWriter();
1461
+ proto.scan.v1.ScanStatusRequest.serializeBinaryToWriter(this, writer);
1462
+ return writer.getResultBuffer();
1463
+ };
1464
+
1465
+
1466
+ /**
1467
+ * Serializes the given message to binary data (in protobuf wire
1468
+ * format), writing to the given BinaryWriter.
1469
+ * @param {!proto.scan.v1.ScanStatusRequest} message
1470
+ * @param {!jspb.BinaryWriter} writer
1471
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1472
+ */
1473
+ proto.scan.v1.ScanStatusRequest.serializeBinaryToWriter = function(message, writer) {
1474
+ var f = undefined;
1475
+ f = message.getScanId();
1476
+ if (f.length > 0) {
1477
+ writer.writeString(
1478
+ 1,
1479
+ f
1480
+ );
1481
+ }
1482
+ };
1483
+
1484
+
1485
+ /**
1486
+ * optional string scan_id = 1;
1487
+ * @return {string}
1488
+ */
1489
+ proto.scan.v1.ScanStatusRequest.prototype.getScanId = function() {
1490
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1491
+ };
1492
+
1493
+
1494
+ /**
1495
+ * @param {string} value
1496
+ * @return {!proto.scan.v1.ScanStatusRequest} returns this
1497
+ */
1498
+ proto.scan.v1.ScanStatusRequest.prototype.setScanId = function(value) {
1499
+ return jspb.Message.setProto3StringField(this, 1, value);
1500
+ };
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1507
+ /**
1508
+ * Creates an object representation of this proto.
1509
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1510
+ * Optional fields that are not set will be set to undefined.
1511
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1512
+ * For the list of reserved names please see:
1513
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1514
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1515
+ * JSPB instance for transitional soy proto support:
1516
+ * http://goto/soy-param-migration
1517
+ * @return {!Object}
1518
+ */
1519
+ proto.scan.v1.ScanStatusResponse.prototype.toObject = function(opt_includeInstance) {
1520
+ return proto.scan.v1.ScanStatusResponse.toObject(opt_includeInstance, this);
1521
+ };
1522
+
1523
+
1524
+ /**
1525
+ * Static version of the {@see toObject} method.
1526
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1527
+ * the JSPB instance for transitional soy proto support:
1528
+ * http://goto/soy-param-migration
1529
+ * @param {!proto.scan.v1.ScanStatusResponse} msg The msg instance to transform.
1530
+ * @return {!Object}
1531
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1532
+ */
1533
+ proto.scan.v1.ScanStatusResponse.toObject = function(includeInstance, msg) {
1534
+ var f, obj = {
1535
+ scanId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1536
+ status: jspb.Message.getFieldWithDefault(msg, 2, 0),
1537
+ error: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1538
+ created: (f = msg.getCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1539
+ updated: (f = msg.getUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1540
+ summary: (f = msg.getSummary()) && proto.scan.v1.ScanSummary.toObject(includeInstance, f)
1541
+ };
1542
+
1543
+ if (includeInstance) {
1544
+ obj.$jspbMessageInstance = msg;
1545
+ }
1546
+ return obj;
1547
+ };
1548
+ }
1549
+
1550
+
1551
+ /**
1552
+ * Deserializes binary data (in protobuf wire format).
1553
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1554
+ * @return {!proto.scan.v1.ScanStatusResponse}
1555
+ */
1556
+ proto.scan.v1.ScanStatusResponse.deserializeBinary = function(bytes) {
1557
+ var reader = new jspb.BinaryReader(bytes);
1558
+ var msg = new proto.scan.v1.ScanStatusResponse;
1559
+ return proto.scan.v1.ScanStatusResponse.deserializeBinaryFromReader(msg, reader);
1560
+ };
1561
+
1562
+
1563
+ /**
1564
+ * Deserializes binary data (in protobuf wire format) from the
1565
+ * given reader into the given message object.
1566
+ * @param {!proto.scan.v1.ScanStatusResponse} msg The message object to deserialize into.
1567
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1568
+ * @return {!proto.scan.v1.ScanStatusResponse}
1569
+ */
1570
+ proto.scan.v1.ScanStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
1571
+ while (reader.nextField()) {
1572
+ if (reader.isEndGroup()) {
1573
+ break;
1574
+ }
1575
+ var field = reader.getFieldNumber();
1576
+ switch (field) {
1577
+ case 1:
1578
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1579
+ msg.setScanId(value);
1580
+ break;
1581
+ case 2:
1582
+ var value = /** @type {!proto.scan.v1.ScanStatus} */ (reader.readEnum());
1583
+ msg.setStatus(value);
1584
+ break;
1585
+ case 3:
1586
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1587
+ msg.setError(value);
1588
+ break;
1589
+ case 4:
1590
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1591
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1592
+ msg.setCreated(value);
1593
+ break;
1594
+ case 5:
1595
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1596
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1597
+ msg.setUpdated(value);
1598
+ break;
1599
+ case 6:
1600
+ var value = new proto.scan.v1.ScanSummary;
1601
+ reader.readMessage(value,proto.scan.v1.ScanSummary.deserializeBinaryFromReader);
1602
+ msg.setSummary(value);
1603
+ break;
1604
+ default:
1605
+ reader.skipField();
1606
+ break;
1607
+ }
1608
+ }
1609
+ return msg;
1610
+ };
1611
+
1612
+
1613
+ /**
1614
+ * Serializes the message to binary data (in protobuf wire format).
1615
+ * @return {!Uint8Array}
1616
+ */
1617
+ proto.scan.v1.ScanStatusResponse.prototype.serializeBinary = function() {
1618
+ var writer = new jspb.BinaryWriter();
1619
+ proto.scan.v1.ScanStatusResponse.serializeBinaryToWriter(this, writer);
1620
+ return writer.getResultBuffer();
1621
+ };
1622
+
1623
+
1624
+ /**
1625
+ * Serializes the given message to binary data (in protobuf wire
1626
+ * format), writing to the given BinaryWriter.
1627
+ * @param {!proto.scan.v1.ScanStatusResponse} message
1628
+ * @param {!jspb.BinaryWriter} writer
1629
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1630
+ */
1631
+ proto.scan.v1.ScanStatusResponse.serializeBinaryToWriter = function(message, writer) {
1632
+ var f = undefined;
1633
+ f = message.getScanId();
1634
+ if (f.length > 0) {
1635
+ writer.writeString(
1636
+ 1,
1637
+ f
1638
+ );
1639
+ }
1640
+ f = message.getStatus();
1641
+ if (f !== 0.0) {
1642
+ writer.writeEnum(
1643
+ 2,
1644
+ f
1645
+ );
1646
+ }
1647
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1648
+ if (f != null) {
1649
+ writer.writeString(
1650
+ 3,
1651
+ f
1652
+ );
1653
+ }
1654
+ f = message.getCreated();
1655
+ if (f != null) {
1656
+ writer.writeMessage(
1657
+ 4,
1658
+ f,
1659
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1660
+ );
1661
+ }
1662
+ f = message.getUpdated();
1663
+ if (f != null) {
1664
+ writer.writeMessage(
1665
+ 5,
1666
+ f,
1667
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1668
+ );
1669
+ }
1670
+ f = message.getSummary();
1671
+ if (f != null) {
1672
+ writer.writeMessage(
1673
+ 6,
1674
+ f,
1675
+ proto.scan.v1.ScanSummary.serializeBinaryToWriter
1676
+ );
1677
+ }
1678
+ };
1679
+
1680
+
1681
+ /**
1682
+ * optional string scan_id = 1;
1683
+ * @return {string}
1684
+ */
1685
+ proto.scan.v1.ScanStatusResponse.prototype.getScanId = function() {
1686
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1687
+ };
1688
+
1689
+
1690
+ /**
1691
+ * @param {string} value
1692
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1693
+ */
1694
+ proto.scan.v1.ScanStatusResponse.prototype.setScanId = function(value) {
1695
+ return jspb.Message.setProto3StringField(this, 1, value);
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * optional ScanStatus status = 2;
1701
+ * @return {!proto.scan.v1.ScanStatus}
1702
+ */
1703
+ proto.scan.v1.ScanStatusResponse.prototype.getStatus = function() {
1704
+ return /** @type {!proto.scan.v1.ScanStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1705
+ };
1706
+
1707
+
1708
+ /**
1709
+ * @param {!proto.scan.v1.ScanStatus} value
1710
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1711
+ */
1712
+ proto.scan.v1.ScanStatusResponse.prototype.setStatus = function(value) {
1713
+ return jspb.Message.setProto3EnumField(this, 2, value);
1714
+ };
1715
+
1716
+
1717
+ /**
1718
+ * optional string error = 3;
1719
+ * @return {string}
1720
+ */
1721
+ proto.scan.v1.ScanStatusResponse.prototype.getError = function() {
1722
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1723
+ };
1724
+
1725
+
1726
+ /**
1727
+ * @param {string} value
1728
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1729
+ */
1730
+ proto.scan.v1.ScanStatusResponse.prototype.setError = function(value) {
1731
+ return jspb.Message.setField(this, 3, value);
1732
+ };
1733
+
1734
+
1735
+ /**
1736
+ * Clears the field making it undefined.
1737
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1738
+ */
1739
+ proto.scan.v1.ScanStatusResponse.prototype.clearError = function() {
1740
+ return jspb.Message.setField(this, 3, undefined);
1741
+ };
1742
+
1743
+
1744
+ /**
1745
+ * Returns whether this field is set.
1746
+ * @return {boolean}
1747
+ */
1748
+ proto.scan.v1.ScanStatusResponse.prototype.hasError = function() {
1749
+ return jspb.Message.getField(this, 3) != null;
1750
+ };
1751
+
1752
+
1753
+ /**
1754
+ * optional google.protobuf.Timestamp created = 4;
1755
+ * @return {?proto.google.protobuf.Timestamp}
1756
+ */
1757
+ proto.scan.v1.ScanStatusResponse.prototype.getCreated = function() {
1758
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1759
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1760
+ };
1761
+
1762
+
1763
+ /**
1764
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1765
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1766
+ */
1767
+ proto.scan.v1.ScanStatusResponse.prototype.setCreated = function(value) {
1768
+ return jspb.Message.setWrapperField(this, 4, value);
1769
+ };
1770
+
1771
+
1772
+ /**
1773
+ * Clears the message field making it undefined.
1774
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1775
+ */
1776
+ proto.scan.v1.ScanStatusResponse.prototype.clearCreated = function() {
1777
+ return this.setCreated(undefined);
1778
+ };
1779
+
1780
+
1781
+ /**
1782
+ * Returns whether this field is set.
1783
+ * @return {boolean}
1784
+ */
1785
+ proto.scan.v1.ScanStatusResponse.prototype.hasCreated = function() {
1786
+ return jspb.Message.getField(this, 4) != null;
1787
+ };
1788
+
1789
+
1790
+ /**
1791
+ * optional google.protobuf.Timestamp updated = 5;
1792
+ * @return {?proto.google.protobuf.Timestamp}
1793
+ */
1794
+ proto.scan.v1.ScanStatusResponse.prototype.getUpdated = function() {
1795
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1796
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1797
+ };
1798
+
1799
+
1800
+ /**
1801
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1802
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1803
+ */
1804
+ proto.scan.v1.ScanStatusResponse.prototype.setUpdated = function(value) {
1805
+ return jspb.Message.setWrapperField(this, 5, value);
1806
+ };
1807
+
1808
+
1809
+ /**
1810
+ * Clears the message field making it undefined.
1811
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1812
+ */
1813
+ proto.scan.v1.ScanStatusResponse.prototype.clearUpdated = function() {
1814
+ return this.setUpdated(undefined);
1815
+ };
1816
+
1817
+
1818
+ /**
1819
+ * Returns whether this field is set.
1820
+ * @return {boolean}
1821
+ */
1822
+ proto.scan.v1.ScanStatusResponse.prototype.hasUpdated = function() {
1823
+ return jspb.Message.getField(this, 5) != null;
1824
+ };
1825
+
1826
+
1827
+ /**
1828
+ * optional ScanSummary summary = 6;
1829
+ * @return {?proto.scan.v1.ScanSummary}
1830
+ */
1831
+ proto.scan.v1.ScanStatusResponse.prototype.getSummary = function() {
1832
+ return /** @type{?proto.scan.v1.ScanSummary} */ (
1833
+ jspb.Message.getWrapperField(this, proto.scan.v1.ScanSummary, 6));
1834
+ };
1835
+
1836
+
1837
+ /**
1838
+ * @param {?proto.scan.v1.ScanSummary|undefined} value
1839
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1840
+ */
1841
+ proto.scan.v1.ScanStatusResponse.prototype.setSummary = function(value) {
1842
+ return jspb.Message.setWrapperField(this, 6, value);
1843
+ };
1844
+
1845
+
1846
+ /**
1847
+ * Clears the message field making it undefined.
1848
+ * @return {!proto.scan.v1.ScanStatusResponse} returns this
1849
+ */
1850
+ proto.scan.v1.ScanStatusResponse.prototype.clearSummary = function() {
1851
+ return this.setSummary(undefined);
1852
+ };
1853
+
1854
+
1855
+ /**
1856
+ * Returns whether this field is set.
1857
+ * @return {boolean}
1858
+ */
1859
+ proto.scan.v1.ScanStatusResponse.prototype.hasSummary = function() {
1860
+ return jspb.Message.getField(this, 6) != null;
1861
+ };
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1868
+ /**
1869
+ * Creates an object representation of this proto.
1870
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1871
+ * Optional fields that are not set will be set to undefined.
1872
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1873
+ * For the list of reserved names please see:
1874
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1875
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1876
+ * JSPB instance for transitional soy proto support:
1877
+ * http://goto/soy-param-migration
1878
+ * @return {!Object}
1879
+ */
1880
+ proto.scan.v1.ScanListRequest.prototype.toObject = function(opt_includeInstance) {
1881
+ return proto.scan.v1.ScanListRequest.toObject(opt_includeInstance, this);
1882
+ };
1883
+
1884
+
1885
+ /**
1886
+ * Static version of the {@see toObject} method.
1887
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1888
+ * the JSPB instance for transitional soy proto support:
1889
+ * http://goto/soy-param-migration
1890
+ * @param {!proto.scan.v1.ScanListRequest} msg The msg instance to transform.
1891
+ * @return {!Object}
1892
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1893
+ */
1894
+ proto.scan.v1.ScanListRequest.toObject = function(includeInstance, msg) {
1895
+ var f, obj = {
1896
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1897
+ applicationId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1898
+ directoryHash: jspb.Message.getFieldWithDefault(msg, 3, "")
1899
+ };
1900
+
1901
+ if (includeInstance) {
1902
+ obj.$jspbMessageInstance = msg;
1903
+ }
1904
+ return obj;
1905
+ };
1906
+ }
1907
+
1908
+
1909
+ /**
1910
+ * Deserializes binary data (in protobuf wire format).
1911
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1912
+ * @return {!proto.scan.v1.ScanListRequest}
1913
+ */
1914
+ proto.scan.v1.ScanListRequest.deserializeBinary = function(bytes) {
1915
+ var reader = new jspb.BinaryReader(bytes);
1916
+ var msg = new proto.scan.v1.ScanListRequest;
1917
+ return proto.scan.v1.ScanListRequest.deserializeBinaryFromReader(msg, reader);
1918
+ };
1919
+
1920
+
1921
+ /**
1922
+ * Deserializes binary data (in protobuf wire format) from the
1923
+ * given reader into the given message object.
1924
+ * @param {!proto.scan.v1.ScanListRequest} msg The message object to deserialize into.
1925
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1926
+ * @return {!proto.scan.v1.ScanListRequest}
1927
+ */
1928
+ proto.scan.v1.ScanListRequest.deserializeBinaryFromReader = function(msg, reader) {
1929
+ while (reader.nextField()) {
1930
+ if (reader.isEndGroup()) {
1931
+ break;
1932
+ }
1933
+ var field = reader.getFieldNumber();
1934
+ switch (field) {
1935
+ case 1:
1936
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1937
+ msg.setOrganizationId(value);
1938
+ break;
1939
+ case 2:
1940
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1941
+ msg.setApplicationId(value);
1942
+ break;
1943
+ case 3:
1944
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1945
+ msg.setDirectoryHash(value);
1946
+ break;
1947
+ default:
1948
+ reader.skipField();
1949
+ break;
1950
+ }
1951
+ }
1952
+ return msg;
1953
+ };
1954
+
1955
+
1956
+ /**
1957
+ * Serializes the message to binary data (in protobuf wire format).
1958
+ * @return {!Uint8Array}
1959
+ */
1960
+ proto.scan.v1.ScanListRequest.prototype.serializeBinary = function() {
1961
+ var writer = new jspb.BinaryWriter();
1962
+ proto.scan.v1.ScanListRequest.serializeBinaryToWriter(this, writer);
1963
+ return writer.getResultBuffer();
1964
+ };
1965
+
1966
+
1967
+ /**
1968
+ * Serializes the given message to binary data (in protobuf wire
1969
+ * format), writing to the given BinaryWriter.
1970
+ * @param {!proto.scan.v1.ScanListRequest} message
1971
+ * @param {!jspb.BinaryWriter} writer
1972
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1973
+ */
1974
+ proto.scan.v1.ScanListRequest.serializeBinaryToWriter = function(message, writer) {
1975
+ var f = undefined;
1976
+ f = message.getOrganizationId();
1977
+ if (f.length > 0) {
1978
+ writer.writeString(
1979
+ 1,
1980
+ f
1981
+ );
1982
+ }
1983
+ f = message.getApplicationId();
1984
+ if (f.length > 0) {
1985
+ writer.writeString(
1986
+ 2,
1987
+ f
1988
+ );
1989
+ }
1990
+ f = message.getDirectoryHash();
1991
+ if (f.length > 0) {
1992
+ writer.writeString(
1993
+ 3,
1994
+ f
1995
+ );
1996
+ }
1997
+ };
1998
+
1999
+
2000
+ /**
2001
+ * optional string organization_id = 1;
2002
+ * @return {string}
2003
+ */
2004
+ proto.scan.v1.ScanListRequest.prototype.getOrganizationId = function() {
2005
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2006
+ };
2007
+
2008
+
2009
+ /**
2010
+ * @param {string} value
2011
+ * @return {!proto.scan.v1.ScanListRequest} returns this
2012
+ */
2013
+ proto.scan.v1.ScanListRequest.prototype.setOrganizationId = function(value) {
2014
+ return jspb.Message.setProto3StringField(this, 1, value);
2015
+ };
2016
+
2017
+
2018
+ /**
2019
+ * optional string application_id = 2;
2020
+ * @return {string}
2021
+ */
2022
+ proto.scan.v1.ScanListRequest.prototype.getApplicationId = function() {
2023
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2024
+ };
2025
+
2026
+
2027
+ /**
2028
+ * @param {string} value
2029
+ * @return {!proto.scan.v1.ScanListRequest} returns this
2030
+ */
2031
+ proto.scan.v1.ScanListRequest.prototype.setApplicationId = function(value) {
2032
+ return jspb.Message.setProto3StringField(this, 2, value);
2033
+ };
2034
+
2035
+
2036
+ /**
2037
+ * optional string directory_hash = 3;
2038
+ * @return {string}
2039
+ */
2040
+ proto.scan.v1.ScanListRequest.prototype.getDirectoryHash = function() {
2041
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2042
+ };
2043
+
2044
+
2045
+ /**
2046
+ * @param {string} value
2047
+ * @return {!proto.scan.v1.ScanListRequest} returns this
2048
+ */
2049
+ proto.scan.v1.ScanListRequest.prototype.setDirectoryHash = function(value) {
2050
+ return jspb.Message.setProto3StringField(this, 3, value);
2051
+ };
2052
+
2053
+
2054
+
2055
+ /**
2056
+ * List of repeated fields within this message type.
2057
+ * @private {!Array<number>}
2058
+ * @const
2059
+ */
2060
+ proto.scan.v1.ScanListResponse.repeatedFields_ = [1];
2061
+
2062
+
2063
+
2064
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2065
+ /**
2066
+ * Creates an object representation of this proto.
2067
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2068
+ * Optional fields that are not set will be set to undefined.
2069
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2070
+ * For the list of reserved names please see:
2071
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2072
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2073
+ * JSPB instance for transitional soy proto support:
2074
+ * http://goto/soy-param-migration
2075
+ * @return {!Object}
2076
+ */
2077
+ proto.scan.v1.ScanListResponse.prototype.toObject = function(opt_includeInstance) {
2078
+ return proto.scan.v1.ScanListResponse.toObject(opt_includeInstance, this);
2079
+ };
2080
+
2081
+
2082
+ /**
2083
+ * Static version of the {@see toObject} method.
2084
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2085
+ * the JSPB instance for transitional soy proto support:
2086
+ * http://goto/soy-param-migration
2087
+ * @param {!proto.scan.v1.ScanListResponse} msg The msg instance to transform.
2088
+ * @return {!Object}
2089
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2090
+ */
2091
+ proto.scan.v1.ScanListResponse.toObject = function(includeInstance, msg) {
2092
+ var f, obj = {
2093
+ scansList: jspb.Message.toObjectList(msg.getScansList(),
2094
+ proto.scan.v1.ScanStatusResponse.toObject, includeInstance)
2095
+ };
2096
+
2097
+ if (includeInstance) {
2098
+ obj.$jspbMessageInstance = msg;
2099
+ }
2100
+ return obj;
2101
+ };
2102
+ }
2103
+
2104
+
2105
+ /**
2106
+ * Deserializes binary data (in protobuf wire format).
2107
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2108
+ * @return {!proto.scan.v1.ScanListResponse}
2109
+ */
2110
+ proto.scan.v1.ScanListResponse.deserializeBinary = function(bytes) {
2111
+ var reader = new jspb.BinaryReader(bytes);
2112
+ var msg = new proto.scan.v1.ScanListResponse;
2113
+ return proto.scan.v1.ScanListResponse.deserializeBinaryFromReader(msg, reader);
2114
+ };
2115
+
2116
+
2117
+ /**
2118
+ * Deserializes binary data (in protobuf wire format) from the
2119
+ * given reader into the given message object.
2120
+ * @param {!proto.scan.v1.ScanListResponse} msg The message object to deserialize into.
2121
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2122
+ * @return {!proto.scan.v1.ScanListResponse}
2123
+ */
2124
+ proto.scan.v1.ScanListResponse.deserializeBinaryFromReader = function(msg, reader) {
2125
+ while (reader.nextField()) {
2126
+ if (reader.isEndGroup()) {
2127
+ break;
2128
+ }
2129
+ var field = reader.getFieldNumber();
2130
+ switch (field) {
2131
+ case 1:
2132
+ var value = new proto.scan.v1.ScanStatusResponse;
2133
+ reader.readMessage(value,proto.scan.v1.ScanStatusResponse.deserializeBinaryFromReader);
2134
+ msg.addScans(value);
2135
+ break;
2136
+ default:
2137
+ reader.skipField();
2138
+ break;
2139
+ }
2140
+ }
2141
+ return msg;
2142
+ };
2143
+
2144
+
2145
+ /**
2146
+ * Serializes the message to binary data (in protobuf wire format).
2147
+ * @return {!Uint8Array}
2148
+ */
2149
+ proto.scan.v1.ScanListResponse.prototype.serializeBinary = function() {
2150
+ var writer = new jspb.BinaryWriter();
2151
+ proto.scan.v1.ScanListResponse.serializeBinaryToWriter(this, writer);
2152
+ return writer.getResultBuffer();
2153
+ };
2154
+
2155
+
2156
+ /**
2157
+ * Serializes the given message to binary data (in protobuf wire
2158
+ * format), writing to the given BinaryWriter.
2159
+ * @param {!proto.scan.v1.ScanListResponse} message
2160
+ * @param {!jspb.BinaryWriter} writer
2161
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2162
+ */
2163
+ proto.scan.v1.ScanListResponse.serializeBinaryToWriter = function(message, writer) {
2164
+ var f = undefined;
2165
+ f = message.getScansList();
2166
+ if (f.length > 0) {
2167
+ writer.writeRepeatedMessage(
2168
+ 1,
2169
+ f,
2170
+ proto.scan.v1.ScanStatusResponse.serializeBinaryToWriter
2171
+ );
2172
+ }
2173
+ };
2174
+
2175
+
2176
+ /**
2177
+ * repeated ScanStatusResponse scans = 1;
2178
+ * @return {!Array<!proto.scan.v1.ScanStatusResponse>}
2179
+ */
2180
+ proto.scan.v1.ScanListResponse.prototype.getScansList = function() {
2181
+ return /** @type{!Array<!proto.scan.v1.ScanStatusResponse>} */ (
2182
+ jspb.Message.getRepeatedWrapperField(this, proto.scan.v1.ScanStatusResponse, 1));
2183
+ };
2184
+
2185
+
2186
+ /**
2187
+ * @param {!Array<!proto.scan.v1.ScanStatusResponse>} value
2188
+ * @return {!proto.scan.v1.ScanListResponse} returns this
2189
+ */
2190
+ proto.scan.v1.ScanListResponse.prototype.setScansList = function(value) {
2191
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2192
+ };
2193
+
2194
+
2195
+ /**
2196
+ * @param {!proto.scan.v1.ScanStatusResponse=} opt_value
2197
+ * @param {number=} opt_index
2198
+ * @return {!proto.scan.v1.ScanStatusResponse}
2199
+ */
2200
+ proto.scan.v1.ScanListResponse.prototype.addScans = function(opt_value, opt_index) {
2201
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.scan.v1.ScanStatusResponse, opt_index);
2202
+ };
2203
+
2204
+
2205
+ /**
2206
+ * Clears the list making it empty but non-null.
2207
+ * @return {!proto.scan.v1.ScanListResponse} returns this
2208
+ */
2209
+ proto.scan.v1.ScanListResponse.prototype.clearScansList = function() {
2210
+ return this.setScansList([]);
2211
+ };
2212
+
2213
+
2214
+
2215
+
2216
+
2217
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2218
+ /**
2219
+ * Creates an object representation of this proto.
2220
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2221
+ * Optional fields that are not set will be set to undefined.
2222
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2223
+ * For the list of reserved names please see:
2224
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2225
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2226
+ * JSPB instance for transitional soy proto support:
2227
+ * http://goto/soy-param-migration
2228
+ * @return {!Object}
2229
+ */
2230
+ proto.scan.v1.ScanSummary.prototype.toObject = function(opt_includeInstance) {
2231
+ return proto.scan.v1.ScanSummary.toObject(opt_includeInstance, this);
2232
+ };
2233
+
2234
+
2235
+ /**
2236
+ * Static version of the {@see toObject} method.
2237
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2238
+ * the JSPB instance for transitional soy proto support:
2239
+ * http://goto/soy-param-migration
2240
+ * @param {!proto.scan.v1.ScanSummary} msg The msg instance to transform.
2241
+ * @return {!Object}
2242
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2243
+ */
2244
+ proto.scan.v1.ScanSummary.toObject = function(includeInstance, msg) {
2245
+ var f, obj = {
2246
+ totalFindings: jspb.Message.getFieldWithDefault(msg, 1, 0),
2247
+ highSeverityFindings: jspb.Message.getFieldWithDefault(msg, 2, 0),
2248
+ sourceFindings: jspb.Message.getFieldWithDefault(msg, 3, 0),
2249
+ builtAssetFindings: jspb.Message.getFieldWithDefault(msg, 4, 0),
2250
+ scannerVersion: jspb.Message.getFieldWithDefault(msg, 5, "")
2251
+ };
2252
+
2253
+ if (includeInstance) {
2254
+ obj.$jspbMessageInstance = msg;
2255
+ }
2256
+ return obj;
2257
+ };
2258
+ }
2259
+
2260
+
2261
+ /**
2262
+ * Deserializes binary data (in protobuf wire format).
2263
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2264
+ * @return {!proto.scan.v1.ScanSummary}
2265
+ */
2266
+ proto.scan.v1.ScanSummary.deserializeBinary = function(bytes) {
2267
+ var reader = new jspb.BinaryReader(bytes);
2268
+ var msg = new proto.scan.v1.ScanSummary;
2269
+ return proto.scan.v1.ScanSummary.deserializeBinaryFromReader(msg, reader);
2270
+ };
2271
+
2272
+
2273
+ /**
2274
+ * Deserializes binary data (in protobuf wire format) from the
2275
+ * given reader into the given message object.
2276
+ * @param {!proto.scan.v1.ScanSummary} msg The message object to deserialize into.
2277
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2278
+ * @return {!proto.scan.v1.ScanSummary}
2279
+ */
2280
+ proto.scan.v1.ScanSummary.deserializeBinaryFromReader = function(msg, reader) {
2281
+ while (reader.nextField()) {
2282
+ if (reader.isEndGroup()) {
2283
+ break;
2284
+ }
2285
+ var field = reader.getFieldNumber();
2286
+ switch (field) {
2287
+ case 1:
2288
+ var value = /** @type {number} */ (reader.readInt64());
2289
+ msg.setTotalFindings(value);
2290
+ break;
2291
+ case 2:
2292
+ var value = /** @type {number} */ (reader.readInt64());
2293
+ msg.setHighSeverityFindings(value);
2294
+ break;
2295
+ case 3:
2296
+ var value = /** @type {number} */ (reader.readInt64());
2297
+ msg.setSourceFindings(value);
2298
+ break;
2299
+ case 4:
2300
+ var value = /** @type {number} */ (reader.readInt64());
2301
+ msg.setBuiltAssetFindings(value);
2302
+ break;
2303
+ case 5:
2304
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2305
+ msg.setScannerVersion(value);
2306
+ break;
2307
+ default:
2308
+ reader.skipField();
2309
+ break;
2310
+ }
2311
+ }
2312
+ return msg;
2313
+ };
2314
+
2315
+
2316
+ /**
2317
+ * Serializes the message to binary data (in protobuf wire format).
2318
+ * @return {!Uint8Array}
2319
+ */
2320
+ proto.scan.v1.ScanSummary.prototype.serializeBinary = function() {
2321
+ var writer = new jspb.BinaryWriter();
2322
+ proto.scan.v1.ScanSummary.serializeBinaryToWriter(this, writer);
2323
+ return writer.getResultBuffer();
2324
+ };
2325
+
2326
+
2327
+ /**
2328
+ * Serializes the given message to binary data (in protobuf wire
2329
+ * format), writing to the given BinaryWriter.
2330
+ * @param {!proto.scan.v1.ScanSummary} message
2331
+ * @param {!jspb.BinaryWriter} writer
2332
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2333
+ */
2334
+ proto.scan.v1.ScanSummary.serializeBinaryToWriter = function(message, writer) {
2335
+ var f = undefined;
2336
+ f = message.getTotalFindings();
2337
+ if (f !== 0) {
2338
+ writer.writeInt64(
2339
+ 1,
2340
+ f
2341
+ );
2342
+ }
2343
+ f = message.getHighSeverityFindings();
2344
+ if (f !== 0) {
2345
+ writer.writeInt64(
2346
+ 2,
2347
+ f
2348
+ );
2349
+ }
2350
+ f = message.getSourceFindings();
2351
+ if (f !== 0) {
2352
+ writer.writeInt64(
2353
+ 3,
2354
+ f
2355
+ );
2356
+ }
2357
+ f = message.getBuiltAssetFindings();
2358
+ if (f !== 0) {
2359
+ writer.writeInt64(
2360
+ 4,
2361
+ f
2362
+ );
2363
+ }
2364
+ f = message.getScannerVersion();
2365
+ if (f.length > 0) {
2366
+ writer.writeString(
2367
+ 5,
2368
+ f
2369
+ );
2370
+ }
2371
+ };
2372
+
2373
+
2374
+ /**
2375
+ * optional int64 total_findings = 1;
2376
+ * @return {number}
2377
+ */
2378
+ proto.scan.v1.ScanSummary.prototype.getTotalFindings = function() {
2379
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2380
+ };
2381
+
2382
+
2383
+ /**
2384
+ * @param {number} value
2385
+ * @return {!proto.scan.v1.ScanSummary} returns this
2386
+ */
2387
+ proto.scan.v1.ScanSummary.prototype.setTotalFindings = function(value) {
2388
+ return jspb.Message.setProto3IntField(this, 1, value);
2389
+ };
2390
+
2391
+
2392
+ /**
2393
+ * optional int64 high_severity_findings = 2;
2394
+ * @return {number}
2395
+ */
2396
+ proto.scan.v1.ScanSummary.prototype.getHighSeverityFindings = function() {
2397
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2398
+ };
2399
+
2400
+
2401
+ /**
2402
+ * @param {number} value
2403
+ * @return {!proto.scan.v1.ScanSummary} returns this
2404
+ */
2405
+ proto.scan.v1.ScanSummary.prototype.setHighSeverityFindings = function(value) {
2406
+ return jspb.Message.setProto3IntField(this, 2, value);
2407
+ };
2408
+
2409
+
2410
+ /**
2411
+ * optional int64 source_findings = 3;
2412
+ * @return {number}
2413
+ */
2414
+ proto.scan.v1.ScanSummary.prototype.getSourceFindings = function() {
2415
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2416
+ };
2417
+
2418
+
2419
+ /**
2420
+ * @param {number} value
2421
+ * @return {!proto.scan.v1.ScanSummary} returns this
2422
+ */
2423
+ proto.scan.v1.ScanSummary.prototype.setSourceFindings = function(value) {
2424
+ return jspb.Message.setProto3IntField(this, 3, value);
2425
+ };
2426
+
2427
+
2428
+ /**
2429
+ * optional int64 built_asset_findings = 4;
2430
+ * @return {number}
2431
+ */
2432
+ proto.scan.v1.ScanSummary.prototype.getBuiltAssetFindings = function() {
2433
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2434
+ };
2435
+
2436
+
2437
+ /**
2438
+ * @param {number} value
2439
+ * @return {!proto.scan.v1.ScanSummary} returns this
2440
+ */
2441
+ proto.scan.v1.ScanSummary.prototype.setBuiltAssetFindings = function(value) {
2442
+ return jspb.Message.setProto3IntField(this, 4, value);
2443
+ };
2444
+
2445
+
2446
+ /**
2447
+ * optional string scanner_version = 5;
2448
+ * @return {string}
2449
+ */
2450
+ proto.scan.v1.ScanSummary.prototype.getScannerVersion = function() {
2451
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2452
+ };
2453
+
2454
+
2455
+ /**
2456
+ * @param {string} value
2457
+ * @return {!proto.scan.v1.ScanSummary} returns this
2458
+ */
2459
+ proto.scan.v1.ScanSummary.prototype.setScannerVersion = function(value) {
2460
+ return jspb.Message.setProto3StringField(this, 5, value);
2461
+ };
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2468
+ /**
2469
+ * Creates an object representation of this proto.
2470
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2471
+ * Optional fields that are not set will be set to undefined.
2472
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2473
+ * For the list of reserved names please see:
2474
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2475
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2476
+ * JSPB instance for transitional soy proto support:
2477
+ * http://goto/soy-param-migration
2478
+ * @return {!Object}
2479
+ */
2480
+ proto.scan.v1.ScanStepTimings.prototype.toObject = function(opt_includeInstance) {
2481
+ return proto.scan.v1.ScanStepTimings.toObject(opt_includeInstance, this);
2482
+ };
2483
+
2484
+
2485
+ /**
2486
+ * Static version of the {@see toObject} method.
2487
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2488
+ * the JSPB instance for transitional soy proto support:
2489
+ * http://goto/soy-param-migration
2490
+ * @param {!proto.scan.v1.ScanStepTimings} msg The msg instance to transform.
2491
+ * @return {!Object}
2492
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2493
+ */
2494
+ proto.scan.v1.ScanStepTimings.toObject = function(includeInstance, msg) {
2495
+ var f, obj = {
2496
+ fetchSourceMs: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
2497
+ fetchArtifactsMs: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
2498
+ sourceScanMs: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
2499
+ builtAssetScanMs: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
2500
+ reportFindingsMs: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f
2501
+ };
2502
+
2503
+ if (includeInstance) {
2504
+ obj.$jspbMessageInstance = msg;
2505
+ }
2506
+ return obj;
2507
+ };
2508
+ }
2509
+
2510
+
2511
+ /**
2512
+ * Deserializes binary data (in protobuf wire format).
2513
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2514
+ * @return {!proto.scan.v1.ScanStepTimings}
2515
+ */
2516
+ proto.scan.v1.ScanStepTimings.deserializeBinary = function(bytes) {
2517
+ var reader = new jspb.BinaryReader(bytes);
2518
+ var msg = new proto.scan.v1.ScanStepTimings;
2519
+ return proto.scan.v1.ScanStepTimings.deserializeBinaryFromReader(msg, reader);
2520
+ };
2521
+
2522
+
2523
+ /**
2524
+ * Deserializes binary data (in protobuf wire format) from the
2525
+ * given reader into the given message object.
2526
+ * @param {!proto.scan.v1.ScanStepTimings} msg The message object to deserialize into.
2527
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2528
+ * @return {!proto.scan.v1.ScanStepTimings}
2529
+ */
2530
+ proto.scan.v1.ScanStepTimings.deserializeBinaryFromReader = function(msg, reader) {
2531
+ while (reader.nextField()) {
2532
+ if (reader.isEndGroup()) {
2533
+ break;
2534
+ }
2535
+ var field = reader.getFieldNumber();
2536
+ switch (field) {
2537
+ case 1:
2538
+ var value = /** @type {number} */ (reader.readInt64());
2539
+ msg.setFetchSourceMs(value);
2540
+ break;
2541
+ case 2:
2542
+ var value = /** @type {number} */ (reader.readInt64());
2543
+ msg.setFetchArtifactsMs(value);
2544
+ break;
2545
+ case 3:
2546
+ var value = /** @type {number} */ (reader.readInt64());
2547
+ msg.setSourceScanMs(value);
2548
+ break;
2549
+ case 4:
2550
+ var value = /** @type {number} */ (reader.readInt64());
2551
+ msg.setBuiltAssetScanMs(value);
2552
+ break;
2553
+ case 5:
2554
+ var value = /** @type {number} */ (reader.readInt64());
2555
+ msg.setReportFindingsMs(value);
2556
+ break;
2557
+ default:
2558
+ reader.skipField();
2559
+ break;
2560
+ }
2561
+ }
2562
+ return msg;
2563
+ };
2564
+
2565
+
2566
+ /**
2567
+ * Serializes the message to binary data (in protobuf wire format).
2568
+ * @return {!Uint8Array}
2569
+ */
2570
+ proto.scan.v1.ScanStepTimings.prototype.serializeBinary = function() {
2571
+ var writer = new jspb.BinaryWriter();
2572
+ proto.scan.v1.ScanStepTimings.serializeBinaryToWriter(this, writer);
2573
+ return writer.getResultBuffer();
2574
+ };
2575
+
2576
+
2577
+ /**
2578
+ * Serializes the given message to binary data (in protobuf wire
2579
+ * format), writing to the given BinaryWriter.
2580
+ * @param {!proto.scan.v1.ScanStepTimings} message
2581
+ * @param {!jspb.BinaryWriter} writer
2582
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2583
+ */
2584
+ proto.scan.v1.ScanStepTimings.serializeBinaryToWriter = function(message, writer) {
2585
+ var f = undefined;
2586
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
2587
+ if (f != null) {
2588
+ writer.writeInt64(
2589
+ 1,
2590
+ f
2591
+ );
2592
+ }
2593
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
2594
+ if (f != null) {
2595
+ writer.writeInt64(
2596
+ 2,
2597
+ f
2598
+ );
2599
+ }
2600
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
2601
+ if (f != null) {
2602
+ writer.writeInt64(
2603
+ 3,
2604
+ f
2605
+ );
2606
+ }
2607
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
2608
+ if (f != null) {
2609
+ writer.writeInt64(
2610
+ 4,
2611
+ f
2612
+ );
2613
+ }
2614
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
2615
+ if (f != null) {
2616
+ writer.writeInt64(
2617
+ 5,
2618
+ f
2619
+ );
2620
+ }
2621
+ };
2622
+
2623
+
2624
+ /**
2625
+ * optional int64 fetch_source_ms = 1;
2626
+ * @return {number}
2627
+ */
2628
+ proto.scan.v1.ScanStepTimings.prototype.getFetchSourceMs = function() {
2629
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2630
+ };
2631
+
2632
+
2633
+ /**
2634
+ * @param {number} value
2635
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2636
+ */
2637
+ proto.scan.v1.ScanStepTimings.prototype.setFetchSourceMs = function(value) {
2638
+ return jspb.Message.setField(this, 1, value);
2639
+ };
2640
+
2641
+
2642
+ /**
2643
+ * Clears the field making it undefined.
2644
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2645
+ */
2646
+ proto.scan.v1.ScanStepTimings.prototype.clearFetchSourceMs = function() {
2647
+ return jspb.Message.setField(this, 1, undefined);
2648
+ };
2649
+
2650
+
2651
+ /**
2652
+ * Returns whether this field is set.
2653
+ * @return {boolean}
2654
+ */
2655
+ proto.scan.v1.ScanStepTimings.prototype.hasFetchSourceMs = function() {
2656
+ return jspb.Message.getField(this, 1) != null;
2657
+ };
2658
+
2659
+
2660
+ /**
2661
+ * optional int64 fetch_artifacts_ms = 2;
2662
+ * @return {number}
2663
+ */
2664
+ proto.scan.v1.ScanStepTimings.prototype.getFetchArtifactsMs = function() {
2665
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2666
+ };
2667
+
2668
+
2669
+ /**
2670
+ * @param {number} value
2671
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2672
+ */
2673
+ proto.scan.v1.ScanStepTimings.prototype.setFetchArtifactsMs = function(value) {
2674
+ return jspb.Message.setField(this, 2, value);
2675
+ };
2676
+
2677
+
2678
+ /**
2679
+ * Clears the field making it undefined.
2680
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2681
+ */
2682
+ proto.scan.v1.ScanStepTimings.prototype.clearFetchArtifactsMs = function() {
2683
+ return jspb.Message.setField(this, 2, undefined);
2684
+ };
2685
+
2686
+
2687
+ /**
2688
+ * Returns whether this field is set.
2689
+ * @return {boolean}
2690
+ */
2691
+ proto.scan.v1.ScanStepTimings.prototype.hasFetchArtifactsMs = function() {
2692
+ return jspb.Message.getField(this, 2) != null;
2693
+ };
2694
+
2695
+
2696
+ /**
2697
+ * optional int64 source_scan_ms = 3;
2698
+ * @return {number}
2699
+ */
2700
+ proto.scan.v1.ScanStepTimings.prototype.getSourceScanMs = function() {
2701
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2702
+ };
2703
+
2704
+
2705
+ /**
2706
+ * @param {number} value
2707
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2708
+ */
2709
+ proto.scan.v1.ScanStepTimings.prototype.setSourceScanMs = function(value) {
2710
+ return jspb.Message.setField(this, 3, value);
2711
+ };
2712
+
2713
+
2714
+ /**
2715
+ * Clears the field making it undefined.
2716
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2717
+ */
2718
+ proto.scan.v1.ScanStepTimings.prototype.clearSourceScanMs = function() {
2719
+ return jspb.Message.setField(this, 3, undefined);
2720
+ };
2721
+
2722
+
2723
+ /**
2724
+ * Returns whether this field is set.
2725
+ * @return {boolean}
2726
+ */
2727
+ proto.scan.v1.ScanStepTimings.prototype.hasSourceScanMs = function() {
2728
+ return jspb.Message.getField(this, 3) != null;
2729
+ };
2730
+
2731
+
2732
+ /**
2733
+ * optional int64 built_asset_scan_ms = 4;
2734
+ * @return {number}
2735
+ */
2736
+ proto.scan.v1.ScanStepTimings.prototype.getBuiltAssetScanMs = function() {
2737
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2738
+ };
2739
+
2740
+
2741
+ /**
2742
+ * @param {number} value
2743
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2744
+ */
2745
+ proto.scan.v1.ScanStepTimings.prototype.setBuiltAssetScanMs = function(value) {
2746
+ return jspb.Message.setField(this, 4, value);
2747
+ };
2748
+
2749
+
2750
+ /**
2751
+ * Clears the field making it undefined.
2752
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2753
+ */
2754
+ proto.scan.v1.ScanStepTimings.prototype.clearBuiltAssetScanMs = function() {
2755
+ return jspb.Message.setField(this, 4, undefined);
2756
+ };
2757
+
2758
+
2759
+ /**
2760
+ * Returns whether this field is set.
2761
+ * @return {boolean}
2762
+ */
2763
+ proto.scan.v1.ScanStepTimings.prototype.hasBuiltAssetScanMs = function() {
2764
+ return jspb.Message.getField(this, 4) != null;
2765
+ };
2766
+
2767
+
2768
+ /**
2769
+ * optional int64 report_findings_ms = 5;
2770
+ * @return {number}
2771
+ */
2772
+ proto.scan.v1.ScanStepTimings.prototype.getReportFindingsMs = function() {
2773
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2774
+ };
2775
+
2776
+
2777
+ /**
2778
+ * @param {number} value
2779
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2780
+ */
2781
+ proto.scan.v1.ScanStepTimings.prototype.setReportFindingsMs = function(value) {
2782
+ return jspb.Message.setField(this, 5, value);
2783
+ };
2784
+
2785
+
2786
+ /**
2787
+ * Clears the field making it undefined.
2788
+ * @return {!proto.scan.v1.ScanStepTimings} returns this
2789
+ */
2790
+ proto.scan.v1.ScanStepTimings.prototype.clearReportFindingsMs = function() {
2791
+ return jspb.Message.setField(this, 5, undefined);
2792
+ };
2793
+
2794
+
2795
+ /**
2796
+ * Returns whether this field is set.
2797
+ * @return {boolean}
2798
+ */
2799
+ proto.scan.v1.ScanStepTimings.prototype.hasReportFindingsMs = function() {
2800
+ return jspb.Message.getField(this, 5) != null;
2801
+ };
2802
+
2803
+
2804
+
2805
+
2806
+
2807
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2808
+ /**
2809
+ * Creates an object representation of this proto.
2810
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2811
+ * Optional fields that are not set will be set to undefined.
2812
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2813
+ * For the list of reserved names please see:
2814
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2815
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2816
+ * JSPB instance for transitional soy proto support:
2817
+ * http://goto/soy-param-migration
2818
+ * @return {!Object}
2819
+ */
2820
+ proto.scan.v1.ScanTerminateRequest.prototype.toObject = function(opt_includeInstance) {
2821
+ return proto.scan.v1.ScanTerminateRequest.toObject(opt_includeInstance, this);
2822
+ };
2823
+
2824
+
2825
+ /**
2826
+ * Static version of the {@see toObject} method.
2827
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2828
+ * the JSPB instance for transitional soy proto support:
2829
+ * http://goto/soy-param-migration
2830
+ * @param {!proto.scan.v1.ScanTerminateRequest} msg The msg instance to transform.
2831
+ * @return {!Object}
2832
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2833
+ */
2834
+ proto.scan.v1.ScanTerminateRequest.toObject = function(includeInstance, msg) {
2835
+ var f, obj = {
2836
+ scanId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2837
+ status: jspb.Message.getFieldWithDefault(msg, 2, 0),
2838
+ error: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
2839
+ scanKey: jspb.Message.getFieldWithDefault(msg, 4, ""),
2840
+ stepTimings: (f = msg.getStepTimings()) && proto.scan.v1.ScanStepTimings.toObject(includeInstance, f),
2841
+ summary: (f = msg.getSummary()) && proto.scan.v1.ScanSummary.toObject(includeInstance, f)
2842
+ };
2843
+
2844
+ if (includeInstance) {
2845
+ obj.$jspbMessageInstance = msg;
2846
+ }
2847
+ return obj;
2848
+ };
2849
+ }
2850
+
2851
+
2852
+ /**
2853
+ * Deserializes binary data (in protobuf wire format).
2854
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2855
+ * @return {!proto.scan.v1.ScanTerminateRequest}
2856
+ */
2857
+ proto.scan.v1.ScanTerminateRequest.deserializeBinary = function(bytes) {
2858
+ var reader = new jspb.BinaryReader(bytes);
2859
+ var msg = new proto.scan.v1.ScanTerminateRequest;
2860
+ return proto.scan.v1.ScanTerminateRequest.deserializeBinaryFromReader(msg, reader);
2861
+ };
2862
+
2863
+
2864
+ /**
2865
+ * Deserializes binary data (in protobuf wire format) from the
2866
+ * given reader into the given message object.
2867
+ * @param {!proto.scan.v1.ScanTerminateRequest} msg The message object to deserialize into.
2868
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2869
+ * @return {!proto.scan.v1.ScanTerminateRequest}
2870
+ */
2871
+ proto.scan.v1.ScanTerminateRequest.deserializeBinaryFromReader = function(msg, reader) {
2872
+ while (reader.nextField()) {
2873
+ if (reader.isEndGroup()) {
2874
+ break;
2875
+ }
2876
+ var field = reader.getFieldNumber();
2877
+ switch (field) {
2878
+ case 1:
2879
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2880
+ msg.setScanId(value);
2881
+ break;
2882
+ case 2:
2883
+ var value = /** @type {!proto.scan.v1.ScanStatus} */ (reader.readEnum());
2884
+ msg.setStatus(value);
2885
+ break;
2886
+ case 3:
2887
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2888
+ msg.setError(value);
2889
+ break;
2890
+ case 4:
2891
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2892
+ msg.setScanKey(value);
2893
+ break;
2894
+ case 5:
2895
+ var value = new proto.scan.v1.ScanStepTimings;
2896
+ reader.readMessage(value,proto.scan.v1.ScanStepTimings.deserializeBinaryFromReader);
2897
+ msg.setStepTimings(value);
2898
+ break;
2899
+ case 6:
2900
+ var value = new proto.scan.v1.ScanSummary;
2901
+ reader.readMessage(value,proto.scan.v1.ScanSummary.deserializeBinaryFromReader);
2902
+ msg.setSummary(value);
2903
+ break;
2904
+ default:
2905
+ reader.skipField();
2906
+ break;
2907
+ }
2908
+ }
2909
+ return msg;
2910
+ };
2911
+
2912
+
2913
+ /**
2914
+ * Serializes the message to binary data (in protobuf wire format).
2915
+ * @return {!Uint8Array}
2916
+ */
2917
+ proto.scan.v1.ScanTerminateRequest.prototype.serializeBinary = function() {
2918
+ var writer = new jspb.BinaryWriter();
2919
+ proto.scan.v1.ScanTerminateRequest.serializeBinaryToWriter(this, writer);
2920
+ return writer.getResultBuffer();
2921
+ };
2922
+
2923
+
2924
+ /**
2925
+ * Serializes the given message to binary data (in protobuf wire
2926
+ * format), writing to the given BinaryWriter.
2927
+ * @param {!proto.scan.v1.ScanTerminateRequest} message
2928
+ * @param {!jspb.BinaryWriter} writer
2929
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2930
+ */
2931
+ proto.scan.v1.ScanTerminateRequest.serializeBinaryToWriter = function(message, writer) {
2932
+ var f = undefined;
2933
+ f = message.getScanId();
2934
+ if (f.length > 0) {
2935
+ writer.writeString(
2936
+ 1,
2937
+ f
2938
+ );
2939
+ }
2940
+ f = message.getStatus();
2941
+ if (f !== 0.0) {
2942
+ writer.writeEnum(
2943
+ 2,
2944
+ f
2945
+ );
2946
+ }
2947
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
2948
+ if (f != null) {
2949
+ writer.writeString(
2950
+ 3,
2951
+ f
2952
+ );
2953
+ }
2954
+ f = message.getScanKey();
2955
+ if (f.length > 0) {
2956
+ writer.writeString(
2957
+ 4,
2958
+ f
2959
+ );
2960
+ }
2961
+ f = message.getStepTimings();
2962
+ if (f != null) {
2963
+ writer.writeMessage(
2964
+ 5,
2965
+ f,
2966
+ proto.scan.v1.ScanStepTimings.serializeBinaryToWriter
2967
+ );
2968
+ }
2969
+ f = message.getSummary();
2970
+ if (f != null) {
2971
+ writer.writeMessage(
2972
+ 6,
2973
+ f,
2974
+ proto.scan.v1.ScanSummary.serializeBinaryToWriter
2975
+ );
2976
+ }
2977
+ };
2978
+
2979
+
2980
+ /**
2981
+ * optional string scan_id = 1;
2982
+ * @return {string}
2983
+ */
2984
+ proto.scan.v1.ScanTerminateRequest.prototype.getScanId = function() {
2985
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2986
+ };
2987
+
2988
+
2989
+ /**
2990
+ * @param {string} value
2991
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
2992
+ */
2993
+ proto.scan.v1.ScanTerminateRequest.prototype.setScanId = function(value) {
2994
+ return jspb.Message.setProto3StringField(this, 1, value);
2995
+ };
2996
+
2997
+
2998
+ /**
2999
+ * optional ScanStatus status = 2;
3000
+ * @return {!proto.scan.v1.ScanStatus}
3001
+ */
3002
+ proto.scan.v1.ScanTerminateRequest.prototype.getStatus = function() {
3003
+ return /** @type {!proto.scan.v1.ScanStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3004
+ };
3005
+
3006
+
3007
+ /**
3008
+ * @param {!proto.scan.v1.ScanStatus} value
3009
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3010
+ */
3011
+ proto.scan.v1.ScanTerminateRequest.prototype.setStatus = function(value) {
3012
+ return jspb.Message.setProto3EnumField(this, 2, value);
3013
+ };
3014
+
3015
+
3016
+ /**
3017
+ * optional string error = 3;
3018
+ * @return {string}
3019
+ */
3020
+ proto.scan.v1.ScanTerminateRequest.prototype.getError = function() {
3021
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3022
+ };
3023
+
3024
+
3025
+ /**
3026
+ * @param {string} value
3027
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3028
+ */
3029
+ proto.scan.v1.ScanTerminateRequest.prototype.setError = function(value) {
3030
+ return jspb.Message.setField(this, 3, value);
3031
+ };
3032
+
3033
+
3034
+ /**
3035
+ * Clears the field making it undefined.
3036
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3037
+ */
3038
+ proto.scan.v1.ScanTerminateRequest.prototype.clearError = function() {
3039
+ return jspb.Message.setField(this, 3, undefined);
3040
+ };
3041
+
3042
+
3043
+ /**
3044
+ * Returns whether this field is set.
3045
+ * @return {boolean}
3046
+ */
3047
+ proto.scan.v1.ScanTerminateRequest.prototype.hasError = function() {
3048
+ return jspb.Message.getField(this, 3) != null;
3049
+ };
3050
+
3051
+
3052
+ /**
3053
+ * optional string scan_key = 4;
3054
+ * @return {string}
3055
+ */
3056
+ proto.scan.v1.ScanTerminateRequest.prototype.getScanKey = function() {
3057
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3058
+ };
3059
+
3060
+
3061
+ /**
3062
+ * @param {string} value
3063
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3064
+ */
3065
+ proto.scan.v1.ScanTerminateRequest.prototype.setScanKey = function(value) {
3066
+ return jspb.Message.setProto3StringField(this, 4, value);
3067
+ };
3068
+
3069
+
3070
+ /**
3071
+ * optional ScanStepTimings step_timings = 5;
3072
+ * @return {?proto.scan.v1.ScanStepTimings}
3073
+ */
3074
+ proto.scan.v1.ScanTerminateRequest.prototype.getStepTimings = function() {
3075
+ return /** @type{?proto.scan.v1.ScanStepTimings} */ (
3076
+ jspb.Message.getWrapperField(this, proto.scan.v1.ScanStepTimings, 5));
3077
+ };
3078
+
3079
+
3080
+ /**
3081
+ * @param {?proto.scan.v1.ScanStepTimings|undefined} value
3082
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3083
+ */
3084
+ proto.scan.v1.ScanTerminateRequest.prototype.setStepTimings = function(value) {
3085
+ return jspb.Message.setWrapperField(this, 5, value);
3086
+ };
3087
+
3088
+
3089
+ /**
3090
+ * Clears the message field making it undefined.
3091
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3092
+ */
3093
+ proto.scan.v1.ScanTerminateRequest.prototype.clearStepTimings = function() {
3094
+ return this.setStepTimings(undefined);
3095
+ };
3096
+
3097
+
3098
+ /**
3099
+ * Returns whether this field is set.
3100
+ * @return {boolean}
3101
+ */
3102
+ proto.scan.v1.ScanTerminateRequest.prototype.hasStepTimings = function() {
3103
+ return jspb.Message.getField(this, 5) != null;
3104
+ };
3105
+
3106
+
3107
+ /**
3108
+ * optional ScanSummary summary = 6;
3109
+ * @return {?proto.scan.v1.ScanSummary}
3110
+ */
3111
+ proto.scan.v1.ScanTerminateRequest.prototype.getSummary = function() {
3112
+ return /** @type{?proto.scan.v1.ScanSummary} */ (
3113
+ jspb.Message.getWrapperField(this, proto.scan.v1.ScanSummary, 6));
3114
+ };
3115
+
3116
+
3117
+ /**
3118
+ * @param {?proto.scan.v1.ScanSummary|undefined} value
3119
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3120
+ */
3121
+ proto.scan.v1.ScanTerminateRequest.prototype.setSummary = function(value) {
3122
+ return jspb.Message.setWrapperField(this, 6, value);
3123
+ };
3124
+
3125
+
3126
+ /**
3127
+ * Clears the message field making it undefined.
3128
+ * @return {!proto.scan.v1.ScanTerminateRequest} returns this
3129
+ */
3130
+ proto.scan.v1.ScanTerminateRequest.prototype.clearSummary = function() {
3131
+ return this.setSummary(undefined);
3132
+ };
3133
+
3134
+
3135
+ /**
3136
+ * Returns whether this field is set.
3137
+ * @return {boolean}
3138
+ */
3139
+ proto.scan.v1.ScanTerminateRequest.prototype.hasSummary = function() {
3140
+ return jspb.Message.getField(this, 6) != null;
3141
+ };
3142
+
3143
+
3144
+
3145
+
3146
+
3147
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3148
+ /**
3149
+ * Creates an object representation of this proto.
3150
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3151
+ * Optional fields that are not set will be set to undefined.
3152
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3153
+ * For the list of reserved names please see:
3154
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3155
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3156
+ * JSPB instance for transitional soy proto support:
3157
+ * http://goto/soy-param-migration
3158
+ * @return {!Object}
3159
+ */
3160
+ proto.scan.v1.ScanTerminateResponse.prototype.toObject = function(opt_includeInstance) {
3161
+ return proto.scan.v1.ScanTerminateResponse.toObject(opt_includeInstance, this);
3162
+ };
3163
+
3164
+
3165
+ /**
3166
+ * Static version of the {@see toObject} method.
3167
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3168
+ * the JSPB instance for transitional soy proto support:
3169
+ * http://goto/soy-param-migration
3170
+ * @param {!proto.scan.v1.ScanTerminateResponse} msg The msg instance to transform.
3171
+ * @return {!Object}
3172
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3173
+ */
3174
+ proto.scan.v1.ScanTerminateResponse.toObject = function(includeInstance, msg) {
3175
+ var f, obj = {
3176
+ scanId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3177
+ status: jspb.Message.getFieldWithDefault(msg, 2, 0),
3178
+ error: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
3179
+ created: (f = msg.getCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3180
+ updated: (f = msg.getUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3181
+ };
3182
+
3183
+ if (includeInstance) {
3184
+ obj.$jspbMessageInstance = msg;
3185
+ }
3186
+ return obj;
3187
+ };
3188
+ }
3189
+
3190
+
3191
+ /**
3192
+ * Deserializes binary data (in protobuf wire format).
3193
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
3194
+ * @return {!proto.scan.v1.ScanTerminateResponse}
3195
+ */
3196
+ proto.scan.v1.ScanTerminateResponse.deserializeBinary = function(bytes) {
3197
+ var reader = new jspb.BinaryReader(bytes);
3198
+ var msg = new proto.scan.v1.ScanTerminateResponse;
3199
+ return proto.scan.v1.ScanTerminateResponse.deserializeBinaryFromReader(msg, reader);
3200
+ };
3201
+
3202
+
3203
+ /**
3204
+ * Deserializes binary data (in protobuf wire format) from the
3205
+ * given reader into the given message object.
3206
+ * @param {!proto.scan.v1.ScanTerminateResponse} msg The message object to deserialize into.
3207
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3208
+ * @return {!proto.scan.v1.ScanTerminateResponse}
3209
+ */
3210
+ proto.scan.v1.ScanTerminateResponse.deserializeBinaryFromReader = function(msg, reader) {
3211
+ while (reader.nextField()) {
3212
+ if (reader.isEndGroup()) {
3213
+ break;
3214
+ }
3215
+ var field = reader.getFieldNumber();
3216
+ switch (field) {
3217
+ case 1:
3218
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
3219
+ msg.setScanId(value);
3220
+ break;
3221
+ case 2:
3222
+ var value = /** @type {!proto.scan.v1.ScanStatus} */ (reader.readEnum());
3223
+ msg.setStatus(value);
3224
+ break;
3225
+ case 3:
3226
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
3227
+ msg.setError(value);
3228
+ break;
3229
+ case 4:
3230
+ var value = new google_protobuf_timestamp_pb.Timestamp;
3231
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3232
+ msg.setCreated(value);
3233
+ break;
3234
+ case 5:
3235
+ var value = new google_protobuf_timestamp_pb.Timestamp;
3236
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3237
+ msg.setUpdated(value);
3238
+ break;
3239
+ default:
3240
+ reader.skipField();
3241
+ break;
3242
+ }
3243
+ }
3244
+ return msg;
3245
+ };
3246
+
3247
+
3248
+ /**
3249
+ * Serializes the message to binary data (in protobuf wire format).
3250
+ * @return {!Uint8Array}
3251
+ */
3252
+ proto.scan.v1.ScanTerminateResponse.prototype.serializeBinary = function() {
3253
+ var writer = new jspb.BinaryWriter();
3254
+ proto.scan.v1.ScanTerminateResponse.serializeBinaryToWriter(this, writer);
3255
+ return writer.getResultBuffer();
3256
+ };
3257
+
3258
+
3259
+ /**
3260
+ * Serializes the given message to binary data (in protobuf wire
3261
+ * format), writing to the given BinaryWriter.
3262
+ * @param {!proto.scan.v1.ScanTerminateResponse} message
3263
+ * @param {!jspb.BinaryWriter} writer
3264
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3265
+ */
3266
+ proto.scan.v1.ScanTerminateResponse.serializeBinaryToWriter = function(message, writer) {
3267
+ var f = undefined;
3268
+ f = message.getScanId();
3269
+ if (f.length > 0) {
3270
+ writer.writeString(
3271
+ 1,
3272
+ f
3273
+ );
3274
+ }
3275
+ f = message.getStatus();
3276
+ if (f !== 0.0) {
3277
+ writer.writeEnum(
3278
+ 2,
3279
+ f
3280
+ );
3281
+ }
3282
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3283
+ if (f != null) {
3284
+ writer.writeString(
3285
+ 3,
3286
+ f
3287
+ );
3288
+ }
3289
+ f = message.getCreated();
3290
+ if (f != null) {
3291
+ writer.writeMessage(
3292
+ 4,
3293
+ f,
3294
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3295
+ );
3296
+ }
3297
+ f = message.getUpdated();
3298
+ if (f != null) {
3299
+ writer.writeMessage(
3300
+ 5,
3301
+ f,
3302
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3303
+ );
3304
+ }
3305
+ };
3306
+
3307
+
3308
+ /**
3309
+ * optional string scan_id = 1;
3310
+ * @return {string}
3311
+ */
3312
+ proto.scan.v1.ScanTerminateResponse.prototype.getScanId = function() {
3313
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3314
+ };
3315
+
3316
+
3317
+ /**
3318
+ * @param {string} value
3319
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3320
+ */
3321
+ proto.scan.v1.ScanTerminateResponse.prototype.setScanId = function(value) {
3322
+ return jspb.Message.setProto3StringField(this, 1, value);
3323
+ };
3324
+
3325
+
3326
+ /**
3327
+ * optional ScanStatus status = 2;
3328
+ * @return {!proto.scan.v1.ScanStatus}
3329
+ */
3330
+ proto.scan.v1.ScanTerminateResponse.prototype.getStatus = function() {
3331
+ return /** @type {!proto.scan.v1.ScanStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3332
+ };
3333
+
3334
+
3335
+ /**
3336
+ * @param {!proto.scan.v1.ScanStatus} value
3337
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3338
+ */
3339
+ proto.scan.v1.ScanTerminateResponse.prototype.setStatus = function(value) {
3340
+ return jspb.Message.setProto3EnumField(this, 2, value);
3341
+ };
3342
+
3343
+
3344
+ /**
3345
+ * optional string error = 3;
3346
+ * @return {string}
3347
+ */
3348
+ proto.scan.v1.ScanTerminateResponse.prototype.getError = function() {
3349
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3350
+ };
3351
+
3352
+
3353
+ /**
3354
+ * @param {string} value
3355
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3356
+ */
3357
+ proto.scan.v1.ScanTerminateResponse.prototype.setError = function(value) {
3358
+ return jspb.Message.setField(this, 3, value);
3359
+ };
3360
+
3361
+
3362
+ /**
3363
+ * Clears the field making it undefined.
3364
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3365
+ */
3366
+ proto.scan.v1.ScanTerminateResponse.prototype.clearError = function() {
3367
+ return jspb.Message.setField(this, 3, undefined);
3368
+ };
3369
+
3370
+
3371
+ /**
3372
+ * Returns whether this field is set.
3373
+ * @return {boolean}
3374
+ */
3375
+ proto.scan.v1.ScanTerminateResponse.prototype.hasError = function() {
3376
+ return jspb.Message.getField(this, 3) != null;
3377
+ };
3378
+
3379
+
3380
+ /**
3381
+ * optional google.protobuf.Timestamp created = 4;
3382
+ * @return {?proto.google.protobuf.Timestamp}
3383
+ */
3384
+ proto.scan.v1.ScanTerminateResponse.prototype.getCreated = function() {
3385
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3386
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
3387
+ };
3388
+
3389
+
3390
+ /**
3391
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3392
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3393
+ */
3394
+ proto.scan.v1.ScanTerminateResponse.prototype.setCreated = function(value) {
3395
+ return jspb.Message.setWrapperField(this, 4, value);
3396
+ };
3397
+
3398
+
3399
+ /**
3400
+ * Clears the message field making it undefined.
3401
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3402
+ */
3403
+ proto.scan.v1.ScanTerminateResponse.prototype.clearCreated = function() {
3404
+ return this.setCreated(undefined);
3405
+ };
3406
+
3407
+
3408
+ /**
3409
+ * Returns whether this field is set.
3410
+ * @return {boolean}
3411
+ */
3412
+ proto.scan.v1.ScanTerminateResponse.prototype.hasCreated = function() {
3413
+ return jspb.Message.getField(this, 4) != null;
3414
+ };
3415
+
3416
+
3417
+ /**
3418
+ * optional google.protobuf.Timestamp updated = 5;
3419
+ * @return {?proto.google.protobuf.Timestamp}
3420
+ */
3421
+ proto.scan.v1.ScanTerminateResponse.prototype.getUpdated = function() {
3422
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3423
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
3424
+ };
3425
+
3426
+
3427
+ /**
3428
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3429
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3430
+ */
3431
+ proto.scan.v1.ScanTerminateResponse.prototype.setUpdated = function(value) {
3432
+ return jspb.Message.setWrapperField(this, 5, value);
3433
+ };
3434
+
3435
+
3436
+ /**
3437
+ * Clears the message field making it undefined.
3438
+ * @return {!proto.scan.v1.ScanTerminateResponse} returns this
3439
+ */
3440
+ proto.scan.v1.ScanTerminateResponse.prototype.clearUpdated = function() {
3441
+ return this.setUpdated(undefined);
3442
+ };
3443
+
3444
+
3445
+ /**
3446
+ * Returns whether this field is set.
3447
+ * @return {boolean}
3448
+ */
3449
+ proto.scan.v1.ScanTerminateResponse.prototype.hasUpdated = function() {
3450
+ return jspb.Message.getField(this, 5) != null;
3451
+ };
3452
+
3453
+
3454
+ /**
3455
+ * @enum {number}
3456
+ */
3457
+ proto.scan.v1.ScanStatus = {
3458
+ SCAN_STATUS_UNSPECIFIED: 0,
3459
+ SCAN_STATUS_RUNNING: 1,
3460
+ SCAN_STATUS_SUCCESS: 2,
3461
+ SCAN_STATUS_FAILED: 3,
3462
+ SCAN_STATUS_TIMED_OUT: 4
3463
+ };
3464
+
3465
+ goog.object.extend(exports, proto.scan.v1);