@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,2403 @@
1
+ // source: agents.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
+ var domains_pb = require('./domains_pb.js');
19
+ goog.object.extend(proto, domains_pb);
20
+ var credentials_pb = require('./credentials_pb.js');
21
+ goog.object.extend(proto, credentials_pb);
22
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.Agent', null, global);
23
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.CreateAgentRequest', null, global);
24
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.CreateAgentResponse', null, global);
25
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.DeleteAgentRequest', null, global);
26
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.DeleteAgentResponse', null, global);
27
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.GetAgentRequest', null, global);
28
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.ListAgentsRequest', null, global);
29
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.ListAgentsResponse', null, global);
30
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.Privacy', null, global);
31
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.UpdateAgentRequest', null, global);
32
+ goog.exportSymbol('proto.fonoster.agents.v1beta2.UpdateAgentResponse', null, global);
33
+ /**
34
+ * Generated by JsPbCodeGenerator.
35
+ * @param {Array=} opt_data Optional initial data array, typically from a
36
+ * server response, or constructed directly in Javascript. The array is used
37
+ * in place and becomes part of the constructed object. It is not cloned.
38
+ * If no data is provided, the constructed object will be empty, but still
39
+ * valid.
40
+ * @extends {jspb.Message}
41
+ * @constructor
42
+ */
43
+ proto.fonoster.agents.v1beta2.Agent = function(opt_data) {
44
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
45
+ };
46
+ goog.inherits(proto.fonoster.agents.v1beta2.Agent, jspb.Message);
47
+ if (goog.DEBUG && !COMPILED) {
48
+ /**
49
+ * @public
50
+ * @override
51
+ */
52
+ proto.fonoster.agents.v1beta2.Agent.displayName = 'proto.fonoster.agents.v1beta2.Agent';
53
+ }
54
+ /**
55
+ * Generated by JsPbCodeGenerator.
56
+ * @param {Array=} opt_data Optional initial data array, typically from a
57
+ * server response, or constructed directly in Javascript. The array is used
58
+ * in place and becomes part of the constructed object. It is not cloned.
59
+ * If no data is provided, the constructed object will be empty, but still
60
+ * valid.
61
+ * @extends {jspb.Message}
62
+ * @constructor
63
+ */
64
+ proto.fonoster.agents.v1beta2.CreateAgentRequest = function(opt_data) {
65
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
66
+ };
67
+ goog.inherits(proto.fonoster.agents.v1beta2.CreateAgentRequest, jspb.Message);
68
+ if (goog.DEBUG && !COMPILED) {
69
+ /**
70
+ * @public
71
+ * @override
72
+ */
73
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.displayName = 'proto.fonoster.agents.v1beta2.CreateAgentRequest';
74
+ }
75
+ /**
76
+ * Generated by JsPbCodeGenerator.
77
+ * @param {Array=} opt_data Optional initial data array, typically from a
78
+ * server response, or constructed directly in Javascript. The array is used
79
+ * in place and becomes part of the constructed object. It is not cloned.
80
+ * If no data is provided, the constructed object will be empty, but still
81
+ * valid.
82
+ * @extends {jspb.Message}
83
+ * @constructor
84
+ */
85
+ proto.fonoster.agents.v1beta2.CreateAgentResponse = function(opt_data) {
86
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
87
+ };
88
+ goog.inherits(proto.fonoster.agents.v1beta2.CreateAgentResponse, jspb.Message);
89
+ if (goog.DEBUG && !COMPILED) {
90
+ /**
91
+ * @public
92
+ * @override
93
+ */
94
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.displayName = 'proto.fonoster.agents.v1beta2.CreateAgentResponse';
95
+ }
96
+ /**
97
+ * Generated by JsPbCodeGenerator.
98
+ * @param {Array=} opt_data Optional initial data array, typically from a
99
+ * server response, or constructed directly in Javascript. The array is used
100
+ * in place and becomes part of the constructed object. It is not cloned.
101
+ * If no data is provided, the constructed object will be empty, but still
102
+ * valid.
103
+ * @extends {jspb.Message}
104
+ * @constructor
105
+ */
106
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest = function(opt_data) {
107
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
108
+ };
109
+ goog.inherits(proto.fonoster.agents.v1beta2.UpdateAgentRequest, jspb.Message);
110
+ if (goog.DEBUG && !COMPILED) {
111
+ /**
112
+ * @public
113
+ * @override
114
+ */
115
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.displayName = 'proto.fonoster.agents.v1beta2.UpdateAgentRequest';
116
+ }
117
+ /**
118
+ * Generated by JsPbCodeGenerator.
119
+ * @param {Array=} opt_data Optional initial data array, typically from a
120
+ * server response, or constructed directly in Javascript. The array is used
121
+ * in place and becomes part of the constructed object. It is not cloned.
122
+ * If no data is provided, the constructed object will be empty, but still
123
+ * valid.
124
+ * @extends {jspb.Message}
125
+ * @constructor
126
+ */
127
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse = function(opt_data) {
128
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
129
+ };
130
+ goog.inherits(proto.fonoster.agents.v1beta2.UpdateAgentResponse, jspb.Message);
131
+ if (goog.DEBUG && !COMPILED) {
132
+ /**
133
+ * @public
134
+ * @override
135
+ */
136
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.displayName = 'proto.fonoster.agents.v1beta2.UpdateAgentResponse';
137
+ }
138
+ /**
139
+ * Generated by JsPbCodeGenerator.
140
+ * @param {Array=} opt_data Optional initial data array, typically from a
141
+ * server response, or constructed directly in Javascript. The array is used
142
+ * in place and becomes part of the constructed object. It is not cloned.
143
+ * If no data is provided, the constructed object will be empty, but still
144
+ * valid.
145
+ * @extends {jspb.Message}
146
+ * @constructor
147
+ */
148
+ proto.fonoster.agents.v1beta2.GetAgentRequest = function(opt_data) {
149
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
150
+ };
151
+ goog.inherits(proto.fonoster.agents.v1beta2.GetAgentRequest, jspb.Message);
152
+ if (goog.DEBUG && !COMPILED) {
153
+ /**
154
+ * @public
155
+ * @override
156
+ */
157
+ proto.fonoster.agents.v1beta2.GetAgentRequest.displayName = 'proto.fonoster.agents.v1beta2.GetAgentRequest';
158
+ }
159
+ /**
160
+ * Generated by JsPbCodeGenerator.
161
+ * @param {Array=} opt_data Optional initial data array, typically from a
162
+ * server response, or constructed directly in Javascript. The array is used
163
+ * in place and becomes part of the constructed object. It is not cloned.
164
+ * If no data is provided, the constructed object will be empty, but still
165
+ * valid.
166
+ * @extends {jspb.Message}
167
+ * @constructor
168
+ */
169
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest = function(opt_data) {
170
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
171
+ };
172
+ goog.inherits(proto.fonoster.agents.v1beta2.DeleteAgentRequest, jspb.Message);
173
+ if (goog.DEBUG && !COMPILED) {
174
+ /**
175
+ * @public
176
+ * @override
177
+ */
178
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.displayName = 'proto.fonoster.agents.v1beta2.DeleteAgentRequest';
179
+ }
180
+ /**
181
+ * Generated by JsPbCodeGenerator.
182
+ * @param {Array=} opt_data Optional initial data array, typically from a
183
+ * server response, or constructed directly in Javascript. The array is used
184
+ * in place and becomes part of the constructed object. It is not cloned.
185
+ * If no data is provided, the constructed object will be empty, but still
186
+ * valid.
187
+ * @extends {jspb.Message}
188
+ * @constructor
189
+ */
190
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse = function(opt_data) {
191
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
192
+ };
193
+ goog.inherits(proto.fonoster.agents.v1beta2.DeleteAgentResponse, jspb.Message);
194
+ if (goog.DEBUG && !COMPILED) {
195
+ /**
196
+ * @public
197
+ * @override
198
+ */
199
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.displayName = 'proto.fonoster.agents.v1beta2.DeleteAgentResponse';
200
+ }
201
+ /**
202
+ * Generated by JsPbCodeGenerator.
203
+ * @param {Array=} opt_data Optional initial data array, typically from a
204
+ * server response, or constructed directly in Javascript. The array is used
205
+ * in place and becomes part of the constructed object. It is not cloned.
206
+ * If no data is provided, the constructed object will be empty, but still
207
+ * valid.
208
+ * @extends {jspb.Message}
209
+ * @constructor
210
+ */
211
+ proto.fonoster.agents.v1beta2.ListAgentsRequest = function(opt_data) {
212
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
213
+ };
214
+ goog.inherits(proto.fonoster.agents.v1beta2.ListAgentsRequest, jspb.Message);
215
+ if (goog.DEBUG && !COMPILED) {
216
+ /**
217
+ * @public
218
+ * @override
219
+ */
220
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.displayName = 'proto.fonoster.agents.v1beta2.ListAgentsRequest';
221
+ }
222
+ /**
223
+ * Generated by JsPbCodeGenerator.
224
+ * @param {Array=} opt_data Optional initial data array, typically from a
225
+ * server response, or constructed directly in Javascript. The array is used
226
+ * in place and becomes part of the constructed object. It is not cloned.
227
+ * If no data is provided, the constructed object will be empty, but still
228
+ * valid.
229
+ * @extends {jspb.Message}
230
+ * @constructor
231
+ */
232
+ proto.fonoster.agents.v1beta2.ListAgentsResponse = function(opt_data) {
233
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.fonoster.agents.v1beta2.ListAgentsResponse.repeatedFields_, null);
234
+ };
235
+ goog.inherits(proto.fonoster.agents.v1beta2.ListAgentsResponse, jspb.Message);
236
+ if (goog.DEBUG && !COMPILED) {
237
+ /**
238
+ * @public
239
+ * @override
240
+ */
241
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.displayName = 'proto.fonoster.agents.v1beta2.ListAgentsResponse';
242
+ }
243
+
244
+
245
+
246
+ if (jspb.Message.GENERATE_TO_OBJECT) {
247
+ /**
248
+ * Creates an object representation of this proto.
249
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
250
+ * Optional fields that are not set will be set to undefined.
251
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
252
+ * For the list of reserved names please see:
253
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
254
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
255
+ * JSPB instance for transitional soy proto support:
256
+ * http://goto/soy-param-migration
257
+ * @return {!Object}
258
+ */
259
+ proto.fonoster.agents.v1beta2.Agent.prototype.toObject = function(opt_includeInstance) {
260
+ return proto.fonoster.agents.v1beta2.Agent.toObject(opt_includeInstance, this);
261
+ };
262
+
263
+
264
+ /**
265
+ * Static version of the {@see toObject} method.
266
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
267
+ * the JSPB instance for transitional soy proto support:
268
+ * http://goto/soy-param-migration
269
+ * @param {!proto.fonoster.agents.v1beta2.Agent} msg The msg instance to transform.
270
+ * @return {!Object}
271
+ * @suppress {unusedLocalVariables} f is only used for nested messages
272
+ */
273
+ proto.fonoster.agents.v1beta2.Agent.toObject = function(includeInstance, msg) {
274
+ var f, obj = {
275
+ ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
276
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
277
+ username: jspb.Message.getFieldWithDefault(msg, 3, ""),
278
+ privacy: jspb.Message.getFieldWithDefault(msg, 4, 0),
279
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
280
+ createdAt: jspb.Message.getFieldWithDefault(msg, 6, 0),
281
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
282
+ maxContacts: jspb.Message.getFieldWithDefault(msg, 8, 0),
283
+ expires: jspb.Message.getFieldWithDefault(msg, 9, 0),
284
+ domain: (f = msg.getDomain()) && domains_pb.Domain.toObject(includeInstance, f),
285
+ credentials: (f = msg.getCredentials()) && credentials_pb.Credentials.toObject(includeInstance, f)
286
+ };
287
+
288
+ if (includeInstance) {
289
+ obj.$jspbMessageInstance = msg;
290
+ }
291
+ return obj;
292
+ };
293
+ }
294
+
295
+
296
+ /**
297
+ * Deserializes binary data (in protobuf wire format).
298
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
299
+ * @return {!proto.fonoster.agents.v1beta2.Agent}
300
+ */
301
+ proto.fonoster.agents.v1beta2.Agent.deserializeBinary = function(bytes) {
302
+ var reader = new jspb.BinaryReader(bytes);
303
+ var msg = new proto.fonoster.agents.v1beta2.Agent;
304
+ return proto.fonoster.agents.v1beta2.Agent.deserializeBinaryFromReader(msg, reader);
305
+ };
306
+
307
+
308
+ /**
309
+ * Deserializes binary data (in protobuf wire format) from the
310
+ * given reader into the given message object.
311
+ * @param {!proto.fonoster.agents.v1beta2.Agent} msg The message object to deserialize into.
312
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
313
+ * @return {!proto.fonoster.agents.v1beta2.Agent}
314
+ */
315
+ proto.fonoster.agents.v1beta2.Agent.deserializeBinaryFromReader = function(msg, reader) {
316
+ while (reader.nextField()) {
317
+ if (reader.isEndGroup()) {
318
+ break;
319
+ }
320
+ var field = reader.getFieldNumber();
321
+ switch (field) {
322
+ case 1:
323
+ var value = /** @type {string} */ (reader.readString());
324
+ msg.setRef(value);
325
+ break;
326
+ case 2:
327
+ var value = /** @type {string} */ (reader.readString());
328
+ msg.setName(value);
329
+ break;
330
+ case 3:
331
+ var value = /** @type {string} */ (reader.readString());
332
+ msg.setUsername(value);
333
+ break;
334
+ case 4:
335
+ var value = /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (reader.readEnum());
336
+ msg.setPrivacy(value);
337
+ break;
338
+ case 5:
339
+ var value = /** @type {boolean} */ (reader.readBool());
340
+ msg.setEnabled(value);
341
+ break;
342
+ case 6:
343
+ var value = /** @type {number} */ (reader.readInt64());
344
+ msg.setCreatedAt(value);
345
+ break;
346
+ case 7:
347
+ var value = /** @type {number} */ (reader.readInt64());
348
+ msg.setUpdatedAt(value);
349
+ break;
350
+ case 8:
351
+ var value = /** @type {number} */ (reader.readInt32());
352
+ msg.setMaxContacts(value);
353
+ break;
354
+ case 9:
355
+ var value = /** @type {number} */ (reader.readInt32());
356
+ msg.setExpires(value);
357
+ break;
358
+ case 10:
359
+ var value = new domains_pb.Domain;
360
+ reader.readMessage(value,domains_pb.Domain.deserializeBinaryFromReader);
361
+ msg.setDomain(value);
362
+ break;
363
+ case 11:
364
+ var value = new credentials_pb.Credentials;
365
+ reader.readMessage(value,credentials_pb.Credentials.deserializeBinaryFromReader);
366
+ msg.setCredentials(value);
367
+ break;
368
+ default:
369
+ reader.skipField();
370
+ break;
371
+ }
372
+ }
373
+ return msg;
374
+ };
375
+
376
+
377
+ /**
378
+ * Serializes the message to binary data (in protobuf wire format).
379
+ * @return {!Uint8Array}
380
+ */
381
+ proto.fonoster.agents.v1beta2.Agent.prototype.serializeBinary = function() {
382
+ var writer = new jspb.BinaryWriter();
383
+ proto.fonoster.agents.v1beta2.Agent.serializeBinaryToWriter(this, writer);
384
+ return writer.getResultBuffer();
385
+ };
386
+
387
+
388
+ /**
389
+ * Serializes the given message to binary data (in protobuf wire
390
+ * format), writing to the given BinaryWriter.
391
+ * @param {!proto.fonoster.agents.v1beta2.Agent} message
392
+ * @param {!jspb.BinaryWriter} writer
393
+ * @suppress {unusedLocalVariables} f is only used for nested messages
394
+ */
395
+ proto.fonoster.agents.v1beta2.Agent.serializeBinaryToWriter = function(message, writer) {
396
+ var f = undefined;
397
+ f = message.getRef();
398
+ if (f.length > 0) {
399
+ writer.writeString(
400
+ 1,
401
+ f
402
+ );
403
+ }
404
+ f = message.getName();
405
+ if (f.length > 0) {
406
+ writer.writeString(
407
+ 2,
408
+ f
409
+ );
410
+ }
411
+ f = message.getUsername();
412
+ if (f.length > 0) {
413
+ writer.writeString(
414
+ 3,
415
+ f
416
+ );
417
+ }
418
+ f = message.getPrivacy();
419
+ if (f !== 0.0) {
420
+ writer.writeEnum(
421
+ 4,
422
+ f
423
+ );
424
+ }
425
+ f = message.getEnabled();
426
+ if (f) {
427
+ writer.writeBool(
428
+ 5,
429
+ f
430
+ );
431
+ }
432
+ f = message.getCreatedAt();
433
+ if (f !== 0) {
434
+ writer.writeInt64(
435
+ 6,
436
+ f
437
+ );
438
+ }
439
+ f = message.getUpdatedAt();
440
+ if (f !== 0) {
441
+ writer.writeInt64(
442
+ 7,
443
+ f
444
+ );
445
+ }
446
+ f = message.getMaxContacts();
447
+ if (f !== 0) {
448
+ writer.writeInt32(
449
+ 8,
450
+ f
451
+ );
452
+ }
453
+ f = message.getExpires();
454
+ if (f !== 0) {
455
+ writer.writeInt32(
456
+ 9,
457
+ f
458
+ );
459
+ }
460
+ f = message.getDomain();
461
+ if (f != null) {
462
+ writer.writeMessage(
463
+ 10,
464
+ f,
465
+ domains_pb.Domain.serializeBinaryToWriter
466
+ );
467
+ }
468
+ f = message.getCredentials();
469
+ if (f != null) {
470
+ writer.writeMessage(
471
+ 11,
472
+ f,
473
+ credentials_pb.Credentials.serializeBinaryToWriter
474
+ );
475
+ }
476
+ };
477
+
478
+
479
+ /**
480
+ * optional string ref = 1;
481
+ * @return {string}
482
+ */
483
+ proto.fonoster.agents.v1beta2.Agent.prototype.getRef = function() {
484
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
485
+ };
486
+
487
+
488
+ /**
489
+ * @param {string} value
490
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
491
+ */
492
+ proto.fonoster.agents.v1beta2.Agent.prototype.setRef = function(value) {
493
+ return jspb.Message.setProto3StringField(this, 1, value);
494
+ };
495
+
496
+
497
+ /**
498
+ * optional string name = 2;
499
+ * @return {string}
500
+ */
501
+ proto.fonoster.agents.v1beta2.Agent.prototype.getName = function() {
502
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
503
+ };
504
+
505
+
506
+ /**
507
+ * @param {string} value
508
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
509
+ */
510
+ proto.fonoster.agents.v1beta2.Agent.prototype.setName = function(value) {
511
+ return jspb.Message.setProto3StringField(this, 2, value);
512
+ };
513
+
514
+
515
+ /**
516
+ * optional string username = 3;
517
+ * @return {string}
518
+ */
519
+ proto.fonoster.agents.v1beta2.Agent.prototype.getUsername = function() {
520
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
521
+ };
522
+
523
+
524
+ /**
525
+ * @param {string} value
526
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
527
+ */
528
+ proto.fonoster.agents.v1beta2.Agent.prototype.setUsername = function(value) {
529
+ return jspb.Message.setProto3StringField(this, 3, value);
530
+ };
531
+
532
+
533
+ /**
534
+ * optional Privacy privacy = 4;
535
+ * @return {!proto.fonoster.agents.v1beta2.Privacy}
536
+ */
537
+ proto.fonoster.agents.v1beta2.Agent.prototype.getPrivacy = function() {
538
+ return /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
539
+ };
540
+
541
+
542
+ /**
543
+ * @param {!proto.fonoster.agents.v1beta2.Privacy} value
544
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
545
+ */
546
+ proto.fonoster.agents.v1beta2.Agent.prototype.setPrivacy = function(value) {
547
+ return jspb.Message.setProto3EnumField(this, 4, value);
548
+ };
549
+
550
+
551
+ /**
552
+ * optional bool enabled = 5;
553
+ * @return {boolean}
554
+ */
555
+ proto.fonoster.agents.v1beta2.Agent.prototype.getEnabled = function() {
556
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
557
+ };
558
+
559
+
560
+ /**
561
+ * @param {boolean} value
562
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
563
+ */
564
+ proto.fonoster.agents.v1beta2.Agent.prototype.setEnabled = function(value) {
565
+ return jspb.Message.setProto3BooleanField(this, 5, value);
566
+ };
567
+
568
+
569
+ /**
570
+ * optional int64 created_at = 6;
571
+ * @return {number}
572
+ */
573
+ proto.fonoster.agents.v1beta2.Agent.prototype.getCreatedAt = function() {
574
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
575
+ };
576
+
577
+
578
+ /**
579
+ * @param {number} value
580
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
581
+ */
582
+ proto.fonoster.agents.v1beta2.Agent.prototype.setCreatedAt = function(value) {
583
+ return jspb.Message.setProto3IntField(this, 6, value);
584
+ };
585
+
586
+
587
+ /**
588
+ * optional int64 updated_at = 7;
589
+ * @return {number}
590
+ */
591
+ proto.fonoster.agents.v1beta2.Agent.prototype.getUpdatedAt = function() {
592
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
593
+ };
594
+
595
+
596
+ /**
597
+ * @param {number} value
598
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
599
+ */
600
+ proto.fonoster.agents.v1beta2.Agent.prototype.setUpdatedAt = function(value) {
601
+ return jspb.Message.setProto3IntField(this, 7, value);
602
+ };
603
+
604
+
605
+ /**
606
+ * optional int32 max_contacts = 8;
607
+ * @return {number}
608
+ */
609
+ proto.fonoster.agents.v1beta2.Agent.prototype.getMaxContacts = function() {
610
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
611
+ };
612
+
613
+
614
+ /**
615
+ * @param {number} value
616
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
617
+ */
618
+ proto.fonoster.agents.v1beta2.Agent.prototype.setMaxContacts = function(value) {
619
+ return jspb.Message.setProto3IntField(this, 8, value);
620
+ };
621
+
622
+
623
+ /**
624
+ * optional int32 expires = 9;
625
+ * @return {number}
626
+ */
627
+ proto.fonoster.agents.v1beta2.Agent.prototype.getExpires = function() {
628
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
629
+ };
630
+
631
+
632
+ /**
633
+ * @param {number} value
634
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
635
+ */
636
+ proto.fonoster.agents.v1beta2.Agent.prototype.setExpires = function(value) {
637
+ return jspb.Message.setProto3IntField(this, 9, value);
638
+ };
639
+
640
+
641
+ /**
642
+ * optional fonoster.domains.v1beta2.Domain domain = 10;
643
+ * @return {?proto.fonoster.domains.v1beta2.Domain}
644
+ */
645
+ proto.fonoster.agents.v1beta2.Agent.prototype.getDomain = function() {
646
+ return /** @type{?proto.fonoster.domains.v1beta2.Domain} */ (
647
+ jspb.Message.getWrapperField(this, domains_pb.Domain, 10));
648
+ };
649
+
650
+
651
+ /**
652
+ * @param {?proto.fonoster.domains.v1beta2.Domain|undefined} value
653
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
654
+ */
655
+ proto.fonoster.agents.v1beta2.Agent.prototype.setDomain = function(value) {
656
+ return jspb.Message.setWrapperField(this, 10, value);
657
+ };
658
+
659
+
660
+ /**
661
+ * Clears the message field making it undefined.
662
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
663
+ */
664
+ proto.fonoster.agents.v1beta2.Agent.prototype.clearDomain = function() {
665
+ return this.setDomain(undefined);
666
+ };
667
+
668
+
669
+ /**
670
+ * Returns whether this field is set.
671
+ * @return {boolean}
672
+ */
673
+ proto.fonoster.agents.v1beta2.Agent.prototype.hasDomain = function() {
674
+ return jspb.Message.getField(this, 10) != null;
675
+ };
676
+
677
+
678
+ /**
679
+ * optional fonoster.credentials.v1beta2.Credentials credentials = 11;
680
+ * @return {?proto.fonoster.credentials.v1beta2.Credentials}
681
+ */
682
+ proto.fonoster.agents.v1beta2.Agent.prototype.getCredentials = function() {
683
+ return /** @type{?proto.fonoster.credentials.v1beta2.Credentials} */ (
684
+ jspb.Message.getWrapperField(this, credentials_pb.Credentials, 11));
685
+ };
686
+
687
+
688
+ /**
689
+ * @param {?proto.fonoster.credentials.v1beta2.Credentials|undefined} value
690
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
691
+ */
692
+ proto.fonoster.agents.v1beta2.Agent.prototype.setCredentials = function(value) {
693
+ return jspb.Message.setWrapperField(this, 11, value);
694
+ };
695
+
696
+
697
+ /**
698
+ * Clears the message field making it undefined.
699
+ * @return {!proto.fonoster.agents.v1beta2.Agent} returns this
700
+ */
701
+ proto.fonoster.agents.v1beta2.Agent.prototype.clearCredentials = function() {
702
+ return this.setCredentials(undefined);
703
+ };
704
+
705
+
706
+ /**
707
+ * Returns whether this field is set.
708
+ * @return {boolean}
709
+ */
710
+ proto.fonoster.agents.v1beta2.Agent.prototype.hasCredentials = function() {
711
+ return jspb.Message.getField(this, 11) != null;
712
+ };
713
+
714
+
715
+
716
+
717
+
718
+ if (jspb.Message.GENERATE_TO_OBJECT) {
719
+ /**
720
+ * Creates an object representation of this proto.
721
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
722
+ * Optional fields that are not set will be set to undefined.
723
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
724
+ * For the list of reserved names please see:
725
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
726
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
727
+ * JSPB instance for transitional soy proto support:
728
+ * http://goto/soy-param-migration
729
+ * @return {!Object}
730
+ */
731
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.toObject = function(opt_includeInstance) {
732
+ return proto.fonoster.agents.v1beta2.CreateAgentRequest.toObject(opt_includeInstance, this);
733
+ };
734
+
735
+
736
+ /**
737
+ * Static version of the {@see toObject} method.
738
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
739
+ * the JSPB instance for transitional soy proto support:
740
+ * http://goto/soy-param-migration
741
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentRequest} msg The msg instance to transform.
742
+ * @return {!Object}
743
+ * @suppress {unusedLocalVariables} f is only used for nested messages
744
+ */
745
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.toObject = function(includeInstance, msg) {
746
+ var f, obj = {
747
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
748
+ username: jspb.Message.getFieldWithDefault(msg, 2, ""),
749
+ privacy: jspb.Message.getFieldWithDefault(msg, 3, 0),
750
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
751
+ domainRef: jspb.Message.getFieldWithDefault(msg, 5, ""),
752
+ credentialsRef: jspb.Message.getFieldWithDefault(msg, 6, ""),
753
+ maxContacts: jspb.Message.getFieldWithDefault(msg, 7, 0),
754
+ expires: jspb.Message.getFieldWithDefault(msg, 8, 0)
755
+ };
756
+
757
+ if (includeInstance) {
758
+ obj.$jspbMessageInstance = msg;
759
+ }
760
+ return obj;
761
+ };
762
+ }
763
+
764
+
765
+ /**
766
+ * Deserializes binary data (in protobuf wire format).
767
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
768
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest}
769
+ */
770
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.deserializeBinary = function(bytes) {
771
+ var reader = new jspb.BinaryReader(bytes);
772
+ var msg = new proto.fonoster.agents.v1beta2.CreateAgentRequest;
773
+ return proto.fonoster.agents.v1beta2.CreateAgentRequest.deserializeBinaryFromReader(msg, reader);
774
+ };
775
+
776
+
777
+ /**
778
+ * Deserializes binary data (in protobuf wire format) from the
779
+ * given reader into the given message object.
780
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentRequest} msg The message object to deserialize into.
781
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
782
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest}
783
+ */
784
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.deserializeBinaryFromReader = function(msg, reader) {
785
+ while (reader.nextField()) {
786
+ if (reader.isEndGroup()) {
787
+ break;
788
+ }
789
+ var field = reader.getFieldNumber();
790
+ switch (field) {
791
+ case 1:
792
+ var value = /** @type {string} */ (reader.readString());
793
+ msg.setName(value);
794
+ break;
795
+ case 2:
796
+ var value = /** @type {string} */ (reader.readString());
797
+ msg.setUsername(value);
798
+ break;
799
+ case 3:
800
+ var value = /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (reader.readEnum());
801
+ msg.setPrivacy(value);
802
+ break;
803
+ case 4:
804
+ var value = /** @type {boolean} */ (reader.readBool());
805
+ msg.setEnabled(value);
806
+ break;
807
+ case 5:
808
+ var value = /** @type {string} */ (reader.readString());
809
+ msg.setDomainRef(value);
810
+ break;
811
+ case 6:
812
+ var value = /** @type {string} */ (reader.readString());
813
+ msg.setCredentialsRef(value);
814
+ break;
815
+ case 7:
816
+ var value = /** @type {number} */ (reader.readInt32());
817
+ msg.setMaxContacts(value);
818
+ break;
819
+ case 8:
820
+ var value = /** @type {number} */ (reader.readInt32());
821
+ msg.setExpires(value);
822
+ break;
823
+ default:
824
+ reader.skipField();
825
+ break;
826
+ }
827
+ }
828
+ return msg;
829
+ };
830
+
831
+
832
+ /**
833
+ * Serializes the message to binary data (in protobuf wire format).
834
+ * @return {!Uint8Array}
835
+ */
836
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.serializeBinary = function() {
837
+ var writer = new jspb.BinaryWriter();
838
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.serializeBinaryToWriter(this, writer);
839
+ return writer.getResultBuffer();
840
+ };
841
+
842
+
843
+ /**
844
+ * Serializes the given message to binary data (in protobuf wire
845
+ * format), writing to the given BinaryWriter.
846
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentRequest} message
847
+ * @param {!jspb.BinaryWriter} writer
848
+ * @suppress {unusedLocalVariables} f is only used for nested messages
849
+ */
850
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.serializeBinaryToWriter = function(message, writer) {
851
+ var f = undefined;
852
+ f = message.getName();
853
+ if (f.length > 0) {
854
+ writer.writeString(
855
+ 1,
856
+ f
857
+ );
858
+ }
859
+ f = message.getUsername();
860
+ if (f.length > 0) {
861
+ writer.writeString(
862
+ 2,
863
+ f
864
+ );
865
+ }
866
+ f = message.getPrivacy();
867
+ if (f !== 0.0) {
868
+ writer.writeEnum(
869
+ 3,
870
+ f
871
+ );
872
+ }
873
+ f = message.getEnabled();
874
+ if (f) {
875
+ writer.writeBool(
876
+ 4,
877
+ f
878
+ );
879
+ }
880
+ f = message.getDomainRef();
881
+ if (f.length > 0) {
882
+ writer.writeString(
883
+ 5,
884
+ f
885
+ );
886
+ }
887
+ f = message.getCredentialsRef();
888
+ if (f.length > 0) {
889
+ writer.writeString(
890
+ 6,
891
+ f
892
+ );
893
+ }
894
+ f = message.getMaxContacts();
895
+ if (f !== 0) {
896
+ writer.writeInt32(
897
+ 7,
898
+ f
899
+ );
900
+ }
901
+ f = message.getExpires();
902
+ if (f !== 0) {
903
+ writer.writeInt32(
904
+ 8,
905
+ f
906
+ );
907
+ }
908
+ };
909
+
910
+
911
+ /**
912
+ * optional string name = 1;
913
+ * @return {string}
914
+ */
915
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getName = function() {
916
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
917
+ };
918
+
919
+
920
+ /**
921
+ * @param {string} value
922
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
923
+ */
924
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setName = function(value) {
925
+ return jspb.Message.setProto3StringField(this, 1, value);
926
+ };
927
+
928
+
929
+ /**
930
+ * optional string username = 2;
931
+ * @return {string}
932
+ */
933
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getUsername = function() {
934
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
935
+ };
936
+
937
+
938
+ /**
939
+ * @param {string} value
940
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
941
+ */
942
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setUsername = function(value) {
943
+ return jspb.Message.setProto3StringField(this, 2, value);
944
+ };
945
+
946
+
947
+ /**
948
+ * optional Privacy privacy = 3;
949
+ * @return {!proto.fonoster.agents.v1beta2.Privacy}
950
+ */
951
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getPrivacy = function() {
952
+ return /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
953
+ };
954
+
955
+
956
+ /**
957
+ * @param {!proto.fonoster.agents.v1beta2.Privacy} value
958
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
959
+ */
960
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setPrivacy = function(value) {
961
+ return jspb.Message.setProto3EnumField(this, 3, value);
962
+ };
963
+
964
+
965
+ /**
966
+ * optional bool enabled = 4;
967
+ * @return {boolean}
968
+ */
969
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getEnabled = function() {
970
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
971
+ };
972
+
973
+
974
+ /**
975
+ * @param {boolean} value
976
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
977
+ */
978
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setEnabled = function(value) {
979
+ return jspb.Message.setProto3BooleanField(this, 4, value);
980
+ };
981
+
982
+
983
+ /**
984
+ * optional string domain_ref = 5;
985
+ * @return {string}
986
+ */
987
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getDomainRef = function() {
988
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
989
+ };
990
+
991
+
992
+ /**
993
+ * @param {string} value
994
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
995
+ */
996
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setDomainRef = function(value) {
997
+ return jspb.Message.setProto3StringField(this, 5, value);
998
+ };
999
+
1000
+
1001
+ /**
1002
+ * optional string credentials_ref = 6;
1003
+ * @return {string}
1004
+ */
1005
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getCredentialsRef = function() {
1006
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1007
+ };
1008
+
1009
+
1010
+ /**
1011
+ * @param {string} value
1012
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
1013
+ */
1014
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setCredentialsRef = function(value) {
1015
+ return jspb.Message.setProto3StringField(this, 6, value);
1016
+ };
1017
+
1018
+
1019
+ /**
1020
+ * optional int32 max_contacts = 7;
1021
+ * @return {number}
1022
+ */
1023
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getMaxContacts = function() {
1024
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1025
+ };
1026
+
1027
+
1028
+ /**
1029
+ * @param {number} value
1030
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
1031
+ */
1032
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setMaxContacts = function(value) {
1033
+ return jspb.Message.setProto3IntField(this, 7, value);
1034
+ };
1035
+
1036
+
1037
+ /**
1038
+ * optional int32 expires = 8;
1039
+ * @return {number}
1040
+ */
1041
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.getExpires = function() {
1042
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1043
+ };
1044
+
1045
+
1046
+ /**
1047
+ * @param {number} value
1048
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentRequest} returns this
1049
+ */
1050
+ proto.fonoster.agents.v1beta2.CreateAgentRequest.prototype.setExpires = function(value) {
1051
+ return jspb.Message.setProto3IntField(this, 8, value);
1052
+ };
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1059
+ /**
1060
+ * Creates an object representation of this proto.
1061
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1062
+ * Optional fields that are not set will be set to undefined.
1063
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1064
+ * For the list of reserved names please see:
1065
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1066
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1067
+ * JSPB instance for transitional soy proto support:
1068
+ * http://goto/soy-param-migration
1069
+ * @return {!Object}
1070
+ */
1071
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.prototype.toObject = function(opt_includeInstance) {
1072
+ return proto.fonoster.agents.v1beta2.CreateAgentResponse.toObject(opt_includeInstance, this);
1073
+ };
1074
+
1075
+
1076
+ /**
1077
+ * Static version of the {@see toObject} method.
1078
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1079
+ * the JSPB instance for transitional soy proto support:
1080
+ * http://goto/soy-param-migration
1081
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentResponse} msg The msg instance to transform.
1082
+ * @return {!Object}
1083
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1084
+ */
1085
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.toObject = function(includeInstance, msg) {
1086
+ var f, obj = {
1087
+ ref: jspb.Message.getFieldWithDefault(msg, 1, "")
1088
+ };
1089
+
1090
+ if (includeInstance) {
1091
+ obj.$jspbMessageInstance = msg;
1092
+ }
1093
+ return obj;
1094
+ };
1095
+ }
1096
+
1097
+
1098
+ /**
1099
+ * Deserializes binary data (in protobuf wire format).
1100
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1101
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentResponse}
1102
+ */
1103
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.deserializeBinary = function(bytes) {
1104
+ var reader = new jspb.BinaryReader(bytes);
1105
+ var msg = new proto.fonoster.agents.v1beta2.CreateAgentResponse;
1106
+ return proto.fonoster.agents.v1beta2.CreateAgentResponse.deserializeBinaryFromReader(msg, reader);
1107
+ };
1108
+
1109
+
1110
+ /**
1111
+ * Deserializes binary data (in protobuf wire format) from the
1112
+ * given reader into the given message object.
1113
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentResponse} msg The message object to deserialize into.
1114
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1115
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentResponse}
1116
+ */
1117
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.deserializeBinaryFromReader = function(msg, reader) {
1118
+ while (reader.nextField()) {
1119
+ if (reader.isEndGroup()) {
1120
+ break;
1121
+ }
1122
+ var field = reader.getFieldNumber();
1123
+ switch (field) {
1124
+ case 1:
1125
+ var value = /** @type {string} */ (reader.readString());
1126
+ msg.setRef(value);
1127
+ break;
1128
+ default:
1129
+ reader.skipField();
1130
+ break;
1131
+ }
1132
+ }
1133
+ return msg;
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * Serializes the message to binary data (in protobuf wire format).
1139
+ * @return {!Uint8Array}
1140
+ */
1141
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.prototype.serializeBinary = function() {
1142
+ var writer = new jspb.BinaryWriter();
1143
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.serializeBinaryToWriter(this, writer);
1144
+ return writer.getResultBuffer();
1145
+ };
1146
+
1147
+
1148
+ /**
1149
+ * Serializes the given message to binary data (in protobuf wire
1150
+ * format), writing to the given BinaryWriter.
1151
+ * @param {!proto.fonoster.agents.v1beta2.CreateAgentResponse} message
1152
+ * @param {!jspb.BinaryWriter} writer
1153
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1154
+ */
1155
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.serializeBinaryToWriter = function(message, writer) {
1156
+ var f = undefined;
1157
+ f = message.getRef();
1158
+ if (f.length > 0) {
1159
+ writer.writeString(
1160
+ 1,
1161
+ f
1162
+ );
1163
+ }
1164
+ };
1165
+
1166
+
1167
+ /**
1168
+ * optional string ref = 1;
1169
+ * @return {string}
1170
+ */
1171
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.prototype.getRef = function() {
1172
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1173
+ };
1174
+
1175
+
1176
+ /**
1177
+ * @param {string} value
1178
+ * @return {!proto.fonoster.agents.v1beta2.CreateAgentResponse} returns this
1179
+ */
1180
+ proto.fonoster.agents.v1beta2.CreateAgentResponse.prototype.setRef = function(value) {
1181
+ return jspb.Message.setProto3StringField(this, 1, value);
1182
+ };
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1189
+ /**
1190
+ * Creates an object representation of this proto.
1191
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1192
+ * Optional fields that are not set will be set to undefined.
1193
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1194
+ * For the list of reserved names please see:
1195
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1196
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1197
+ * JSPB instance for transitional soy proto support:
1198
+ * http://goto/soy-param-migration
1199
+ * @return {!Object}
1200
+ */
1201
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.toObject = function(opt_includeInstance) {
1202
+ return proto.fonoster.agents.v1beta2.UpdateAgentRequest.toObject(opt_includeInstance, this);
1203
+ };
1204
+
1205
+
1206
+ /**
1207
+ * Static version of the {@see toObject} method.
1208
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1209
+ * the JSPB instance for transitional soy proto support:
1210
+ * http://goto/soy-param-migration
1211
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} msg The msg instance to transform.
1212
+ * @return {!Object}
1213
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1214
+ */
1215
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.toObject = function(includeInstance, msg) {
1216
+ var f, obj = {
1217
+ ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
1218
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
1219
+ privacy: jspb.Message.getFieldWithDefault(msg, 3, 0),
1220
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
1221
+ domainRef: jspb.Message.getFieldWithDefault(msg, 5, ""),
1222
+ credentialsRef: jspb.Message.getFieldWithDefault(msg, 6, ""),
1223
+ maxContacts: jspb.Message.getFieldWithDefault(msg, 7, 0),
1224
+ expires: jspb.Message.getFieldWithDefault(msg, 8, 0)
1225
+ };
1226
+
1227
+ if (includeInstance) {
1228
+ obj.$jspbMessageInstance = msg;
1229
+ }
1230
+ return obj;
1231
+ };
1232
+ }
1233
+
1234
+
1235
+ /**
1236
+ * Deserializes binary data (in protobuf wire format).
1237
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1238
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest}
1239
+ */
1240
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.deserializeBinary = function(bytes) {
1241
+ var reader = new jspb.BinaryReader(bytes);
1242
+ var msg = new proto.fonoster.agents.v1beta2.UpdateAgentRequest;
1243
+ return proto.fonoster.agents.v1beta2.UpdateAgentRequest.deserializeBinaryFromReader(msg, reader);
1244
+ };
1245
+
1246
+
1247
+ /**
1248
+ * Deserializes binary data (in protobuf wire format) from the
1249
+ * given reader into the given message object.
1250
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} msg The message object to deserialize into.
1251
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1252
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest}
1253
+ */
1254
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.deserializeBinaryFromReader = function(msg, reader) {
1255
+ while (reader.nextField()) {
1256
+ if (reader.isEndGroup()) {
1257
+ break;
1258
+ }
1259
+ var field = reader.getFieldNumber();
1260
+ switch (field) {
1261
+ case 1:
1262
+ var value = /** @type {string} */ (reader.readString());
1263
+ msg.setRef(value);
1264
+ break;
1265
+ case 2:
1266
+ var value = /** @type {string} */ (reader.readString());
1267
+ msg.setName(value);
1268
+ break;
1269
+ case 3:
1270
+ var value = /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (reader.readEnum());
1271
+ msg.setPrivacy(value);
1272
+ break;
1273
+ case 4:
1274
+ var value = /** @type {boolean} */ (reader.readBool());
1275
+ msg.setEnabled(value);
1276
+ break;
1277
+ case 5:
1278
+ var value = /** @type {string} */ (reader.readString());
1279
+ msg.setDomainRef(value);
1280
+ break;
1281
+ case 6:
1282
+ var value = /** @type {string} */ (reader.readString());
1283
+ msg.setCredentialsRef(value);
1284
+ break;
1285
+ case 7:
1286
+ var value = /** @type {number} */ (reader.readInt32());
1287
+ msg.setMaxContacts(value);
1288
+ break;
1289
+ case 8:
1290
+ var value = /** @type {number} */ (reader.readInt32());
1291
+ msg.setExpires(value);
1292
+ break;
1293
+ default:
1294
+ reader.skipField();
1295
+ break;
1296
+ }
1297
+ }
1298
+ return msg;
1299
+ };
1300
+
1301
+
1302
+ /**
1303
+ * Serializes the message to binary data (in protobuf wire format).
1304
+ * @return {!Uint8Array}
1305
+ */
1306
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.serializeBinary = function() {
1307
+ var writer = new jspb.BinaryWriter();
1308
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.serializeBinaryToWriter(this, writer);
1309
+ return writer.getResultBuffer();
1310
+ };
1311
+
1312
+
1313
+ /**
1314
+ * Serializes the given message to binary data (in protobuf wire
1315
+ * format), writing to the given BinaryWriter.
1316
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} message
1317
+ * @param {!jspb.BinaryWriter} writer
1318
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1319
+ */
1320
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.serializeBinaryToWriter = function(message, writer) {
1321
+ var f = undefined;
1322
+ f = message.getRef();
1323
+ if (f.length > 0) {
1324
+ writer.writeString(
1325
+ 1,
1326
+ f
1327
+ );
1328
+ }
1329
+ f = message.getName();
1330
+ if (f.length > 0) {
1331
+ writer.writeString(
1332
+ 2,
1333
+ f
1334
+ );
1335
+ }
1336
+ f = message.getPrivacy();
1337
+ if (f !== 0.0) {
1338
+ writer.writeEnum(
1339
+ 3,
1340
+ f
1341
+ );
1342
+ }
1343
+ f = message.getEnabled();
1344
+ if (f) {
1345
+ writer.writeBool(
1346
+ 4,
1347
+ f
1348
+ );
1349
+ }
1350
+ f = message.getDomainRef();
1351
+ if (f.length > 0) {
1352
+ writer.writeString(
1353
+ 5,
1354
+ f
1355
+ );
1356
+ }
1357
+ f = message.getCredentialsRef();
1358
+ if (f.length > 0) {
1359
+ writer.writeString(
1360
+ 6,
1361
+ f
1362
+ );
1363
+ }
1364
+ f = message.getMaxContacts();
1365
+ if (f !== 0) {
1366
+ writer.writeInt32(
1367
+ 7,
1368
+ f
1369
+ );
1370
+ }
1371
+ f = message.getExpires();
1372
+ if (f !== 0) {
1373
+ writer.writeInt32(
1374
+ 8,
1375
+ f
1376
+ );
1377
+ }
1378
+ };
1379
+
1380
+
1381
+ /**
1382
+ * optional string ref = 1;
1383
+ * @return {string}
1384
+ */
1385
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getRef = function() {
1386
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1387
+ };
1388
+
1389
+
1390
+ /**
1391
+ * @param {string} value
1392
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1393
+ */
1394
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setRef = function(value) {
1395
+ return jspb.Message.setProto3StringField(this, 1, value);
1396
+ };
1397
+
1398
+
1399
+ /**
1400
+ * optional string name = 2;
1401
+ * @return {string}
1402
+ */
1403
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getName = function() {
1404
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * @param {string} value
1410
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1411
+ */
1412
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setName = function(value) {
1413
+ return jspb.Message.setProto3StringField(this, 2, value);
1414
+ };
1415
+
1416
+
1417
+ /**
1418
+ * optional Privacy privacy = 3;
1419
+ * @return {!proto.fonoster.agents.v1beta2.Privacy}
1420
+ */
1421
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getPrivacy = function() {
1422
+ return /** @type {!proto.fonoster.agents.v1beta2.Privacy} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1423
+ };
1424
+
1425
+
1426
+ /**
1427
+ * @param {!proto.fonoster.agents.v1beta2.Privacy} value
1428
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1429
+ */
1430
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setPrivacy = function(value) {
1431
+ return jspb.Message.setProto3EnumField(this, 3, value);
1432
+ };
1433
+
1434
+
1435
+ /**
1436
+ * optional bool enabled = 4;
1437
+ * @return {boolean}
1438
+ */
1439
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getEnabled = function() {
1440
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1441
+ };
1442
+
1443
+
1444
+ /**
1445
+ * @param {boolean} value
1446
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1447
+ */
1448
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setEnabled = function(value) {
1449
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1450
+ };
1451
+
1452
+
1453
+ /**
1454
+ * optional string domain_ref = 5;
1455
+ * @return {string}
1456
+ */
1457
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getDomainRef = function() {
1458
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1459
+ };
1460
+
1461
+
1462
+ /**
1463
+ * @param {string} value
1464
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1465
+ */
1466
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setDomainRef = function(value) {
1467
+ return jspb.Message.setProto3StringField(this, 5, value);
1468
+ };
1469
+
1470
+
1471
+ /**
1472
+ * optional string credentials_ref = 6;
1473
+ * @return {string}
1474
+ */
1475
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getCredentialsRef = function() {
1476
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1477
+ };
1478
+
1479
+
1480
+ /**
1481
+ * @param {string} value
1482
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1483
+ */
1484
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setCredentialsRef = function(value) {
1485
+ return jspb.Message.setProto3StringField(this, 6, value);
1486
+ };
1487
+
1488
+
1489
+ /**
1490
+ * optional int32 max_contacts = 7;
1491
+ * @return {number}
1492
+ */
1493
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getMaxContacts = function() {
1494
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1495
+ };
1496
+
1497
+
1498
+ /**
1499
+ * @param {number} value
1500
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1501
+ */
1502
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setMaxContacts = function(value) {
1503
+ return jspb.Message.setProto3IntField(this, 7, value);
1504
+ };
1505
+
1506
+
1507
+ /**
1508
+ * optional int32 expires = 8;
1509
+ * @return {number}
1510
+ */
1511
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.getExpires = function() {
1512
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1513
+ };
1514
+
1515
+
1516
+ /**
1517
+ * @param {number} value
1518
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentRequest} returns this
1519
+ */
1520
+ proto.fonoster.agents.v1beta2.UpdateAgentRequest.prototype.setExpires = function(value) {
1521
+ return jspb.Message.setProto3IntField(this, 8, value);
1522
+ };
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1529
+ /**
1530
+ * Creates an object representation of this proto.
1531
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1532
+ * Optional fields that are not set will be set to undefined.
1533
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1534
+ * For the list of reserved names please see:
1535
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1536
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1537
+ * JSPB instance for transitional soy proto support:
1538
+ * http://goto/soy-param-migration
1539
+ * @return {!Object}
1540
+ */
1541
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.prototype.toObject = function(opt_includeInstance) {
1542
+ return proto.fonoster.agents.v1beta2.UpdateAgentResponse.toObject(opt_includeInstance, this);
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * Static version of the {@see toObject} method.
1548
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1549
+ * the JSPB instance for transitional soy proto support:
1550
+ * http://goto/soy-param-migration
1551
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentResponse} msg The msg instance to transform.
1552
+ * @return {!Object}
1553
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1554
+ */
1555
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.toObject = function(includeInstance, msg) {
1556
+ var f, obj = {
1557
+ ref: jspb.Message.getFieldWithDefault(msg, 1, "")
1558
+ };
1559
+
1560
+ if (includeInstance) {
1561
+ obj.$jspbMessageInstance = msg;
1562
+ }
1563
+ return obj;
1564
+ };
1565
+ }
1566
+
1567
+
1568
+ /**
1569
+ * Deserializes binary data (in protobuf wire format).
1570
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1571
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentResponse}
1572
+ */
1573
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.deserializeBinary = function(bytes) {
1574
+ var reader = new jspb.BinaryReader(bytes);
1575
+ var msg = new proto.fonoster.agents.v1beta2.UpdateAgentResponse;
1576
+ return proto.fonoster.agents.v1beta2.UpdateAgentResponse.deserializeBinaryFromReader(msg, reader);
1577
+ };
1578
+
1579
+
1580
+ /**
1581
+ * Deserializes binary data (in protobuf wire format) from the
1582
+ * given reader into the given message object.
1583
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentResponse} msg The message object to deserialize into.
1584
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1585
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentResponse}
1586
+ */
1587
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.deserializeBinaryFromReader = function(msg, reader) {
1588
+ while (reader.nextField()) {
1589
+ if (reader.isEndGroup()) {
1590
+ break;
1591
+ }
1592
+ var field = reader.getFieldNumber();
1593
+ switch (field) {
1594
+ case 1:
1595
+ var value = /** @type {string} */ (reader.readString());
1596
+ msg.setRef(value);
1597
+ break;
1598
+ default:
1599
+ reader.skipField();
1600
+ break;
1601
+ }
1602
+ }
1603
+ return msg;
1604
+ };
1605
+
1606
+
1607
+ /**
1608
+ * Serializes the message to binary data (in protobuf wire format).
1609
+ * @return {!Uint8Array}
1610
+ */
1611
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.prototype.serializeBinary = function() {
1612
+ var writer = new jspb.BinaryWriter();
1613
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.serializeBinaryToWriter(this, writer);
1614
+ return writer.getResultBuffer();
1615
+ };
1616
+
1617
+
1618
+ /**
1619
+ * Serializes the given message to binary data (in protobuf wire
1620
+ * format), writing to the given BinaryWriter.
1621
+ * @param {!proto.fonoster.agents.v1beta2.UpdateAgentResponse} message
1622
+ * @param {!jspb.BinaryWriter} writer
1623
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1624
+ */
1625
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.serializeBinaryToWriter = function(message, writer) {
1626
+ var f = undefined;
1627
+ f = message.getRef();
1628
+ if (f.length > 0) {
1629
+ writer.writeString(
1630
+ 1,
1631
+ f
1632
+ );
1633
+ }
1634
+ };
1635
+
1636
+
1637
+ /**
1638
+ * optional string ref = 1;
1639
+ * @return {string}
1640
+ */
1641
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.prototype.getRef = function() {
1642
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1643
+ };
1644
+
1645
+
1646
+ /**
1647
+ * @param {string} value
1648
+ * @return {!proto.fonoster.agents.v1beta2.UpdateAgentResponse} returns this
1649
+ */
1650
+ proto.fonoster.agents.v1beta2.UpdateAgentResponse.prototype.setRef = function(value) {
1651
+ return jspb.Message.setProto3StringField(this, 1, value);
1652
+ };
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1659
+ /**
1660
+ * Creates an object representation of this proto.
1661
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1662
+ * Optional fields that are not set will be set to undefined.
1663
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1664
+ * For the list of reserved names please see:
1665
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1666
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1667
+ * JSPB instance for transitional soy proto support:
1668
+ * http://goto/soy-param-migration
1669
+ * @return {!Object}
1670
+ */
1671
+ proto.fonoster.agents.v1beta2.GetAgentRequest.prototype.toObject = function(opt_includeInstance) {
1672
+ return proto.fonoster.agents.v1beta2.GetAgentRequest.toObject(opt_includeInstance, this);
1673
+ };
1674
+
1675
+
1676
+ /**
1677
+ * Static version of the {@see toObject} method.
1678
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1679
+ * the JSPB instance for transitional soy proto support:
1680
+ * http://goto/soy-param-migration
1681
+ * @param {!proto.fonoster.agents.v1beta2.GetAgentRequest} msg The msg instance to transform.
1682
+ * @return {!Object}
1683
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1684
+ */
1685
+ proto.fonoster.agents.v1beta2.GetAgentRequest.toObject = function(includeInstance, msg) {
1686
+ var f, obj = {
1687
+ ref: jspb.Message.getFieldWithDefault(msg, 1, "")
1688
+ };
1689
+
1690
+ if (includeInstance) {
1691
+ obj.$jspbMessageInstance = msg;
1692
+ }
1693
+ return obj;
1694
+ };
1695
+ }
1696
+
1697
+
1698
+ /**
1699
+ * Deserializes binary data (in protobuf wire format).
1700
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1701
+ * @return {!proto.fonoster.agents.v1beta2.GetAgentRequest}
1702
+ */
1703
+ proto.fonoster.agents.v1beta2.GetAgentRequest.deserializeBinary = function(bytes) {
1704
+ var reader = new jspb.BinaryReader(bytes);
1705
+ var msg = new proto.fonoster.agents.v1beta2.GetAgentRequest;
1706
+ return proto.fonoster.agents.v1beta2.GetAgentRequest.deserializeBinaryFromReader(msg, reader);
1707
+ };
1708
+
1709
+
1710
+ /**
1711
+ * Deserializes binary data (in protobuf wire format) from the
1712
+ * given reader into the given message object.
1713
+ * @param {!proto.fonoster.agents.v1beta2.GetAgentRequest} msg The message object to deserialize into.
1714
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1715
+ * @return {!proto.fonoster.agents.v1beta2.GetAgentRequest}
1716
+ */
1717
+ proto.fonoster.agents.v1beta2.GetAgentRequest.deserializeBinaryFromReader = function(msg, reader) {
1718
+ while (reader.nextField()) {
1719
+ if (reader.isEndGroup()) {
1720
+ break;
1721
+ }
1722
+ var field = reader.getFieldNumber();
1723
+ switch (field) {
1724
+ case 1:
1725
+ var value = /** @type {string} */ (reader.readString());
1726
+ msg.setRef(value);
1727
+ break;
1728
+ default:
1729
+ reader.skipField();
1730
+ break;
1731
+ }
1732
+ }
1733
+ return msg;
1734
+ };
1735
+
1736
+
1737
+ /**
1738
+ * Serializes the message to binary data (in protobuf wire format).
1739
+ * @return {!Uint8Array}
1740
+ */
1741
+ proto.fonoster.agents.v1beta2.GetAgentRequest.prototype.serializeBinary = function() {
1742
+ var writer = new jspb.BinaryWriter();
1743
+ proto.fonoster.agents.v1beta2.GetAgentRequest.serializeBinaryToWriter(this, writer);
1744
+ return writer.getResultBuffer();
1745
+ };
1746
+
1747
+
1748
+ /**
1749
+ * Serializes the given message to binary data (in protobuf wire
1750
+ * format), writing to the given BinaryWriter.
1751
+ * @param {!proto.fonoster.agents.v1beta2.GetAgentRequest} message
1752
+ * @param {!jspb.BinaryWriter} writer
1753
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1754
+ */
1755
+ proto.fonoster.agents.v1beta2.GetAgentRequest.serializeBinaryToWriter = function(message, writer) {
1756
+ var f = undefined;
1757
+ f = message.getRef();
1758
+ if (f.length > 0) {
1759
+ writer.writeString(
1760
+ 1,
1761
+ f
1762
+ );
1763
+ }
1764
+ };
1765
+
1766
+
1767
+ /**
1768
+ * optional string ref = 1;
1769
+ * @return {string}
1770
+ */
1771
+ proto.fonoster.agents.v1beta2.GetAgentRequest.prototype.getRef = function() {
1772
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1773
+ };
1774
+
1775
+
1776
+ /**
1777
+ * @param {string} value
1778
+ * @return {!proto.fonoster.agents.v1beta2.GetAgentRequest} returns this
1779
+ */
1780
+ proto.fonoster.agents.v1beta2.GetAgentRequest.prototype.setRef = function(value) {
1781
+ return jspb.Message.setProto3StringField(this, 1, value);
1782
+ };
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1789
+ /**
1790
+ * Creates an object representation of this proto.
1791
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1792
+ * Optional fields that are not set will be set to undefined.
1793
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1794
+ * For the list of reserved names please see:
1795
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1796
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1797
+ * JSPB instance for transitional soy proto support:
1798
+ * http://goto/soy-param-migration
1799
+ * @return {!Object}
1800
+ */
1801
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.prototype.toObject = function(opt_includeInstance) {
1802
+ return proto.fonoster.agents.v1beta2.DeleteAgentRequest.toObject(opt_includeInstance, this);
1803
+ };
1804
+
1805
+
1806
+ /**
1807
+ * Static version of the {@see toObject} method.
1808
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1809
+ * the JSPB instance for transitional soy proto support:
1810
+ * http://goto/soy-param-migration
1811
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentRequest} msg The msg instance to transform.
1812
+ * @return {!Object}
1813
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1814
+ */
1815
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.toObject = function(includeInstance, msg) {
1816
+ var f, obj = {
1817
+ ref: jspb.Message.getFieldWithDefault(msg, 1, "")
1818
+ };
1819
+
1820
+ if (includeInstance) {
1821
+ obj.$jspbMessageInstance = msg;
1822
+ }
1823
+ return obj;
1824
+ };
1825
+ }
1826
+
1827
+
1828
+ /**
1829
+ * Deserializes binary data (in protobuf wire format).
1830
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1831
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentRequest}
1832
+ */
1833
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.deserializeBinary = function(bytes) {
1834
+ var reader = new jspb.BinaryReader(bytes);
1835
+ var msg = new proto.fonoster.agents.v1beta2.DeleteAgentRequest;
1836
+ return proto.fonoster.agents.v1beta2.DeleteAgentRequest.deserializeBinaryFromReader(msg, reader);
1837
+ };
1838
+
1839
+
1840
+ /**
1841
+ * Deserializes binary data (in protobuf wire format) from the
1842
+ * given reader into the given message object.
1843
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentRequest} msg The message object to deserialize into.
1844
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1845
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentRequest}
1846
+ */
1847
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.deserializeBinaryFromReader = function(msg, reader) {
1848
+ while (reader.nextField()) {
1849
+ if (reader.isEndGroup()) {
1850
+ break;
1851
+ }
1852
+ var field = reader.getFieldNumber();
1853
+ switch (field) {
1854
+ case 1:
1855
+ var value = /** @type {string} */ (reader.readString());
1856
+ msg.setRef(value);
1857
+ break;
1858
+ default:
1859
+ reader.skipField();
1860
+ break;
1861
+ }
1862
+ }
1863
+ return msg;
1864
+ };
1865
+
1866
+
1867
+ /**
1868
+ * Serializes the message to binary data (in protobuf wire format).
1869
+ * @return {!Uint8Array}
1870
+ */
1871
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.prototype.serializeBinary = function() {
1872
+ var writer = new jspb.BinaryWriter();
1873
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.serializeBinaryToWriter(this, writer);
1874
+ return writer.getResultBuffer();
1875
+ };
1876
+
1877
+
1878
+ /**
1879
+ * Serializes the given message to binary data (in protobuf wire
1880
+ * format), writing to the given BinaryWriter.
1881
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentRequest} message
1882
+ * @param {!jspb.BinaryWriter} writer
1883
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1884
+ */
1885
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.serializeBinaryToWriter = function(message, writer) {
1886
+ var f = undefined;
1887
+ f = message.getRef();
1888
+ if (f.length > 0) {
1889
+ writer.writeString(
1890
+ 1,
1891
+ f
1892
+ );
1893
+ }
1894
+ };
1895
+
1896
+
1897
+ /**
1898
+ * optional string ref = 1;
1899
+ * @return {string}
1900
+ */
1901
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.prototype.getRef = function() {
1902
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1903
+ };
1904
+
1905
+
1906
+ /**
1907
+ * @param {string} value
1908
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentRequest} returns this
1909
+ */
1910
+ proto.fonoster.agents.v1beta2.DeleteAgentRequest.prototype.setRef = function(value) {
1911
+ return jspb.Message.setProto3StringField(this, 1, value);
1912
+ };
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1919
+ /**
1920
+ * Creates an object representation of this proto.
1921
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1922
+ * Optional fields that are not set will be set to undefined.
1923
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1924
+ * For the list of reserved names please see:
1925
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1926
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1927
+ * JSPB instance for transitional soy proto support:
1928
+ * http://goto/soy-param-migration
1929
+ * @return {!Object}
1930
+ */
1931
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.prototype.toObject = function(opt_includeInstance) {
1932
+ return proto.fonoster.agents.v1beta2.DeleteAgentResponse.toObject(opt_includeInstance, this);
1933
+ };
1934
+
1935
+
1936
+ /**
1937
+ * Static version of the {@see toObject} method.
1938
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1939
+ * the JSPB instance for transitional soy proto support:
1940
+ * http://goto/soy-param-migration
1941
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentResponse} msg The msg instance to transform.
1942
+ * @return {!Object}
1943
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1944
+ */
1945
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.toObject = function(includeInstance, msg) {
1946
+ var f, obj = {
1947
+ ref: jspb.Message.getFieldWithDefault(msg, 1, "")
1948
+ };
1949
+
1950
+ if (includeInstance) {
1951
+ obj.$jspbMessageInstance = msg;
1952
+ }
1953
+ return obj;
1954
+ };
1955
+ }
1956
+
1957
+
1958
+ /**
1959
+ * Deserializes binary data (in protobuf wire format).
1960
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1961
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentResponse}
1962
+ */
1963
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.deserializeBinary = function(bytes) {
1964
+ var reader = new jspb.BinaryReader(bytes);
1965
+ var msg = new proto.fonoster.agents.v1beta2.DeleteAgentResponse;
1966
+ return proto.fonoster.agents.v1beta2.DeleteAgentResponse.deserializeBinaryFromReader(msg, reader);
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * Deserializes binary data (in protobuf wire format) from the
1972
+ * given reader into the given message object.
1973
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentResponse} msg The message object to deserialize into.
1974
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1975
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentResponse}
1976
+ */
1977
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.deserializeBinaryFromReader = function(msg, reader) {
1978
+ while (reader.nextField()) {
1979
+ if (reader.isEndGroup()) {
1980
+ break;
1981
+ }
1982
+ var field = reader.getFieldNumber();
1983
+ switch (field) {
1984
+ case 1:
1985
+ var value = /** @type {string} */ (reader.readString());
1986
+ msg.setRef(value);
1987
+ break;
1988
+ default:
1989
+ reader.skipField();
1990
+ break;
1991
+ }
1992
+ }
1993
+ return msg;
1994
+ };
1995
+
1996
+
1997
+ /**
1998
+ * Serializes the message to binary data (in protobuf wire format).
1999
+ * @return {!Uint8Array}
2000
+ */
2001
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.prototype.serializeBinary = function() {
2002
+ var writer = new jspb.BinaryWriter();
2003
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.serializeBinaryToWriter(this, writer);
2004
+ return writer.getResultBuffer();
2005
+ };
2006
+
2007
+
2008
+ /**
2009
+ * Serializes the given message to binary data (in protobuf wire
2010
+ * format), writing to the given BinaryWriter.
2011
+ * @param {!proto.fonoster.agents.v1beta2.DeleteAgentResponse} message
2012
+ * @param {!jspb.BinaryWriter} writer
2013
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2014
+ */
2015
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.serializeBinaryToWriter = function(message, writer) {
2016
+ var f = undefined;
2017
+ f = message.getRef();
2018
+ if (f.length > 0) {
2019
+ writer.writeString(
2020
+ 1,
2021
+ f
2022
+ );
2023
+ }
2024
+ };
2025
+
2026
+
2027
+ /**
2028
+ * optional string ref = 1;
2029
+ * @return {string}
2030
+ */
2031
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.prototype.getRef = function() {
2032
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2033
+ };
2034
+
2035
+
2036
+ /**
2037
+ * @param {string} value
2038
+ * @return {!proto.fonoster.agents.v1beta2.DeleteAgentResponse} returns this
2039
+ */
2040
+ proto.fonoster.agents.v1beta2.DeleteAgentResponse.prototype.setRef = function(value) {
2041
+ return jspb.Message.setProto3StringField(this, 1, value);
2042
+ };
2043
+
2044
+
2045
+
2046
+
2047
+
2048
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2049
+ /**
2050
+ * Creates an object representation of this proto.
2051
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2052
+ * Optional fields that are not set will be set to undefined.
2053
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2054
+ * For the list of reserved names please see:
2055
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2056
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2057
+ * JSPB instance for transitional soy proto support:
2058
+ * http://goto/soy-param-migration
2059
+ * @return {!Object}
2060
+ */
2061
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.toObject = function(opt_includeInstance) {
2062
+ return proto.fonoster.agents.v1beta2.ListAgentsRequest.toObject(opt_includeInstance, this);
2063
+ };
2064
+
2065
+
2066
+ /**
2067
+ * Static version of the {@see toObject} method.
2068
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2069
+ * the JSPB instance for transitional soy proto support:
2070
+ * http://goto/soy-param-migration
2071
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsRequest} msg The msg instance to transform.
2072
+ * @return {!Object}
2073
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2074
+ */
2075
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.toObject = function(includeInstance, msg) {
2076
+ var f, obj = {
2077
+ pageSize: jspb.Message.getFieldWithDefault(msg, 1, 0),
2078
+ pageToken: jspb.Message.getFieldWithDefault(msg, 2, "")
2079
+ };
2080
+
2081
+ if (includeInstance) {
2082
+ obj.$jspbMessageInstance = msg;
2083
+ }
2084
+ return obj;
2085
+ };
2086
+ }
2087
+
2088
+
2089
+ /**
2090
+ * Deserializes binary data (in protobuf wire format).
2091
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2092
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsRequest}
2093
+ */
2094
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.deserializeBinary = function(bytes) {
2095
+ var reader = new jspb.BinaryReader(bytes);
2096
+ var msg = new proto.fonoster.agents.v1beta2.ListAgentsRequest;
2097
+ return proto.fonoster.agents.v1beta2.ListAgentsRequest.deserializeBinaryFromReader(msg, reader);
2098
+ };
2099
+
2100
+
2101
+ /**
2102
+ * Deserializes binary data (in protobuf wire format) from the
2103
+ * given reader into the given message object.
2104
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsRequest} msg The message object to deserialize into.
2105
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2106
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsRequest}
2107
+ */
2108
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.deserializeBinaryFromReader = function(msg, reader) {
2109
+ while (reader.nextField()) {
2110
+ if (reader.isEndGroup()) {
2111
+ break;
2112
+ }
2113
+ var field = reader.getFieldNumber();
2114
+ switch (field) {
2115
+ case 1:
2116
+ var value = /** @type {number} */ (reader.readInt32());
2117
+ msg.setPageSize(value);
2118
+ break;
2119
+ case 2:
2120
+ var value = /** @type {string} */ (reader.readString());
2121
+ msg.setPageToken(value);
2122
+ break;
2123
+ default:
2124
+ reader.skipField();
2125
+ break;
2126
+ }
2127
+ }
2128
+ return msg;
2129
+ };
2130
+
2131
+
2132
+ /**
2133
+ * Serializes the message to binary data (in protobuf wire format).
2134
+ * @return {!Uint8Array}
2135
+ */
2136
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.serializeBinary = function() {
2137
+ var writer = new jspb.BinaryWriter();
2138
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.serializeBinaryToWriter(this, writer);
2139
+ return writer.getResultBuffer();
2140
+ };
2141
+
2142
+
2143
+ /**
2144
+ * Serializes the given message to binary data (in protobuf wire
2145
+ * format), writing to the given BinaryWriter.
2146
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsRequest} message
2147
+ * @param {!jspb.BinaryWriter} writer
2148
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2149
+ */
2150
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.serializeBinaryToWriter = function(message, writer) {
2151
+ var f = undefined;
2152
+ f = message.getPageSize();
2153
+ if (f !== 0) {
2154
+ writer.writeInt32(
2155
+ 1,
2156
+ f
2157
+ );
2158
+ }
2159
+ f = message.getPageToken();
2160
+ if (f.length > 0) {
2161
+ writer.writeString(
2162
+ 2,
2163
+ f
2164
+ );
2165
+ }
2166
+ };
2167
+
2168
+
2169
+ /**
2170
+ * optional int32 page_size = 1;
2171
+ * @return {number}
2172
+ */
2173
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.getPageSize = function() {
2174
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2175
+ };
2176
+
2177
+
2178
+ /**
2179
+ * @param {number} value
2180
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsRequest} returns this
2181
+ */
2182
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.setPageSize = function(value) {
2183
+ return jspb.Message.setProto3IntField(this, 1, value);
2184
+ };
2185
+
2186
+
2187
+ /**
2188
+ * optional string page_token = 2;
2189
+ * @return {string}
2190
+ */
2191
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.getPageToken = function() {
2192
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2193
+ };
2194
+
2195
+
2196
+ /**
2197
+ * @param {string} value
2198
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsRequest} returns this
2199
+ */
2200
+ proto.fonoster.agents.v1beta2.ListAgentsRequest.prototype.setPageToken = function(value) {
2201
+ return jspb.Message.setProto3StringField(this, 2, value);
2202
+ };
2203
+
2204
+
2205
+
2206
+ /**
2207
+ * List of repeated fields within this message type.
2208
+ * @private {!Array<number>}
2209
+ * @const
2210
+ */
2211
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.repeatedFields_ = [1];
2212
+
2213
+
2214
+
2215
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2216
+ /**
2217
+ * Creates an object representation of this proto.
2218
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2219
+ * Optional fields that are not set will be set to undefined.
2220
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2221
+ * For the list of reserved names please see:
2222
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2223
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2224
+ * JSPB instance for transitional soy proto support:
2225
+ * http://goto/soy-param-migration
2226
+ * @return {!Object}
2227
+ */
2228
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.toObject = function(opt_includeInstance) {
2229
+ return proto.fonoster.agents.v1beta2.ListAgentsResponse.toObject(opt_includeInstance, this);
2230
+ };
2231
+
2232
+
2233
+ /**
2234
+ * Static version of the {@see toObject} method.
2235
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2236
+ * the JSPB instance for transitional soy proto support:
2237
+ * http://goto/soy-param-migration
2238
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsResponse} msg The msg instance to transform.
2239
+ * @return {!Object}
2240
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2241
+ */
2242
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.toObject = function(includeInstance, msg) {
2243
+ var f, obj = {
2244
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2245
+ proto.fonoster.agents.v1beta2.Agent.toObject, includeInstance),
2246
+ nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "")
2247
+ };
2248
+
2249
+ if (includeInstance) {
2250
+ obj.$jspbMessageInstance = msg;
2251
+ }
2252
+ return obj;
2253
+ };
2254
+ }
2255
+
2256
+
2257
+ /**
2258
+ * Deserializes binary data (in protobuf wire format).
2259
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2260
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsResponse}
2261
+ */
2262
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.deserializeBinary = function(bytes) {
2263
+ var reader = new jspb.BinaryReader(bytes);
2264
+ var msg = new proto.fonoster.agents.v1beta2.ListAgentsResponse;
2265
+ return proto.fonoster.agents.v1beta2.ListAgentsResponse.deserializeBinaryFromReader(msg, reader);
2266
+ };
2267
+
2268
+
2269
+ /**
2270
+ * Deserializes binary data (in protobuf wire format) from the
2271
+ * given reader into the given message object.
2272
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsResponse} msg The message object to deserialize into.
2273
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2274
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsResponse}
2275
+ */
2276
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.deserializeBinaryFromReader = function(msg, reader) {
2277
+ while (reader.nextField()) {
2278
+ if (reader.isEndGroup()) {
2279
+ break;
2280
+ }
2281
+ var field = reader.getFieldNumber();
2282
+ switch (field) {
2283
+ case 1:
2284
+ var value = new proto.fonoster.agents.v1beta2.Agent;
2285
+ reader.readMessage(value,proto.fonoster.agents.v1beta2.Agent.deserializeBinaryFromReader);
2286
+ msg.addItems(value);
2287
+ break;
2288
+ case 2:
2289
+ var value = /** @type {string} */ (reader.readString());
2290
+ msg.setNextPageToken(value);
2291
+ break;
2292
+ default:
2293
+ reader.skipField();
2294
+ break;
2295
+ }
2296
+ }
2297
+ return msg;
2298
+ };
2299
+
2300
+
2301
+ /**
2302
+ * Serializes the message to binary data (in protobuf wire format).
2303
+ * @return {!Uint8Array}
2304
+ */
2305
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.serializeBinary = function() {
2306
+ var writer = new jspb.BinaryWriter();
2307
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.serializeBinaryToWriter(this, writer);
2308
+ return writer.getResultBuffer();
2309
+ };
2310
+
2311
+
2312
+ /**
2313
+ * Serializes the given message to binary data (in protobuf wire
2314
+ * format), writing to the given BinaryWriter.
2315
+ * @param {!proto.fonoster.agents.v1beta2.ListAgentsResponse} message
2316
+ * @param {!jspb.BinaryWriter} writer
2317
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2318
+ */
2319
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.serializeBinaryToWriter = function(message, writer) {
2320
+ var f = undefined;
2321
+ f = message.getItemsList();
2322
+ if (f.length > 0) {
2323
+ writer.writeRepeatedMessage(
2324
+ 1,
2325
+ f,
2326
+ proto.fonoster.agents.v1beta2.Agent.serializeBinaryToWriter
2327
+ );
2328
+ }
2329
+ f = message.getNextPageToken();
2330
+ if (f.length > 0) {
2331
+ writer.writeString(
2332
+ 2,
2333
+ f
2334
+ );
2335
+ }
2336
+ };
2337
+
2338
+
2339
+ /**
2340
+ * repeated Agent items = 1;
2341
+ * @return {!Array<!proto.fonoster.agents.v1beta2.Agent>}
2342
+ */
2343
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.getItemsList = function() {
2344
+ return /** @type{!Array<!proto.fonoster.agents.v1beta2.Agent>} */ (
2345
+ jspb.Message.getRepeatedWrapperField(this, proto.fonoster.agents.v1beta2.Agent, 1));
2346
+ };
2347
+
2348
+
2349
+ /**
2350
+ * @param {!Array<!proto.fonoster.agents.v1beta2.Agent>} value
2351
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsResponse} returns this
2352
+ */
2353
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.setItemsList = function(value) {
2354
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2355
+ };
2356
+
2357
+
2358
+ /**
2359
+ * @param {!proto.fonoster.agents.v1beta2.Agent=} opt_value
2360
+ * @param {number=} opt_index
2361
+ * @return {!proto.fonoster.agents.v1beta2.Agent}
2362
+ */
2363
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.addItems = function(opt_value, opt_index) {
2364
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.fonoster.agents.v1beta2.Agent, opt_index);
2365
+ };
2366
+
2367
+
2368
+ /**
2369
+ * Clears the list making it empty but non-null.
2370
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsResponse} returns this
2371
+ */
2372
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.clearItemsList = function() {
2373
+ return this.setItemsList([]);
2374
+ };
2375
+
2376
+
2377
+ /**
2378
+ * optional string next_page_token = 2;
2379
+ * @return {string}
2380
+ */
2381
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.getNextPageToken = function() {
2382
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2383
+ };
2384
+
2385
+
2386
+ /**
2387
+ * @param {string} value
2388
+ * @return {!proto.fonoster.agents.v1beta2.ListAgentsResponse} returns this
2389
+ */
2390
+ proto.fonoster.agents.v1beta2.ListAgentsResponse.prototype.setNextPageToken = function(value) {
2391
+ return jspb.Message.setProto3StringField(this, 2, value);
2392
+ };
2393
+
2394
+
2395
+ /**
2396
+ * @enum {number}
2397
+ */
2398
+ proto.fonoster.agents.v1beta2.Privacy = {
2399
+ PRIVATE: 0,
2400
+ NONE: 1
2401
+ };
2402
+
2403
+ goog.object.extend(exports, proto.fonoster.agents.v1beta2);