@fonoster/sdk 0.30.0 → 0.31.1

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 (54) hide show
  1. package/README.md +6 -4
  2. package/dist/node/Agents.js +5 -20
  3. package/dist/node/Applications.js +13 -5
  4. package/dist/node/Billing.d.ts +50 -0
  5. package/dist/node/Billing.js +84 -0
  6. package/dist/node/CallRecords.js +5 -2
  7. package/dist/node/Calls.d.ts +3 -1
  8. package/dist/node/Calls.js +3 -1
  9. package/dist/node/Numbers.js +2 -7
  10. package/dist/node/Providers.js +4 -2
  11. package/dist/node/Regions.js +5 -2
  12. package/dist/node/Usage.d.ts +44 -0
  13. package/dist/node/Usage.js +41 -0
  14. package/dist/node/client/AbstractClient.d.ts +11 -0
  15. package/dist/node/client/AbstractClient.js +5 -1
  16. package/dist/node/client/Client.d.ts +2 -0
  17. package/dist/node/client/Client.js +13 -1
  18. package/dist/node/client/types/BillingClient.d.ts +28 -0
  19. package/dist/node/client/types/BillingClient.js +2 -0
  20. package/dist/node/client/types/FonosterClient.d.ts +5 -1
  21. package/dist/node/client/types/UsageClient.d.ts +24 -0
  22. package/dist/node/client/types/UsageClient.js +2 -0
  23. package/dist/node/client/types/index.d.ts +2 -0
  24. package/dist/node/client/types/index.js +2 -0
  25. package/dist/node/generated/node/applications_pb.js +368 -6
  26. package/dist/node/generated/node/billing_grpc_pb.js +169 -0
  27. package/dist/node/generated/node/billing_pb.js +1720 -0
  28. package/dist/node/generated/node/calls_pb.js +62 -2
  29. package/dist/node/generated/node/capabilities_pb.js +204 -1
  30. package/dist/node/generated/node/providers_pb.js +61 -1
  31. package/dist/node/generated/node/usage_grpc_pb.js +64 -0
  32. package/dist/node/generated/node/usage_pb.js +866 -0
  33. package/dist/node/generated/web/BillingServiceClientPb.ts +258 -0
  34. package/dist/node/generated/web/UsageServiceClientPb.ts +86 -0
  35. package/dist/node/generated/web/applications_pb.d.ts +42 -0
  36. package/dist/node/generated/web/applications_pb.js +368 -6
  37. package/dist/node/generated/web/billing_pb.d.ts +210 -0
  38. package/dist/node/generated/web/billing_pb.js +1720 -0
  39. package/dist/node/generated/web/calls_pb.d.ts +8 -0
  40. package/dist/node/generated/web/calls_pb.js +62 -2
  41. package/dist/node/generated/web/capabilities_pb.d.ts +24 -0
  42. package/dist/node/generated/web/capabilities_pb.js +204 -1
  43. package/dist/node/generated/web/providers_pb.d.ts +8 -0
  44. package/dist/node/generated/web/providers_pb.js +61 -1
  45. package/dist/node/generated/web/usage_pb.d.ts +106 -0
  46. package/dist/node/generated/web/usage_pb.js +866 -0
  47. package/dist/node/node.d.ts +2 -0
  48. package/dist/node/node.js +2 -0
  49. package/dist/node/tsconfig.tsbuildinfo +1 -1
  50. package/dist/node/utils.d.ts +8 -1
  51. package/dist/node/utils.js +18 -2
  52. package/dist/web/fonoster.min.js +1 -1
  53. package/dist/web/index.esm.js +1 -1
  54. package/package.json +7 -12
