@miradorlabs/web-grpc 2.7.0 → 2.9.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,4805 @@
1
+ // source: proto/gateway/web/v1/derived_metric_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
+ goog.exportSymbol('proto.gateway.web.v1.CreateDerivedMetricRequest', null, global);
29
+ goog.exportSymbol('proto.gateway.web.v1.CreateDerivedMetricResponse', null, global);
30
+ goog.exportSymbol('proto.gateway.web.v1.DeleteDerivedMetricRequest', null, global);
31
+ goog.exportSymbol('proto.gateway.web.v1.DeleteDerivedMetricResponse', null, global);
32
+ goog.exportSymbol('proto.gateway.web.v1.DerivedMetric', null, global);
33
+ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcome', null, global);
34
+ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcomeCount', null, global);
35
+ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricProgram', null, global);
36
+ goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricRequest', null, global);
37
+ goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricResponse', null, global);
38
+ goog.exportSymbol('proto.gateway.web.v1.DryRunEmission', null, global);
39
+ goog.exportSymbol('proto.gateway.web.v1.DryRunNonEmission', null, global);
40
+ goog.exportSymbol('proto.gateway.web.v1.DryRunTraceResult', null, global);
41
+ goog.exportSymbol('proto.gateway.web.v1.DryRunTraceResult.ResultCase', null, global);
42
+ goog.exportSymbol('proto.gateway.web.v1.GetDerivedMetricRequest', null, global);
43
+ goog.exportSymbol('proto.gateway.web.v1.GetDerivedMetricResponse', null, global);
44
+ goog.exportSymbol('proto.gateway.web.v1.ListDerivedMetricsRequest', null, global);
45
+ goog.exportSymbol('proto.gateway.web.v1.ListDerivedMetricsResponse', null, global);
46
+ goog.exportSymbol('proto.gateway.web.v1.UpdateDerivedMetricRequest', null, global);
47
+ goog.exportSymbol('proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates', null, global);
48
+ goog.exportSymbol('proto.gateway.web.v1.UpdateDerivedMetricResponse', 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.DerivedMetric = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.gateway.web.v1.DerivedMetric, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.gateway.web.v1.DerivedMetric.displayName = 'proto.gateway.web.v1.DerivedMetric';
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.DerivedMetricProgram = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(proto.gateway.web.v1.DerivedMetricProgram, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ proto.gateway.web.v1.DerivedMetricProgram.displayName = 'proto.gateway.web.v1.DerivedMetricProgram';
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.CreateDerivedMetricRequest = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(proto.gateway.web.v1.CreateDerivedMetricRequest, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ proto.gateway.web.v1.CreateDerivedMetricRequest.displayName = 'proto.gateway.web.v1.CreateDerivedMetricRequest';
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.CreateDerivedMetricResponse = function(opt_data) {
123
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
124
+ };
125
+ goog.inherits(proto.gateway.web.v1.CreateDerivedMetricResponse, jspb.Message);
126
+ if (goog.DEBUG && !COMPILED) {
127
+ /**
128
+ * @public
129
+ * @override
130
+ */
131
+ proto.gateway.web.v1.CreateDerivedMetricResponse.displayName = 'proto.gateway.web.v1.CreateDerivedMetricResponse';
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.GetDerivedMetricRequest = function(opt_data) {
144
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
145
+ };
146
+ goog.inherits(proto.gateway.web.v1.GetDerivedMetricRequest, jspb.Message);
147
+ if (goog.DEBUG && !COMPILED) {
148
+ /**
149
+ * @public
150
+ * @override
151
+ */
152
+ proto.gateway.web.v1.GetDerivedMetricRequest.displayName = 'proto.gateway.web.v1.GetDerivedMetricRequest';
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.GetDerivedMetricResponse = function(opt_data) {
165
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
166
+ };
167
+ goog.inherits(proto.gateway.web.v1.GetDerivedMetricResponse, jspb.Message);
168
+ if (goog.DEBUG && !COMPILED) {
169
+ /**
170
+ * @public
171
+ * @override
172
+ */
173
+ proto.gateway.web.v1.GetDerivedMetricResponse.displayName = 'proto.gateway.web.v1.GetDerivedMetricResponse';
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.ListDerivedMetricsRequest = function(opt_data) {
186
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
187
+ };
188
+ goog.inherits(proto.gateway.web.v1.ListDerivedMetricsRequest, jspb.Message);
189
+ if (goog.DEBUG && !COMPILED) {
190
+ /**
191
+ * @public
192
+ * @override
193
+ */
194
+ proto.gateway.web.v1.ListDerivedMetricsRequest.displayName = 'proto.gateway.web.v1.ListDerivedMetricsRequest';
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.ListDerivedMetricsResponse = function(opt_data) {
207
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.ListDerivedMetricsResponse.repeatedFields_, null);
208
+ };
209
+ goog.inherits(proto.gateway.web.v1.ListDerivedMetricsResponse, jspb.Message);
210
+ if (goog.DEBUG && !COMPILED) {
211
+ /**
212
+ * @public
213
+ * @override
214
+ */
215
+ proto.gateway.web.v1.ListDerivedMetricsResponse.displayName = 'proto.gateway.web.v1.ListDerivedMetricsResponse';
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.UpdateDerivedMetricRequest = function(opt_data) {
228
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
229
+ };
230
+ goog.inherits(proto.gateway.web.v1.UpdateDerivedMetricRequest, jspb.Message);
231
+ if (goog.DEBUG && !COMPILED) {
232
+ /**
233
+ * @public
234
+ * @override
235
+ */
236
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.displayName = 'proto.gateway.web.v1.UpdateDerivedMetricRequest';
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.UpdateDerivedMetricRequest.DerivedMetricUpdates = function(opt_data) {
249
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
250
+ };
251
+ goog.inherits(proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates, jspb.Message);
252
+ if (goog.DEBUG && !COMPILED) {
253
+ /**
254
+ * @public
255
+ * @override
256
+ */
257
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.displayName = 'proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates';
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.UpdateDerivedMetricResponse = function(opt_data) {
270
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
271
+ };
272
+ goog.inherits(proto.gateway.web.v1.UpdateDerivedMetricResponse, jspb.Message);
273
+ if (goog.DEBUG && !COMPILED) {
274
+ /**
275
+ * @public
276
+ * @override
277
+ */
278
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.displayName = 'proto.gateway.web.v1.UpdateDerivedMetricResponse';
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.DeleteDerivedMetricRequest = function(opt_data) {
291
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
292
+ };
293
+ goog.inherits(proto.gateway.web.v1.DeleteDerivedMetricRequest, jspb.Message);
294
+ if (goog.DEBUG && !COMPILED) {
295
+ /**
296
+ * @public
297
+ * @override
298
+ */
299
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.displayName = 'proto.gateway.web.v1.DeleteDerivedMetricRequest';
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.DeleteDerivedMetricResponse = function(opt_data) {
312
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
313
+ };
314
+ goog.inherits(proto.gateway.web.v1.DeleteDerivedMetricResponse, jspb.Message);
315
+ if (goog.DEBUG && !COMPILED) {
316
+ /**
317
+ * @public
318
+ * @override
319
+ */
320
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.displayName = 'proto.gateway.web.v1.DeleteDerivedMetricResponse';
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.DryRunDerivedMetricRequest = function(opt_data) {
333
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
334
+ };
335
+ goog.inherits(proto.gateway.web.v1.DryRunDerivedMetricRequest, jspb.Message);
336
+ if (goog.DEBUG && !COMPILED) {
337
+ /**
338
+ * @public
339
+ * @override
340
+ */
341
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.displayName = 'proto.gateway.web.v1.DryRunDerivedMetricRequest';
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.DryRunDerivedMetricResponse = function(opt_data) {
354
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.DryRunDerivedMetricResponse.repeatedFields_, null);
355
+ };
356
+ goog.inherits(proto.gateway.web.v1.DryRunDerivedMetricResponse, jspb.Message);
357
+ if (goog.DEBUG && !COMPILED) {
358
+ /**
359
+ * @public
360
+ * @override
361
+ */
362
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.displayName = 'proto.gateway.web.v1.DryRunDerivedMetricResponse';
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.DryRunTraceResult = function(opt_data) {
375
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gateway.web.v1.DryRunTraceResult.oneofGroups_);
376
+ };
377
+ goog.inherits(proto.gateway.web.v1.DryRunTraceResult, jspb.Message);
378
+ if (goog.DEBUG && !COMPILED) {
379
+ /**
380
+ * @public
381
+ * @override
382
+ */
383
+ proto.gateway.web.v1.DryRunTraceResult.displayName = 'proto.gateway.web.v1.DryRunTraceResult';
384
+ }
385
+ /**
386
+ * Generated by JsPbCodeGenerator.
387
+ * @param {Array=} opt_data Optional initial data array, typically from a
388
+ * server response, or constructed directly in Javascript. The array is used
389
+ * in place and becomes part of the constructed object. It is not cloned.
390
+ * If no data is provided, the constructed object will be empty, but still
391
+ * valid.
392
+ * @extends {jspb.Message}
393
+ * @constructor
394
+ */
395
+ proto.gateway.web.v1.DryRunEmission = function(opt_data) {
396
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
397
+ };
398
+ goog.inherits(proto.gateway.web.v1.DryRunEmission, jspb.Message);
399
+ if (goog.DEBUG && !COMPILED) {
400
+ /**
401
+ * @public
402
+ * @override
403
+ */
404
+ proto.gateway.web.v1.DryRunEmission.displayName = 'proto.gateway.web.v1.DryRunEmission';
405
+ }
406
+ /**
407
+ * Generated by JsPbCodeGenerator.
408
+ * @param {Array=} opt_data Optional initial data array, typically from a
409
+ * server response, or constructed directly in Javascript. The array is used
410
+ * in place and becomes part of the constructed object. It is not cloned.
411
+ * If no data is provided, the constructed object will be empty, but still
412
+ * valid.
413
+ * @extends {jspb.Message}
414
+ * @constructor
415
+ */
416
+ proto.gateway.web.v1.DryRunNonEmission = function(opt_data) {
417
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
418
+ };
419
+ goog.inherits(proto.gateway.web.v1.DryRunNonEmission, jspb.Message);
420
+ if (goog.DEBUG && !COMPILED) {
421
+ /**
422
+ * @public
423
+ * @override
424
+ */
425
+ proto.gateway.web.v1.DryRunNonEmission.displayName = 'proto.gateway.web.v1.DryRunNonEmission';
426
+ }
427
+ /**
428
+ * Generated by JsPbCodeGenerator.
429
+ * @param {Array=} opt_data Optional initial data array, typically from a
430
+ * server response, or constructed directly in Javascript. The array is used
431
+ * in place and becomes part of the constructed object. It is not cloned.
432
+ * If no data is provided, the constructed object will be empty, but still
433
+ * valid.
434
+ * @extends {jspb.Message}
435
+ * @constructor
436
+ */
437
+ proto.gateway.web.v1.DerivedMetricOutcomeCount = function(opt_data) {
438
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
439
+ };
440
+ goog.inherits(proto.gateway.web.v1.DerivedMetricOutcomeCount, jspb.Message);
441
+ if (goog.DEBUG && !COMPILED) {
442
+ /**
443
+ * @public
444
+ * @override
445
+ */
446
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.displayName = 'proto.gateway.web.v1.DerivedMetricOutcomeCount';
447
+ }
448
+
449
+
450
+
451
+ if (jspb.Message.GENERATE_TO_OBJECT) {
452
+ /**
453
+ * Creates an object representation of this proto.
454
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
455
+ * Optional fields that are not set will be set to undefined.
456
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
457
+ * For the list of reserved names please see:
458
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
459
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
460
+ * JSPB instance for transitional soy proto support:
461
+ * http://goto/soy-param-migration
462
+ * @return {!Object}
463
+ */
464
+ proto.gateway.web.v1.DerivedMetric.prototype.toObject = function(opt_includeInstance) {
465
+ return proto.gateway.web.v1.DerivedMetric.toObject(opt_includeInstance, this);
466
+ };
467
+
468
+
469
+ /**
470
+ * Static version of the {@see toObject} method.
471
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
472
+ * the JSPB instance for transitional soy proto support:
473
+ * http://goto/soy-param-migration
474
+ * @param {!proto.gateway.web.v1.DerivedMetric} msg The msg instance to transform.
475
+ * @return {!Object}
476
+ * @suppress {unusedLocalVariables} f is only used for nested messages
477
+ */
478
+ proto.gateway.web.v1.DerivedMetric.toObject = function(includeInstance, msg) {
479
+ var f, obj = {
480
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
481
+ organizationId: jspb.Message.getFieldWithDefault(msg, 2, ""),
482
+ projectId: jspb.Message.getFieldWithDefault(msg, 3, ""),
483
+ slug: jspb.Message.getFieldWithDefault(msg, 4, ""),
484
+ displayName: jspb.Message.getFieldWithDefault(msg, 5, ""),
485
+ description: jspb.Message.getFieldWithDefault(msg, 6, ""),
486
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
487
+ metricName: jspb.Message.getFieldWithDefault(msg, 8, ""),
488
+ unit: jspb.Message.getFieldWithDefault(msg, 9, ""),
489
+ program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
490
+ createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
491
+ updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
492
+ };
493
+
494
+ if (includeInstance) {
495
+ obj.$jspbMessageInstance = msg;
496
+ }
497
+ return obj;
498
+ };
499
+ }
500
+
501
+
502
+ /**
503
+ * Deserializes binary data (in protobuf wire format).
504
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
505
+ * @return {!proto.gateway.web.v1.DerivedMetric}
506
+ */
507
+ proto.gateway.web.v1.DerivedMetric.deserializeBinary = function(bytes) {
508
+ var reader = new jspb.BinaryReader(bytes);
509
+ var msg = new proto.gateway.web.v1.DerivedMetric;
510
+ return proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader(msg, reader);
511
+ };
512
+
513
+
514
+ /**
515
+ * Deserializes binary data (in protobuf wire format) from the
516
+ * given reader into the given message object.
517
+ * @param {!proto.gateway.web.v1.DerivedMetric} msg The message object to deserialize into.
518
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
519
+ * @return {!proto.gateway.web.v1.DerivedMetric}
520
+ */
521
+ proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader = function(msg, reader) {
522
+ while (reader.nextField()) {
523
+ if (reader.isEndGroup()) {
524
+ break;
525
+ }
526
+ var field = reader.getFieldNumber();
527
+ switch (field) {
528
+ case 1:
529
+ var value = /** @type {string} */ (reader.readString());
530
+ msg.setId(value);
531
+ break;
532
+ case 2:
533
+ var value = /** @type {string} */ (reader.readString());
534
+ msg.setOrganizationId(value);
535
+ break;
536
+ case 3:
537
+ var value = /** @type {string} */ (reader.readString());
538
+ msg.setProjectId(value);
539
+ break;
540
+ case 4:
541
+ var value = /** @type {string} */ (reader.readString());
542
+ msg.setSlug(value);
543
+ break;
544
+ case 5:
545
+ var value = /** @type {string} */ (reader.readString());
546
+ msg.setDisplayName(value);
547
+ break;
548
+ case 6:
549
+ var value = /** @type {string} */ (reader.readString());
550
+ msg.setDescription(value);
551
+ break;
552
+ case 7:
553
+ var value = /** @type {boolean} */ (reader.readBool());
554
+ msg.setEnabled(value);
555
+ break;
556
+ case 8:
557
+ var value = /** @type {string} */ (reader.readString());
558
+ msg.setMetricName(value);
559
+ break;
560
+ case 9:
561
+ var value = /** @type {string} */ (reader.readString());
562
+ msg.setUnit(value);
563
+ break;
564
+ case 10:
565
+ var value = new proto.gateway.web.v1.DerivedMetricProgram;
566
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader);
567
+ msg.setProgram(value);
568
+ break;
569
+ case 11:
570
+ var value = new google_protobuf_timestamp_pb.Timestamp;
571
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
572
+ msg.setCreatedAt(value);
573
+ break;
574
+ case 12:
575
+ var value = new google_protobuf_timestamp_pb.Timestamp;
576
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
577
+ msg.setUpdatedAt(value);
578
+ break;
579
+ default:
580
+ reader.skipField();
581
+ break;
582
+ }
583
+ }
584
+ return msg;
585
+ };
586
+
587
+
588
+ /**
589
+ * Serializes the message to binary data (in protobuf wire format).
590
+ * @return {!Uint8Array}
591
+ */
592
+ proto.gateway.web.v1.DerivedMetric.prototype.serializeBinary = function() {
593
+ var writer = new jspb.BinaryWriter();
594
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter(this, writer);
595
+ return writer.getResultBuffer();
596
+ };
597
+
598
+
599
+ /**
600
+ * Serializes the given message to binary data (in protobuf wire
601
+ * format), writing to the given BinaryWriter.
602
+ * @param {!proto.gateway.web.v1.DerivedMetric} message
603
+ * @param {!jspb.BinaryWriter} writer
604
+ * @suppress {unusedLocalVariables} f is only used for nested messages
605
+ */
606
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter = function(message, writer) {
607
+ var f = undefined;
608
+ f = message.getId();
609
+ if (f.length > 0) {
610
+ writer.writeString(
611
+ 1,
612
+ f
613
+ );
614
+ }
615
+ f = message.getOrganizationId();
616
+ if (f.length > 0) {
617
+ writer.writeString(
618
+ 2,
619
+ f
620
+ );
621
+ }
622
+ f = message.getProjectId();
623
+ if (f.length > 0) {
624
+ writer.writeString(
625
+ 3,
626
+ f
627
+ );
628
+ }
629
+ f = message.getSlug();
630
+ if (f.length > 0) {
631
+ writer.writeString(
632
+ 4,
633
+ f
634
+ );
635
+ }
636
+ f = message.getDisplayName();
637
+ if (f.length > 0) {
638
+ writer.writeString(
639
+ 5,
640
+ f
641
+ );
642
+ }
643
+ f = message.getDescription();
644
+ if (f.length > 0) {
645
+ writer.writeString(
646
+ 6,
647
+ f
648
+ );
649
+ }
650
+ f = message.getEnabled();
651
+ if (f) {
652
+ writer.writeBool(
653
+ 7,
654
+ f
655
+ );
656
+ }
657
+ f = message.getMetricName();
658
+ if (f.length > 0) {
659
+ writer.writeString(
660
+ 8,
661
+ f
662
+ );
663
+ }
664
+ f = message.getUnit();
665
+ if (f.length > 0) {
666
+ writer.writeString(
667
+ 9,
668
+ f
669
+ );
670
+ }
671
+ f = message.getProgram();
672
+ if (f != null) {
673
+ writer.writeMessage(
674
+ 10,
675
+ f,
676
+ proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter
677
+ );
678
+ }
679
+ f = message.getCreatedAt();
680
+ if (f != null) {
681
+ writer.writeMessage(
682
+ 11,
683
+ f,
684
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
685
+ );
686
+ }
687
+ f = message.getUpdatedAt();
688
+ if (f != null) {
689
+ writer.writeMessage(
690
+ 12,
691
+ f,
692
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
693
+ );
694
+ }
695
+ };
696
+
697
+
698
+ /**
699
+ * optional string id = 1;
700
+ * @return {string}
701
+ */
702
+ proto.gateway.web.v1.DerivedMetric.prototype.getId = function() {
703
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
704
+ };
705
+
706
+
707
+ /**
708
+ * @param {string} value
709
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
710
+ */
711
+ proto.gateway.web.v1.DerivedMetric.prototype.setId = function(value) {
712
+ return jspb.Message.setProto3StringField(this, 1, value);
713
+ };
714
+
715
+
716
+ /**
717
+ * optional string organization_id = 2;
718
+ * @return {string}
719
+ */
720
+ proto.gateway.web.v1.DerivedMetric.prototype.getOrganizationId = function() {
721
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
722
+ };
723
+
724
+
725
+ /**
726
+ * @param {string} value
727
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
728
+ */
729
+ proto.gateway.web.v1.DerivedMetric.prototype.setOrganizationId = function(value) {
730
+ return jspb.Message.setProto3StringField(this, 2, value);
731
+ };
732
+
733
+
734
+ /**
735
+ * optional string project_id = 3;
736
+ * @return {string}
737
+ */
738
+ proto.gateway.web.v1.DerivedMetric.prototype.getProjectId = function() {
739
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
740
+ };
741
+
742
+
743
+ /**
744
+ * @param {string} value
745
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
746
+ */
747
+ proto.gateway.web.v1.DerivedMetric.prototype.setProjectId = function(value) {
748
+ return jspb.Message.setProto3StringField(this, 3, value);
749
+ };
750
+
751
+
752
+ /**
753
+ * optional string slug = 4;
754
+ * @return {string}
755
+ */
756
+ proto.gateway.web.v1.DerivedMetric.prototype.getSlug = function() {
757
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
758
+ };
759
+
760
+
761
+ /**
762
+ * @param {string} value
763
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
764
+ */
765
+ proto.gateway.web.v1.DerivedMetric.prototype.setSlug = function(value) {
766
+ return jspb.Message.setProto3StringField(this, 4, value);
767
+ };
768
+
769
+
770
+ /**
771
+ * optional string display_name = 5;
772
+ * @return {string}
773
+ */
774
+ proto.gateway.web.v1.DerivedMetric.prototype.getDisplayName = function() {
775
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
776
+ };
777
+
778
+
779
+ /**
780
+ * @param {string} value
781
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
782
+ */
783
+ proto.gateway.web.v1.DerivedMetric.prototype.setDisplayName = function(value) {
784
+ return jspb.Message.setProto3StringField(this, 5, value);
785
+ };
786
+
787
+
788
+ /**
789
+ * optional string description = 6;
790
+ * @return {string}
791
+ */
792
+ proto.gateway.web.v1.DerivedMetric.prototype.getDescription = function() {
793
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
794
+ };
795
+
796
+
797
+ /**
798
+ * @param {string} value
799
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
800
+ */
801
+ proto.gateway.web.v1.DerivedMetric.prototype.setDescription = function(value) {
802
+ return jspb.Message.setProto3StringField(this, 6, value);
803
+ };
804
+
805
+
806
+ /**
807
+ * optional bool enabled = 7;
808
+ * @return {boolean}
809
+ */
810
+ proto.gateway.web.v1.DerivedMetric.prototype.getEnabled = function() {
811
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
812
+ };
813
+
814
+
815
+ /**
816
+ * @param {boolean} value
817
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
818
+ */
819
+ proto.gateway.web.v1.DerivedMetric.prototype.setEnabled = function(value) {
820
+ return jspb.Message.setProto3BooleanField(this, 7, value);
821
+ };
822
+
823
+
824
+ /**
825
+ * optional string metric_name = 8;
826
+ * @return {string}
827
+ */
828
+ proto.gateway.web.v1.DerivedMetric.prototype.getMetricName = function() {
829
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
830
+ };
831
+
832
+
833
+ /**
834
+ * @param {string} value
835
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
836
+ */
837
+ proto.gateway.web.v1.DerivedMetric.prototype.setMetricName = function(value) {
838
+ return jspb.Message.setProto3StringField(this, 8, value);
839
+ };
840
+
841
+
842
+ /**
843
+ * optional string unit = 9;
844
+ * @return {string}
845
+ */
846
+ proto.gateway.web.v1.DerivedMetric.prototype.getUnit = function() {
847
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
848
+ };
849
+
850
+
851
+ /**
852
+ * @param {string} value
853
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
854
+ */
855
+ proto.gateway.web.v1.DerivedMetric.prototype.setUnit = function(value) {
856
+ return jspb.Message.setProto3StringField(this, 9, value);
857
+ };
858
+
859
+
860
+ /**
861
+ * optional DerivedMetricProgram program = 10;
862
+ * @return {?proto.gateway.web.v1.DerivedMetricProgram}
863
+ */
864
+ proto.gateway.web.v1.DerivedMetric.prototype.getProgram = function() {
865
+ return /** @type{?proto.gateway.web.v1.DerivedMetricProgram} */ (
866
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetricProgram, 10));
867
+ };
868
+
869
+
870
+ /**
871
+ * @param {?proto.gateway.web.v1.DerivedMetricProgram|undefined} value
872
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
873
+ */
874
+ proto.gateway.web.v1.DerivedMetric.prototype.setProgram = function(value) {
875
+ return jspb.Message.setWrapperField(this, 10, value);
876
+ };
877
+
878
+
879
+ /**
880
+ * Clears the message field making it undefined.
881
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
882
+ */
883
+ proto.gateway.web.v1.DerivedMetric.prototype.clearProgram = function() {
884
+ return this.setProgram(undefined);
885
+ };
886
+
887
+
888
+ /**
889
+ * Returns whether this field is set.
890
+ * @return {boolean}
891
+ */
892
+ proto.gateway.web.v1.DerivedMetric.prototype.hasProgram = function() {
893
+ return jspb.Message.getField(this, 10) != null;
894
+ };
895
+
896
+
897
+ /**
898
+ * optional google.protobuf.Timestamp created_at = 11;
899
+ * @return {?proto.google.protobuf.Timestamp}
900
+ */
901
+ proto.gateway.web.v1.DerivedMetric.prototype.getCreatedAt = function() {
902
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
903
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11));
904
+ };
905
+
906
+
907
+ /**
908
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
909
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
910
+ */
911
+ proto.gateway.web.v1.DerivedMetric.prototype.setCreatedAt = function(value) {
912
+ return jspb.Message.setWrapperField(this, 11, value);
913
+ };
914
+
915
+
916
+ /**
917
+ * Clears the message field making it undefined.
918
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
919
+ */
920
+ proto.gateway.web.v1.DerivedMetric.prototype.clearCreatedAt = function() {
921
+ return this.setCreatedAt(undefined);
922
+ };
923
+
924
+
925
+ /**
926
+ * Returns whether this field is set.
927
+ * @return {boolean}
928
+ */
929
+ proto.gateway.web.v1.DerivedMetric.prototype.hasCreatedAt = function() {
930
+ return jspb.Message.getField(this, 11) != null;
931
+ };
932
+
933
+
934
+ /**
935
+ * optional google.protobuf.Timestamp updated_at = 12;
936
+ * @return {?proto.google.protobuf.Timestamp}
937
+ */
938
+ proto.gateway.web.v1.DerivedMetric.prototype.getUpdatedAt = function() {
939
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
940
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 12));
941
+ };
942
+
943
+
944
+ /**
945
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
946
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
947
+ */
948
+ proto.gateway.web.v1.DerivedMetric.prototype.setUpdatedAt = function(value) {
949
+ return jspb.Message.setWrapperField(this, 12, value);
950
+ };
951
+
952
+
953
+ /**
954
+ * Clears the message field making it undefined.
955
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
956
+ */
957
+ proto.gateway.web.v1.DerivedMetric.prototype.clearUpdatedAt = function() {
958
+ return this.setUpdatedAt(undefined);
959
+ };
960
+
961
+
962
+ /**
963
+ * Returns whether this field is set.
964
+ * @return {boolean}
965
+ */
966
+ proto.gateway.web.v1.DerivedMetric.prototype.hasUpdatedAt = function() {
967
+ return jspb.Message.getField(this, 12) != null;
968
+ };
969
+
970
+
971
+
972
+
973
+
974
+ if (jspb.Message.GENERATE_TO_OBJECT) {
975
+ /**
976
+ * Creates an object representation of this proto.
977
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
978
+ * Optional fields that are not set will be set to undefined.
979
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
980
+ * For the list of reserved names please see:
981
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
982
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
983
+ * JSPB instance for transitional soy proto support:
984
+ * http://goto/soy-param-migration
985
+ * @return {!Object}
986
+ */
987
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.toObject = function(opt_includeInstance) {
988
+ return proto.gateway.web.v1.DerivedMetricProgram.toObject(opt_includeInstance, this);
989
+ };
990
+
991
+
992
+ /**
993
+ * Static version of the {@see toObject} method.
994
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
995
+ * the JSPB instance for transitional soy proto support:
996
+ * http://goto/soy-param-migration
997
+ * @param {!proto.gateway.web.v1.DerivedMetricProgram} msg The msg instance to transform.
998
+ * @return {!Object}
999
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1000
+ */
1001
+ proto.gateway.web.v1.DerivedMetricProgram.toObject = function(includeInstance, msg) {
1002
+ var f, obj = {
1003
+ populationExpression: jspb.Message.getFieldWithDefault(msg, 1, ""),
1004
+ valueExpression: jspb.Message.getFieldWithDefault(msg, 2, ""),
1005
+ groupByExpression: jspb.Message.getFieldWithDefault(msg, 3, "")
1006
+ };
1007
+
1008
+ if (includeInstance) {
1009
+ obj.$jspbMessageInstance = msg;
1010
+ }
1011
+ return obj;
1012
+ };
1013
+ }
1014
+
1015
+
1016
+ /**
1017
+ * Deserializes binary data (in protobuf wire format).
1018
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1019
+ * @return {!proto.gateway.web.v1.DerivedMetricProgram}
1020
+ */
1021
+ proto.gateway.web.v1.DerivedMetricProgram.deserializeBinary = function(bytes) {
1022
+ var reader = new jspb.BinaryReader(bytes);
1023
+ var msg = new proto.gateway.web.v1.DerivedMetricProgram;
1024
+ return proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader(msg, reader);
1025
+ };
1026
+
1027
+
1028
+ /**
1029
+ * Deserializes binary data (in protobuf wire format) from the
1030
+ * given reader into the given message object.
1031
+ * @param {!proto.gateway.web.v1.DerivedMetricProgram} msg The message object to deserialize into.
1032
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1033
+ * @return {!proto.gateway.web.v1.DerivedMetricProgram}
1034
+ */
1035
+ proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader = function(msg, reader) {
1036
+ while (reader.nextField()) {
1037
+ if (reader.isEndGroup()) {
1038
+ break;
1039
+ }
1040
+ var field = reader.getFieldNumber();
1041
+ switch (field) {
1042
+ case 1:
1043
+ var value = /** @type {string} */ (reader.readString());
1044
+ msg.setPopulationExpression(value);
1045
+ break;
1046
+ case 2:
1047
+ var value = /** @type {string} */ (reader.readString());
1048
+ msg.setValueExpression(value);
1049
+ break;
1050
+ case 3:
1051
+ var value = /** @type {string} */ (reader.readString());
1052
+ msg.setGroupByExpression(value);
1053
+ break;
1054
+ default:
1055
+ reader.skipField();
1056
+ break;
1057
+ }
1058
+ }
1059
+ return msg;
1060
+ };
1061
+
1062
+
1063
+ /**
1064
+ * Serializes the message to binary data (in protobuf wire format).
1065
+ * @return {!Uint8Array}
1066
+ */
1067
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.serializeBinary = function() {
1068
+ var writer = new jspb.BinaryWriter();
1069
+ proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter(this, writer);
1070
+ return writer.getResultBuffer();
1071
+ };
1072
+
1073
+
1074
+ /**
1075
+ * Serializes the given message to binary data (in protobuf wire
1076
+ * format), writing to the given BinaryWriter.
1077
+ * @param {!proto.gateway.web.v1.DerivedMetricProgram} message
1078
+ * @param {!jspb.BinaryWriter} writer
1079
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1080
+ */
1081
+ proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter = function(message, writer) {
1082
+ var f = undefined;
1083
+ f = message.getPopulationExpression();
1084
+ if (f.length > 0) {
1085
+ writer.writeString(
1086
+ 1,
1087
+ f
1088
+ );
1089
+ }
1090
+ f = message.getValueExpression();
1091
+ if (f.length > 0) {
1092
+ writer.writeString(
1093
+ 2,
1094
+ f
1095
+ );
1096
+ }
1097
+ f = message.getGroupByExpression();
1098
+ if (f.length > 0) {
1099
+ writer.writeString(
1100
+ 3,
1101
+ f
1102
+ );
1103
+ }
1104
+ };
1105
+
1106
+
1107
+ /**
1108
+ * optional string population_expression = 1;
1109
+ * @return {string}
1110
+ */
1111
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.getPopulationExpression = function() {
1112
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1113
+ };
1114
+
1115
+
1116
+ /**
1117
+ * @param {string} value
1118
+ * @return {!proto.gateway.web.v1.DerivedMetricProgram} returns this
1119
+ */
1120
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.setPopulationExpression = function(value) {
1121
+ return jspb.Message.setProto3StringField(this, 1, value);
1122
+ };
1123
+
1124
+
1125
+ /**
1126
+ * optional string value_expression = 2;
1127
+ * @return {string}
1128
+ */
1129
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.getValueExpression = function() {
1130
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1131
+ };
1132
+
1133
+
1134
+ /**
1135
+ * @param {string} value
1136
+ * @return {!proto.gateway.web.v1.DerivedMetricProgram} returns this
1137
+ */
1138
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.setValueExpression = function(value) {
1139
+ return jspb.Message.setProto3StringField(this, 2, value);
1140
+ };
1141
+
1142
+
1143
+ /**
1144
+ * optional string group_by_expression = 3;
1145
+ * @return {string}
1146
+ */
1147
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.getGroupByExpression = function() {
1148
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1149
+ };
1150
+
1151
+
1152
+ /**
1153
+ * @param {string} value
1154
+ * @return {!proto.gateway.web.v1.DerivedMetricProgram} returns this
1155
+ */
1156
+ proto.gateway.web.v1.DerivedMetricProgram.prototype.setGroupByExpression = function(value) {
1157
+ return jspb.Message.setProto3StringField(this, 3, value);
1158
+ };
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1165
+ /**
1166
+ * Creates an object representation of this proto.
1167
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1168
+ * Optional fields that are not set will be set to undefined.
1169
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1170
+ * For the list of reserved names please see:
1171
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1172
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1173
+ * JSPB instance for transitional soy proto support:
1174
+ * http://goto/soy-param-migration
1175
+ * @return {!Object}
1176
+ */
1177
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.toObject = function(opt_includeInstance) {
1178
+ return proto.gateway.web.v1.CreateDerivedMetricRequest.toObject(opt_includeInstance, this);
1179
+ };
1180
+
1181
+
1182
+ /**
1183
+ * Static version of the {@see toObject} method.
1184
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1185
+ * the JSPB instance for transitional soy proto support:
1186
+ * http://goto/soy-param-migration
1187
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricRequest} msg The msg instance to transform.
1188
+ * @return {!Object}
1189
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1190
+ */
1191
+ proto.gateway.web.v1.CreateDerivedMetricRequest.toObject = function(includeInstance, msg) {
1192
+ var f, obj = {
1193
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1194
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1195
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
1196
+ displayName: jspb.Message.getFieldWithDefault(msg, 4, ""),
1197
+ description: jspb.Message.getFieldWithDefault(msg, 5, ""),
1198
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
1199
+ unit: jspb.Message.getFieldWithDefault(msg, 7, ""),
1200
+ program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f)
1201
+ };
1202
+
1203
+ if (includeInstance) {
1204
+ obj.$jspbMessageInstance = msg;
1205
+ }
1206
+ return obj;
1207
+ };
1208
+ }
1209
+
1210
+
1211
+ /**
1212
+ * Deserializes binary data (in protobuf wire format).
1213
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1214
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest}
1215
+ */
1216
+ proto.gateway.web.v1.CreateDerivedMetricRequest.deserializeBinary = function(bytes) {
1217
+ var reader = new jspb.BinaryReader(bytes);
1218
+ var msg = new proto.gateway.web.v1.CreateDerivedMetricRequest;
1219
+ return proto.gateway.web.v1.CreateDerivedMetricRequest.deserializeBinaryFromReader(msg, reader);
1220
+ };
1221
+
1222
+
1223
+ /**
1224
+ * Deserializes binary data (in protobuf wire format) from the
1225
+ * given reader into the given message object.
1226
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricRequest} msg The message object to deserialize into.
1227
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1228
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest}
1229
+ */
1230
+ proto.gateway.web.v1.CreateDerivedMetricRequest.deserializeBinaryFromReader = function(msg, reader) {
1231
+ while (reader.nextField()) {
1232
+ if (reader.isEndGroup()) {
1233
+ break;
1234
+ }
1235
+ var field = reader.getFieldNumber();
1236
+ switch (field) {
1237
+ case 1:
1238
+ var value = /** @type {string} */ (reader.readString());
1239
+ msg.setOrganizationId(value);
1240
+ break;
1241
+ case 2:
1242
+ var value = /** @type {string} */ (reader.readString());
1243
+ msg.setProjectId(value);
1244
+ break;
1245
+ case 3:
1246
+ var value = /** @type {string} */ (reader.readString());
1247
+ msg.setSlug(value);
1248
+ break;
1249
+ case 4:
1250
+ var value = /** @type {string} */ (reader.readString());
1251
+ msg.setDisplayName(value);
1252
+ break;
1253
+ case 5:
1254
+ var value = /** @type {string} */ (reader.readString());
1255
+ msg.setDescription(value);
1256
+ break;
1257
+ case 6:
1258
+ var value = /** @type {boolean} */ (reader.readBool());
1259
+ msg.setEnabled(value);
1260
+ break;
1261
+ case 7:
1262
+ var value = /** @type {string} */ (reader.readString());
1263
+ msg.setUnit(value);
1264
+ break;
1265
+ case 8:
1266
+ var value = new proto.gateway.web.v1.DerivedMetricProgram;
1267
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader);
1268
+ msg.setProgram(value);
1269
+ break;
1270
+ default:
1271
+ reader.skipField();
1272
+ break;
1273
+ }
1274
+ }
1275
+ return msg;
1276
+ };
1277
+
1278
+
1279
+ /**
1280
+ * Serializes the message to binary data (in protobuf wire format).
1281
+ * @return {!Uint8Array}
1282
+ */
1283
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.serializeBinary = function() {
1284
+ var writer = new jspb.BinaryWriter();
1285
+ proto.gateway.web.v1.CreateDerivedMetricRequest.serializeBinaryToWriter(this, writer);
1286
+ return writer.getResultBuffer();
1287
+ };
1288
+
1289
+
1290
+ /**
1291
+ * Serializes the given message to binary data (in protobuf wire
1292
+ * format), writing to the given BinaryWriter.
1293
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricRequest} message
1294
+ * @param {!jspb.BinaryWriter} writer
1295
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1296
+ */
1297
+ proto.gateway.web.v1.CreateDerivedMetricRequest.serializeBinaryToWriter = function(message, writer) {
1298
+ var f = undefined;
1299
+ f = message.getOrganizationId();
1300
+ if (f.length > 0) {
1301
+ writer.writeString(
1302
+ 1,
1303
+ f
1304
+ );
1305
+ }
1306
+ f = message.getProjectId();
1307
+ if (f.length > 0) {
1308
+ writer.writeString(
1309
+ 2,
1310
+ f
1311
+ );
1312
+ }
1313
+ f = message.getSlug();
1314
+ if (f.length > 0) {
1315
+ writer.writeString(
1316
+ 3,
1317
+ f
1318
+ );
1319
+ }
1320
+ f = message.getDisplayName();
1321
+ if (f.length > 0) {
1322
+ writer.writeString(
1323
+ 4,
1324
+ f
1325
+ );
1326
+ }
1327
+ f = message.getDescription();
1328
+ if (f.length > 0) {
1329
+ writer.writeString(
1330
+ 5,
1331
+ f
1332
+ );
1333
+ }
1334
+ f = message.getEnabled();
1335
+ if (f) {
1336
+ writer.writeBool(
1337
+ 6,
1338
+ f
1339
+ );
1340
+ }
1341
+ f = message.getUnit();
1342
+ if (f.length > 0) {
1343
+ writer.writeString(
1344
+ 7,
1345
+ f
1346
+ );
1347
+ }
1348
+ f = message.getProgram();
1349
+ if (f != null) {
1350
+ writer.writeMessage(
1351
+ 8,
1352
+ f,
1353
+ proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter
1354
+ );
1355
+ }
1356
+ };
1357
+
1358
+
1359
+ /**
1360
+ * optional string organization_id = 1;
1361
+ * @return {string}
1362
+ */
1363
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getOrganizationId = function() {
1364
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1365
+ };
1366
+
1367
+
1368
+ /**
1369
+ * @param {string} value
1370
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1371
+ */
1372
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setOrganizationId = function(value) {
1373
+ return jspb.Message.setProto3StringField(this, 1, value);
1374
+ };
1375
+
1376
+
1377
+ /**
1378
+ * optional string project_id = 2;
1379
+ * @return {string}
1380
+ */
1381
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getProjectId = function() {
1382
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1383
+ };
1384
+
1385
+
1386
+ /**
1387
+ * @param {string} value
1388
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1389
+ */
1390
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setProjectId = function(value) {
1391
+ return jspb.Message.setProto3StringField(this, 2, value);
1392
+ };
1393
+
1394
+
1395
+ /**
1396
+ * optional string slug = 3;
1397
+ * @return {string}
1398
+ */
1399
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getSlug = function() {
1400
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1401
+ };
1402
+
1403
+
1404
+ /**
1405
+ * @param {string} value
1406
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1407
+ */
1408
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setSlug = function(value) {
1409
+ return jspb.Message.setProto3StringField(this, 3, value);
1410
+ };
1411
+
1412
+
1413
+ /**
1414
+ * optional string display_name = 4;
1415
+ * @return {string}
1416
+ */
1417
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getDisplayName = function() {
1418
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1419
+ };
1420
+
1421
+
1422
+ /**
1423
+ * @param {string} value
1424
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1425
+ */
1426
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setDisplayName = function(value) {
1427
+ return jspb.Message.setProto3StringField(this, 4, value);
1428
+ };
1429
+
1430
+
1431
+ /**
1432
+ * optional string description = 5;
1433
+ * @return {string}
1434
+ */
1435
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getDescription = function() {
1436
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1437
+ };
1438
+
1439
+
1440
+ /**
1441
+ * @param {string} value
1442
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1443
+ */
1444
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setDescription = function(value) {
1445
+ return jspb.Message.setProto3StringField(this, 5, value);
1446
+ };
1447
+
1448
+
1449
+ /**
1450
+ * optional bool enabled = 6;
1451
+ * @return {boolean}
1452
+ */
1453
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getEnabled = function() {
1454
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
1455
+ };
1456
+
1457
+
1458
+ /**
1459
+ * @param {boolean} value
1460
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1461
+ */
1462
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setEnabled = function(value) {
1463
+ return jspb.Message.setProto3BooleanField(this, 6, value);
1464
+ };
1465
+
1466
+
1467
+ /**
1468
+ * optional string unit = 7;
1469
+ * @return {string}
1470
+ */
1471
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getUnit = function() {
1472
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1473
+ };
1474
+
1475
+
1476
+ /**
1477
+ * @param {string} value
1478
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1479
+ */
1480
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setUnit = function(value) {
1481
+ return jspb.Message.setProto3StringField(this, 7, value);
1482
+ };
1483
+
1484
+
1485
+ /**
1486
+ * optional DerivedMetricProgram program = 8;
1487
+ * @return {?proto.gateway.web.v1.DerivedMetricProgram}
1488
+ */
1489
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getProgram = function() {
1490
+ return /** @type{?proto.gateway.web.v1.DerivedMetricProgram} */ (
1491
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetricProgram, 8));
1492
+ };
1493
+
1494
+
1495
+ /**
1496
+ * @param {?proto.gateway.web.v1.DerivedMetricProgram|undefined} value
1497
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1498
+ */
1499
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setProgram = function(value) {
1500
+ return jspb.Message.setWrapperField(this, 8, value);
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * Clears the message field making it undefined.
1506
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1507
+ */
1508
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.clearProgram = function() {
1509
+ return this.setProgram(undefined);
1510
+ };
1511
+
1512
+
1513
+ /**
1514
+ * Returns whether this field is set.
1515
+ * @return {boolean}
1516
+ */
1517
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.hasProgram = function() {
1518
+ return jspb.Message.getField(this, 8) != null;
1519
+ };
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1526
+ /**
1527
+ * Creates an object representation of this proto.
1528
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1529
+ * Optional fields that are not set will be set to undefined.
1530
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1531
+ * For the list of reserved names please see:
1532
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1533
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1534
+ * JSPB instance for transitional soy proto support:
1535
+ * http://goto/soy-param-migration
1536
+ * @return {!Object}
1537
+ */
1538
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.toObject = function(opt_includeInstance) {
1539
+ return proto.gateway.web.v1.CreateDerivedMetricResponse.toObject(opt_includeInstance, this);
1540
+ };
1541
+
1542
+
1543
+ /**
1544
+ * Static version of the {@see toObject} method.
1545
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1546
+ * the JSPB instance for transitional soy proto support:
1547
+ * http://goto/soy-param-migration
1548
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricResponse} msg The msg instance to transform.
1549
+ * @return {!Object}
1550
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1551
+ */
1552
+ proto.gateway.web.v1.CreateDerivedMetricResponse.toObject = function(includeInstance, msg) {
1553
+ var f, obj = {
1554
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1555
+ derivedMetric: (f = msg.getDerivedMetric()) && proto.gateway.web.v1.DerivedMetric.toObject(includeInstance, f)
1556
+ };
1557
+
1558
+ if (includeInstance) {
1559
+ obj.$jspbMessageInstance = msg;
1560
+ }
1561
+ return obj;
1562
+ };
1563
+ }
1564
+
1565
+
1566
+ /**
1567
+ * Deserializes binary data (in protobuf wire format).
1568
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1569
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse}
1570
+ */
1571
+ proto.gateway.web.v1.CreateDerivedMetricResponse.deserializeBinary = function(bytes) {
1572
+ var reader = new jspb.BinaryReader(bytes);
1573
+ var msg = new proto.gateway.web.v1.CreateDerivedMetricResponse;
1574
+ return proto.gateway.web.v1.CreateDerivedMetricResponse.deserializeBinaryFromReader(msg, reader);
1575
+ };
1576
+
1577
+
1578
+ /**
1579
+ * Deserializes binary data (in protobuf wire format) from the
1580
+ * given reader into the given message object.
1581
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricResponse} msg The message object to deserialize into.
1582
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1583
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse}
1584
+ */
1585
+ proto.gateway.web.v1.CreateDerivedMetricResponse.deserializeBinaryFromReader = function(msg, reader) {
1586
+ while (reader.nextField()) {
1587
+ if (reader.isEndGroup()) {
1588
+ break;
1589
+ }
1590
+ var field = reader.getFieldNumber();
1591
+ switch (field) {
1592
+ case 1:
1593
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1594
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1595
+ msg.setStatus(value);
1596
+ break;
1597
+ case 2:
1598
+ var value = new proto.gateway.web.v1.DerivedMetric;
1599
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader);
1600
+ msg.setDerivedMetric(value);
1601
+ break;
1602
+ default:
1603
+ reader.skipField();
1604
+ break;
1605
+ }
1606
+ }
1607
+ return msg;
1608
+ };
1609
+
1610
+
1611
+ /**
1612
+ * Serializes the message to binary data (in protobuf wire format).
1613
+ * @return {!Uint8Array}
1614
+ */
1615
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.serializeBinary = function() {
1616
+ var writer = new jspb.BinaryWriter();
1617
+ proto.gateway.web.v1.CreateDerivedMetricResponse.serializeBinaryToWriter(this, writer);
1618
+ return writer.getResultBuffer();
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * Serializes the given message to binary data (in protobuf wire
1624
+ * format), writing to the given BinaryWriter.
1625
+ * @param {!proto.gateway.web.v1.CreateDerivedMetricResponse} message
1626
+ * @param {!jspb.BinaryWriter} writer
1627
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1628
+ */
1629
+ proto.gateway.web.v1.CreateDerivedMetricResponse.serializeBinaryToWriter = function(message, writer) {
1630
+ var f = undefined;
1631
+ f = message.getStatus();
1632
+ if (f != null) {
1633
+ writer.writeMessage(
1634
+ 1,
1635
+ f,
1636
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1637
+ );
1638
+ }
1639
+ f = message.getDerivedMetric();
1640
+ if (f != null) {
1641
+ writer.writeMessage(
1642
+ 2,
1643
+ f,
1644
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter
1645
+ );
1646
+ }
1647
+ };
1648
+
1649
+
1650
+ /**
1651
+ * optional gateway.common.v1.ResponseStatus status = 1;
1652
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1653
+ */
1654
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.getStatus = function() {
1655
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1656
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1657
+ };
1658
+
1659
+
1660
+ /**
1661
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1662
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse} returns this
1663
+ */
1664
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.setStatus = function(value) {
1665
+ return jspb.Message.setWrapperField(this, 1, value);
1666
+ };
1667
+
1668
+
1669
+ /**
1670
+ * Clears the message field making it undefined.
1671
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse} returns this
1672
+ */
1673
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.clearStatus = function() {
1674
+ return this.setStatus(undefined);
1675
+ };
1676
+
1677
+
1678
+ /**
1679
+ * Returns whether this field is set.
1680
+ * @return {boolean}
1681
+ */
1682
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.hasStatus = function() {
1683
+ return jspb.Message.getField(this, 1) != null;
1684
+ };
1685
+
1686
+
1687
+ /**
1688
+ * optional DerivedMetric derived_metric = 2;
1689
+ * @return {?proto.gateway.web.v1.DerivedMetric}
1690
+ */
1691
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.getDerivedMetric = function() {
1692
+ return /** @type{?proto.gateway.web.v1.DerivedMetric} */ (
1693
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetric, 2));
1694
+ };
1695
+
1696
+
1697
+ /**
1698
+ * @param {?proto.gateway.web.v1.DerivedMetric|undefined} value
1699
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse} returns this
1700
+ */
1701
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.setDerivedMetric = function(value) {
1702
+ return jspb.Message.setWrapperField(this, 2, value);
1703
+ };
1704
+
1705
+
1706
+ /**
1707
+ * Clears the message field making it undefined.
1708
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricResponse} returns this
1709
+ */
1710
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.clearDerivedMetric = function() {
1711
+ return this.setDerivedMetric(undefined);
1712
+ };
1713
+
1714
+
1715
+ /**
1716
+ * Returns whether this field is set.
1717
+ * @return {boolean}
1718
+ */
1719
+ proto.gateway.web.v1.CreateDerivedMetricResponse.prototype.hasDerivedMetric = function() {
1720
+ return jspb.Message.getField(this, 2) != null;
1721
+ };
1722
+
1723
+
1724
+
1725
+
1726
+
1727
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1728
+ /**
1729
+ * Creates an object representation of this proto.
1730
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1731
+ * Optional fields that are not set will be set to undefined.
1732
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1733
+ * For the list of reserved names please see:
1734
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1735
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1736
+ * JSPB instance for transitional soy proto support:
1737
+ * http://goto/soy-param-migration
1738
+ * @return {!Object}
1739
+ */
1740
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.toObject = function(opt_includeInstance) {
1741
+ return proto.gateway.web.v1.GetDerivedMetricRequest.toObject(opt_includeInstance, this);
1742
+ };
1743
+
1744
+
1745
+ /**
1746
+ * Static version of the {@see toObject} method.
1747
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1748
+ * the JSPB instance for transitional soy proto support:
1749
+ * http://goto/soy-param-migration
1750
+ * @param {!proto.gateway.web.v1.GetDerivedMetricRequest} msg The msg instance to transform.
1751
+ * @return {!Object}
1752
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1753
+ */
1754
+ proto.gateway.web.v1.GetDerivedMetricRequest.toObject = function(includeInstance, msg) {
1755
+ var f, obj = {
1756
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1757
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1758
+ derivedMetricId: jspb.Message.getFieldWithDefault(msg, 3, "")
1759
+ };
1760
+
1761
+ if (includeInstance) {
1762
+ obj.$jspbMessageInstance = msg;
1763
+ }
1764
+ return obj;
1765
+ };
1766
+ }
1767
+
1768
+
1769
+ /**
1770
+ * Deserializes binary data (in protobuf wire format).
1771
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1772
+ * @return {!proto.gateway.web.v1.GetDerivedMetricRequest}
1773
+ */
1774
+ proto.gateway.web.v1.GetDerivedMetricRequest.deserializeBinary = function(bytes) {
1775
+ var reader = new jspb.BinaryReader(bytes);
1776
+ var msg = new proto.gateway.web.v1.GetDerivedMetricRequest;
1777
+ return proto.gateway.web.v1.GetDerivedMetricRequest.deserializeBinaryFromReader(msg, reader);
1778
+ };
1779
+
1780
+
1781
+ /**
1782
+ * Deserializes binary data (in protobuf wire format) from the
1783
+ * given reader into the given message object.
1784
+ * @param {!proto.gateway.web.v1.GetDerivedMetricRequest} msg The message object to deserialize into.
1785
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1786
+ * @return {!proto.gateway.web.v1.GetDerivedMetricRequest}
1787
+ */
1788
+ proto.gateway.web.v1.GetDerivedMetricRequest.deserializeBinaryFromReader = function(msg, reader) {
1789
+ while (reader.nextField()) {
1790
+ if (reader.isEndGroup()) {
1791
+ break;
1792
+ }
1793
+ var field = reader.getFieldNumber();
1794
+ switch (field) {
1795
+ case 1:
1796
+ var value = /** @type {string} */ (reader.readString());
1797
+ msg.setOrganizationId(value);
1798
+ break;
1799
+ case 2:
1800
+ var value = /** @type {string} */ (reader.readString());
1801
+ msg.setProjectId(value);
1802
+ break;
1803
+ case 3:
1804
+ var value = /** @type {string} */ (reader.readString());
1805
+ msg.setDerivedMetricId(value);
1806
+ break;
1807
+ default:
1808
+ reader.skipField();
1809
+ break;
1810
+ }
1811
+ }
1812
+ return msg;
1813
+ };
1814
+
1815
+
1816
+ /**
1817
+ * Serializes the message to binary data (in protobuf wire format).
1818
+ * @return {!Uint8Array}
1819
+ */
1820
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.serializeBinary = function() {
1821
+ var writer = new jspb.BinaryWriter();
1822
+ proto.gateway.web.v1.GetDerivedMetricRequest.serializeBinaryToWriter(this, writer);
1823
+ return writer.getResultBuffer();
1824
+ };
1825
+
1826
+
1827
+ /**
1828
+ * Serializes the given message to binary data (in protobuf wire
1829
+ * format), writing to the given BinaryWriter.
1830
+ * @param {!proto.gateway.web.v1.GetDerivedMetricRequest} message
1831
+ * @param {!jspb.BinaryWriter} writer
1832
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1833
+ */
1834
+ proto.gateway.web.v1.GetDerivedMetricRequest.serializeBinaryToWriter = function(message, writer) {
1835
+ var f = undefined;
1836
+ f = message.getOrganizationId();
1837
+ if (f.length > 0) {
1838
+ writer.writeString(
1839
+ 1,
1840
+ f
1841
+ );
1842
+ }
1843
+ f = message.getProjectId();
1844
+ if (f.length > 0) {
1845
+ writer.writeString(
1846
+ 2,
1847
+ f
1848
+ );
1849
+ }
1850
+ f = message.getDerivedMetricId();
1851
+ if (f.length > 0) {
1852
+ writer.writeString(
1853
+ 3,
1854
+ f
1855
+ );
1856
+ }
1857
+ };
1858
+
1859
+
1860
+ /**
1861
+ * optional string organization_id = 1;
1862
+ * @return {string}
1863
+ */
1864
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.getOrganizationId = function() {
1865
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1866
+ };
1867
+
1868
+
1869
+ /**
1870
+ * @param {string} value
1871
+ * @return {!proto.gateway.web.v1.GetDerivedMetricRequest} returns this
1872
+ */
1873
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.setOrganizationId = function(value) {
1874
+ return jspb.Message.setProto3StringField(this, 1, value);
1875
+ };
1876
+
1877
+
1878
+ /**
1879
+ * optional string project_id = 2;
1880
+ * @return {string}
1881
+ */
1882
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.getProjectId = function() {
1883
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1884
+ };
1885
+
1886
+
1887
+ /**
1888
+ * @param {string} value
1889
+ * @return {!proto.gateway.web.v1.GetDerivedMetricRequest} returns this
1890
+ */
1891
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.setProjectId = function(value) {
1892
+ return jspb.Message.setProto3StringField(this, 2, value);
1893
+ };
1894
+
1895
+
1896
+ /**
1897
+ * optional string derived_metric_id = 3;
1898
+ * @return {string}
1899
+ */
1900
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.getDerivedMetricId = function() {
1901
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1902
+ };
1903
+
1904
+
1905
+ /**
1906
+ * @param {string} value
1907
+ * @return {!proto.gateway.web.v1.GetDerivedMetricRequest} returns this
1908
+ */
1909
+ proto.gateway.web.v1.GetDerivedMetricRequest.prototype.setDerivedMetricId = function(value) {
1910
+ return jspb.Message.setProto3StringField(this, 3, value);
1911
+ };
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1918
+ /**
1919
+ * Creates an object representation of this proto.
1920
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1921
+ * Optional fields that are not set will be set to undefined.
1922
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1923
+ * For the list of reserved names please see:
1924
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1925
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1926
+ * JSPB instance for transitional soy proto support:
1927
+ * http://goto/soy-param-migration
1928
+ * @return {!Object}
1929
+ */
1930
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.toObject = function(opt_includeInstance) {
1931
+ return proto.gateway.web.v1.GetDerivedMetricResponse.toObject(opt_includeInstance, this);
1932
+ };
1933
+
1934
+
1935
+ /**
1936
+ * Static version of the {@see toObject} method.
1937
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1938
+ * the JSPB instance for transitional soy proto support:
1939
+ * http://goto/soy-param-migration
1940
+ * @param {!proto.gateway.web.v1.GetDerivedMetricResponse} msg The msg instance to transform.
1941
+ * @return {!Object}
1942
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1943
+ */
1944
+ proto.gateway.web.v1.GetDerivedMetricResponse.toObject = function(includeInstance, msg) {
1945
+ var f, obj = {
1946
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1947
+ derivedMetric: (f = msg.getDerivedMetric()) && proto.gateway.web.v1.DerivedMetric.toObject(includeInstance, f)
1948
+ };
1949
+
1950
+ if (includeInstance) {
1951
+ obj.$jspbMessageInstance = msg;
1952
+ }
1953
+ return obj;
1954
+ };
1955
+ }
1956
+
1957
+
1958
+ /**
1959
+ * Deserializes binary data (in protobuf wire format).
1960
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1961
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse}
1962
+ */
1963
+ proto.gateway.web.v1.GetDerivedMetricResponse.deserializeBinary = function(bytes) {
1964
+ var reader = new jspb.BinaryReader(bytes);
1965
+ var msg = new proto.gateway.web.v1.GetDerivedMetricResponse;
1966
+ return proto.gateway.web.v1.GetDerivedMetricResponse.deserializeBinaryFromReader(msg, reader);
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * Deserializes binary data (in protobuf wire format) from the
1972
+ * given reader into the given message object.
1973
+ * @param {!proto.gateway.web.v1.GetDerivedMetricResponse} msg The message object to deserialize into.
1974
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1975
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse}
1976
+ */
1977
+ proto.gateway.web.v1.GetDerivedMetricResponse.deserializeBinaryFromReader = function(msg, reader) {
1978
+ while (reader.nextField()) {
1979
+ if (reader.isEndGroup()) {
1980
+ break;
1981
+ }
1982
+ var field = reader.getFieldNumber();
1983
+ switch (field) {
1984
+ case 1:
1985
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1986
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1987
+ msg.setStatus(value);
1988
+ break;
1989
+ case 2:
1990
+ var value = new proto.gateway.web.v1.DerivedMetric;
1991
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader);
1992
+ msg.setDerivedMetric(value);
1993
+ break;
1994
+ default:
1995
+ reader.skipField();
1996
+ break;
1997
+ }
1998
+ }
1999
+ return msg;
2000
+ };
2001
+
2002
+
2003
+ /**
2004
+ * Serializes the message to binary data (in protobuf wire format).
2005
+ * @return {!Uint8Array}
2006
+ */
2007
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.serializeBinary = function() {
2008
+ var writer = new jspb.BinaryWriter();
2009
+ proto.gateway.web.v1.GetDerivedMetricResponse.serializeBinaryToWriter(this, writer);
2010
+ return writer.getResultBuffer();
2011
+ };
2012
+
2013
+
2014
+ /**
2015
+ * Serializes the given message to binary data (in protobuf wire
2016
+ * format), writing to the given BinaryWriter.
2017
+ * @param {!proto.gateway.web.v1.GetDerivedMetricResponse} message
2018
+ * @param {!jspb.BinaryWriter} writer
2019
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2020
+ */
2021
+ proto.gateway.web.v1.GetDerivedMetricResponse.serializeBinaryToWriter = function(message, writer) {
2022
+ var f = undefined;
2023
+ f = message.getStatus();
2024
+ if (f != null) {
2025
+ writer.writeMessage(
2026
+ 1,
2027
+ f,
2028
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2029
+ );
2030
+ }
2031
+ f = message.getDerivedMetric();
2032
+ if (f != null) {
2033
+ writer.writeMessage(
2034
+ 2,
2035
+ f,
2036
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter
2037
+ );
2038
+ }
2039
+ };
2040
+
2041
+
2042
+ /**
2043
+ * optional gateway.common.v1.ResponseStatus status = 1;
2044
+ * @return {?proto.gateway.common.v1.ResponseStatus}
2045
+ */
2046
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.getStatus = function() {
2047
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2048
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2049
+ };
2050
+
2051
+
2052
+ /**
2053
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2054
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse} returns this
2055
+ */
2056
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.setStatus = function(value) {
2057
+ return jspb.Message.setWrapperField(this, 1, value);
2058
+ };
2059
+
2060
+
2061
+ /**
2062
+ * Clears the message field making it undefined.
2063
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse} returns this
2064
+ */
2065
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.clearStatus = function() {
2066
+ return this.setStatus(undefined);
2067
+ };
2068
+
2069
+
2070
+ /**
2071
+ * Returns whether this field is set.
2072
+ * @return {boolean}
2073
+ */
2074
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.hasStatus = function() {
2075
+ return jspb.Message.getField(this, 1) != null;
2076
+ };
2077
+
2078
+
2079
+ /**
2080
+ * optional DerivedMetric derived_metric = 2;
2081
+ * @return {?proto.gateway.web.v1.DerivedMetric}
2082
+ */
2083
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.getDerivedMetric = function() {
2084
+ return /** @type{?proto.gateway.web.v1.DerivedMetric} */ (
2085
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetric, 2));
2086
+ };
2087
+
2088
+
2089
+ /**
2090
+ * @param {?proto.gateway.web.v1.DerivedMetric|undefined} value
2091
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse} returns this
2092
+ */
2093
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.setDerivedMetric = function(value) {
2094
+ return jspb.Message.setWrapperField(this, 2, value);
2095
+ };
2096
+
2097
+
2098
+ /**
2099
+ * Clears the message field making it undefined.
2100
+ * @return {!proto.gateway.web.v1.GetDerivedMetricResponse} returns this
2101
+ */
2102
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.clearDerivedMetric = function() {
2103
+ return this.setDerivedMetric(undefined);
2104
+ };
2105
+
2106
+
2107
+ /**
2108
+ * Returns whether this field is set.
2109
+ * @return {boolean}
2110
+ */
2111
+ proto.gateway.web.v1.GetDerivedMetricResponse.prototype.hasDerivedMetric = function() {
2112
+ return jspb.Message.getField(this, 2) != null;
2113
+ };
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2120
+ /**
2121
+ * Creates an object representation of this proto.
2122
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2123
+ * Optional fields that are not set will be set to undefined.
2124
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2125
+ * For the list of reserved names please see:
2126
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2127
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2128
+ * JSPB instance for transitional soy proto support:
2129
+ * http://goto/soy-param-migration
2130
+ * @return {!Object}
2131
+ */
2132
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.toObject = function(opt_includeInstance) {
2133
+ return proto.gateway.web.v1.ListDerivedMetricsRequest.toObject(opt_includeInstance, this);
2134
+ };
2135
+
2136
+
2137
+ /**
2138
+ * Static version of the {@see toObject} method.
2139
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2140
+ * the JSPB instance for transitional soy proto support:
2141
+ * http://goto/soy-param-migration
2142
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsRequest} msg The msg instance to transform.
2143
+ * @return {!Object}
2144
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2145
+ */
2146
+ proto.gateway.web.v1.ListDerivedMetricsRequest.toObject = function(includeInstance, msg) {
2147
+ var f, obj = {
2148
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2149
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, "")
2150
+ };
2151
+
2152
+ if (includeInstance) {
2153
+ obj.$jspbMessageInstance = msg;
2154
+ }
2155
+ return obj;
2156
+ };
2157
+ }
2158
+
2159
+
2160
+ /**
2161
+ * Deserializes binary data (in protobuf wire format).
2162
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2163
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsRequest}
2164
+ */
2165
+ proto.gateway.web.v1.ListDerivedMetricsRequest.deserializeBinary = function(bytes) {
2166
+ var reader = new jspb.BinaryReader(bytes);
2167
+ var msg = new proto.gateway.web.v1.ListDerivedMetricsRequest;
2168
+ return proto.gateway.web.v1.ListDerivedMetricsRequest.deserializeBinaryFromReader(msg, reader);
2169
+ };
2170
+
2171
+
2172
+ /**
2173
+ * Deserializes binary data (in protobuf wire format) from the
2174
+ * given reader into the given message object.
2175
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsRequest} msg The message object to deserialize into.
2176
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2177
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsRequest}
2178
+ */
2179
+ proto.gateway.web.v1.ListDerivedMetricsRequest.deserializeBinaryFromReader = function(msg, reader) {
2180
+ while (reader.nextField()) {
2181
+ if (reader.isEndGroup()) {
2182
+ break;
2183
+ }
2184
+ var field = reader.getFieldNumber();
2185
+ switch (field) {
2186
+ case 1:
2187
+ var value = /** @type {string} */ (reader.readString());
2188
+ msg.setOrganizationId(value);
2189
+ break;
2190
+ case 2:
2191
+ var value = /** @type {string} */ (reader.readString());
2192
+ msg.setProjectId(value);
2193
+ break;
2194
+ default:
2195
+ reader.skipField();
2196
+ break;
2197
+ }
2198
+ }
2199
+ return msg;
2200
+ };
2201
+
2202
+
2203
+ /**
2204
+ * Serializes the message to binary data (in protobuf wire format).
2205
+ * @return {!Uint8Array}
2206
+ */
2207
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.serializeBinary = function() {
2208
+ var writer = new jspb.BinaryWriter();
2209
+ proto.gateway.web.v1.ListDerivedMetricsRequest.serializeBinaryToWriter(this, writer);
2210
+ return writer.getResultBuffer();
2211
+ };
2212
+
2213
+
2214
+ /**
2215
+ * Serializes the given message to binary data (in protobuf wire
2216
+ * format), writing to the given BinaryWriter.
2217
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsRequest} message
2218
+ * @param {!jspb.BinaryWriter} writer
2219
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2220
+ */
2221
+ proto.gateway.web.v1.ListDerivedMetricsRequest.serializeBinaryToWriter = function(message, writer) {
2222
+ var f = undefined;
2223
+ f = message.getOrganizationId();
2224
+ if (f.length > 0) {
2225
+ writer.writeString(
2226
+ 1,
2227
+ f
2228
+ );
2229
+ }
2230
+ f = message.getProjectId();
2231
+ if (f.length > 0) {
2232
+ writer.writeString(
2233
+ 2,
2234
+ f
2235
+ );
2236
+ }
2237
+ };
2238
+
2239
+
2240
+ /**
2241
+ * optional string organization_id = 1;
2242
+ * @return {string}
2243
+ */
2244
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.getOrganizationId = function() {
2245
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2246
+ };
2247
+
2248
+
2249
+ /**
2250
+ * @param {string} value
2251
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsRequest} returns this
2252
+ */
2253
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.setOrganizationId = function(value) {
2254
+ return jspb.Message.setProto3StringField(this, 1, value);
2255
+ };
2256
+
2257
+
2258
+ /**
2259
+ * optional string project_id = 2;
2260
+ * @return {string}
2261
+ */
2262
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.getProjectId = function() {
2263
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2264
+ };
2265
+
2266
+
2267
+ /**
2268
+ * @param {string} value
2269
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsRequest} returns this
2270
+ */
2271
+ proto.gateway.web.v1.ListDerivedMetricsRequest.prototype.setProjectId = function(value) {
2272
+ return jspb.Message.setProto3StringField(this, 2, value);
2273
+ };
2274
+
2275
+
2276
+
2277
+ /**
2278
+ * List of repeated fields within this message type.
2279
+ * @private {!Array<number>}
2280
+ * @const
2281
+ */
2282
+ proto.gateway.web.v1.ListDerivedMetricsResponse.repeatedFields_ = [2];
2283
+
2284
+
2285
+
2286
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2287
+ /**
2288
+ * Creates an object representation of this proto.
2289
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2290
+ * Optional fields that are not set will be set to undefined.
2291
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2292
+ * For the list of reserved names please see:
2293
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2294
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2295
+ * JSPB instance for transitional soy proto support:
2296
+ * http://goto/soy-param-migration
2297
+ * @return {!Object}
2298
+ */
2299
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.toObject = function(opt_includeInstance) {
2300
+ return proto.gateway.web.v1.ListDerivedMetricsResponse.toObject(opt_includeInstance, this);
2301
+ };
2302
+
2303
+
2304
+ /**
2305
+ * Static version of the {@see toObject} method.
2306
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2307
+ * the JSPB instance for transitional soy proto support:
2308
+ * http://goto/soy-param-migration
2309
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsResponse} msg The msg instance to transform.
2310
+ * @return {!Object}
2311
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2312
+ */
2313
+ proto.gateway.web.v1.ListDerivedMetricsResponse.toObject = function(includeInstance, msg) {
2314
+ var f, obj = {
2315
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
2316
+ derivedMetricsList: jspb.Message.toObjectList(msg.getDerivedMetricsList(),
2317
+ proto.gateway.web.v1.DerivedMetric.toObject, includeInstance)
2318
+ };
2319
+
2320
+ if (includeInstance) {
2321
+ obj.$jspbMessageInstance = msg;
2322
+ }
2323
+ return obj;
2324
+ };
2325
+ }
2326
+
2327
+
2328
+ /**
2329
+ * Deserializes binary data (in protobuf wire format).
2330
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2331
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse}
2332
+ */
2333
+ proto.gateway.web.v1.ListDerivedMetricsResponse.deserializeBinary = function(bytes) {
2334
+ var reader = new jspb.BinaryReader(bytes);
2335
+ var msg = new proto.gateway.web.v1.ListDerivedMetricsResponse;
2336
+ return proto.gateway.web.v1.ListDerivedMetricsResponse.deserializeBinaryFromReader(msg, reader);
2337
+ };
2338
+
2339
+
2340
+ /**
2341
+ * Deserializes binary data (in protobuf wire format) from the
2342
+ * given reader into the given message object.
2343
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsResponse} msg The message object to deserialize into.
2344
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2345
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse}
2346
+ */
2347
+ proto.gateway.web.v1.ListDerivedMetricsResponse.deserializeBinaryFromReader = function(msg, reader) {
2348
+ while (reader.nextField()) {
2349
+ if (reader.isEndGroup()) {
2350
+ break;
2351
+ }
2352
+ var field = reader.getFieldNumber();
2353
+ switch (field) {
2354
+ case 1:
2355
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
2356
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2357
+ msg.setStatus(value);
2358
+ break;
2359
+ case 2:
2360
+ var value = new proto.gateway.web.v1.DerivedMetric;
2361
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader);
2362
+ msg.addDerivedMetrics(value);
2363
+ break;
2364
+ default:
2365
+ reader.skipField();
2366
+ break;
2367
+ }
2368
+ }
2369
+ return msg;
2370
+ };
2371
+
2372
+
2373
+ /**
2374
+ * Serializes the message to binary data (in protobuf wire format).
2375
+ * @return {!Uint8Array}
2376
+ */
2377
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.serializeBinary = function() {
2378
+ var writer = new jspb.BinaryWriter();
2379
+ proto.gateway.web.v1.ListDerivedMetricsResponse.serializeBinaryToWriter(this, writer);
2380
+ return writer.getResultBuffer();
2381
+ };
2382
+
2383
+
2384
+ /**
2385
+ * Serializes the given message to binary data (in protobuf wire
2386
+ * format), writing to the given BinaryWriter.
2387
+ * @param {!proto.gateway.web.v1.ListDerivedMetricsResponse} message
2388
+ * @param {!jspb.BinaryWriter} writer
2389
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2390
+ */
2391
+ proto.gateway.web.v1.ListDerivedMetricsResponse.serializeBinaryToWriter = function(message, writer) {
2392
+ var f = undefined;
2393
+ f = message.getStatus();
2394
+ if (f != null) {
2395
+ writer.writeMessage(
2396
+ 1,
2397
+ f,
2398
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2399
+ );
2400
+ }
2401
+ f = message.getDerivedMetricsList();
2402
+ if (f.length > 0) {
2403
+ writer.writeRepeatedMessage(
2404
+ 2,
2405
+ f,
2406
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter
2407
+ );
2408
+ }
2409
+ };
2410
+
2411
+
2412
+ /**
2413
+ * optional gateway.common.v1.ResponseStatus status = 1;
2414
+ * @return {?proto.gateway.common.v1.ResponseStatus}
2415
+ */
2416
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.getStatus = function() {
2417
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2418
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2419
+ };
2420
+
2421
+
2422
+ /**
2423
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2424
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse} returns this
2425
+ */
2426
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.setStatus = function(value) {
2427
+ return jspb.Message.setWrapperField(this, 1, value);
2428
+ };
2429
+
2430
+
2431
+ /**
2432
+ * Clears the message field making it undefined.
2433
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse} returns this
2434
+ */
2435
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.clearStatus = function() {
2436
+ return this.setStatus(undefined);
2437
+ };
2438
+
2439
+
2440
+ /**
2441
+ * Returns whether this field is set.
2442
+ * @return {boolean}
2443
+ */
2444
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.hasStatus = function() {
2445
+ return jspb.Message.getField(this, 1) != null;
2446
+ };
2447
+
2448
+
2449
+ /**
2450
+ * repeated DerivedMetric derived_metrics = 2;
2451
+ * @return {!Array<!proto.gateway.web.v1.DerivedMetric>}
2452
+ */
2453
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.getDerivedMetricsList = function() {
2454
+ return /** @type{!Array<!proto.gateway.web.v1.DerivedMetric>} */ (
2455
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.DerivedMetric, 2));
2456
+ };
2457
+
2458
+
2459
+ /**
2460
+ * @param {!Array<!proto.gateway.web.v1.DerivedMetric>} value
2461
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse} returns this
2462
+ */
2463
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.setDerivedMetricsList = function(value) {
2464
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
2465
+ };
2466
+
2467
+
2468
+ /**
2469
+ * @param {!proto.gateway.web.v1.DerivedMetric=} opt_value
2470
+ * @param {number=} opt_index
2471
+ * @return {!proto.gateway.web.v1.DerivedMetric}
2472
+ */
2473
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.addDerivedMetrics = function(opt_value, opt_index) {
2474
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.DerivedMetric, opt_index);
2475
+ };
2476
+
2477
+
2478
+ /**
2479
+ * Clears the list making it empty but non-null.
2480
+ * @return {!proto.gateway.web.v1.ListDerivedMetricsResponse} returns this
2481
+ */
2482
+ proto.gateway.web.v1.ListDerivedMetricsResponse.prototype.clearDerivedMetricsList = function() {
2483
+ return this.setDerivedMetricsList([]);
2484
+ };
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2491
+ /**
2492
+ * Creates an object representation of this proto.
2493
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2494
+ * Optional fields that are not set will be set to undefined.
2495
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2496
+ * For the list of reserved names please see:
2497
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2498
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2499
+ * JSPB instance for transitional soy proto support:
2500
+ * http://goto/soy-param-migration
2501
+ * @return {!Object}
2502
+ */
2503
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.toObject = function(opt_includeInstance) {
2504
+ return proto.gateway.web.v1.UpdateDerivedMetricRequest.toObject(opt_includeInstance, this);
2505
+ };
2506
+
2507
+
2508
+ /**
2509
+ * Static version of the {@see toObject} method.
2510
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2511
+ * the JSPB instance for transitional soy proto support:
2512
+ * http://goto/soy-param-migration
2513
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricRequest} msg The msg instance to transform.
2514
+ * @return {!Object}
2515
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2516
+ */
2517
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.toObject = function(includeInstance, msg) {
2518
+ var f, obj = {
2519
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2520
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2521
+ derivedMetricId: jspb.Message.getFieldWithDefault(msg, 3, ""),
2522
+ updates: (f = msg.getUpdates()) && proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.toObject(includeInstance, f)
2523
+ };
2524
+
2525
+ if (includeInstance) {
2526
+ obj.$jspbMessageInstance = msg;
2527
+ }
2528
+ return obj;
2529
+ };
2530
+ }
2531
+
2532
+
2533
+ /**
2534
+ * Deserializes binary data (in protobuf wire format).
2535
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2536
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest}
2537
+ */
2538
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.deserializeBinary = function(bytes) {
2539
+ var reader = new jspb.BinaryReader(bytes);
2540
+ var msg = new proto.gateway.web.v1.UpdateDerivedMetricRequest;
2541
+ return proto.gateway.web.v1.UpdateDerivedMetricRequest.deserializeBinaryFromReader(msg, reader);
2542
+ };
2543
+
2544
+
2545
+ /**
2546
+ * Deserializes binary data (in protobuf wire format) from the
2547
+ * given reader into the given message object.
2548
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricRequest} msg The message object to deserialize into.
2549
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2550
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest}
2551
+ */
2552
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.deserializeBinaryFromReader = function(msg, reader) {
2553
+ while (reader.nextField()) {
2554
+ if (reader.isEndGroup()) {
2555
+ break;
2556
+ }
2557
+ var field = reader.getFieldNumber();
2558
+ switch (field) {
2559
+ case 1:
2560
+ var value = /** @type {string} */ (reader.readString());
2561
+ msg.setOrganizationId(value);
2562
+ break;
2563
+ case 2:
2564
+ var value = /** @type {string} */ (reader.readString());
2565
+ msg.setProjectId(value);
2566
+ break;
2567
+ case 3:
2568
+ var value = /** @type {string} */ (reader.readString());
2569
+ msg.setDerivedMetricId(value);
2570
+ break;
2571
+ case 4:
2572
+ var value = new proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates;
2573
+ reader.readMessage(value,proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.deserializeBinaryFromReader);
2574
+ msg.setUpdates(value);
2575
+ break;
2576
+ default:
2577
+ reader.skipField();
2578
+ break;
2579
+ }
2580
+ }
2581
+ return msg;
2582
+ };
2583
+
2584
+
2585
+ /**
2586
+ * Serializes the message to binary data (in protobuf wire format).
2587
+ * @return {!Uint8Array}
2588
+ */
2589
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.serializeBinary = function() {
2590
+ var writer = new jspb.BinaryWriter();
2591
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.serializeBinaryToWriter(this, writer);
2592
+ return writer.getResultBuffer();
2593
+ };
2594
+
2595
+
2596
+ /**
2597
+ * Serializes the given message to binary data (in protobuf wire
2598
+ * format), writing to the given BinaryWriter.
2599
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricRequest} message
2600
+ * @param {!jspb.BinaryWriter} writer
2601
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2602
+ */
2603
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.serializeBinaryToWriter = function(message, writer) {
2604
+ var f = undefined;
2605
+ f = message.getOrganizationId();
2606
+ if (f.length > 0) {
2607
+ writer.writeString(
2608
+ 1,
2609
+ f
2610
+ );
2611
+ }
2612
+ f = message.getProjectId();
2613
+ if (f.length > 0) {
2614
+ writer.writeString(
2615
+ 2,
2616
+ f
2617
+ );
2618
+ }
2619
+ f = message.getDerivedMetricId();
2620
+ if (f.length > 0) {
2621
+ writer.writeString(
2622
+ 3,
2623
+ f
2624
+ );
2625
+ }
2626
+ f = message.getUpdates();
2627
+ if (f != null) {
2628
+ writer.writeMessage(
2629
+ 4,
2630
+ f,
2631
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.serializeBinaryToWriter
2632
+ );
2633
+ }
2634
+ };
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2641
+ /**
2642
+ * Creates an object representation of this proto.
2643
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2644
+ * Optional fields that are not set will be set to undefined.
2645
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2646
+ * For the list of reserved names please see:
2647
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2648
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2649
+ * JSPB instance for transitional soy proto support:
2650
+ * http://goto/soy-param-migration
2651
+ * @return {!Object}
2652
+ */
2653
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.toObject = function(opt_includeInstance) {
2654
+ return proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.toObject(opt_includeInstance, this);
2655
+ };
2656
+
2657
+
2658
+ /**
2659
+ * Static version of the {@see toObject} method.
2660
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2661
+ * the JSPB instance for transitional soy proto support:
2662
+ * http://goto/soy-param-migration
2663
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} msg The msg instance to transform.
2664
+ * @return {!Object}
2665
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2666
+ */
2667
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.toObject = function(includeInstance, msg) {
2668
+ var f, obj = {
2669
+ displayName: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
2670
+ description: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
2671
+ enabled: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f
2672
+ };
2673
+
2674
+ if (includeInstance) {
2675
+ obj.$jspbMessageInstance = msg;
2676
+ }
2677
+ return obj;
2678
+ };
2679
+ }
2680
+
2681
+
2682
+ /**
2683
+ * Deserializes binary data (in protobuf wire format).
2684
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2685
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates}
2686
+ */
2687
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.deserializeBinary = function(bytes) {
2688
+ var reader = new jspb.BinaryReader(bytes);
2689
+ var msg = new proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates;
2690
+ return proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.deserializeBinaryFromReader(msg, reader);
2691
+ };
2692
+
2693
+
2694
+ /**
2695
+ * Deserializes binary data (in protobuf wire format) from the
2696
+ * given reader into the given message object.
2697
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} msg The message object to deserialize into.
2698
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2699
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates}
2700
+ */
2701
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.deserializeBinaryFromReader = function(msg, reader) {
2702
+ while (reader.nextField()) {
2703
+ if (reader.isEndGroup()) {
2704
+ break;
2705
+ }
2706
+ var field = reader.getFieldNumber();
2707
+ switch (field) {
2708
+ case 1:
2709
+ var value = /** @type {string} */ (reader.readString());
2710
+ msg.setDisplayName(value);
2711
+ break;
2712
+ case 2:
2713
+ var value = /** @type {string} */ (reader.readString());
2714
+ msg.setDescription(value);
2715
+ break;
2716
+ case 3:
2717
+ var value = /** @type {boolean} */ (reader.readBool());
2718
+ msg.setEnabled(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.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.serializeBinary = function() {
2734
+ var writer = new jspb.BinaryWriter();
2735
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.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.UpdateDerivedMetricRequest.DerivedMetricUpdates} message
2744
+ * @param {!jspb.BinaryWriter} writer
2745
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2746
+ */
2747
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.serializeBinaryToWriter = function(message, writer) {
2748
+ var f = undefined;
2749
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
2750
+ if (f != null) {
2751
+ writer.writeString(
2752
+ 1,
2753
+ f
2754
+ );
2755
+ }
2756
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
2757
+ if (f != null) {
2758
+ writer.writeString(
2759
+ 2,
2760
+ f
2761
+ );
2762
+ }
2763
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
2764
+ if (f != null) {
2765
+ writer.writeBool(
2766
+ 3,
2767
+ f
2768
+ );
2769
+ }
2770
+ };
2771
+
2772
+
2773
+ /**
2774
+ * optional string display_name = 1;
2775
+ * @return {string}
2776
+ */
2777
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.getDisplayName = function() {
2778
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2779
+ };
2780
+
2781
+
2782
+ /**
2783
+ * @param {string} value
2784
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2785
+ */
2786
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.setDisplayName = function(value) {
2787
+ return jspb.Message.setField(this, 1, value);
2788
+ };
2789
+
2790
+
2791
+ /**
2792
+ * Clears the field making it undefined.
2793
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2794
+ */
2795
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.clearDisplayName = function() {
2796
+ return jspb.Message.setField(this, 1, undefined);
2797
+ };
2798
+
2799
+
2800
+ /**
2801
+ * Returns whether this field is set.
2802
+ * @return {boolean}
2803
+ */
2804
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.hasDisplayName = function() {
2805
+ return jspb.Message.getField(this, 1) != null;
2806
+ };
2807
+
2808
+
2809
+ /**
2810
+ * optional string description = 2;
2811
+ * @return {string}
2812
+ */
2813
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.getDescription = function() {
2814
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2815
+ };
2816
+
2817
+
2818
+ /**
2819
+ * @param {string} value
2820
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2821
+ */
2822
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.setDescription = function(value) {
2823
+ return jspb.Message.setField(this, 2, value);
2824
+ };
2825
+
2826
+
2827
+ /**
2828
+ * Clears the field making it undefined.
2829
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2830
+ */
2831
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.clearDescription = function() {
2832
+ return jspb.Message.setField(this, 2, undefined);
2833
+ };
2834
+
2835
+
2836
+ /**
2837
+ * Returns whether this field is set.
2838
+ * @return {boolean}
2839
+ */
2840
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.hasDescription = function() {
2841
+ return jspb.Message.getField(this, 2) != null;
2842
+ };
2843
+
2844
+
2845
+ /**
2846
+ * optional bool enabled = 3;
2847
+ * @return {boolean}
2848
+ */
2849
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.getEnabled = function() {
2850
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
2851
+ };
2852
+
2853
+
2854
+ /**
2855
+ * @param {boolean} value
2856
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2857
+ */
2858
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.setEnabled = function(value) {
2859
+ return jspb.Message.setField(this, 3, value);
2860
+ };
2861
+
2862
+
2863
+ /**
2864
+ * Clears the field making it undefined.
2865
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
2866
+ */
2867
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.clearEnabled = function() {
2868
+ return jspb.Message.setField(this, 3, undefined);
2869
+ };
2870
+
2871
+
2872
+ /**
2873
+ * Returns whether this field is set.
2874
+ * @return {boolean}
2875
+ */
2876
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.hasEnabled = function() {
2877
+ return jspb.Message.getField(this, 3) != null;
2878
+ };
2879
+
2880
+
2881
+ /**
2882
+ * optional string organization_id = 1;
2883
+ * @return {string}
2884
+ */
2885
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.getOrganizationId = function() {
2886
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2887
+ };
2888
+
2889
+
2890
+ /**
2891
+ * @param {string} value
2892
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest} returns this
2893
+ */
2894
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.setOrganizationId = function(value) {
2895
+ return jspb.Message.setProto3StringField(this, 1, value);
2896
+ };
2897
+
2898
+
2899
+ /**
2900
+ * optional string project_id = 2;
2901
+ * @return {string}
2902
+ */
2903
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.getProjectId = function() {
2904
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2905
+ };
2906
+
2907
+
2908
+ /**
2909
+ * @param {string} value
2910
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest} returns this
2911
+ */
2912
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.setProjectId = function(value) {
2913
+ return jspb.Message.setProto3StringField(this, 2, value);
2914
+ };
2915
+
2916
+
2917
+ /**
2918
+ * optional string derived_metric_id = 3;
2919
+ * @return {string}
2920
+ */
2921
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.getDerivedMetricId = function() {
2922
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2923
+ };
2924
+
2925
+
2926
+ /**
2927
+ * @param {string} value
2928
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest} returns this
2929
+ */
2930
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.setDerivedMetricId = function(value) {
2931
+ return jspb.Message.setProto3StringField(this, 3, value);
2932
+ };
2933
+
2934
+
2935
+ /**
2936
+ * optional DerivedMetricUpdates updates = 4;
2937
+ * @return {?proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates}
2938
+ */
2939
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.getUpdates = function() {
2940
+ return /** @type{?proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} */ (
2941
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates, 4));
2942
+ };
2943
+
2944
+
2945
+ /**
2946
+ * @param {?proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates|undefined} value
2947
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest} returns this
2948
+ */
2949
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.setUpdates = function(value) {
2950
+ return jspb.Message.setWrapperField(this, 4, value);
2951
+ };
2952
+
2953
+
2954
+ /**
2955
+ * Clears the message field making it undefined.
2956
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest} returns this
2957
+ */
2958
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.clearUpdates = function() {
2959
+ return this.setUpdates(undefined);
2960
+ };
2961
+
2962
+
2963
+ /**
2964
+ * Returns whether this field is set.
2965
+ * @return {boolean}
2966
+ */
2967
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.prototype.hasUpdates = function() {
2968
+ return jspb.Message.getField(this, 4) != null;
2969
+ };
2970
+
2971
+
2972
+
2973
+
2974
+
2975
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2976
+ /**
2977
+ * Creates an object representation of this proto.
2978
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2979
+ * Optional fields that are not set will be set to undefined.
2980
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2981
+ * For the list of reserved names please see:
2982
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2983
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2984
+ * JSPB instance for transitional soy proto support:
2985
+ * http://goto/soy-param-migration
2986
+ * @return {!Object}
2987
+ */
2988
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.toObject = function(opt_includeInstance) {
2989
+ return proto.gateway.web.v1.UpdateDerivedMetricResponse.toObject(opt_includeInstance, this);
2990
+ };
2991
+
2992
+
2993
+ /**
2994
+ * Static version of the {@see toObject} method.
2995
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2996
+ * the JSPB instance for transitional soy proto support:
2997
+ * http://goto/soy-param-migration
2998
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricResponse} msg The msg instance to transform.
2999
+ * @return {!Object}
3000
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3001
+ */
3002
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.toObject = function(includeInstance, msg) {
3003
+ var f, obj = {
3004
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
3005
+ derivedMetric: (f = msg.getDerivedMetric()) && proto.gateway.web.v1.DerivedMetric.toObject(includeInstance, f)
3006
+ };
3007
+
3008
+ if (includeInstance) {
3009
+ obj.$jspbMessageInstance = msg;
3010
+ }
3011
+ return obj;
3012
+ };
3013
+ }
3014
+
3015
+
3016
+ /**
3017
+ * Deserializes binary data (in protobuf wire format).
3018
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3019
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse}
3020
+ */
3021
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.deserializeBinary = function(bytes) {
3022
+ var reader = new jspb.BinaryReader(bytes);
3023
+ var msg = new proto.gateway.web.v1.UpdateDerivedMetricResponse;
3024
+ return proto.gateway.web.v1.UpdateDerivedMetricResponse.deserializeBinaryFromReader(msg, reader);
3025
+ };
3026
+
3027
+
3028
+ /**
3029
+ * Deserializes binary data (in protobuf wire format) from the
3030
+ * given reader into the given message object.
3031
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricResponse} msg The message object to deserialize into.
3032
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3033
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse}
3034
+ */
3035
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.deserializeBinaryFromReader = function(msg, reader) {
3036
+ while (reader.nextField()) {
3037
+ if (reader.isEndGroup()) {
3038
+ break;
3039
+ }
3040
+ var field = reader.getFieldNumber();
3041
+ switch (field) {
3042
+ case 1:
3043
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
3044
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3045
+ msg.setStatus(value);
3046
+ break;
3047
+ case 2:
3048
+ var value = new proto.gateway.web.v1.DerivedMetric;
3049
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader);
3050
+ msg.setDerivedMetric(value);
3051
+ break;
3052
+ default:
3053
+ reader.skipField();
3054
+ break;
3055
+ }
3056
+ }
3057
+ return msg;
3058
+ };
3059
+
3060
+
3061
+ /**
3062
+ * Serializes the message to binary data (in protobuf wire format).
3063
+ * @return {!Uint8Array}
3064
+ */
3065
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.serializeBinary = function() {
3066
+ var writer = new jspb.BinaryWriter();
3067
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.serializeBinaryToWriter(this, writer);
3068
+ return writer.getResultBuffer();
3069
+ };
3070
+
3071
+
3072
+ /**
3073
+ * Serializes the given message to binary data (in protobuf wire
3074
+ * format), writing to the given BinaryWriter.
3075
+ * @param {!proto.gateway.web.v1.UpdateDerivedMetricResponse} message
3076
+ * @param {!jspb.BinaryWriter} writer
3077
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3078
+ */
3079
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.serializeBinaryToWriter = function(message, writer) {
3080
+ var f = undefined;
3081
+ f = message.getStatus();
3082
+ if (f != null) {
3083
+ writer.writeMessage(
3084
+ 1,
3085
+ f,
3086
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3087
+ );
3088
+ }
3089
+ f = message.getDerivedMetric();
3090
+ if (f != null) {
3091
+ writer.writeMessage(
3092
+ 2,
3093
+ f,
3094
+ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter
3095
+ );
3096
+ }
3097
+ };
3098
+
3099
+
3100
+ /**
3101
+ * optional gateway.common.v1.ResponseStatus status = 1;
3102
+ * @return {?proto.gateway.common.v1.ResponseStatus}
3103
+ */
3104
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.getStatus = function() {
3105
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
3106
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
3107
+ };
3108
+
3109
+
3110
+ /**
3111
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
3112
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse} returns this
3113
+ */
3114
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.setStatus = function(value) {
3115
+ return jspb.Message.setWrapperField(this, 1, value);
3116
+ };
3117
+
3118
+
3119
+ /**
3120
+ * Clears the message field making it undefined.
3121
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse} returns this
3122
+ */
3123
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.clearStatus = function() {
3124
+ return this.setStatus(undefined);
3125
+ };
3126
+
3127
+
3128
+ /**
3129
+ * Returns whether this field is set.
3130
+ * @return {boolean}
3131
+ */
3132
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.hasStatus = function() {
3133
+ return jspb.Message.getField(this, 1) != null;
3134
+ };
3135
+
3136
+
3137
+ /**
3138
+ * optional DerivedMetric derived_metric = 2;
3139
+ * @return {?proto.gateway.web.v1.DerivedMetric}
3140
+ */
3141
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.getDerivedMetric = function() {
3142
+ return /** @type{?proto.gateway.web.v1.DerivedMetric} */ (
3143
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetric, 2));
3144
+ };
3145
+
3146
+
3147
+ /**
3148
+ * @param {?proto.gateway.web.v1.DerivedMetric|undefined} value
3149
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse} returns this
3150
+ */
3151
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.setDerivedMetric = function(value) {
3152
+ return jspb.Message.setWrapperField(this, 2, value);
3153
+ };
3154
+
3155
+
3156
+ /**
3157
+ * Clears the message field making it undefined.
3158
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricResponse} returns this
3159
+ */
3160
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.clearDerivedMetric = function() {
3161
+ return this.setDerivedMetric(undefined);
3162
+ };
3163
+
3164
+
3165
+ /**
3166
+ * Returns whether this field is set.
3167
+ * @return {boolean}
3168
+ */
3169
+ proto.gateway.web.v1.UpdateDerivedMetricResponse.prototype.hasDerivedMetric = function() {
3170
+ return jspb.Message.getField(this, 2) != null;
3171
+ };
3172
+
3173
+
3174
+
3175
+
3176
+
3177
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3178
+ /**
3179
+ * Creates an object representation of this proto.
3180
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3181
+ * Optional fields that are not set will be set to undefined.
3182
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3183
+ * For the list of reserved names please see:
3184
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3185
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3186
+ * JSPB instance for transitional soy proto support:
3187
+ * http://goto/soy-param-migration
3188
+ * @return {!Object}
3189
+ */
3190
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.toObject = function(opt_includeInstance) {
3191
+ return proto.gateway.web.v1.DeleteDerivedMetricRequest.toObject(opt_includeInstance, this);
3192
+ };
3193
+
3194
+
3195
+ /**
3196
+ * Static version of the {@see toObject} method.
3197
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3198
+ * the JSPB instance for transitional soy proto support:
3199
+ * http://goto/soy-param-migration
3200
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricRequest} msg The msg instance to transform.
3201
+ * @return {!Object}
3202
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3203
+ */
3204
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.toObject = function(includeInstance, msg) {
3205
+ var f, obj = {
3206
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3207
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3208
+ derivedMetricId: jspb.Message.getFieldWithDefault(msg, 3, "")
3209
+ };
3210
+
3211
+ if (includeInstance) {
3212
+ obj.$jspbMessageInstance = msg;
3213
+ }
3214
+ return obj;
3215
+ };
3216
+ }
3217
+
3218
+
3219
+ /**
3220
+ * Deserializes binary data (in protobuf wire format).
3221
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3222
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricRequest}
3223
+ */
3224
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.deserializeBinary = function(bytes) {
3225
+ var reader = new jspb.BinaryReader(bytes);
3226
+ var msg = new proto.gateway.web.v1.DeleteDerivedMetricRequest;
3227
+ return proto.gateway.web.v1.DeleteDerivedMetricRequest.deserializeBinaryFromReader(msg, reader);
3228
+ };
3229
+
3230
+
3231
+ /**
3232
+ * Deserializes binary data (in protobuf wire format) from the
3233
+ * given reader into the given message object.
3234
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricRequest} msg The message object to deserialize into.
3235
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3236
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricRequest}
3237
+ */
3238
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.deserializeBinaryFromReader = function(msg, reader) {
3239
+ while (reader.nextField()) {
3240
+ if (reader.isEndGroup()) {
3241
+ break;
3242
+ }
3243
+ var field = reader.getFieldNumber();
3244
+ switch (field) {
3245
+ case 1:
3246
+ var value = /** @type {string} */ (reader.readString());
3247
+ msg.setOrganizationId(value);
3248
+ break;
3249
+ case 2:
3250
+ var value = /** @type {string} */ (reader.readString());
3251
+ msg.setProjectId(value);
3252
+ break;
3253
+ case 3:
3254
+ var value = /** @type {string} */ (reader.readString());
3255
+ msg.setDerivedMetricId(value);
3256
+ break;
3257
+ default:
3258
+ reader.skipField();
3259
+ break;
3260
+ }
3261
+ }
3262
+ return msg;
3263
+ };
3264
+
3265
+
3266
+ /**
3267
+ * Serializes the message to binary data (in protobuf wire format).
3268
+ * @return {!Uint8Array}
3269
+ */
3270
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.serializeBinary = function() {
3271
+ var writer = new jspb.BinaryWriter();
3272
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.serializeBinaryToWriter(this, writer);
3273
+ return writer.getResultBuffer();
3274
+ };
3275
+
3276
+
3277
+ /**
3278
+ * Serializes the given message to binary data (in protobuf wire
3279
+ * format), writing to the given BinaryWriter.
3280
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricRequest} message
3281
+ * @param {!jspb.BinaryWriter} writer
3282
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3283
+ */
3284
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.serializeBinaryToWriter = function(message, writer) {
3285
+ var f = undefined;
3286
+ f = message.getOrganizationId();
3287
+ if (f.length > 0) {
3288
+ writer.writeString(
3289
+ 1,
3290
+ f
3291
+ );
3292
+ }
3293
+ f = message.getProjectId();
3294
+ if (f.length > 0) {
3295
+ writer.writeString(
3296
+ 2,
3297
+ f
3298
+ );
3299
+ }
3300
+ f = message.getDerivedMetricId();
3301
+ if (f.length > 0) {
3302
+ writer.writeString(
3303
+ 3,
3304
+ f
3305
+ );
3306
+ }
3307
+ };
3308
+
3309
+
3310
+ /**
3311
+ * optional string organization_id = 1;
3312
+ * @return {string}
3313
+ */
3314
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.getOrganizationId = function() {
3315
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3316
+ };
3317
+
3318
+
3319
+ /**
3320
+ * @param {string} value
3321
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricRequest} returns this
3322
+ */
3323
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.setOrganizationId = function(value) {
3324
+ return jspb.Message.setProto3StringField(this, 1, value);
3325
+ };
3326
+
3327
+
3328
+ /**
3329
+ * optional string project_id = 2;
3330
+ * @return {string}
3331
+ */
3332
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.getProjectId = function() {
3333
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3334
+ };
3335
+
3336
+
3337
+ /**
3338
+ * @param {string} value
3339
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricRequest} returns this
3340
+ */
3341
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.setProjectId = function(value) {
3342
+ return jspb.Message.setProto3StringField(this, 2, value);
3343
+ };
3344
+
3345
+
3346
+ /**
3347
+ * optional string derived_metric_id = 3;
3348
+ * @return {string}
3349
+ */
3350
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.getDerivedMetricId = function() {
3351
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3352
+ };
3353
+
3354
+
3355
+ /**
3356
+ * @param {string} value
3357
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricRequest} returns this
3358
+ */
3359
+ proto.gateway.web.v1.DeleteDerivedMetricRequest.prototype.setDerivedMetricId = function(value) {
3360
+ return jspb.Message.setProto3StringField(this, 3, value);
3361
+ };
3362
+
3363
+
3364
+
3365
+
3366
+
3367
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3368
+ /**
3369
+ * Creates an object representation of this proto.
3370
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3371
+ * Optional fields that are not set will be set to undefined.
3372
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3373
+ * For the list of reserved names please see:
3374
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3375
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3376
+ * JSPB instance for transitional soy proto support:
3377
+ * http://goto/soy-param-migration
3378
+ * @return {!Object}
3379
+ */
3380
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.toObject = function(opt_includeInstance) {
3381
+ return proto.gateway.web.v1.DeleteDerivedMetricResponse.toObject(opt_includeInstance, this);
3382
+ };
3383
+
3384
+
3385
+ /**
3386
+ * Static version of the {@see toObject} method.
3387
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3388
+ * the JSPB instance for transitional soy proto support:
3389
+ * http://goto/soy-param-migration
3390
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricResponse} msg The msg instance to transform.
3391
+ * @return {!Object}
3392
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3393
+ */
3394
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.toObject = function(includeInstance, msg) {
3395
+ var f, obj = {
3396
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
3397
+ };
3398
+
3399
+ if (includeInstance) {
3400
+ obj.$jspbMessageInstance = msg;
3401
+ }
3402
+ return obj;
3403
+ };
3404
+ }
3405
+
3406
+
3407
+ /**
3408
+ * Deserializes binary data (in protobuf wire format).
3409
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3410
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricResponse}
3411
+ */
3412
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.deserializeBinary = function(bytes) {
3413
+ var reader = new jspb.BinaryReader(bytes);
3414
+ var msg = new proto.gateway.web.v1.DeleteDerivedMetricResponse;
3415
+ return proto.gateway.web.v1.DeleteDerivedMetricResponse.deserializeBinaryFromReader(msg, reader);
3416
+ };
3417
+
3418
+
3419
+ /**
3420
+ * Deserializes binary data (in protobuf wire format) from the
3421
+ * given reader into the given message object.
3422
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricResponse} msg The message object to deserialize into.
3423
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3424
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricResponse}
3425
+ */
3426
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.deserializeBinaryFromReader = function(msg, reader) {
3427
+ while (reader.nextField()) {
3428
+ if (reader.isEndGroup()) {
3429
+ break;
3430
+ }
3431
+ var field = reader.getFieldNumber();
3432
+ switch (field) {
3433
+ case 1:
3434
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
3435
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3436
+ msg.setStatus(value);
3437
+ break;
3438
+ default:
3439
+ reader.skipField();
3440
+ break;
3441
+ }
3442
+ }
3443
+ return msg;
3444
+ };
3445
+
3446
+
3447
+ /**
3448
+ * Serializes the message to binary data (in protobuf wire format).
3449
+ * @return {!Uint8Array}
3450
+ */
3451
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.serializeBinary = function() {
3452
+ var writer = new jspb.BinaryWriter();
3453
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.serializeBinaryToWriter(this, writer);
3454
+ return writer.getResultBuffer();
3455
+ };
3456
+
3457
+
3458
+ /**
3459
+ * Serializes the given message to binary data (in protobuf wire
3460
+ * format), writing to the given BinaryWriter.
3461
+ * @param {!proto.gateway.web.v1.DeleteDerivedMetricResponse} message
3462
+ * @param {!jspb.BinaryWriter} writer
3463
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3464
+ */
3465
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.serializeBinaryToWriter = function(message, writer) {
3466
+ var f = undefined;
3467
+ f = message.getStatus();
3468
+ if (f != null) {
3469
+ writer.writeMessage(
3470
+ 1,
3471
+ f,
3472
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3473
+ );
3474
+ }
3475
+ };
3476
+
3477
+
3478
+ /**
3479
+ * optional gateway.common.v1.ResponseStatus status = 1;
3480
+ * @return {?proto.gateway.common.v1.ResponseStatus}
3481
+ */
3482
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.getStatus = function() {
3483
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
3484
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
3485
+ };
3486
+
3487
+
3488
+ /**
3489
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
3490
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricResponse} returns this
3491
+ */
3492
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.setStatus = function(value) {
3493
+ return jspb.Message.setWrapperField(this, 1, value);
3494
+ };
3495
+
3496
+
3497
+ /**
3498
+ * Clears the message field making it undefined.
3499
+ * @return {!proto.gateway.web.v1.DeleteDerivedMetricResponse} returns this
3500
+ */
3501
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.clearStatus = function() {
3502
+ return this.setStatus(undefined);
3503
+ };
3504
+
3505
+
3506
+ /**
3507
+ * Returns whether this field is set.
3508
+ * @return {boolean}
3509
+ */
3510
+ proto.gateway.web.v1.DeleteDerivedMetricResponse.prototype.hasStatus = function() {
3511
+ return jspb.Message.getField(this, 1) != null;
3512
+ };
3513
+
3514
+
3515
+
3516
+
3517
+
3518
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3519
+ /**
3520
+ * Creates an object representation of this proto.
3521
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3522
+ * Optional fields that are not set will be set to undefined.
3523
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3524
+ * For the list of reserved names please see:
3525
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3526
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3527
+ * JSPB instance for transitional soy proto support:
3528
+ * http://goto/soy-param-migration
3529
+ * @return {!Object}
3530
+ */
3531
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.toObject = function(opt_includeInstance) {
3532
+ return proto.gateway.web.v1.DryRunDerivedMetricRequest.toObject(opt_includeInstance, this);
3533
+ };
3534
+
3535
+
3536
+ /**
3537
+ * Static version of the {@see toObject} method.
3538
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3539
+ * the JSPB instance for transitional soy proto support:
3540
+ * http://goto/soy-param-migration
3541
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricRequest} msg The msg instance to transform.
3542
+ * @return {!Object}
3543
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3544
+ */
3545
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.toObject = function(includeInstance, msg) {
3546
+ var f, obj = {
3547
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3548
+ projectId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3549
+ program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
3550
+ traceLimit: jspb.Message.getFieldWithDefault(msg, 4, 0)
3551
+ };
3552
+
3553
+ if (includeInstance) {
3554
+ obj.$jspbMessageInstance = msg;
3555
+ }
3556
+ return obj;
3557
+ };
3558
+ }
3559
+
3560
+
3561
+ /**
3562
+ * Deserializes binary data (in protobuf wire format).
3563
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3564
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest}
3565
+ */
3566
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.deserializeBinary = function(bytes) {
3567
+ var reader = new jspb.BinaryReader(bytes);
3568
+ var msg = new proto.gateway.web.v1.DryRunDerivedMetricRequest;
3569
+ return proto.gateway.web.v1.DryRunDerivedMetricRequest.deserializeBinaryFromReader(msg, reader);
3570
+ };
3571
+
3572
+
3573
+ /**
3574
+ * Deserializes binary data (in protobuf wire format) from the
3575
+ * given reader into the given message object.
3576
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricRequest} msg The message object to deserialize into.
3577
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3578
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest}
3579
+ */
3580
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.deserializeBinaryFromReader = function(msg, reader) {
3581
+ while (reader.nextField()) {
3582
+ if (reader.isEndGroup()) {
3583
+ break;
3584
+ }
3585
+ var field = reader.getFieldNumber();
3586
+ switch (field) {
3587
+ case 1:
3588
+ var value = /** @type {string} */ (reader.readString());
3589
+ msg.setOrganizationId(value);
3590
+ break;
3591
+ case 2:
3592
+ var value = /** @type {string} */ (reader.readString());
3593
+ msg.setProjectId(value);
3594
+ break;
3595
+ case 3:
3596
+ var value = new proto.gateway.web.v1.DerivedMetricProgram;
3597
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader);
3598
+ msg.setProgram(value);
3599
+ break;
3600
+ case 4:
3601
+ var value = /** @type {number} */ (reader.readInt32());
3602
+ msg.setTraceLimit(value);
3603
+ break;
3604
+ default:
3605
+ reader.skipField();
3606
+ break;
3607
+ }
3608
+ }
3609
+ return msg;
3610
+ };
3611
+
3612
+
3613
+ /**
3614
+ * Serializes the message to binary data (in protobuf wire format).
3615
+ * @return {!Uint8Array}
3616
+ */
3617
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.serializeBinary = function() {
3618
+ var writer = new jspb.BinaryWriter();
3619
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.serializeBinaryToWriter(this, writer);
3620
+ return writer.getResultBuffer();
3621
+ };
3622
+
3623
+
3624
+ /**
3625
+ * Serializes the given message to binary data (in protobuf wire
3626
+ * format), writing to the given BinaryWriter.
3627
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricRequest} message
3628
+ * @param {!jspb.BinaryWriter} writer
3629
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3630
+ */
3631
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.serializeBinaryToWriter = function(message, writer) {
3632
+ var f = undefined;
3633
+ f = message.getOrganizationId();
3634
+ if (f.length > 0) {
3635
+ writer.writeString(
3636
+ 1,
3637
+ f
3638
+ );
3639
+ }
3640
+ f = message.getProjectId();
3641
+ if (f.length > 0) {
3642
+ writer.writeString(
3643
+ 2,
3644
+ f
3645
+ );
3646
+ }
3647
+ f = message.getProgram();
3648
+ if (f != null) {
3649
+ writer.writeMessage(
3650
+ 3,
3651
+ f,
3652
+ proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter
3653
+ );
3654
+ }
3655
+ f = message.getTraceLimit();
3656
+ if (f !== 0) {
3657
+ writer.writeInt32(
3658
+ 4,
3659
+ f
3660
+ );
3661
+ }
3662
+ };
3663
+
3664
+
3665
+ /**
3666
+ * optional string organization_id = 1;
3667
+ * @return {string}
3668
+ */
3669
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.getOrganizationId = function() {
3670
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3671
+ };
3672
+
3673
+
3674
+ /**
3675
+ * @param {string} value
3676
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest} returns this
3677
+ */
3678
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.setOrganizationId = function(value) {
3679
+ return jspb.Message.setProto3StringField(this, 1, value);
3680
+ };
3681
+
3682
+
3683
+ /**
3684
+ * optional string project_id = 2;
3685
+ * @return {string}
3686
+ */
3687
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.getProjectId = function() {
3688
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3689
+ };
3690
+
3691
+
3692
+ /**
3693
+ * @param {string} value
3694
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest} returns this
3695
+ */
3696
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.setProjectId = function(value) {
3697
+ return jspb.Message.setProto3StringField(this, 2, value);
3698
+ };
3699
+
3700
+
3701
+ /**
3702
+ * optional DerivedMetricProgram program = 3;
3703
+ * @return {?proto.gateway.web.v1.DerivedMetricProgram}
3704
+ */
3705
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.getProgram = function() {
3706
+ return /** @type{?proto.gateway.web.v1.DerivedMetricProgram} */ (
3707
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DerivedMetricProgram, 3));
3708
+ };
3709
+
3710
+
3711
+ /**
3712
+ * @param {?proto.gateway.web.v1.DerivedMetricProgram|undefined} value
3713
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest} returns this
3714
+ */
3715
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.setProgram = function(value) {
3716
+ return jspb.Message.setWrapperField(this, 3, value);
3717
+ };
3718
+
3719
+
3720
+ /**
3721
+ * Clears the message field making it undefined.
3722
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest} returns this
3723
+ */
3724
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.clearProgram = function() {
3725
+ return this.setProgram(undefined);
3726
+ };
3727
+
3728
+
3729
+ /**
3730
+ * Returns whether this field is set.
3731
+ * @return {boolean}
3732
+ */
3733
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.hasProgram = function() {
3734
+ return jspb.Message.getField(this, 3) != null;
3735
+ };
3736
+
3737
+
3738
+ /**
3739
+ * optional int32 trace_limit = 4;
3740
+ * @return {number}
3741
+ */
3742
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.getTraceLimit = function() {
3743
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
3744
+ };
3745
+
3746
+
3747
+ /**
3748
+ * @param {number} value
3749
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricRequest} returns this
3750
+ */
3751
+ proto.gateway.web.v1.DryRunDerivedMetricRequest.prototype.setTraceLimit = function(value) {
3752
+ return jspb.Message.setProto3IntField(this, 4, value);
3753
+ };
3754
+
3755
+
3756
+
3757
+ /**
3758
+ * List of repeated fields within this message type.
3759
+ * @private {!Array<number>}
3760
+ * @const
3761
+ */
3762
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.repeatedFields_ = [2,3];
3763
+
3764
+
3765
+
3766
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3767
+ /**
3768
+ * Creates an object representation of this proto.
3769
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3770
+ * Optional fields that are not set will be set to undefined.
3771
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3772
+ * For the list of reserved names please see:
3773
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3774
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3775
+ * JSPB instance for transitional soy proto support:
3776
+ * http://goto/soy-param-migration
3777
+ * @return {!Object}
3778
+ */
3779
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.toObject = function(opt_includeInstance) {
3780
+ return proto.gateway.web.v1.DryRunDerivedMetricResponse.toObject(opt_includeInstance, this);
3781
+ };
3782
+
3783
+
3784
+ /**
3785
+ * Static version of the {@see toObject} method.
3786
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3787
+ * the JSPB instance for transitional soy proto support:
3788
+ * http://goto/soy-param-migration
3789
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricResponse} msg The msg instance to transform.
3790
+ * @return {!Object}
3791
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3792
+ */
3793
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.toObject = function(includeInstance, msg) {
3794
+ var f, obj = {
3795
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
3796
+ traceResultsList: jspb.Message.toObjectList(msg.getTraceResultsList(),
3797
+ proto.gateway.web.v1.DryRunTraceResult.toObject, includeInstance),
3798
+ outcomeCountsList: jspb.Message.toObjectList(msg.getOutcomeCountsList(),
3799
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.toObject, includeInstance),
3800
+ tracesSelected: jspb.Message.getFieldWithDefault(msg, 4, 0)
3801
+ };
3802
+
3803
+ if (includeInstance) {
3804
+ obj.$jspbMessageInstance = msg;
3805
+ }
3806
+ return obj;
3807
+ };
3808
+ }
3809
+
3810
+
3811
+ /**
3812
+ * Deserializes binary data (in protobuf wire format).
3813
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3814
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse}
3815
+ */
3816
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.deserializeBinary = function(bytes) {
3817
+ var reader = new jspb.BinaryReader(bytes);
3818
+ var msg = new proto.gateway.web.v1.DryRunDerivedMetricResponse;
3819
+ return proto.gateway.web.v1.DryRunDerivedMetricResponse.deserializeBinaryFromReader(msg, reader);
3820
+ };
3821
+
3822
+
3823
+ /**
3824
+ * Deserializes binary data (in protobuf wire format) from the
3825
+ * given reader into the given message object.
3826
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricResponse} msg The message object to deserialize into.
3827
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3828
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse}
3829
+ */
3830
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.deserializeBinaryFromReader = function(msg, reader) {
3831
+ while (reader.nextField()) {
3832
+ if (reader.isEndGroup()) {
3833
+ break;
3834
+ }
3835
+ var field = reader.getFieldNumber();
3836
+ switch (field) {
3837
+ case 1:
3838
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
3839
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3840
+ msg.setStatus(value);
3841
+ break;
3842
+ case 2:
3843
+ var value = new proto.gateway.web.v1.DryRunTraceResult;
3844
+ reader.readMessage(value,proto.gateway.web.v1.DryRunTraceResult.deserializeBinaryFromReader);
3845
+ msg.addTraceResults(value);
3846
+ break;
3847
+ case 3:
3848
+ var value = new proto.gateway.web.v1.DerivedMetricOutcomeCount;
3849
+ reader.readMessage(value,proto.gateway.web.v1.DerivedMetricOutcomeCount.deserializeBinaryFromReader);
3850
+ msg.addOutcomeCounts(value);
3851
+ break;
3852
+ case 4:
3853
+ var value = /** @type {number} */ (reader.readUint32());
3854
+ msg.setTracesSelected(value);
3855
+ break;
3856
+ default:
3857
+ reader.skipField();
3858
+ break;
3859
+ }
3860
+ }
3861
+ return msg;
3862
+ };
3863
+
3864
+
3865
+ /**
3866
+ * Serializes the message to binary data (in protobuf wire format).
3867
+ * @return {!Uint8Array}
3868
+ */
3869
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.serializeBinary = function() {
3870
+ var writer = new jspb.BinaryWriter();
3871
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.serializeBinaryToWriter(this, writer);
3872
+ return writer.getResultBuffer();
3873
+ };
3874
+
3875
+
3876
+ /**
3877
+ * Serializes the given message to binary data (in protobuf wire
3878
+ * format), writing to the given BinaryWriter.
3879
+ * @param {!proto.gateway.web.v1.DryRunDerivedMetricResponse} message
3880
+ * @param {!jspb.BinaryWriter} writer
3881
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3882
+ */
3883
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.serializeBinaryToWriter = function(message, writer) {
3884
+ var f = undefined;
3885
+ f = message.getStatus();
3886
+ if (f != null) {
3887
+ writer.writeMessage(
3888
+ 1,
3889
+ f,
3890
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3891
+ );
3892
+ }
3893
+ f = message.getTraceResultsList();
3894
+ if (f.length > 0) {
3895
+ writer.writeRepeatedMessage(
3896
+ 2,
3897
+ f,
3898
+ proto.gateway.web.v1.DryRunTraceResult.serializeBinaryToWriter
3899
+ );
3900
+ }
3901
+ f = message.getOutcomeCountsList();
3902
+ if (f.length > 0) {
3903
+ writer.writeRepeatedMessage(
3904
+ 3,
3905
+ f,
3906
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.serializeBinaryToWriter
3907
+ );
3908
+ }
3909
+ f = message.getTracesSelected();
3910
+ if (f !== 0) {
3911
+ writer.writeUint32(
3912
+ 4,
3913
+ f
3914
+ );
3915
+ }
3916
+ };
3917
+
3918
+
3919
+ /**
3920
+ * optional gateway.common.v1.ResponseStatus status = 1;
3921
+ * @return {?proto.gateway.common.v1.ResponseStatus}
3922
+ */
3923
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.getStatus = function() {
3924
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
3925
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
3926
+ };
3927
+
3928
+
3929
+ /**
3930
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
3931
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
3932
+ */
3933
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.setStatus = function(value) {
3934
+ return jspb.Message.setWrapperField(this, 1, value);
3935
+ };
3936
+
3937
+
3938
+ /**
3939
+ * Clears the message field making it undefined.
3940
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
3941
+ */
3942
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.clearStatus = function() {
3943
+ return this.setStatus(undefined);
3944
+ };
3945
+
3946
+
3947
+ /**
3948
+ * Returns whether this field is set.
3949
+ * @return {boolean}
3950
+ */
3951
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.hasStatus = function() {
3952
+ return jspb.Message.getField(this, 1) != null;
3953
+ };
3954
+
3955
+
3956
+ /**
3957
+ * repeated DryRunTraceResult trace_results = 2;
3958
+ * @return {!Array<!proto.gateway.web.v1.DryRunTraceResult>}
3959
+ */
3960
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.getTraceResultsList = function() {
3961
+ return /** @type{!Array<!proto.gateway.web.v1.DryRunTraceResult>} */ (
3962
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.DryRunTraceResult, 2));
3963
+ };
3964
+
3965
+
3966
+ /**
3967
+ * @param {!Array<!proto.gateway.web.v1.DryRunTraceResult>} value
3968
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
3969
+ */
3970
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.setTraceResultsList = function(value) {
3971
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
3972
+ };
3973
+
3974
+
3975
+ /**
3976
+ * @param {!proto.gateway.web.v1.DryRunTraceResult=} opt_value
3977
+ * @param {number=} opt_index
3978
+ * @return {!proto.gateway.web.v1.DryRunTraceResult}
3979
+ */
3980
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.addTraceResults = function(opt_value, opt_index) {
3981
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.DryRunTraceResult, opt_index);
3982
+ };
3983
+
3984
+
3985
+ /**
3986
+ * Clears the list making it empty but non-null.
3987
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
3988
+ */
3989
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.clearTraceResultsList = function() {
3990
+ return this.setTraceResultsList([]);
3991
+ };
3992
+
3993
+
3994
+ /**
3995
+ * repeated DerivedMetricOutcomeCount outcome_counts = 3;
3996
+ * @return {!Array<!proto.gateway.web.v1.DerivedMetricOutcomeCount>}
3997
+ */
3998
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.getOutcomeCountsList = function() {
3999
+ return /** @type{!Array<!proto.gateway.web.v1.DerivedMetricOutcomeCount>} */ (
4000
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.DerivedMetricOutcomeCount, 3));
4001
+ };
4002
+
4003
+
4004
+ /**
4005
+ * @param {!Array<!proto.gateway.web.v1.DerivedMetricOutcomeCount>} value
4006
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
4007
+ */
4008
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.setOutcomeCountsList = function(value) {
4009
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
4010
+ };
4011
+
4012
+
4013
+ /**
4014
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcomeCount=} opt_value
4015
+ * @param {number=} opt_index
4016
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcomeCount}
4017
+ */
4018
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.addOutcomeCounts = function(opt_value, opt_index) {
4019
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gateway.web.v1.DerivedMetricOutcomeCount, opt_index);
4020
+ };
4021
+
4022
+
4023
+ /**
4024
+ * Clears the list making it empty but non-null.
4025
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
4026
+ */
4027
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.clearOutcomeCountsList = function() {
4028
+ return this.setOutcomeCountsList([]);
4029
+ };
4030
+
4031
+
4032
+ /**
4033
+ * optional uint32 traces_selected = 4;
4034
+ * @return {number}
4035
+ */
4036
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.getTracesSelected = function() {
4037
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4038
+ };
4039
+
4040
+
4041
+ /**
4042
+ * @param {number} value
4043
+ * @return {!proto.gateway.web.v1.DryRunDerivedMetricResponse} returns this
4044
+ */
4045
+ proto.gateway.web.v1.DryRunDerivedMetricResponse.prototype.setTracesSelected = function(value) {
4046
+ return jspb.Message.setProto3IntField(this, 4, value);
4047
+ };
4048
+
4049
+
4050
+
4051
+ /**
4052
+ * Oneof group definitions for this message. Each group defines the field
4053
+ * numbers belonging to that group. When of these fields' value is set, all
4054
+ * other fields in the group are cleared. During deserialization, if multiple
4055
+ * fields are encountered for a group, only the last value seen will be kept.
4056
+ * @private {!Array<!Array<number>>}
4057
+ * @const
4058
+ */
4059
+ proto.gateway.web.v1.DryRunTraceResult.oneofGroups_ = [[2,3]];
4060
+
4061
+ /**
4062
+ * @enum {number}
4063
+ */
4064
+ proto.gateway.web.v1.DryRunTraceResult.ResultCase = {
4065
+ RESULT_NOT_SET: 0,
4066
+ EMITTED: 2,
4067
+ NOT_EMITTED: 3
4068
+ };
4069
+
4070
+ /**
4071
+ * @return {proto.gateway.web.v1.DryRunTraceResult.ResultCase}
4072
+ */
4073
+ proto.gateway.web.v1.DryRunTraceResult.prototype.getResultCase = function() {
4074
+ return /** @type {proto.gateway.web.v1.DryRunTraceResult.ResultCase} */(jspb.Message.computeOneofCase(this, proto.gateway.web.v1.DryRunTraceResult.oneofGroups_[0]));
4075
+ };
4076
+
4077
+
4078
+
4079
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4080
+ /**
4081
+ * Creates an object representation of this proto.
4082
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4083
+ * Optional fields that are not set will be set to undefined.
4084
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4085
+ * For the list of reserved names please see:
4086
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4087
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4088
+ * JSPB instance for transitional soy proto support:
4089
+ * http://goto/soy-param-migration
4090
+ * @return {!Object}
4091
+ */
4092
+ proto.gateway.web.v1.DryRunTraceResult.prototype.toObject = function(opt_includeInstance) {
4093
+ return proto.gateway.web.v1.DryRunTraceResult.toObject(opt_includeInstance, this);
4094
+ };
4095
+
4096
+
4097
+ /**
4098
+ * Static version of the {@see toObject} method.
4099
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4100
+ * the JSPB instance for transitional soy proto support:
4101
+ * http://goto/soy-param-migration
4102
+ * @param {!proto.gateway.web.v1.DryRunTraceResult} msg The msg instance to transform.
4103
+ * @return {!Object}
4104
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4105
+ */
4106
+ proto.gateway.web.v1.DryRunTraceResult.toObject = function(includeInstance, msg) {
4107
+ var f, obj = {
4108
+ traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
4109
+ emitted: (f = msg.getEmitted()) && proto.gateway.web.v1.DryRunEmission.toObject(includeInstance, f),
4110
+ notEmitted: (f = msg.getNotEmitted()) && proto.gateway.web.v1.DryRunNonEmission.toObject(includeInstance, f)
4111
+ };
4112
+
4113
+ if (includeInstance) {
4114
+ obj.$jspbMessageInstance = msg;
4115
+ }
4116
+ return obj;
4117
+ };
4118
+ }
4119
+
4120
+
4121
+ /**
4122
+ * Deserializes binary data (in protobuf wire format).
4123
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4124
+ * @return {!proto.gateway.web.v1.DryRunTraceResult}
4125
+ */
4126
+ proto.gateway.web.v1.DryRunTraceResult.deserializeBinary = function(bytes) {
4127
+ var reader = new jspb.BinaryReader(bytes);
4128
+ var msg = new proto.gateway.web.v1.DryRunTraceResult;
4129
+ return proto.gateway.web.v1.DryRunTraceResult.deserializeBinaryFromReader(msg, reader);
4130
+ };
4131
+
4132
+
4133
+ /**
4134
+ * Deserializes binary data (in protobuf wire format) from the
4135
+ * given reader into the given message object.
4136
+ * @param {!proto.gateway.web.v1.DryRunTraceResult} msg The message object to deserialize into.
4137
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4138
+ * @return {!proto.gateway.web.v1.DryRunTraceResult}
4139
+ */
4140
+ proto.gateway.web.v1.DryRunTraceResult.deserializeBinaryFromReader = function(msg, reader) {
4141
+ while (reader.nextField()) {
4142
+ if (reader.isEndGroup()) {
4143
+ break;
4144
+ }
4145
+ var field = reader.getFieldNumber();
4146
+ switch (field) {
4147
+ case 1:
4148
+ var value = /** @type {string} */ (reader.readString());
4149
+ msg.setTraceId(value);
4150
+ break;
4151
+ case 2:
4152
+ var value = new proto.gateway.web.v1.DryRunEmission;
4153
+ reader.readMessage(value,proto.gateway.web.v1.DryRunEmission.deserializeBinaryFromReader);
4154
+ msg.setEmitted(value);
4155
+ break;
4156
+ case 3:
4157
+ var value = new proto.gateway.web.v1.DryRunNonEmission;
4158
+ reader.readMessage(value,proto.gateway.web.v1.DryRunNonEmission.deserializeBinaryFromReader);
4159
+ msg.setNotEmitted(value);
4160
+ break;
4161
+ default:
4162
+ reader.skipField();
4163
+ break;
4164
+ }
4165
+ }
4166
+ return msg;
4167
+ };
4168
+
4169
+
4170
+ /**
4171
+ * Serializes the message to binary data (in protobuf wire format).
4172
+ * @return {!Uint8Array}
4173
+ */
4174
+ proto.gateway.web.v1.DryRunTraceResult.prototype.serializeBinary = function() {
4175
+ var writer = new jspb.BinaryWriter();
4176
+ proto.gateway.web.v1.DryRunTraceResult.serializeBinaryToWriter(this, writer);
4177
+ return writer.getResultBuffer();
4178
+ };
4179
+
4180
+
4181
+ /**
4182
+ * Serializes the given message to binary data (in protobuf wire
4183
+ * format), writing to the given BinaryWriter.
4184
+ * @param {!proto.gateway.web.v1.DryRunTraceResult} message
4185
+ * @param {!jspb.BinaryWriter} writer
4186
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4187
+ */
4188
+ proto.gateway.web.v1.DryRunTraceResult.serializeBinaryToWriter = function(message, writer) {
4189
+ var f = undefined;
4190
+ f = message.getTraceId();
4191
+ if (f.length > 0) {
4192
+ writer.writeString(
4193
+ 1,
4194
+ f
4195
+ );
4196
+ }
4197
+ f = message.getEmitted();
4198
+ if (f != null) {
4199
+ writer.writeMessage(
4200
+ 2,
4201
+ f,
4202
+ proto.gateway.web.v1.DryRunEmission.serializeBinaryToWriter
4203
+ );
4204
+ }
4205
+ f = message.getNotEmitted();
4206
+ if (f != null) {
4207
+ writer.writeMessage(
4208
+ 3,
4209
+ f,
4210
+ proto.gateway.web.v1.DryRunNonEmission.serializeBinaryToWriter
4211
+ );
4212
+ }
4213
+ };
4214
+
4215
+
4216
+ /**
4217
+ * optional string trace_id = 1;
4218
+ * @return {string}
4219
+ */
4220
+ proto.gateway.web.v1.DryRunTraceResult.prototype.getTraceId = function() {
4221
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4222
+ };
4223
+
4224
+
4225
+ /**
4226
+ * @param {string} value
4227
+ * @return {!proto.gateway.web.v1.DryRunTraceResult} returns this
4228
+ */
4229
+ proto.gateway.web.v1.DryRunTraceResult.prototype.setTraceId = function(value) {
4230
+ return jspb.Message.setProto3StringField(this, 1, value);
4231
+ };
4232
+
4233
+
4234
+ /**
4235
+ * optional DryRunEmission emitted = 2;
4236
+ * @return {?proto.gateway.web.v1.DryRunEmission}
4237
+ */
4238
+ proto.gateway.web.v1.DryRunTraceResult.prototype.getEmitted = function() {
4239
+ return /** @type{?proto.gateway.web.v1.DryRunEmission} */ (
4240
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DryRunEmission, 2));
4241
+ };
4242
+
4243
+
4244
+ /**
4245
+ * @param {?proto.gateway.web.v1.DryRunEmission|undefined} value
4246
+ * @return {!proto.gateway.web.v1.DryRunTraceResult} returns this
4247
+ */
4248
+ proto.gateway.web.v1.DryRunTraceResult.prototype.setEmitted = function(value) {
4249
+ return jspb.Message.setOneofWrapperField(this, 2, proto.gateway.web.v1.DryRunTraceResult.oneofGroups_[0], value);
4250
+ };
4251
+
4252
+
4253
+ /**
4254
+ * Clears the message field making it undefined.
4255
+ * @return {!proto.gateway.web.v1.DryRunTraceResult} returns this
4256
+ */
4257
+ proto.gateway.web.v1.DryRunTraceResult.prototype.clearEmitted = function() {
4258
+ return this.setEmitted(undefined);
4259
+ };
4260
+
4261
+
4262
+ /**
4263
+ * Returns whether this field is set.
4264
+ * @return {boolean}
4265
+ */
4266
+ proto.gateway.web.v1.DryRunTraceResult.prototype.hasEmitted = function() {
4267
+ return jspb.Message.getField(this, 2) != null;
4268
+ };
4269
+
4270
+
4271
+ /**
4272
+ * optional DryRunNonEmission not_emitted = 3;
4273
+ * @return {?proto.gateway.web.v1.DryRunNonEmission}
4274
+ */
4275
+ proto.gateway.web.v1.DryRunTraceResult.prototype.getNotEmitted = function() {
4276
+ return /** @type{?proto.gateway.web.v1.DryRunNonEmission} */ (
4277
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DryRunNonEmission, 3));
4278
+ };
4279
+
4280
+
4281
+ /**
4282
+ * @param {?proto.gateway.web.v1.DryRunNonEmission|undefined} value
4283
+ * @return {!proto.gateway.web.v1.DryRunTraceResult} returns this
4284
+ */
4285
+ proto.gateway.web.v1.DryRunTraceResult.prototype.setNotEmitted = function(value) {
4286
+ return jspb.Message.setOneofWrapperField(this, 3, proto.gateway.web.v1.DryRunTraceResult.oneofGroups_[0], value);
4287
+ };
4288
+
4289
+
4290
+ /**
4291
+ * Clears the message field making it undefined.
4292
+ * @return {!proto.gateway.web.v1.DryRunTraceResult} returns this
4293
+ */
4294
+ proto.gateway.web.v1.DryRunTraceResult.prototype.clearNotEmitted = function() {
4295
+ return this.setNotEmitted(undefined);
4296
+ };
4297
+
4298
+
4299
+ /**
4300
+ * Returns whether this field is set.
4301
+ * @return {boolean}
4302
+ */
4303
+ proto.gateway.web.v1.DryRunTraceResult.prototype.hasNotEmitted = function() {
4304
+ return jspb.Message.getField(this, 3) != null;
4305
+ };
4306
+
4307
+
4308
+
4309
+
4310
+
4311
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4312
+ /**
4313
+ * Creates an object representation of this proto.
4314
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4315
+ * Optional fields that are not set will be set to undefined.
4316
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4317
+ * For the list of reserved names please see:
4318
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4319
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4320
+ * JSPB instance for transitional soy proto support:
4321
+ * http://goto/soy-param-migration
4322
+ * @return {!Object}
4323
+ */
4324
+ proto.gateway.web.v1.DryRunEmission.prototype.toObject = function(opt_includeInstance) {
4325
+ return proto.gateway.web.v1.DryRunEmission.toObject(opt_includeInstance, this);
4326
+ };
4327
+
4328
+
4329
+ /**
4330
+ * Static version of the {@see toObject} method.
4331
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4332
+ * the JSPB instance for transitional soy proto support:
4333
+ * http://goto/soy-param-migration
4334
+ * @param {!proto.gateway.web.v1.DryRunEmission} msg The msg instance to transform.
4335
+ * @return {!Object}
4336
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4337
+ */
4338
+ proto.gateway.web.v1.DryRunEmission.toObject = function(includeInstance, msg) {
4339
+ var f, obj = {
4340
+ value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
4341
+ groupValue: jspb.Message.getFieldWithDefault(msg, 2, "")
4342
+ };
4343
+
4344
+ if (includeInstance) {
4345
+ obj.$jspbMessageInstance = msg;
4346
+ }
4347
+ return obj;
4348
+ };
4349
+ }
4350
+
4351
+
4352
+ /**
4353
+ * Deserializes binary data (in protobuf wire format).
4354
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4355
+ * @return {!proto.gateway.web.v1.DryRunEmission}
4356
+ */
4357
+ proto.gateway.web.v1.DryRunEmission.deserializeBinary = function(bytes) {
4358
+ var reader = new jspb.BinaryReader(bytes);
4359
+ var msg = new proto.gateway.web.v1.DryRunEmission;
4360
+ return proto.gateway.web.v1.DryRunEmission.deserializeBinaryFromReader(msg, reader);
4361
+ };
4362
+
4363
+
4364
+ /**
4365
+ * Deserializes binary data (in protobuf wire format) from the
4366
+ * given reader into the given message object.
4367
+ * @param {!proto.gateway.web.v1.DryRunEmission} msg The message object to deserialize into.
4368
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4369
+ * @return {!proto.gateway.web.v1.DryRunEmission}
4370
+ */
4371
+ proto.gateway.web.v1.DryRunEmission.deserializeBinaryFromReader = function(msg, reader) {
4372
+ while (reader.nextField()) {
4373
+ if (reader.isEndGroup()) {
4374
+ break;
4375
+ }
4376
+ var field = reader.getFieldNumber();
4377
+ switch (field) {
4378
+ case 1:
4379
+ var value = /** @type {number} */ (reader.readDouble());
4380
+ msg.setValue(value);
4381
+ break;
4382
+ case 2:
4383
+ var value = /** @type {string} */ (reader.readString());
4384
+ msg.setGroupValue(value);
4385
+ break;
4386
+ default:
4387
+ reader.skipField();
4388
+ break;
4389
+ }
4390
+ }
4391
+ return msg;
4392
+ };
4393
+
4394
+
4395
+ /**
4396
+ * Serializes the message to binary data (in protobuf wire format).
4397
+ * @return {!Uint8Array}
4398
+ */
4399
+ proto.gateway.web.v1.DryRunEmission.prototype.serializeBinary = function() {
4400
+ var writer = new jspb.BinaryWriter();
4401
+ proto.gateway.web.v1.DryRunEmission.serializeBinaryToWriter(this, writer);
4402
+ return writer.getResultBuffer();
4403
+ };
4404
+
4405
+
4406
+ /**
4407
+ * Serializes the given message to binary data (in protobuf wire
4408
+ * format), writing to the given BinaryWriter.
4409
+ * @param {!proto.gateway.web.v1.DryRunEmission} message
4410
+ * @param {!jspb.BinaryWriter} writer
4411
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4412
+ */
4413
+ proto.gateway.web.v1.DryRunEmission.serializeBinaryToWriter = function(message, writer) {
4414
+ var f = undefined;
4415
+ f = message.getValue();
4416
+ if (f !== 0.0) {
4417
+ writer.writeDouble(
4418
+ 1,
4419
+ f
4420
+ );
4421
+ }
4422
+ f = message.getGroupValue();
4423
+ if (f.length > 0) {
4424
+ writer.writeString(
4425
+ 2,
4426
+ f
4427
+ );
4428
+ }
4429
+ };
4430
+
4431
+
4432
+ /**
4433
+ * optional double value = 1;
4434
+ * @return {number}
4435
+ */
4436
+ proto.gateway.web.v1.DryRunEmission.prototype.getValue = function() {
4437
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
4438
+ };
4439
+
4440
+
4441
+ /**
4442
+ * @param {number} value
4443
+ * @return {!proto.gateway.web.v1.DryRunEmission} returns this
4444
+ */
4445
+ proto.gateway.web.v1.DryRunEmission.prototype.setValue = function(value) {
4446
+ return jspb.Message.setProto3FloatField(this, 1, value);
4447
+ };
4448
+
4449
+
4450
+ /**
4451
+ * optional string group_value = 2;
4452
+ * @return {string}
4453
+ */
4454
+ proto.gateway.web.v1.DryRunEmission.prototype.getGroupValue = function() {
4455
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4456
+ };
4457
+
4458
+
4459
+ /**
4460
+ * @param {string} value
4461
+ * @return {!proto.gateway.web.v1.DryRunEmission} returns this
4462
+ */
4463
+ proto.gateway.web.v1.DryRunEmission.prototype.setGroupValue = function(value) {
4464
+ return jspb.Message.setProto3StringField(this, 2, value);
4465
+ };
4466
+
4467
+
4468
+
4469
+
4470
+
4471
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4472
+ /**
4473
+ * Creates an object representation of this proto.
4474
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4475
+ * Optional fields that are not set will be set to undefined.
4476
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4477
+ * For the list of reserved names please see:
4478
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4479
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4480
+ * JSPB instance for transitional soy proto support:
4481
+ * http://goto/soy-param-migration
4482
+ * @return {!Object}
4483
+ */
4484
+ proto.gateway.web.v1.DryRunNonEmission.prototype.toObject = function(opt_includeInstance) {
4485
+ return proto.gateway.web.v1.DryRunNonEmission.toObject(opt_includeInstance, this);
4486
+ };
4487
+
4488
+
4489
+ /**
4490
+ * Static version of the {@see toObject} method.
4491
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4492
+ * the JSPB instance for transitional soy proto support:
4493
+ * http://goto/soy-param-migration
4494
+ * @param {!proto.gateway.web.v1.DryRunNonEmission} msg The msg instance to transform.
4495
+ * @return {!Object}
4496
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4497
+ */
4498
+ proto.gateway.web.v1.DryRunNonEmission.toObject = function(includeInstance, msg) {
4499
+ var f, obj = {
4500
+ outcome: jspb.Message.getFieldWithDefault(msg, 1, 0),
4501
+ detail: jspb.Message.getFieldWithDefault(msg, 2, "")
4502
+ };
4503
+
4504
+ if (includeInstance) {
4505
+ obj.$jspbMessageInstance = msg;
4506
+ }
4507
+ return obj;
4508
+ };
4509
+ }
4510
+
4511
+
4512
+ /**
4513
+ * Deserializes binary data (in protobuf wire format).
4514
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4515
+ * @return {!proto.gateway.web.v1.DryRunNonEmission}
4516
+ */
4517
+ proto.gateway.web.v1.DryRunNonEmission.deserializeBinary = function(bytes) {
4518
+ var reader = new jspb.BinaryReader(bytes);
4519
+ var msg = new proto.gateway.web.v1.DryRunNonEmission;
4520
+ return proto.gateway.web.v1.DryRunNonEmission.deserializeBinaryFromReader(msg, reader);
4521
+ };
4522
+
4523
+
4524
+ /**
4525
+ * Deserializes binary data (in protobuf wire format) from the
4526
+ * given reader into the given message object.
4527
+ * @param {!proto.gateway.web.v1.DryRunNonEmission} msg The message object to deserialize into.
4528
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4529
+ * @return {!proto.gateway.web.v1.DryRunNonEmission}
4530
+ */
4531
+ proto.gateway.web.v1.DryRunNonEmission.deserializeBinaryFromReader = function(msg, reader) {
4532
+ while (reader.nextField()) {
4533
+ if (reader.isEndGroup()) {
4534
+ break;
4535
+ }
4536
+ var field = reader.getFieldNumber();
4537
+ switch (field) {
4538
+ case 1:
4539
+ var value = /** @type {!proto.gateway.web.v1.DerivedMetricOutcome} */ (reader.readEnum());
4540
+ msg.setOutcome(value);
4541
+ break;
4542
+ case 2:
4543
+ var value = /** @type {string} */ (reader.readString());
4544
+ msg.setDetail(value);
4545
+ break;
4546
+ default:
4547
+ reader.skipField();
4548
+ break;
4549
+ }
4550
+ }
4551
+ return msg;
4552
+ };
4553
+
4554
+
4555
+ /**
4556
+ * Serializes the message to binary data (in protobuf wire format).
4557
+ * @return {!Uint8Array}
4558
+ */
4559
+ proto.gateway.web.v1.DryRunNonEmission.prototype.serializeBinary = function() {
4560
+ var writer = new jspb.BinaryWriter();
4561
+ proto.gateway.web.v1.DryRunNonEmission.serializeBinaryToWriter(this, writer);
4562
+ return writer.getResultBuffer();
4563
+ };
4564
+
4565
+
4566
+ /**
4567
+ * Serializes the given message to binary data (in protobuf wire
4568
+ * format), writing to the given BinaryWriter.
4569
+ * @param {!proto.gateway.web.v1.DryRunNonEmission} message
4570
+ * @param {!jspb.BinaryWriter} writer
4571
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4572
+ */
4573
+ proto.gateway.web.v1.DryRunNonEmission.serializeBinaryToWriter = function(message, writer) {
4574
+ var f = undefined;
4575
+ f = message.getOutcome();
4576
+ if (f !== 0.0) {
4577
+ writer.writeEnum(
4578
+ 1,
4579
+ f
4580
+ );
4581
+ }
4582
+ f = message.getDetail();
4583
+ if (f.length > 0) {
4584
+ writer.writeString(
4585
+ 2,
4586
+ f
4587
+ );
4588
+ }
4589
+ };
4590
+
4591
+
4592
+ /**
4593
+ * optional DerivedMetricOutcome outcome = 1;
4594
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcome}
4595
+ */
4596
+ proto.gateway.web.v1.DryRunNonEmission.prototype.getOutcome = function() {
4597
+ return /** @type {!proto.gateway.web.v1.DerivedMetricOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4598
+ };
4599
+
4600
+
4601
+ /**
4602
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcome} value
4603
+ * @return {!proto.gateway.web.v1.DryRunNonEmission} returns this
4604
+ */
4605
+ proto.gateway.web.v1.DryRunNonEmission.prototype.setOutcome = function(value) {
4606
+ return jspb.Message.setProto3EnumField(this, 1, value);
4607
+ };
4608
+
4609
+
4610
+ /**
4611
+ * optional string detail = 2;
4612
+ * @return {string}
4613
+ */
4614
+ proto.gateway.web.v1.DryRunNonEmission.prototype.getDetail = function() {
4615
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4616
+ };
4617
+
4618
+
4619
+ /**
4620
+ * @param {string} value
4621
+ * @return {!proto.gateway.web.v1.DryRunNonEmission} returns this
4622
+ */
4623
+ proto.gateway.web.v1.DryRunNonEmission.prototype.setDetail = function(value) {
4624
+ return jspb.Message.setProto3StringField(this, 2, value);
4625
+ };
4626
+
4627
+
4628
+
4629
+
4630
+
4631
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4632
+ /**
4633
+ * Creates an object representation of this proto.
4634
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4635
+ * Optional fields that are not set will be set to undefined.
4636
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4637
+ * For the list of reserved names please see:
4638
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4639
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4640
+ * JSPB instance for transitional soy proto support:
4641
+ * http://goto/soy-param-migration
4642
+ * @return {!Object}
4643
+ */
4644
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.toObject = function(opt_includeInstance) {
4645
+ return proto.gateway.web.v1.DerivedMetricOutcomeCount.toObject(opt_includeInstance, this);
4646
+ };
4647
+
4648
+
4649
+ /**
4650
+ * Static version of the {@see toObject} method.
4651
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4652
+ * the JSPB instance for transitional soy proto support:
4653
+ * http://goto/soy-param-migration
4654
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcomeCount} msg The msg instance to transform.
4655
+ * @return {!Object}
4656
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4657
+ */
4658
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.toObject = function(includeInstance, msg) {
4659
+ var f, obj = {
4660
+ outcome: jspb.Message.getFieldWithDefault(msg, 1, 0),
4661
+ count: jspb.Message.getFieldWithDefault(msg, 2, 0)
4662
+ };
4663
+
4664
+ if (includeInstance) {
4665
+ obj.$jspbMessageInstance = msg;
4666
+ }
4667
+ return obj;
4668
+ };
4669
+ }
4670
+
4671
+
4672
+ /**
4673
+ * Deserializes binary data (in protobuf wire format).
4674
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4675
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcomeCount}
4676
+ */
4677
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.deserializeBinary = function(bytes) {
4678
+ var reader = new jspb.BinaryReader(bytes);
4679
+ var msg = new proto.gateway.web.v1.DerivedMetricOutcomeCount;
4680
+ return proto.gateway.web.v1.DerivedMetricOutcomeCount.deserializeBinaryFromReader(msg, reader);
4681
+ };
4682
+
4683
+
4684
+ /**
4685
+ * Deserializes binary data (in protobuf wire format) from the
4686
+ * given reader into the given message object.
4687
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcomeCount} msg The message object to deserialize into.
4688
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4689
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcomeCount}
4690
+ */
4691
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.deserializeBinaryFromReader = function(msg, reader) {
4692
+ while (reader.nextField()) {
4693
+ if (reader.isEndGroup()) {
4694
+ break;
4695
+ }
4696
+ var field = reader.getFieldNumber();
4697
+ switch (field) {
4698
+ case 1:
4699
+ var value = /** @type {!proto.gateway.web.v1.DerivedMetricOutcome} */ (reader.readEnum());
4700
+ msg.setOutcome(value);
4701
+ break;
4702
+ case 2:
4703
+ var value = /** @type {number} */ (reader.readUint32());
4704
+ msg.setCount(value);
4705
+ break;
4706
+ default:
4707
+ reader.skipField();
4708
+ break;
4709
+ }
4710
+ }
4711
+ return msg;
4712
+ };
4713
+
4714
+
4715
+ /**
4716
+ * Serializes the message to binary data (in protobuf wire format).
4717
+ * @return {!Uint8Array}
4718
+ */
4719
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.serializeBinary = function() {
4720
+ var writer = new jspb.BinaryWriter();
4721
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.serializeBinaryToWriter(this, writer);
4722
+ return writer.getResultBuffer();
4723
+ };
4724
+
4725
+
4726
+ /**
4727
+ * Serializes the given message to binary data (in protobuf wire
4728
+ * format), writing to the given BinaryWriter.
4729
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcomeCount} message
4730
+ * @param {!jspb.BinaryWriter} writer
4731
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4732
+ */
4733
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.serializeBinaryToWriter = function(message, writer) {
4734
+ var f = undefined;
4735
+ f = message.getOutcome();
4736
+ if (f !== 0.0) {
4737
+ writer.writeEnum(
4738
+ 1,
4739
+ f
4740
+ );
4741
+ }
4742
+ f = message.getCount();
4743
+ if (f !== 0) {
4744
+ writer.writeUint32(
4745
+ 2,
4746
+ f
4747
+ );
4748
+ }
4749
+ };
4750
+
4751
+
4752
+ /**
4753
+ * optional DerivedMetricOutcome outcome = 1;
4754
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcome}
4755
+ */
4756
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.getOutcome = function() {
4757
+ return /** @type {!proto.gateway.web.v1.DerivedMetricOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4758
+ };
4759
+
4760
+
4761
+ /**
4762
+ * @param {!proto.gateway.web.v1.DerivedMetricOutcome} value
4763
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcomeCount} returns this
4764
+ */
4765
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.setOutcome = function(value) {
4766
+ return jspb.Message.setProto3EnumField(this, 1, value);
4767
+ };
4768
+
4769
+
4770
+ /**
4771
+ * optional uint32 count = 2;
4772
+ * @return {number}
4773
+ */
4774
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.getCount = function() {
4775
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4776
+ };
4777
+
4778
+
4779
+ /**
4780
+ * @param {number} value
4781
+ * @return {!proto.gateway.web.v1.DerivedMetricOutcomeCount} returns this
4782
+ */
4783
+ proto.gateway.web.v1.DerivedMetricOutcomeCount.prototype.setCount = function(value) {
4784
+ return jspb.Message.setProto3IntField(this, 2, value);
4785
+ };
4786
+
4787
+
4788
+ /**
4789
+ * @enum {number}
4790
+ */
4791
+ proto.gateway.web.v1.DerivedMetricOutcome = {
4792
+ DERIVED_METRIC_OUTCOME_UNSPECIFIED: 0,
4793
+ DERIVED_METRIC_OUTCOME_EMITTED: 1,
4794
+ DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION: 2,
4795
+ DERIVED_METRIC_OUTCOME_POPULATION_ERROR: 3,
4796
+ DERIVED_METRIC_OUTCOME_VALUE_MISSING: 4,
4797
+ DERIVED_METRIC_OUTCOME_VALUE_ERROR: 5,
4798
+ DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE: 6,
4799
+ DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE: 7,
4800
+ DERIVED_METRIC_OUTCOME_CANCELLED: 8,
4801
+ DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE: 9,
4802
+ DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE: 10
4803
+ };
4804
+
4805
+ goog.object.extend(exports, proto.gateway.web.v1);