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