@miradorlabs/web-grpc 1.0.0

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