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