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