@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,866 @@
1
+ // source: usage.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.usage.v1beta2.GetUsageRequest', null, global);
25
+ goog.exportSymbol('proto.fonoster.usage.v1beta2.GetUsageResponse', null, global);
26
+ goog.exportSymbol('proto.fonoster.usage.v1beta2.UsageRow', null, global);
27
+ /**
28
+ * Generated by JsPbCodeGenerator.
29
+ * @param {Array=} opt_data Optional initial data array, typically from a
30
+ * server response, or constructed directly in Javascript. The array is used
31
+ * in place and becomes part of the constructed object. It is not cloned.
32
+ * If no data is provided, the constructed object will be empty, but still
33
+ * valid.
34
+ * @extends {jspb.Message}
35
+ * @constructor
36
+ */
37
+ proto.fonoster.usage.v1beta2.GetUsageRequest = function(opt_data) {
38
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.fonoster.usage.v1beta2.GetUsageRequest.repeatedFields_, null);
39
+ };
40
+ goog.inherits(proto.fonoster.usage.v1beta2.GetUsageRequest, jspb.Message);
41
+ if (goog.DEBUG && !COMPILED) {
42
+ /**
43
+ * @public
44
+ * @override
45
+ */
46
+ proto.fonoster.usage.v1beta2.GetUsageRequest.displayName = 'proto.fonoster.usage.v1beta2.GetUsageRequest';
47
+ }
48
+ /**
49
+ * Generated by JsPbCodeGenerator.
50
+ * @param {Array=} opt_data Optional initial data array, typically from a
51
+ * server response, or constructed directly in Javascript. The array is used
52
+ * in place and becomes part of the constructed object. It is not cloned.
53
+ * If no data is provided, the constructed object will be empty, but still
54
+ * valid.
55
+ * @extends {jspb.Message}
56
+ * @constructor
57
+ */
58
+ proto.fonoster.usage.v1beta2.UsageRow = function(opt_data) {
59
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
60
+ };
61
+ goog.inherits(proto.fonoster.usage.v1beta2.UsageRow, jspb.Message);
62
+ if (goog.DEBUG && !COMPILED) {
63
+ /**
64
+ * @public
65
+ * @override
66
+ */
67
+ proto.fonoster.usage.v1beta2.UsageRow.displayName = 'proto.fonoster.usage.v1beta2.UsageRow';
68
+ }
69
+ /**
70
+ * Generated by JsPbCodeGenerator.
71
+ * @param {Array=} opt_data Optional initial data array, typically from a
72
+ * server response, or constructed directly in Javascript. The array is used
73
+ * in place and becomes part of the constructed object. It is not cloned.
74
+ * If no data is provided, the constructed object will be empty, but still
75
+ * valid.
76
+ * @extends {jspb.Message}
77
+ * @constructor
78
+ */
79
+ proto.fonoster.usage.v1beta2.GetUsageResponse = function(opt_data) {
80
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.fonoster.usage.v1beta2.GetUsageResponse.repeatedFields_, null);
81
+ };
82
+ goog.inherits(proto.fonoster.usage.v1beta2.GetUsageResponse, jspb.Message);
83
+ if (goog.DEBUG && !COMPILED) {
84
+ /**
85
+ * @public
86
+ * @override
87
+ */
88
+ proto.fonoster.usage.v1beta2.GetUsageResponse.displayName = 'proto.fonoster.usage.v1beta2.GetUsageResponse';
89
+ }
90
+
91
+ /**
92
+ * List of repeated fields within this message type.
93
+ * @private {!Array<number>}
94
+ * @const
95
+ */
96
+ proto.fonoster.usage.v1beta2.GetUsageRequest.repeatedFields_ = [3];
97
+
98
+
99
+
100
+ if (jspb.Message.GENERATE_TO_OBJECT) {
101
+ /**
102
+ * Creates an object representation of this proto.
103
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
104
+ * Optional fields that are not set will be set to undefined.
105
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
106
+ * For the list of reserved names please see:
107
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
108
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
109
+ * JSPB instance for transitional soy proto support:
110
+ * http://goto/soy-param-migration
111
+ * @return {!Object}
112
+ */
113
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.toObject = function(opt_includeInstance) {
114
+ return proto.fonoster.usage.v1beta2.GetUsageRequest.toObject(opt_includeInstance, this);
115
+ };
116
+
117
+
118
+ /**
119
+ * Static version of the {@see toObject} method.
120
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
121
+ * the JSPB instance for transitional soy proto support:
122
+ * http://goto/soy-param-migration
123
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageRequest} msg The msg instance to transform.
124
+ * @return {!Object}
125
+ * @suppress {unusedLocalVariables} f is only used for nested messages
126
+ */
127
+ proto.fonoster.usage.v1beta2.GetUsageRequest.toObject = function(includeInstance, msg) {
128
+ var f, obj = {
129
+ fromDay: jspb.Message.getFieldWithDefault(msg, 1, ""),
130
+ toDay: jspb.Message.getFieldWithDefault(msg, 2, ""),
131
+ groupByList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
132
+ allOwned: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
133
+ };
134
+
135
+ if (includeInstance) {
136
+ obj.$jspbMessageInstance = msg;
137
+ }
138
+ return obj;
139
+ };
140
+ }
141
+
142
+
143
+ /**
144
+ * Deserializes binary data (in protobuf wire format).
145
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
146
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest}
147
+ */
148
+ proto.fonoster.usage.v1beta2.GetUsageRequest.deserializeBinary = function(bytes) {
149
+ var reader = new jspb.BinaryReader(bytes);
150
+ var msg = new proto.fonoster.usage.v1beta2.GetUsageRequest;
151
+ return proto.fonoster.usage.v1beta2.GetUsageRequest.deserializeBinaryFromReader(msg, reader);
152
+ };
153
+
154
+
155
+ /**
156
+ * Deserializes binary data (in protobuf wire format) from the
157
+ * given reader into the given message object.
158
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageRequest} msg The message object to deserialize into.
159
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
160
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest}
161
+ */
162
+ proto.fonoster.usage.v1beta2.GetUsageRequest.deserializeBinaryFromReader = function(msg, reader) {
163
+ while (reader.nextField()) {
164
+ if (reader.isEndGroup()) {
165
+ break;
166
+ }
167
+ var field = reader.getFieldNumber();
168
+ switch (field) {
169
+ case 1:
170
+ var value = /** @type {string} */ (reader.readString());
171
+ msg.setFromDay(value);
172
+ break;
173
+ case 2:
174
+ var value = /** @type {string} */ (reader.readString());
175
+ msg.setToDay(value);
176
+ break;
177
+ case 3:
178
+ var value = /** @type {string} */ (reader.readString());
179
+ msg.addGroupBy(value);
180
+ break;
181
+ case 4:
182
+ var value = /** @type {boolean} */ (reader.readBool());
183
+ msg.setAllOwned(value);
184
+ break;
185
+ default:
186
+ reader.skipField();
187
+ break;
188
+ }
189
+ }
190
+ return msg;
191
+ };
192
+
193
+
194
+ /**
195
+ * Serializes the message to binary data (in protobuf wire format).
196
+ * @return {!Uint8Array}
197
+ */
198
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.serializeBinary = function() {
199
+ var writer = new jspb.BinaryWriter();
200
+ proto.fonoster.usage.v1beta2.GetUsageRequest.serializeBinaryToWriter(this, writer);
201
+ return writer.getResultBuffer();
202
+ };
203
+
204
+
205
+ /**
206
+ * Serializes the given message to binary data (in protobuf wire
207
+ * format), writing to the given BinaryWriter.
208
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageRequest} message
209
+ * @param {!jspb.BinaryWriter} writer
210
+ * @suppress {unusedLocalVariables} f is only used for nested messages
211
+ */
212
+ proto.fonoster.usage.v1beta2.GetUsageRequest.serializeBinaryToWriter = function(message, writer) {
213
+ var f = undefined;
214
+ f = message.getFromDay();
215
+ if (f.length > 0) {
216
+ writer.writeString(
217
+ 1,
218
+ f
219
+ );
220
+ }
221
+ f = message.getToDay();
222
+ if (f.length > 0) {
223
+ writer.writeString(
224
+ 2,
225
+ f
226
+ );
227
+ }
228
+ f = message.getGroupByList();
229
+ if (f.length > 0) {
230
+ writer.writeRepeatedString(
231
+ 3,
232
+ f
233
+ );
234
+ }
235
+ f = message.getAllOwned();
236
+ if (f) {
237
+ writer.writeBool(
238
+ 4,
239
+ f
240
+ );
241
+ }
242
+ };
243
+
244
+
245
+ /**
246
+ * optional string from_day = 1;
247
+ * @return {string}
248
+ */
249
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.getFromDay = function() {
250
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
251
+ };
252
+
253
+
254
+ /**
255
+ * @param {string} value
256
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
257
+ */
258
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.setFromDay = function(value) {
259
+ return jspb.Message.setProto3StringField(this, 1, value);
260
+ };
261
+
262
+
263
+ /**
264
+ * optional string to_day = 2;
265
+ * @return {string}
266
+ */
267
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.getToDay = function() {
268
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
269
+ };
270
+
271
+
272
+ /**
273
+ * @param {string} value
274
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
275
+ */
276
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.setToDay = function(value) {
277
+ return jspb.Message.setProto3StringField(this, 2, value);
278
+ };
279
+
280
+
281
+ /**
282
+ * repeated string group_by = 3;
283
+ * @return {!Array<string>}
284
+ */
285
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.getGroupByList = function() {
286
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
287
+ };
288
+
289
+
290
+ /**
291
+ * @param {!Array<string>} value
292
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
293
+ */
294
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.setGroupByList = function(value) {
295
+ return jspb.Message.setField(this, 3, value || []);
296
+ };
297
+
298
+
299
+ /**
300
+ * @param {string} value
301
+ * @param {number=} opt_index
302
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
303
+ */
304
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.addGroupBy = function(value, opt_index) {
305
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
306
+ };
307
+
308
+
309
+ /**
310
+ * Clears the list making it empty but non-null.
311
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
312
+ */
313
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.clearGroupByList = function() {
314
+ return this.setGroupByList([]);
315
+ };
316
+
317
+
318
+ /**
319
+ * optional bool all_owned = 4;
320
+ * @return {boolean}
321
+ */
322
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.getAllOwned = function() {
323
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
324
+ };
325
+
326
+
327
+ /**
328
+ * @param {boolean} value
329
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageRequest} returns this
330
+ */
331
+ proto.fonoster.usage.v1beta2.GetUsageRequest.prototype.setAllOwned = function(value) {
332
+ return jspb.Message.setProto3BooleanField(this, 4, value);
333
+ };
334
+
335
+
336
+
337
+
338
+
339
+ if (jspb.Message.GENERATE_TO_OBJECT) {
340
+ /**
341
+ * Creates an object representation of this proto.
342
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
343
+ * Optional fields that are not set will be set to undefined.
344
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
345
+ * For the list of reserved names please see:
346
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
347
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
348
+ * JSPB instance for transitional soy proto support:
349
+ * http://goto/soy-param-migration
350
+ * @return {!Object}
351
+ */
352
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.toObject = function(opt_includeInstance) {
353
+ return proto.fonoster.usage.v1beta2.UsageRow.toObject(opt_includeInstance, this);
354
+ };
355
+
356
+
357
+ /**
358
+ * Static version of the {@see toObject} method.
359
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
360
+ * the JSPB instance for transitional soy proto support:
361
+ * http://goto/soy-param-migration
362
+ * @param {!proto.fonoster.usage.v1beta2.UsageRow} msg The msg instance to transform.
363
+ * @return {!Object}
364
+ * @suppress {unusedLocalVariables} f is only used for nested messages
365
+ */
366
+ proto.fonoster.usage.v1beta2.UsageRow.toObject = function(includeInstance, msg) {
367
+ var f, obj = {
368
+ day: jspb.Message.getFieldWithDefault(msg, 1, ""),
369
+ workspaceRef: jspb.Message.getFieldWithDefault(msg, 2, ""),
370
+ meter: jspb.Message.getFieldWithDefault(msg, 3, ""),
371
+ unit: jspb.Message.getFieldWithDefault(msg, 4, ""),
372
+ provider: jspb.Message.getFieldWithDefault(msg, 5, ""),
373
+ model: jspb.Message.getFieldWithDefault(msg, 6, ""),
374
+ keySource: jspb.Message.getFieldWithDefault(msg, 7, ""),
375
+ origin: jspb.Message.getFieldWithDefault(msg, 8, ""),
376
+ quantity: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0)
377
+ };
378
+
379
+ if (includeInstance) {
380
+ obj.$jspbMessageInstance = msg;
381
+ }
382
+ return obj;
383
+ };
384
+ }
385
+
386
+
387
+ /**
388
+ * Deserializes binary data (in protobuf wire format).
389
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
390
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow}
391
+ */
392
+ proto.fonoster.usage.v1beta2.UsageRow.deserializeBinary = function(bytes) {
393
+ var reader = new jspb.BinaryReader(bytes);
394
+ var msg = new proto.fonoster.usage.v1beta2.UsageRow;
395
+ return proto.fonoster.usage.v1beta2.UsageRow.deserializeBinaryFromReader(msg, reader);
396
+ };
397
+
398
+
399
+ /**
400
+ * Deserializes binary data (in protobuf wire format) from the
401
+ * given reader into the given message object.
402
+ * @param {!proto.fonoster.usage.v1beta2.UsageRow} msg The message object to deserialize into.
403
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
404
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow}
405
+ */
406
+ proto.fonoster.usage.v1beta2.UsageRow.deserializeBinaryFromReader = function(msg, reader) {
407
+ while (reader.nextField()) {
408
+ if (reader.isEndGroup()) {
409
+ break;
410
+ }
411
+ var field = reader.getFieldNumber();
412
+ switch (field) {
413
+ case 1:
414
+ var value = /** @type {string} */ (reader.readString());
415
+ msg.setDay(value);
416
+ break;
417
+ case 2:
418
+ var value = /** @type {string} */ (reader.readString());
419
+ msg.setWorkspaceRef(value);
420
+ break;
421
+ case 3:
422
+ var value = /** @type {string} */ (reader.readString());
423
+ msg.setMeter(value);
424
+ break;
425
+ case 4:
426
+ var value = /** @type {string} */ (reader.readString());
427
+ msg.setUnit(value);
428
+ break;
429
+ case 5:
430
+ var value = /** @type {string} */ (reader.readString());
431
+ msg.setProvider(value);
432
+ break;
433
+ case 6:
434
+ var value = /** @type {string} */ (reader.readString());
435
+ msg.setModel(value);
436
+ break;
437
+ case 7:
438
+ var value = /** @type {string} */ (reader.readString());
439
+ msg.setKeySource(value);
440
+ break;
441
+ case 8:
442
+ var value = /** @type {string} */ (reader.readString());
443
+ msg.setOrigin(value);
444
+ break;
445
+ case 9:
446
+ var value = /** @type {number} */ (reader.readDouble());
447
+ msg.setQuantity(value);
448
+ break;
449
+ default:
450
+ reader.skipField();
451
+ break;
452
+ }
453
+ }
454
+ return msg;
455
+ };
456
+
457
+
458
+ /**
459
+ * Serializes the message to binary data (in protobuf wire format).
460
+ * @return {!Uint8Array}
461
+ */
462
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.serializeBinary = function() {
463
+ var writer = new jspb.BinaryWriter();
464
+ proto.fonoster.usage.v1beta2.UsageRow.serializeBinaryToWriter(this, writer);
465
+ return writer.getResultBuffer();
466
+ };
467
+
468
+
469
+ /**
470
+ * Serializes the given message to binary data (in protobuf wire
471
+ * format), writing to the given BinaryWriter.
472
+ * @param {!proto.fonoster.usage.v1beta2.UsageRow} message
473
+ * @param {!jspb.BinaryWriter} writer
474
+ * @suppress {unusedLocalVariables} f is only used for nested messages
475
+ */
476
+ proto.fonoster.usage.v1beta2.UsageRow.serializeBinaryToWriter = function(message, writer) {
477
+ var f = undefined;
478
+ f = message.getDay();
479
+ if (f.length > 0) {
480
+ writer.writeString(
481
+ 1,
482
+ f
483
+ );
484
+ }
485
+ f = message.getWorkspaceRef();
486
+ if (f.length > 0) {
487
+ writer.writeString(
488
+ 2,
489
+ f
490
+ );
491
+ }
492
+ f = message.getMeter();
493
+ if (f.length > 0) {
494
+ writer.writeString(
495
+ 3,
496
+ f
497
+ );
498
+ }
499
+ f = message.getUnit();
500
+ if (f.length > 0) {
501
+ writer.writeString(
502
+ 4,
503
+ f
504
+ );
505
+ }
506
+ f = message.getProvider();
507
+ if (f.length > 0) {
508
+ writer.writeString(
509
+ 5,
510
+ f
511
+ );
512
+ }
513
+ f = message.getModel();
514
+ if (f.length > 0) {
515
+ writer.writeString(
516
+ 6,
517
+ f
518
+ );
519
+ }
520
+ f = message.getKeySource();
521
+ if (f.length > 0) {
522
+ writer.writeString(
523
+ 7,
524
+ f
525
+ );
526
+ }
527
+ f = message.getOrigin();
528
+ if (f.length > 0) {
529
+ writer.writeString(
530
+ 8,
531
+ f
532
+ );
533
+ }
534
+ f = message.getQuantity();
535
+ if (f !== 0.0) {
536
+ writer.writeDouble(
537
+ 9,
538
+ f
539
+ );
540
+ }
541
+ };
542
+
543
+
544
+ /**
545
+ * optional string day = 1;
546
+ * @return {string}
547
+ */
548
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getDay = function() {
549
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
550
+ };
551
+
552
+
553
+ /**
554
+ * @param {string} value
555
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
556
+ */
557
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setDay = function(value) {
558
+ return jspb.Message.setProto3StringField(this, 1, value);
559
+ };
560
+
561
+
562
+ /**
563
+ * optional string workspace_ref = 2;
564
+ * @return {string}
565
+ */
566
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getWorkspaceRef = function() {
567
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
568
+ };
569
+
570
+
571
+ /**
572
+ * @param {string} value
573
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
574
+ */
575
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setWorkspaceRef = function(value) {
576
+ return jspb.Message.setProto3StringField(this, 2, value);
577
+ };
578
+
579
+
580
+ /**
581
+ * optional string meter = 3;
582
+ * @return {string}
583
+ */
584
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getMeter = function() {
585
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
586
+ };
587
+
588
+
589
+ /**
590
+ * @param {string} value
591
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
592
+ */
593
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setMeter = function(value) {
594
+ return jspb.Message.setProto3StringField(this, 3, value);
595
+ };
596
+
597
+
598
+ /**
599
+ * optional string unit = 4;
600
+ * @return {string}
601
+ */
602
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getUnit = function() {
603
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
604
+ };
605
+
606
+
607
+ /**
608
+ * @param {string} value
609
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
610
+ */
611
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setUnit = function(value) {
612
+ return jspb.Message.setProto3StringField(this, 4, value);
613
+ };
614
+
615
+
616
+ /**
617
+ * optional string provider = 5;
618
+ * @return {string}
619
+ */
620
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getProvider = function() {
621
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
622
+ };
623
+
624
+
625
+ /**
626
+ * @param {string} value
627
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
628
+ */
629
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setProvider = function(value) {
630
+ return jspb.Message.setProto3StringField(this, 5, value);
631
+ };
632
+
633
+
634
+ /**
635
+ * optional string model = 6;
636
+ * @return {string}
637
+ */
638
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getModel = function() {
639
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
640
+ };
641
+
642
+
643
+ /**
644
+ * @param {string} value
645
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
646
+ */
647
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setModel = function(value) {
648
+ return jspb.Message.setProto3StringField(this, 6, value);
649
+ };
650
+
651
+
652
+ /**
653
+ * optional string key_source = 7;
654
+ * @return {string}
655
+ */
656
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getKeySource = function() {
657
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
658
+ };
659
+
660
+
661
+ /**
662
+ * @param {string} value
663
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
664
+ */
665
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setKeySource = function(value) {
666
+ return jspb.Message.setProto3StringField(this, 7, value);
667
+ };
668
+
669
+
670
+ /**
671
+ * optional string origin = 8;
672
+ * @return {string}
673
+ */
674
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getOrigin = function() {
675
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
676
+ };
677
+
678
+
679
+ /**
680
+ * @param {string} value
681
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
682
+ */
683
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setOrigin = function(value) {
684
+ return jspb.Message.setProto3StringField(this, 8, value);
685
+ };
686
+
687
+
688
+ /**
689
+ * optional double quantity = 9;
690
+ * @return {number}
691
+ */
692
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.getQuantity = function() {
693
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0));
694
+ };
695
+
696
+
697
+ /**
698
+ * @param {number} value
699
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow} returns this
700
+ */
701
+ proto.fonoster.usage.v1beta2.UsageRow.prototype.setQuantity = function(value) {
702
+ return jspb.Message.setProto3FloatField(this, 9, value);
703
+ };
704
+
705
+
706
+
707
+ /**
708
+ * List of repeated fields within this message type.
709
+ * @private {!Array<number>}
710
+ * @const
711
+ */
712
+ proto.fonoster.usage.v1beta2.GetUsageResponse.repeatedFields_ = [1];
713
+
714
+
715
+
716
+ if (jspb.Message.GENERATE_TO_OBJECT) {
717
+ /**
718
+ * Creates an object representation of this proto.
719
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
720
+ * Optional fields that are not set will be set to undefined.
721
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
722
+ * For the list of reserved names please see:
723
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
724
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
725
+ * JSPB instance for transitional soy proto support:
726
+ * http://goto/soy-param-migration
727
+ * @return {!Object}
728
+ */
729
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.toObject = function(opt_includeInstance) {
730
+ return proto.fonoster.usage.v1beta2.GetUsageResponse.toObject(opt_includeInstance, this);
731
+ };
732
+
733
+
734
+ /**
735
+ * Static version of the {@see toObject} method.
736
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
737
+ * the JSPB instance for transitional soy proto support:
738
+ * http://goto/soy-param-migration
739
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageResponse} msg The msg instance to transform.
740
+ * @return {!Object}
741
+ * @suppress {unusedLocalVariables} f is only used for nested messages
742
+ */
743
+ proto.fonoster.usage.v1beta2.GetUsageResponse.toObject = function(includeInstance, msg) {
744
+ var f, obj = {
745
+ rowsList: jspb.Message.toObjectList(msg.getRowsList(),
746
+ proto.fonoster.usage.v1beta2.UsageRow.toObject, includeInstance)
747
+ };
748
+
749
+ if (includeInstance) {
750
+ obj.$jspbMessageInstance = msg;
751
+ }
752
+ return obj;
753
+ };
754
+ }
755
+
756
+
757
+ /**
758
+ * Deserializes binary data (in protobuf wire format).
759
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
760
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageResponse}
761
+ */
762
+ proto.fonoster.usage.v1beta2.GetUsageResponse.deserializeBinary = function(bytes) {
763
+ var reader = new jspb.BinaryReader(bytes);
764
+ var msg = new proto.fonoster.usage.v1beta2.GetUsageResponse;
765
+ return proto.fonoster.usage.v1beta2.GetUsageResponse.deserializeBinaryFromReader(msg, reader);
766
+ };
767
+
768
+
769
+ /**
770
+ * Deserializes binary data (in protobuf wire format) from the
771
+ * given reader into the given message object.
772
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageResponse} msg The message object to deserialize into.
773
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
774
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageResponse}
775
+ */
776
+ proto.fonoster.usage.v1beta2.GetUsageResponse.deserializeBinaryFromReader = function(msg, reader) {
777
+ while (reader.nextField()) {
778
+ if (reader.isEndGroup()) {
779
+ break;
780
+ }
781
+ var field = reader.getFieldNumber();
782
+ switch (field) {
783
+ case 1:
784
+ var value = new proto.fonoster.usage.v1beta2.UsageRow;
785
+ reader.readMessage(value,proto.fonoster.usage.v1beta2.UsageRow.deserializeBinaryFromReader);
786
+ msg.addRows(value);
787
+ break;
788
+ default:
789
+ reader.skipField();
790
+ break;
791
+ }
792
+ }
793
+ return msg;
794
+ };
795
+
796
+
797
+ /**
798
+ * Serializes the message to binary data (in protobuf wire format).
799
+ * @return {!Uint8Array}
800
+ */
801
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.serializeBinary = function() {
802
+ var writer = new jspb.BinaryWriter();
803
+ proto.fonoster.usage.v1beta2.GetUsageResponse.serializeBinaryToWriter(this, writer);
804
+ return writer.getResultBuffer();
805
+ };
806
+
807
+
808
+ /**
809
+ * Serializes the given message to binary data (in protobuf wire
810
+ * format), writing to the given BinaryWriter.
811
+ * @param {!proto.fonoster.usage.v1beta2.GetUsageResponse} message
812
+ * @param {!jspb.BinaryWriter} writer
813
+ * @suppress {unusedLocalVariables} f is only used for nested messages
814
+ */
815
+ proto.fonoster.usage.v1beta2.GetUsageResponse.serializeBinaryToWriter = function(message, writer) {
816
+ var f = undefined;
817
+ f = message.getRowsList();
818
+ if (f.length > 0) {
819
+ writer.writeRepeatedMessage(
820
+ 1,
821
+ f,
822
+ proto.fonoster.usage.v1beta2.UsageRow.serializeBinaryToWriter
823
+ );
824
+ }
825
+ };
826
+
827
+
828
+ /**
829
+ * repeated UsageRow rows = 1;
830
+ * @return {!Array<!proto.fonoster.usage.v1beta2.UsageRow>}
831
+ */
832
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.getRowsList = function() {
833
+ return /** @type{!Array<!proto.fonoster.usage.v1beta2.UsageRow>} */ (
834
+ jspb.Message.getRepeatedWrapperField(this, proto.fonoster.usage.v1beta2.UsageRow, 1));
835
+ };
836
+
837
+
838
+ /**
839
+ * @param {!Array<!proto.fonoster.usage.v1beta2.UsageRow>} value
840
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageResponse} returns this
841
+ */
842
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.setRowsList = function(value) {
843
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
844
+ };
845
+
846
+
847
+ /**
848
+ * @param {!proto.fonoster.usage.v1beta2.UsageRow=} opt_value
849
+ * @param {number=} opt_index
850
+ * @return {!proto.fonoster.usage.v1beta2.UsageRow}
851
+ */
852
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.addRows = function(opt_value, opt_index) {
853
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.fonoster.usage.v1beta2.UsageRow, opt_index);
854
+ };
855
+
856
+
857
+ /**
858
+ * Clears the list making it empty but non-null.
859
+ * @return {!proto.fonoster.usage.v1beta2.GetUsageResponse} returns this
860
+ */
861
+ proto.fonoster.usage.v1beta2.GetUsageResponse.prototype.clearRowsList = function() {
862
+ return this.setRowsList([]);
863
+ };
864
+
865
+
866
+ goog.object.extend(exports, proto.fonoster.usage.v1beta2);