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