@@ -0,0 +1,1720 @@
1
+ // source: billing.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
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.BillingSummary', null, global);
25
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.CreatePortalSessionRequest', null, global);
26
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.CreatePortalSessionResponse', null, global);
27
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.CreateTopUpRequest', null, global);
28
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.CreditSource', null, global);
29
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.GetBillingRequest', null, global);
30
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.SubscribeRequest', null, global);
31
+ goog.exportSymbol('proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest', null, global);
32
+ /**
33
+ * Generated by JsPbCodeGenerator.
34
+ * @param {Array=} opt_data Optional initial data array, typically from a
35
+ * server response, or constructed directly in Javascript. The array is used
36
+ * in place and becomes part of the constructed object. It is not cloned.
37
+ * If no data is provided, the constructed object will be empty, but still
38
+ * valid.
39
+ * @extends {jspb.Message}
40
+ * @constructor
41
+ */
42
+ proto.fonoster.billing.v1beta2.GetBillingRequest = function(opt_data) {
43
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
44
+ };
45
+ goog.inherits(proto.fonoster.billing.v1beta2.GetBillingRequest, jspb.Message);
46
+ if (goog.DEBUG && !COMPILED) {
47
+ /**
48
+ * @public
49
+ * @override
50
+ */
51
+ proto.fonoster.billing.v1beta2.GetBillingRequest.displayName = 'proto.fonoster.billing.v1beta2.GetBillingRequest';
52
+ }
53
+ /**
54
+ * Generated by JsPbCodeGenerator.
55
+ * @param {Array=} opt_data Optional initial data array, typically from a
56
+ * server response, or constructed directly in Javascript. The array is used
57
+ * in place and becomes part of the constructed object. It is not cloned.
58
+ * If no data is provided, the constructed object will be empty, but still
59
+ * valid.
60
+ * @extends {jspb.Message}
61
+ * @constructor
62
+ */
63
+ proto.fonoster.billing.v1beta2.CreditSource = function(opt_data) {
64
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
65
+ };
66
+ goog.inherits(proto.fonoster.billing.v1beta2.CreditSource, jspb.Message);
67
+ if (goog.DEBUG && !COMPILED) {
68
+ /**
69
+ * @public
70
+ * @override
71
+ */
72
+ proto.fonoster.billing.v1beta2.CreditSource.displayName = 'proto.fonoster.billing.v1beta2.CreditSource';
73
+ }
74
+ /**
75
+ * Generated by JsPbCodeGenerator.
76
+ * @param {Array=} opt_data Optional initial data array, typically from a
77
+ * server response, or constructed directly in Javascript. The array is used
78
+ * in place and becomes part of the constructed object. It is not cloned.
79
+ * If no data is provided, the constructed object will be empty, but still
80
+ * valid.
81
+ * @extends {jspb.Message}
82
+ * @constructor
83
+ */
84
+ proto.fonoster.billing.v1beta2.BillingSummary = function(opt_data) {
85
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.fonoster.billing.v1beta2.BillingSummary.repeatedFields_, null);
86
+ };
87
+ goog.inherits(proto.fonoster.billing.v1beta2.BillingSummary, jspb.Message);
88
+ if (goog.DEBUG && !COMPILED) {
89
+ /**
90
+ * @public
91
+ * @override
92
+ */
93
+ proto.fonoster.billing.v1beta2.BillingSummary.displayName = 'proto.fonoster.billing.v1beta2.BillingSummary';
94
+ }
95
+ /**
96
+ * Generated by JsPbCodeGenerator.
97
+ * @param {Array=} opt_data Optional initial data array, typically from a
98
+ * server response, or constructed directly in Javascript. The array is used
99
+ * in place and becomes part of the constructed object. It is not cloned.
100
+ * If no data is provided, the constructed object will be empty, but still
101
+ * valid.
102
+ * @extends {jspb.Message}
103
+ * @constructor
104
+ */
105
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest = function(opt_data) {
106
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
107
+ };
108
+ goog.inherits(proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest, jspb.Message);
109
+ if (goog.DEBUG && !COMPILED) {
110
+ /**
111
+ * @public
112
+ * @override
113
+ */
114
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.displayName = 'proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest';
115
+ }
116
+ /**
117
+ * Generated by JsPbCodeGenerator.
118
+ * @param {Array=} opt_data Optional initial data array, typically from a
119
+ * server response, or constructed directly in Javascript. The array is used
120
+ * in place and becomes part of the constructed object. It is not cloned.
121
+ * If no data is provided, the constructed object will be empty, but still
122
+ * valid.
123
+ * @extends {jspb.Message}
124
+ * @constructor
125
+ */
126
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest = function(opt_data) {
127
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
128
+ };
129
+ goog.inherits(proto.fonoster.billing.v1beta2.CreateTopUpRequest, jspb.Message);
130
+ if (goog.DEBUG && !COMPILED) {
131
+ /**
132
+ * @public
133
+ * @override
134
+ */
135
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.displayName = 'proto.fonoster.billing.v1beta2.CreateTopUpRequest';
136
+ }
137
+ /**
138
+ * Generated by JsPbCodeGenerator.
139
+ * @param {Array=} opt_data Optional initial data array, typically from a
140
+ * server response, or constructed directly in Javascript. The array is used
141
+ * in place and becomes part of the constructed object. It is not cloned.
142
+ * If no data is provided, the constructed object will be empty, but still
143
+ * valid.
144
+ * @extends {jspb.Message}
145
+ * @constructor
146
+ */
147
+ proto.fonoster.billing.v1beta2.SubscribeRequest = function(opt_data) {
148
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
149
+ };
150
+ goog.inherits(proto.fonoster.billing.v1beta2.SubscribeRequest, jspb.Message);
151
+ if (goog.DEBUG && !COMPILED) {
152
+ /**
153
+ * @public
154
+ * @override
155
+ */
156
+ proto.fonoster.billing.v1beta2.SubscribeRequest.displayName = 'proto.fonoster.billing.v1beta2.SubscribeRequest';
157
+ }
158
+ /**
159
+ * Generated by JsPbCodeGenerator.
160
+ * @param {Array=} opt_data Optional initial data array, typically from a
161
+ * server response, or constructed directly in Javascript. The array is used
162
+ * in place and becomes part of the constructed object. It is not cloned.
163
+ * If no data is provided, the constructed object will be empty, but still
164
+ * valid.
165
+ * @extends {jspb.Message}
166
+ * @constructor
167
+ */
168
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest = function(opt_data) {
169
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
170
+ };
171
+ goog.inherits(proto.fonoster.billing.v1beta2.CreatePortalSessionRequest, jspb.Message);
172
+ if (goog.DEBUG && !COMPILED) {
173
+ /**
174
+ * @public
175
+ * @override
176
+ */
177
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.displayName = 'proto.fonoster.billing.v1beta2.CreatePortalSessionRequest';
178
+ }
179
+ /**
180
+ * Generated by JsPbCodeGenerator.
181
+ * @param {Array=} opt_data Optional initial data array, typically from a
182
+ * server response, or constructed directly in Javascript. The array is used
183
+ * in place and becomes part of the constructed object. It is not cloned.
184
+ * If no data is provided, the constructed object will be empty, but still
185
+ * valid.
186
+ * @extends {jspb.Message}
187
+ * @constructor
188
+ */
189
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse = function(opt_data) {
190
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
191
+ };
192
+ goog.inherits(proto.fonoster.billing.v1beta2.CreatePortalSessionResponse, jspb.Message);
193
+ if (goog.DEBUG && !COMPILED) {
194
+ /**
195
+ * @public
196
+ * @override
197
+ */
198
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.displayName = 'proto.fonoster.billing.v1beta2.CreatePortalSessionResponse';
199
+ }
200
+
201
+
202
+
203
+ if (jspb.Message.GENERATE_TO_OBJECT) {
204
+ /**
205
+ * Creates an object representation of this proto.
206
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
207
+ * Optional fields that are not set will be set to undefined.
208
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
209
+ * For the list of reserved names please see:
210
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
211
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
212
+ * JSPB instance for transitional soy proto support:
213
+ * http://goto/soy-param-migration
214
+ * @return {!Object}
215
+ */
216
+ proto.fonoster.billing.v1beta2.GetBillingRequest.prototype.toObject = function(opt_includeInstance) {
217
+ return proto.fonoster.billing.v1beta2.GetBillingRequest.toObject(opt_includeInstance, this);
218
+ };
219
+
220
+
221
+ /**
222
+ * Static version of the {@see toObject} method.
223
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
224
+ * the JSPB instance for transitional soy proto support:
225
+ * http://goto/soy-param-migration
226
+ * @param {!proto.fonoster.billing.v1beta2.GetBillingRequest} msg The msg instance to transform.
227
+ * @return {!Object}
228
+ * @suppress {unusedLocalVariables} f is only used for nested messages
229
+ */
230
+ proto.fonoster.billing.v1beta2.GetBillingRequest.toObject = function(includeInstance, msg) {
231
+ var f, obj = {
232
+ ownerRef: jspb.Message.getFieldWithDefault(msg, 1, "")
233
+ };
234
+
235
+ if (includeInstance) {
236
+ obj.$jspbMessageInstance = msg;
237
+ }
238
+ return obj;
239
+ };
240
+ }
241
+
242
+
243
+ /**
244
+ * Deserializes binary data (in protobuf wire format).
245
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
246
+ * @return {!proto.fonoster.billing.v1beta2.GetBillingRequest}
247
+ */
248
+ proto.fonoster.billing.v1beta2.GetBillingRequest.deserializeBinary = function(bytes) {
249
+ var reader = new jspb.BinaryReader(bytes);
250
+ var msg = new proto.fonoster.billing.v1beta2.GetBillingRequest;
251
+ return proto.fonoster.billing.v1beta2.GetBillingRequest.deserializeBinaryFromReader(msg, reader);
252
+ };
253
+
254
+
255
+ /**
256
+ * Deserializes binary data (in protobuf wire format) from the
257
+ * given reader into the given message object.
258
+ * @param {!proto.fonoster.billing.v1beta2.GetBillingRequest} msg The message object to deserialize into.
259
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
260
+ * @return {!proto.fonoster.billing.v1beta2.GetBillingRequest}
261
+ */
262
+ proto.fonoster.billing.v1beta2.GetBillingRequest.deserializeBinaryFromReader = function(msg, reader) {
263
+ while (reader.nextField()) {
264
+ if (reader.isEndGroup()) {
265
+ break;
266
+ }
267
+ var field = reader.getFieldNumber();
268
+ switch (field) {
269
+ case 1:
270
+ var value = /** @type {string} */ (reader.readString());
271
+ msg.setOwnerRef(value);
272
+ break;
273
+ default:
274
+ reader.skipField();
275
+ break;
276
+ }
277
+ }
278
+ return msg;
279
+ };
280
+
281
+
282
+ /**
283
+ * Serializes the message to binary data (in protobuf wire format).
284
+ * @return {!Uint8Array}
285
+ */
286
+ proto.fonoster.billing.v1beta2.GetBillingRequest.prototype.serializeBinary = function() {
287
+ var writer = new jspb.BinaryWriter();
288
+ proto.fonoster.billing.v1beta2.GetBillingRequest.serializeBinaryToWriter(this, writer);
289
+ return writer.getResultBuffer();
290
+ };
291
+
292
+
293
+ /**
294
+ * Serializes the given message to binary data (in protobuf wire
295
+ * format), writing to the given BinaryWriter.
296
+ * @param {!proto.fonoster.billing.v1beta2.GetBillingRequest} message
297
+ * @param {!jspb.BinaryWriter} writer
298
+ * @suppress {unusedLocalVariables} f is only used for nested messages
299
+ */
300
+ proto.fonoster.billing.v1beta2.GetBillingRequest.serializeBinaryToWriter = function(message, writer) {
301
+ var f = undefined;
302
+ f = message.getOwnerRef();
303
+ if (f.length > 0) {
304
+ writer.writeString(
305
+ 1,
306
+ f
307
+ );
308
+ }
309
+ };
310
+
311
+
312
+ /**
313
+ * optional string owner_ref = 1;
314
+ * @return {string}
315
+ */
316
+ proto.fonoster.billing.v1beta2.GetBillingRequest.prototype.getOwnerRef = function() {
317
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
318
+ };
319
+
320
+
321
+ /**
322
+ * @param {string} value
323
+ * @return {!proto.fonoster.billing.v1beta2.GetBillingRequest} returns this
324
+ */
325
+ proto.fonoster.billing.v1beta2.GetBillingRequest.prototype.setOwnerRef = function(value) {
326
+ return jspb.Message.setProto3StringField(this, 1, value);
327
+ };
328
+
329
+
330
+
331
+
332
+
333
+ if (jspb.Message.GENERATE_TO_OBJECT) {
334
+ /**
335
+ * Creates an object representation of this proto.
336
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
337
+ * Optional fields that are not set will be set to undefined.
338
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
339
+ * For the list of reserved names please see:
340
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
341
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
342
+ * JSPB instance for transitional soy proto support:
343
+ * http://goto/soy-param-migration
344
+ * @return {!Object}
345
+ */
346
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.toObject = function(opt_includeInstance) {
347
+ return proto.fonoster.billing.v1beta2.CreditSource.toObject(opt_includeInstance, this);
348
+ };
349
+
350
+
351
+ /**
352
+ * Static version of the {@see toObject} method.
353
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
354
+ * the JSPB instance for transitional soy proto support:
355
+ * http://goto/soy-param-migration
356
+ * @param {!proto.fonoster.billing.v1beta2.CreditSource} msg The msg instance to transform.
357
+ * @return {!Object}
358
+ * @suppress {unusedLocalVariables} f is only used for nested messages
359
+ */
360
+ proto.fonoster.billing.v1beta2.CreditSource.toObject = function(includeInstance, msg) {
361
+ var f, obj = {
362
+ kind: jspb.Message.getFieldWithDefault(msg, 1, ""),
363
+ credits: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
364
+ expiresAt: jspb.Message.getFieldWithDefault(msg, 3, "")
365
+ };
366
+
367
+ if (includeInstance) {
368
+ obj.$jspbMessageInstance = msg;
369
+ }
370
+ return obj;
371
+ };
372
+ }
373
+
374
+
375
+ /**
376
+ * Deserializes binary data (in protobuf wire format).
377
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
378
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource}
379
+ */
380
+ proto.fonoster.billing.v1beta2.CreditSource.deserializeBinary = function(bytes) {
381
+ var reader = new jspb.BinaryReader(bytes);
382
+ var msg = new proto.fonoster.billing.v1beta2.CreditSource;
383
+ return proto.fonoster.billing.v1beta2.CreditSource.deserializeBinaryFromReader(msg, reader);
384
+ };
385
+
386
+
387
+ /**
388
+ * Deserializes binary data (in protobuf wire format) from the
389
+ * given reader into the given message object.
390
+ * @param {!proto.fonoster.billing.v1beta2.CreditSource} msg The message object to deserialize into.
391
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
392
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource}
393
+ */
394
+ proto.fonoster.billing.v1beta2.CreditSource.deserializeBinaryFromReader = function(msg, reader) {
395
+ while (reader.nextField()) {
396
+ if (reader.isEndGroup()) {
397
+ break;
398
+ }
399
+ var field = reader.getFieldNumber();
400
+ switch (field) {
401
+ case 1:
402
+ var value = /** @type {string} */ (reader.readString());
403
+ msg.setKind(value);
404
+ break;
405
+ case 2:
406
+ var value = /** @type {number} */ (reader.readDouble());
407
+ msg.setCredits(value);
408
+ break;
409
+ case 3:
410
+ var value = /** @type {string} */ (reader.readString());
411
+ msg.setExpiresAt(value);
412
+ break;
413
+ default:
414
+ reader.skipField();
415
+ break;
416
+ }
417
+ }
418
+ return msg;
419
+ };
420
+
421
+
422
+ /**
423
+ * Serializes the message to binary data (in protobuf wire format).
424
+ * @return {!Uint8Array}
425
+ */
426
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.serializeBinary = function() {
427
+ var writer = new jspb.BinaryWriter();
428
+ proto.fonoster.billing.v1beta2.CreditSource.serializeBinaryToWriter(this, writer);
429
+ return writer.getResultBuffer();
430
+ };
431
+
432
+
433
+ /**
434
+ * Serializes the given message to binary data (in protobuf wire
435
+ * format), writing to the given BinaryWriter.
436
+ * @param {!proto.fonoster.billing.v1beta2.CreditSource} message
437
+ * @param {!jspb.BinaryWriter} writer
438
+ * @suppress {unusedLocalVariables} f is only used for nested messages
439
+ */
440
+ proto.fonoster.billing.v1beta2.CreditSource.serializeBinaryToWriter = function(message, writer) {
441
+ var f = undefined;
442
+ f = message.getKind();
443
+ if (f.length > 0) {
444
+ writer.writeString(
445
+ 1,
446
+ f
447
+ );
448
+ }
449
+ f = message.getCredits();
450
+ if (f !== 0.0) {
451
+ writer.writeDouble(
452
+ 2,
453
+ f
454
+ );
455
+ }
456
+ f = message.getExpiresAt();
457
+ if (f.length > 0) {
458
+ writer.writeString(
459
+ 3,
460
+ f
461
+ );
462
+ }
463
+ };
464
+
465
+
466
+ /**
467
+ * optional string kind = 1;
468
+ * @return {string}
469
+ */
470
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.getKind = function() {
471
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
472
+ };
473
+
474
+
475
+ /**
476
+ * @param {string} value
477
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource} returns this
478
+ */
479
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.setKind = function(value) {
480
+ return jspb.Message.setProto3StringField(this, 1, value);
481
+ };
482
+
483
+
484
+ /**
485
+ * optional double credits = 2;
486
+ * @return {number}
487
+ */
488
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.getCredits = function() {
489
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
490
+ };
491
+
492
+
493
+ /**
494
+ * @param {number} value
495
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource} returns this
496
+ */
497
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.setCredits = function(value) {
498
+ return jspb.Message.setProto3FloatField(this, 2, value);
499
+ };
500
+
501
+
502
+ /**
503
+ * optional string expires_at = 3;
504
+ * @return {string}
505
+ */
506
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.getExpiresAt = function() {
507
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
508
+ };
509
+
510
+
511
+ /**
512
+ * @param {string} value
513
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource} returns this
514
+ */
515
+ proto.fonoster.billing.v1beta2.CreditSource.prototype.setExpiresAt = function(value) {
516
+ return jspb.Message.setProto3StringField(this, 3, value);
517
+ };
518
+
519
+
520
+
521
+ /**
522
+ * List of repeated fields within this message type.
523
+ * @private {!Array<number>}
524
+ * @const
525
+ */
526
+ proto.fonoster.billing.v1beta2.BillingSummary.repeatedFields_ = [5];
527
+
528
+
529
+
530
+ if (jspb.Message.GENERATE_TO_OBJECT) {
531
+ /**
532
+ * Creates an object representation of this proto.
533
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
534
+ * Optional fields that are not set will be set to undefined.
535
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
536
+ * For the list of reserved names please see:
537
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
538
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
539
+ * JSPB instance for transitional soy proto support:
540
+ * http://goto/soy-param-migration
541
+ * @return {!Object}
542
+ */
543
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.toObject = function(opt_includeInstance) {
544
+ return proto.fonoster.billing.v1beta2.BillingSummary.toObject(opt_includeInstance, this);
545
+ };
546
+
547
+
548
+ /**
549
+ * Static version of the {@see toObject} method.
550
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
551
+ * the JSPB instance for transitional soy proto support:
552
+ * http://goto/soy-param-migration
553
+ * @param {!proto.fonoster.billing.v1beta2.BillingSummary} msg The msg instance to transform.
554
+ * @return {!Object}
555
+ * @suppress {unusedLocalVariables} f is only used for nested messages
556
+ */
557
+ proto.fonoster.billing.v1beta2.BillingSummary.toObject = function(includeInstance, msg) {
558
+ var f, obj = {
559
+ plan: jspb.Message.getFieldWithDefault(msg, 1, ""),
560
+ status: jspb.Message.getFieldWithDefault(msg, 2, ""),
561
+ balance: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
562
+ overdraft: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
563
+ sourcesList: jspb.Message.toObjectList(msg.getSourcesList(),
564
+ proto.fonoster.billing.v1beta2.CreditSource.toObject, includeInstance),
565
+ periodEnd: jspb.Message.getFieldWithDefault(msg, 6, ""),
566
+ autoRecharge: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
567
+ rechargeThreshold: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
568
+ rechargeAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0)
569
+ };
570
+
571
+ if (includeInstance) {
572
+ obj.$jspbMessageInstance = msg;
573
+ }
574
+ return obj;
575
+ };
576
+ }
577
+
578
+
579
+ /**
580
+ * Deserializes binary data (in protobuf wire format).
581
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
582
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary}
583
+ */
584
+ proto.fonoster.billing.v1beta2.BillingSummary.deserializeBinary = function(bytes) {
585
+ var reader = new jspb.BinaryReader(bytes);
586
+ var msg = new proto.fonoster.billing.v1beta2.BillingSummary;
587
+ return proto.fonoster.billing.v1beta2.BillingSummary.deserializeBinaryFromReader(msg, reader);
588
+ };
589
+
590
+
591
+ /**
592
+ * Deserializes binary data (in protobuf wire format) from the
593
+ * given reader into the given message object.
594
+ * @param {!proto.fonoster.billing.v1beta2.BillingSummary} msg The message object to deserialize into.
595
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
596
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary}
597
+ */
598
+ proto.fonoster.billing.v1beta2.BillingSummary.deserializeBinaryFromReader = function(msg, reader) {
599
+ while (reader.nextField()) {
600
+ if (reader.isEndGroup()) {
601
+ break;
602
+ }
603
+ var field = reader.getFieldNumber();
604
+ switch (field) {
605
+ case 1:
606
+ var value = /** @type {string} */ (reader.readString());
607
+ msg.setPlan(value);
608
+ break;
609
+ case 2:
610
+ var value = /** @type {string} */ (reader.readString());
611
+ msg.setStatus(value);
612
+ break;
613
+ case 3:
614
+ var value = /** @type {number} */ (reader.readDouble());
615
+ msg.setBalance(value);
616
+ break;
617
+ case 4:
618
+ var value = /** @type {number} */ (reader.readDouble());
619
+ msg.setOverdraft(value);
620
+ break;
621
+ case 5:
622
+ var value = new proto.fonoster.billing.v1beta2.CreditSource;
623
+ reader.readMessage(value,proto.fonoster.billing.v1beta2.CreditSource.deserializeBinaryFromReader);
624
+ msg.addSources(value);
625
+ break;
626
+ case 6:
627
+ var value = /** @type {string} */ (reader.readString());
628
+ msg.setPeriodEnd(value);
629
+ break;
630
+ case 7:
631
+ var value = /** @type {boolean} */ (reader.readBool());
632
+ msg.setAutoRecharge(value);
633
+ break;
634
+ case 8:
635
+ var value = /** @type {number} */ (reader.readDouble());
636
+ msg.setRechargeThreshold(value);
637
+ break;
638
+ case 9:
639
+ var value = /** @type {number} */ (reader.readDouble());
640
+ msg.setRechargeAmount(value);
641
+ break;
642
+ default:
643
+ reader.skipField();
644
+ break;
645
+ }
646
+ }
647
+ return msg;
648
+ };
649
+
650
+
651
+ /**
652
+ * Serializes the message to binary data (in protobuf wire format).
653
+ * @return {!Uint8Array}
654
+ */
655
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.serializeBinary = function() {
656
+ var writer = new jspb.BinaryWriter();
657
+ proto.fonoster.billing.v1beta2.BillingSummary.serializeBinaryToWriter(this, writer);
658
+ return writer.getResultBuffer();
659
+ };
660
+
661
+
662
+ /**
663
+ * Serializes the given message to binary data (in protobuf wire
664
+ * format), writing to the given BinaryWriter.
665
+ * @param {!proto.fonoster.billing.v1beta2.BillingSummary} message
666
+ * @param {!jspb.BinaryWriter} writer
667
+ * @suppress {unusedLocalVariables} f is only used for nested messages
668
+ */
669
+ proto.fonoster.billing.v1beta2.BillingSummary.serializeBinaryToWriter = function(message, writer) {
670
+ var f = undefined;
671
+ f = message.getPlan();
672
+ if (f.length > 0) {
673
+ writer.writeString(
674
+ 1,
675
+ f
676
+ );
677
+ }
678
+ f = message.getStatus();
679
+ if (f.length > 0) {
680
+ writer.writeString(
681
+ 2,
682
+ f
683
+ );
684
+ }
685
+ f = message.getBalance();
686
+ if (f !== 0.0) {
687
+ writer.writeDouble(
688
+ 3,
689
+ f
690
+ );
691
+ }
692
+ f = message.getOverdraft();
693
+ if (f !== 0.0) {
694
+ writer.writeDouble(
695
+ 4,
696
+ f
697
+ );
698
+ }
699
+ f = message.getSourcesList();
700
+ if (f.length > 0) {
701
+ writer.writeRepeatedMessage(
702
+ 5,
703
+ f,
704
+ proto.fonoster.billing.v1beta2.CreditSource.serializeBinaryToWriter
705
+ );
706
+ }
707
+ f = message.getPeriodEnd();
708
+ if (f.length > 0) {
709
+ writer.writeString(
710
+ 6,
711
+ f
712
+ );
713
+ }
714
+ f = message.getAutoRecharge();
715
+ if (f) {
716
+ writer.writeBool(
717
+ 7,
718
+ f
719
+ );
720
+ }
721
+ f = message.getRechargeThreshold();
722
+ if (f !== 0.0) {
723
+ writer.writeDouble(
724
+ 8,
725
+ f
726
+ );
727
+ }
728
+ f = message.getRechargeAmount();
729
+ if (f !== 0.0) {
730
+ writer.writeDouble(
731
+ 9,
732
+ f
733
+ );
734
+ }
735
+ };
736
+
737
+
738
+ /**
739
+ * optional string plan = 1;
740
+ * @return {string}
741
+ */
742
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getPlan = function() {
743
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
744
+ };
745
+
746
+
747
+ /**
748
+ * @param {string} value
749
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
750
+ */
751
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setPlan = function(value) {
752
+ return jspb.Message.setProto3StringField(this, 1, value);
753
+ };
754
+
755
+
756
+ /**
757
+ * optional string status = 2;
758
+ * @return {string}
759
+ */
760
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getStatus = function() {
761
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
762
+ };
763
+
764
+
765
+ /**
766
+ * @param {string} value
767
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
768
+ */
769
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setStatus = function(value) {
770
+ return jspb.Message.setProto3StringField(this, 2, value);
771
+ };
772
+
773
+
774
+ /**
775
+ * optional double balance = 3;
776
+ * @return {number}
777
+ */
778
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getBalance = function() {
779
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
780
+ };
781
+
782
+
783
+ /**
784
+ * @param {number} value
785
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
786
+ */
787
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setBalance = function(value) {
788
+ return jspb.Message.setProto3FloatField(this, 3, value);
789
+ };
790
+
791
+
792
+ /**
793
+ * optional double overdraft = 4;
794
+ * @return {number}
795
+ */
796
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getOverdraft = function() {
797
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
798
+ };
799
+
800
+
801
+ /**
802
+ * @param {number} value
803
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
804
+ */
805
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setOverdraft = function(value) {
806
+ return jspb.Message.setProto3FloatField(this, 4, value);
807
+ };
808
+
809
+
810
+ /**
811
+ * repeated CreditSource sources = 5;
812
+ * @return {!Array<!proto.fonoster.billing.v1beta2.CreditSource>}
813
+ */
814
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getSourcesList = function() {
815
+ return /** @type{!Array<!proto.fonoster.billing.v1beta2.CreditSource>} */ (
816
+ jspb.Message.getRepeatedWrapperField(this, proto.fonoster.billing.v1beta2.CreditSource, 5));
817
+ };
818
+
819
+
820
+ /**
821
+ * @param {!Array<!proto.fonoster.billing.v1beta2.CreditSource>} value
822
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
823
+ */
824
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setSourcesList = function(value) {
825
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
826
+ };
827
+
828
+
829
+ /**
830
+ * @param {!proto.fonoster.billing.v1beta2.CreditSource=} opt_value
831
+ * @param {number=} opt_index
832
+ * @return {!proto.fonoster.billing.v1beta2.CreditSource}
833
+ */
834
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.addSources = function(opt_value, opt_index) {
835
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.fonoster.billing.v1beta2.CreditSource, opt_index);
836
+ };
837
+
838
+
839
+ /**
840
+ * Clears the list making it empty but non-null.
841
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
842
+ */
843
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.clearSourcesList = function() {
844
+ return this.setSourcesList([]);
845
+ };
846
+
847
+
848
+ /**
849
+ * optional string period_end = 6;
850
+ * @return {string}
851
+ */
852
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getPeriodEnd = function() {
853
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
854
+ };
855
+
856
+
857
+ /**
858
+ * @param {string} value
859
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
860
+ */
861
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setPeriodEnd = function(value) {
862
+ return jspb.Message.setProto3StringField(this, 6, value);
863
+ };
864
+
865
+
866
+ /**
867
+ * optional bool auto_recharge = 7;
868
+ * @return {boolean}
869
+ */
870
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getAutoRecharge = function() {
871
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
872
+ };
873
+
874
+
875
+ /**
876
+ * @param {boolean} value
877
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
878
+ */
879
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setAutoRecharge = function(value) {
880
+ return jspb.Message.setProto3BooleanField(this, 7, value);
881
+ };
882
+
883
+
884
+ /**
885
+ * optional double recharge_threshold = 8;
886
+ * @return {number}
887
+ */
888
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getRechargeThreshold = function() {
889
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0));
890
+ };
891
+
892
+
893
+ /**
894
+ * @param {number} value
895
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
896
+ */
897
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setRechargeThreshold = function(value) {
898
+ return jspb.Message.setProto3FloatField(this, 8, value);
899
+ };
900
+
901
+
902
+ /**
903
+ * optional double recharge_amount = 9;
904
+ * @return {number}
905
+ */
906
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.getRechargeAmount = function() {
907
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0));
908
+ };
909
+
910
+
911
+ /**
912
+ * @param {number} value
913
+ * @return {!proto.fonoster.billing.v1beta2.BillingSummary} returns this
914
+ */
915
+ proto.fonoster.billing.v1beta2.BillingSummary.prototype.setRechargeAmount = function(value) {
916
+ return jspb.Message.setProto3FloatField(this, 9, value);
917
+ };
918
+
919
+
920
+
921
+
922
+
923
+ if (jspb.Message.GENERATE_TO_OBJECT) {
924
+ /**
925
+ * Creates an object representation of this proto.
926
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
927
+ * Optional fields that are not set will be set to undefined.
928
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
929
+ * For the list of reserved names please see:
930
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
931
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
932
+ * JSPB instance for transitional soy proto support:
933
+ * http://goto/soy-param-migration
934
+ * @return {!Object}
935
+ */
936
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.toObject = function(opt_includeInstance) {
937
+ return proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.toObject(opt_includeInstance, this);
938
+ };
939
+
940
+
941
+ /**
942
+ * Static version of the {@see toObject} method.
943
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
944
+ * the JSPB instance for transitional soy proto support:
945
+ * http://goto/soy-param-migration
946
+ * @param {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} msg The msg instance to transform.
947
+ * @return {!Object}
948
+ * @suppress {unusedLocalVariables} f is only used for nested messages
949
+ */
950
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.toObject = function(includeInstance, msg) {
951
+ var f, obj = {
952
+ ownerRef: jspb.Message.getFieldWithDefault(msg, 1, ""),
953
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
954
+ threshold: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
955
+ amount: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0)
956
+ };
957
+
958
+ if (includeInstance) {
959
+ obj.$jspbMessageInstance = msg;
960
+ }
961
+ return obj;
962
+ };
963
+ }
964
+
965
+
966
+ /**
967
+ * Deserializes binary data (in protobuf wire format).
968
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
969
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest}
970
+ */
971
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.deserializeBinary = function(bytes) {
972
+ var reader = new jspb.BinaryReader(bytes);
973
+ var msg = new proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest;
974
+ return proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.deserializeBinaryFromReader(msg, reader);
975
+ };
976
+
977
+
978
+ /**
979
+ * Deserializes binary data (in protobuf wire format) from the
980
+ * given reader into the given message object.
981
+ * @param {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} msg The message object to deserialize into.
982
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
983
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest}
984
+ */
985
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.deserializeBinaryFromReader = function(msg, reader) {
986
+ while (reader.nextField()) {
987
+ if (reader.isEndGroup()) {
988
+ break;
989
+ }
990
+ var field = reader.getFieldNumber();
991
+ switch (field) {
992
+ case 1:
993
+ var value = /** @type {string} */ (reader.readString());
994
+ msg.setOwnerRef(value);
995
+ break;
996
+ case 2:
997
+ var value = /** @type {boolean} */ (reader.readBool());
998
+ msg.setEnabled(value);
999
+ break;
1000
+ case 3:
1001
+ var value = /** @type {number} */ (reader.readDouble());
1002
+ msg.setThreshold(value);
1003
+ break;
1004
+ case 4:
1005
+ var value = /** @type {number} */ (reader.readDouble());
1006
+ msg.setAmount(value);
1007
+ break;
1008
+ default:
1009
+ reader.skipField();
1010
+ break;
1011
+ }
1012
+ }
1013
+ return msg;
1014
+ };
1015
+
1016
+
1017
+ /**
1018
+ * Serializes the message to binary data (in protobuf wire format).
1019
+ * @return {!Uint8Array}
1020
+ */
1021
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.serializeBinary = function() {
1022
+ var writer = new jspb.BinaryWriter();
1023
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.serializeBinaryToWriter(this, writer);
1024
+ return writer.getResultBuffer();
1025
+ };
1026
+
1027
+
1028
+ /**
1029
+ * Serializes the given message to binary data (in protobuf wire
1030
+ * format), writing to the given BinaryWriter.
1031
+ * @param {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} message
1032
+ * @param {!jspb.BinaryWriter} writer
1033
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1034
+ */
1035
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.serializeBinaryToWriter = function(message, writer) {
1036
+ var f = undefined;
1037
+ f = message.getOwnerRef();
1038
+ if (f.length > 0) {
1039
+ writer.writeString(
1040
+ 1,
1041
+ f
1042
+ );
1043
+ }
1044
+ f = message.getEnabled();
1045
+ if (f) {
1046
+ writer.writeBool(
1047
+ 2,
1048
+ f
1049
+ );
1050
+ }
1051
+ f = message.getThreshold();
1052
+ if (f !== 0.0) {
1053
+ writer.writeDouble(
1054
+ 3,
1055
+ f
1056
+ );
1057
+ }
1058
+ f = message.getAmount();
1059
+ if (f !== 0.0) {
1060
+ writer.writeDouble(
1061
+ 4,
1062
+ f
1063
+ );
1064
+ }
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * optional string owner_ref = 1;
1070
+ * @return {string}
1071
+ */
1072
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.getOwnerRef = function() {
1073
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * @param {string} value
1079
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} returns this
1080
+ */
1081
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.setOwnerRef = function(value) {
1082
+ return jspb.Message.setProto3StringField(this, 1, value);
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * optional bool enabled = 2;
1088
+ * @return {boolean}
1089
+ */
1090
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.getEnabled = function() {
1091
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * @param {boolean} value
1097
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} returns this
1098
+ */
1099
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.setEnabled = function(value) {
1100
+ return jspb.Message.setProto3BooleanField(this, 2, value);
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * optional double threshold = 3;
1106
+ * @return {number}
1107
+ */
1108
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.getThreshold = function() {
1109
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
1110
+ };
1111
+
1112
+
1113
+ /**
1114
+ * @param {number} value
1115
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} returns this
1116
+ */
1117
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.setThreshold = function(value) {
1118
+ return jspb.Message.setProto3FloatField(this, 3, value);
1119
+ };
1120
+
1121
+
1122
+ /**
1123
+ * optional double amount = 4;
1124
+ * @return {number}
1125
+ */
1126
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.getAmount = function() {
1127
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
1128
+ };
1129
+
1130
+
1131
+ /**
1132
+ * @param {number} value
1133
+ * @return {!proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest} returns this
1134
+ */
1135
+ proto.fonoster.billing.v1beta2.UpdateAutoRechargeRequest.prototype.setAmount = function(value) {
1136
+ return jspb.Message.setProto3FloatField(this, 4, value);
1137
+ };
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1144
+ /**
1145
+ * Creates an object representation of this proto.
1146
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1147
+ * Optional fields that are not set will be set to undefined.
1148
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1149
+ * For the list of reserved names please see:
1150
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1151
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1152
+ * JSPB instance for transitional soy proto support:
1153
+ * http://goto/soy-param-migration
1154
+ * @return {!Object}
1155
+ */
1156
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.toObject = function(opt_includeInstance) {
1157
+ return proto.fonoster.billing.v1beta2.CreateTopUpRequest.toObject(opt_includeInstance, this);
1158
+ };
1159
+
1160
+
1161
+ /**
1162
+ * Static version of the {@see toObject} method.
1163
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1164
+ * the JSPB instance for transitional soy proto support:
1165
+ * http://goto/soy-param-migration
1166
+ * @param {!proto.fonoster.billing.v1beta2.CreateTopUpRequest} msg The msg instance to transform.
1167
+ * @return {!Object}
1168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1169
+ */
1170
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.toObject = function(includeInstance, msg) {
1171
+ var f, obj = {
1172
+ ownerRef: jspb.Message.getFieldWithDefault(msg, 1, ""),
1173
+ credits: jspb.Message.getFieldWithDefault(msg, 2, 0)
1174
+ };
1175
+
1176
+ if (includeInstance) {
1177
+ obj.$jspbMessageInstance = msg;
1178
+ }
1179
+ return obj;
1180
+ };
1181
+ }
1182
+
1183
+
1184
+ /**
1185
+ * Deserializes binary data (in protobuf wire format).
1186
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1187
+ * @return {!proto.fonoster.billing.v1beta2.CreateTopUpRequest}
1188
+ */
1189
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.deserializeBinary = function(bytes) {
1190
+ var reader = new jspb.BinaryReader(bytes);
1191
+ var msg = new proto.fonoster.billing.v1beta2.CreateTopUpRequest;
1192
+ return proto.fonoster.billing.v1beta2.CreateTopUpRequest.deserializeBinaryFromReader(msg, reader);
1193
+ };
1194
+
1195
+
1196
+ /**
1197
+ * Deserializes binary data (in protobuf wire format) from the
1198
+ * given reader into the given message object.
1199
+ * @param {!proto.fonoster.billing.v1beta2.CreateTopUpRequest} msg The message object to deserialize into.
1200
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1201
+ * @return {!proto.fonoster.billing.v1beta2.CreateTopUpRequest}
1202
+ */
1203
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.deserializeBinaryFromReader = function(msg, reader) {
1204
+ while (reader.nextField()) {
1205
+ if (reader.isEndGroup()) {
1206
+ break;
1207
+ }
1208
+ var field = reader.getFieldNumber();
1209
+ switch (field) {
1210
+ case 1:
1211
+ var value = /** @type {string} */ (reader.readString());
1212
+ msg.setOwnerRef(value);
1213
+ break;
1214
+ case 2:
1215
+ var value = /** @type {number} */ (reader.readInt32());
1216
+ msg.setCredits(value);
1217
+ break;
1218
+ default:
1219
+ reader.skipField();
1220
+ break;
1221
+ }
1222
+ }
1223
+ return msg;
1224
+ };
1225
+
1226
+
1227
+ /**
1228
+ * Serializes the message to binary data (in protobuf wire format).
1229
+ * @return {!Uint8Array}
1230
+ */
1231
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.serializeBinary = function() {
1232
+ var writer = new jspb.BinaryWriter();
1233
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.serializeBinaryToWriter(this, writer);
1234
+ return writer.getResultBuffer();
1235
+ };
1236
+
1237
+
1238
+ /**
1239
+ * Serializes the given message to binary data (in protobuf wire
1240
+ * format), writing to the given BinaryWriter.
1241
+ * @param {!proto.fonoster.billing.v1beta2.CreateTopUpRequest} message
1242
+ * @param {!jspb.BinaryWriter} writer
1243
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1244
+ */
1245
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.serializeBinaryToWriter = function(message, writer) {
1246
+ var f = undefined;
1247
+ f = message.getOwnerRef();
1248
+ if (f.length > 0) {
1249
+ writer.writeString(
1250
+ 1,
1251
+ f
1252
+ );
1253
+ }
1254
+ f = message.getCredits();
1255
+ if (f !== 0) {
1256
+ writer.writeInt32(
1257
+ 2,
1258
+ f
1259
+ );
1260
+ }
1261
+ };
1262
+
1263
+
1264
+ /**
1265
+ * optional string owner_ref = 1;
1266
+ * @return {string}
1267
+ */
1268
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.getOwnerRef = function() {
1269
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1270
+ };
1271
+
1272
+
1273
+ /**
1274
+ * @param {string} value
1275
+ * @return {!proto.fonoster.billing.v1beta2.CreateTopUpRequest} returns this
1276
+ */
1277
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.setOwnerRef = function(value) {
1278
+ return jspb.Message.setProto3StringField(this, 1, value);
1279
+ };
1280
+
1281
+
1282
+ /**
1283
+ * optional int32 credits = 2;
1284
+ * @return {number}
1285
+ */
1286
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.getCredits = function() {
1287
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * @param {number} value
1293
+ * @return {!proto.fonoster.billing.v1beta2.CreateTopUpRequest} returns this
1294
+ */
1295
+ proto.fonoster.billing.v1beta2.CreateTopUpRequest.prototype.setCredits = function(value) {
1296
+ return jspb.Message.setProto3IntField(this, 2, value);
1297
+ };
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1304
+ /**
1305
+ * Creates an object representation of this proto.
1306
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1307
+ * Optional fields that are not set will be set to undefined.
1308
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1309
+ * For the list of reserved names please see:
1310
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1311
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1312
+ * JSPB instance for transitional soy proto support:
1313
+ * http://goto/soy-param-migration
1314
+ * @return {!Object}
1315
+ */
1316
+ proto.fonoster.billing.v1beta2.SubscribeRequest.prototype.toObject = function(opt_includeInstance) {
1317
+ return proto.fonoster.billing.v1beta2.SubscribeRequest.toObject(opt_includeInstance, this);
1318
+ };
1319
+
1320
+
1321
+ /**
1322
+ * Static version of the {@see toObject} method.
1323
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1324
+ * the JSPB instance for transitional soy proto support:
1325
+ * http://goto/soy-param-migration
1326
+ * @param {!proto.fonoster.billing.v1beta2.SubscribeRequest} msg The msg instance to transform.
1327
+ * @return {!Object}
1328
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1329
+ */
1330
+ proto.fonoster.billing.v1beta2.SubscribeRequest.toObject = function(includeInstance, msg) {
1331
+ var f, obj = {
1332
+ ownerRef: jspb.Message.getFieldWithDefault(msg, 1, "")
1333
+ };
1334
+
1335
+ if (includeInstance) {
1336
+ obj.$jspbMessageInstance = msg;
1337
+ }
1338
+ return obj;
1339
+ };
1340
+ }
1341
+
1342
+
1343
+ /**
1344
+ * Deserializes binary data (in protobuf wire format).
1345
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1346
+ * @return {!proto.fonoster.billing.v1beta2.SubscribeRequest}
1347
+ */
1348
+ proto.fonoster.billing.v1beta2.SubscribeRequest.deserializeBinary = function(bytes) {
1349
+ var reader = new jspb.BinaryReader(bytes);
1350
+ var msg = new proto.fonoster.billing.v1beta2.SubscribeRequest;
1351
+ return proto.fonoster.billing.v1beta2.SubscribeRequest.deserializeBinaryFromReader(msg, reader);
1352
+ };
1353
+
1354
+
1355
+ /**
1356
+ * Deserializes binary data (in protobuf wire format) from the
1357
+ * given reader into the given message object.
1358
+ * @param {!proto.fonoster.billing.v1beta2.SubscribeRequest} msg The message object to deserialize into.
1359
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1360
+ * @return {!proto.fonoster.billing.v1beta2.SubscribeRequest}
1361
+ */
1362
+ proto.fonoster.billing.v1beta2.SubscribeRequest.deserializeBinaryFromReader = function(msg, reader) {
1363
+ while (reader.nextField()) {
1364
+ if (reader.isEndGroup()) {
1365
+ break;
1366
+ }
1367
+ var field = reader.getFieldNumber();
1368
+ switch (field) {
1369
+ case 1:
1370
+ var value = /** @type {string} */ (reader.readString());
1371
+ msg.setOwnerRef(value);
1372
+ break;
1373
+ default:
1374
+ reader.skipField();
1375
+ break;
1376
+ }
1377
+ }
1378
+ return msg;
1379
+ };
1380
+
1381
+
1382
+ /**
1383
+ * Serializes the message to binary data (in protobuf wire format).
1384
+ * @return {!Uint8Array}
1385
+ */
1386
+ proto.fonoster.billing.v1beta2.SubscribeRequest.prototype.serializeBinary = function() {
1387
+ var writer = new jspb.BinaryWriter();
1388
+ proto.fonoster.billing.v1beta2.SubscribeRequest.serializeBinaryToWriter(this, writer);
1389
+ return writer.getResultBuffer();
1390
+ };
1391
+
1392
+
1393
+ /**
1394
+ * Serializes the given message to binary data (in protobuf wire
1395
+ * format), writing to the given BinaryWriter.
1396
+ * @param {!proto.fonoster.billing.v1beta2.SubscribeRequest} message
1397
+ * @param {!jspb.BinaryWriter} writer
1398
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1399
+ */
1400
+ proto.fonoster.billing.v1beta2.SubscribeRequest.serializeBinaryToWriter = function(message, writer) {
1401
+ var f = undefined;
1402
+ f = message.getOwnerRef();
1403
+ if (f.length > 0) {
1404
+ writer.writeString(
1405
+ 1,
1406
+ f
1407
+ );
1408
+ }
1409
+ };
1410
+
1411
+
1412
+ /**
1413
+ * optional string owner_ref = 1;
1414
+ * @return {string}
1415
+ */
1416
+ proto.fonoster.billing.v1beta2.SubscribeRequest.prototype.getOwnerRef = function() {
1417
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1418
+ };
1419
+
1420
+
1421
+ /**
1422
+ * @param {string} value
1423
+ * @return {!proto.fonoster.billing.v1beta2.SubscribeRequest} returns this
1424
+ */
1425
+ proto.fonoster.billing.v1beta2.SubscribeRequest.prototype.setOwnerRef = function(value) {
1426
+ return jspb.Message.setProto3StringField(this, 1, value);
1427
+ };
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1434
+ /**
1435
+ * Creates an object representation of this proto.
1436
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1437
+ * Optional fields that are not set will be set to undefined.
1438
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1439
+ * For the list of reserved names please see:
1440
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1441
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1442
+ * JSPB instance for transitional soy proto support:
1443
+ * http://goto/soy-param-migration
1444
+ * @return {!Object}
1445
+ */
1446
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.toObject = function(opt_includeInstance) {
1447
+ return proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.toObject(opt_includeInstance, this);
1448
+ };
1449
+
1450
+
1451
+ /**
1452
+ * Static version of the {@see toObject} method.
1453
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1454
+ * the JSPB instance for transitional soy proto support:
1455
+ * http://goto/soy-param-migration
1456
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest} msg The msg instance to transform.
1457
+ * @return {!Object}
1458
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1459
+ */
1460
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.toObject = function(includeInstance, msg) {
1461
+ var f, obj = {
1462
+ ownerRef: jspb.Message.getFieldWithDefault(msg, 1, ""),
1463
+ returnUrl: jspb.Message.getFieldWithDefault(msg, 2, "")
1464
+ };
1465
+
1466
+ if (includeInstance) {
1467
+ obj.$jspbMessageInstance = msg;
1468
+ }
1469
+ return obj;
1470
+ };
1471
+ }
1472
+
1473
+
1474
+ /**
1475
+ * Deserializes binary data (in protobuf wire format).
1476
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1477
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest}
1478
+ */
1479
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.deserializeBinary = function(bytes) {
1480
+ var reader = new jspb.BinaryReader(bytes);
1481
+ var msg = new proto.fonoster.billing.v1beta2.CreatePortalSessionRequest;
1482
+ return proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.deserializeBinaryFromReader(msg, reader);
1483
+ };
1484
+
1485
+
1486
+ /**
1487
+ * Deserializes binary data (in protobuf wire format) from the
1488
+ * given reader into the given message object.
1489
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest} msg The message object to deserialize into.
1490
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1491
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest}
1492
+ */
1493
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.deserializeBinaryFromReader = function(msg, reader) {
1494
+ while (reader.nextField()) {
1495
+ if (reader.isEndGroup()) {
1496
+ break;
1497
+ }
1498
+ var field = reader.getFieldNumber();
1499
+ switch (field) {
1500
+ case 1:
1501
+ var value = /** @type {string} */ (reader.readString());
1502
+ msg.setOwnerRef(value);
1503
+ break;
1504
+ case 2:
1505
+ var value = /** @type {string} */ (reader.readString());
1506
+ msg.setReturnUrl(value);
1507
+ break;
1508
+ default:
1509
+ reader.skipField();
1510
+ break;
1511
+ }
1512
+ }
1513
+ return msg;
1514
+ };
1515
+
1516
+
1517
+ /**
1518
+ * Serializes the message to binary data (in protobuf wire format).
1519
+ * @return {!Uint8Array}
1520
+ */
1521
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.serializeBinary = function() {
1522
+ var writer = new jspb.BinaryWriter();
1523
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.serializeBinaryToWriter(this, writer);
1524
+ return writer.getResultBuffer();
1525
+ };
1526
+
1527
+
1528
+ /**
1529
+ * Serializes the given message to binary data (in protobuf wire
1530
+ * format), writing to the given BinaryWriter.
1531
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest} message
1532
+ * @param {!jspb.BinaryWriter} writer
1533
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1534
+ */
1535
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.serializeBinaryToWriter = function(message, writer) {
1536
+ var f = undefined;
1537
+ f = message.getOwnerRef();
1538
+ if (f.length > 0) {
1539
+ writer.writeString(
1540
+ 1,
1541
+ f
1542
+ );
1543
+ }
1544
+ f = message.getReturnUrl();
1545
+ if (f.length > 0) {
1546
+ writer.writeString(
1547
+ 2,
1548
+ f
1549
+ );
1550
+ }
1551
+ };
1552
+
1553
+
1554
+ /**
1555
+ * optional string owner_ref = 1;
1556
+ * @return {string}
1557
+ */
1558
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.getOwnerRef = function() {
1559
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1560
+ };
1561
+
1562
+
1563
+ /**
1564
+ * @param {string} value
1565
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest} returns this
1566
+ */
1567
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.setOwnerRef = function(value) {
1568
+ return jspb.Message.setProto3StringField(this, 1, value);
1569
+ };
1570
+
1571
+
1572
+ /**
1573
+ * optional string return_url = 2;
1574
+ * @return {string}
1575
+ */
1576
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.getReturnUrl = function() {
1577
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1578
+ };
1579
+
1580
+
1581
+ /**
1582
+ * @param {string} value
1583
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionRequest} returns this
1584
+ */
1585
+ proto.fonoster.billing.v1beta2.CreatePortalSessionRequest.prototype.setReturnUrl = function(value) {
1586
+ return jspb.Message.setProto3StringField(this, 2, value);
1587
+ };
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1594
+ /**
1595
+ * Creates an object representation of this proto.
1596
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1597
+ * Optional fields that are not set will be set to undefined.
1598
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1599
+ * For the list of reserved names please see:
1600
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1601
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1602
+ * JSPB instance for transitional soy proto support:
1603
+ * http://goto/soy-param-migration
1604
+ * @return {!Object}
1605
+ */
1606
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.prototype.toObject = function(opt_includeInstance) {
1607
+ return proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.toObject(opt_includeInstance, this);
1608
+ };
1609
+
1610
+
1611
+ /**
1612
+ * Static version of the {@see toObject} method.
1613
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1614
+ * the JSPB instance for transitional soy proto support:
1615
+ * http://goto/soy-param-migration
1616
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse} msg The msg instance to transform.
1617
+ * @return {!Object}
1618
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1619
+ */
1620
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.toObject = function(includeInstance, msg) {
1621
+ var f, obj = {
1622
+ url: jspb.Message.getFieldWithDefault(msg, 1, "")
1623
+ };
1624
+
1625
+ if (includeInstance) {
1626
+ obj.$jspbMessageInstance = msg;
1627
+ }
1628
+ return obj;
1629
+ };
1630
+ }
1631
+
1632
+
1633
+ /**
1634
+ * Deserializes binary data (in protobuf wire format).
1635
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1636
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse}
1637
+ */
1638
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.deserializeBinary = function(bytes) {
1639
+ var reader = new jspb.BinaryReader(bytes);
1640
+ var msg = new proto.fonoster.billing.v1beta2.CreatePortalSessionResponse;
1641
+ return proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.deserializeBinaryFromReader(msg, reader);
1642
+ };
1643
+
1644
+
1645
+ /**
1646
+ * Deserializes binary data (in protobuf wire format) from the
1647
+ * given reader into the given message object.
1648
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse} msg The message object to deserialize into.
1649
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1650
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse}
1651
+ */
1652
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.deserializeBinaryFromReader = function(msg, reader) {
1653
+ while (reader.nextField()) {
1654
+ if (reader.isEndGroup()) {
1655
+ break;
1656
+ }
1657
+ var field = reader.getFieldNumber();
1658
+ switch (field) {
1659
+ case 1:
1660
+ var value = /** @type {string} */ (reader.readString());
1661
+ msg.setUrl(value);
1662
+ break;
1663
+ default:
1664
+ reader.skipField();
1665
+ break;
1666
+ }
1667
+ }
1668
+ return msg;
1669
+ };
1670
+
1671
+
1672
+ /**
1673
+ * Serializes the message to binary data (in protobuf wire format).
1674
+ * @return {!Uint8Array}
1675
+ */
1676
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.prototype.serializeBinary = function() {
1677
+ var writer = new jspb.BinaryWriter();
1678
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.serializeBinaryToWriter(this, writer);
1679
+ return writer.getResultBuffer();
1680
+ };
1681
+
1682
+
1683
+ /**
1684
+ * Serializes the given message to binary data (in protobuf wire
1685
+ * format), writing to the given BinaryWriter.
1686
+ * @param {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse} message
1687
+ * @param {!jspb.BinaryWriter} writer
1688
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1689
+ */
1690
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.serializeBinaryToWriter = function(message, writer) {
1691
+ var f = undefined;
1692
+ f = message.getUrl();
1693
+ if (f.length > 0) {
1694
+ writer.writeString(
1695
+ 1,
1696
+ f
1697
+ );
1698
+ }
1699
+ };
1700
+
1701
+
1702
+ /**
1703
+ * optional string url = 1;
1704
+ * @return {string}
1705
+ */
1706
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.prototype.getUrl = function() {
1707
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1708
+ };
1709
+
1710
+
1711
+ /**
1712
+ * @param {string} value
1713
+ * @return {!proto.fonoster.billing.v1beta2.CreatePortalSessionResponse} returns this
1714
+ */
1715
+ proto.fonoster.billing.v1beta2.CreatePortalSessionResponse.prototype.setUrl = function(value) {
1716
+ return jspb.Message.setProto3StringField(this, 1, value);
1717
+ };
1718
+
1719
+
1720
+ goog.object.extend(exports, proto.fonoster.billing.v1beta2);