@ccmaymay/concrete 4.15.0 → 4.15.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 (42) hide show
  1. package/ActiveLearnerClientService.js +249 -249
  2. package/ActiveLearnerServerService.js +642 -642
  3. package/AnnotateCommunicationService.js +696 -696
  4. package/AnnotateWithContextService.js +298 -298
  5. package/FeedbackService.js +750 -750
  6. package/FetchCommunicationService.js +709 -709
  7. package/README.md +125 -0
  8. package/ResultsServerService.js +2138 -2138
  9. package/SearchProxyService.js +962 -962
  10. package/SearchService.js +685 -685
  11. package/Service.js +373 -373
  12. package/StoreCommunicationService.js +255 -255
  13. package/SummarizationService.js +479 -479
  14. package/access_types.js +168 -168
  15. package/annotate_types.js +26 -26
  16. package/audio_types.js +110 -110
  17. package/cluster_types.js +398 -398
  18. package/communication_fu.js +432 -432
  19. package/communication_types.js +845 -845
  20. package/concrete.js +64 -64
  21. package/context_types.js +65 -65
  22. package/email_types.js +477 -477
  23. package/entities_types.js +658 -658
  24. package/ex_types.js +82 -82
  25. package/language_types.js +123 -123
  26. package/learn_types.js +207 -207
  27. package/linking_types.js +286 -286
  28. package/metadata_types.js +926 -926
  29. package/nitf_types.js +1005 -1005
  30. package/package.json +26 -5
  31. package/results_types.js +18 -18
  32. package/search_types.js +661 -661
  33. package/services_types.js +384 -384
  34. package/situations_types.js +1268 -1268
  35. package/spans_types.js +151 -151
  36. package/structure_types.js +2311 -2311
  37. package/summarization_types.js +433 -433
  38. package/tokenization_fu.js +33 -33
  39. package/tokentagging_fu.js +241 -241
  40. package/twitter_types.js +1553 -1553
  41. package/util.js +117 -117
  42. package/uuid_types.js +67 -67
package/services_types.js CHANGED
@@ -1,384 +1,384 @@
1
- //
2
- // Autogenerated by Thrift Compiler (0.15.0)
3
- //
4
- // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- //
6
- "use strict";
7
-
8
- const thrift = require('thrift');
9
- const Thrift = thrift.Thrift;
10
- const Int64 = require('node-int64');
11
-
12
- const uuid_ttypes = require('./uuid_types');
13
-
14
-
15
- const ttypes = module.exports = {};
16
- ttypes.AnnotationTaskType = {
17
- 'TRANSLATION' : 1,
18
- 'NER' : 2,
19
- 'TOPICID' : 3
20
- };
21
- ttypes.AnnotationUnitType = {
22
- 'COMMUNICATION' : 1,
23
- 'SENTENCE' : 2
24
- };
25
- const ServicesException = module.exports.ServicesException = class extends Thrift.TException {
26
- constructor(args) {
27
- super(args);
28
- this.name = "ServicesException";
29
- this.message = null;
30
- this.serEx = null;
31
- if (args) {
32
- if (args.message !== undefined && args.message !== null) {
33
- this.message = args.message;
34
- } else {
35
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
36
- }
37
- if (args.serEx !== undefined && args.serEx !== null) {
38
- this.serEx = args.serEx;
39
- }
40
- }
41
- }
42
-
43
- read (input) {
44
- input.readStructBegin();
45
- while (true) {
46
- const ret = input.readFieldBegin();
47
- const ftype = ret.ftype;
48
- const fid = ret.fid;
49
- if (ftype == Thrift.Type.STOP) {
50
- break;
51
- }
52
- switch (fid) {
53
- case 1:
54
- if (ftype == Thrift.Type.STRING) {
55
- this.message = input.readString();
56
- } else {
57
- input.skip(ftype);
58
- }
59
- break;
60
- case 2:
61
- if (ftype == Thrift.Type.STRING) {
62
- this.serEx = input.readBinary();
63
- } else {
64
- input.skip(ftype);
65
- }
66
- break;
67
- default:
68
- input.skip(ftype);
69
- }
70
- input.readFieldEnd();
71
- }
72
- input.readStructEnd();
73
- return;
74
- }
75
-
76
- write (output) {
77
- output.writeStructBegin('ServicesException');
78
- if (this.message !== null && this.message !== undefined) {
79
- output.writeFieldBegin('message', Thrift.Type.STRING, 1);
80
- output.writeString(this.message);
81
- output.writeFieldEnd();
82
- }
83
- if (this.serEx !== null && this.serEx !== undefined) {
84
- output.writeFieldBegin('serEx', Thrift.Type.STRING, 2);
85
- output.writeBinary(this.serEx);
86
- output.writeFieldEnd();
87
- }
88
- output.writeFieldStop();
89
- output.writeStructEnd();
90
- return;
91
- }
92
-
93
- };
94
- const NotImplementedException = module.exports.NotImplementedException = class extends Thrift.TException {
95
- constructor(args) {
96
- super(args);
97
- this.name = "NotImplementedException";
98
- this.message = null;
99
- this.serEx = null;
100
- if (args) {
101
- if (args.message !== undefined && args.message !== null) {
102
- this.message = args.message;
103
- } else {
104
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
105
- }
106
- if (args.serEx !== undefined && args.serEx !== null) {
107
- this.serEx = args.serEx;
108
- }
109
- }
110
- }
111
-
112
- read (input) {
113
- input.readStructBegin();
114
- while (true) {
115
- const ret = input.readFieldBegin();
116
- const ftype = ret.ftype;
117
- const fid = ret.fid;
118
- if (ftype == Thrift.Type.STOP) {
119
- break;
120
- }
121
- switch (fid) {
122
- case 1:
123
- if (ftype == Thrift.Type.STRING) {
124
- this.message = input.readString();
125
- } else {
126
- input.skip(ftype);
127
- }
128
- break;
129
- case 2:
130
- if (ftype == Thrift.Type.STRING) {
131
- this.serEx = input.readBinary();
132
- } else {
133
- input.skip(ftype);
134
- }
135
- break;
136
- default:
137
- input.skip(ftype);
138
- }
139
- input.readFieldEnd();
140
- }
141
- input.readStructEnd();
142
- return;
143
- }
144
-
145
- write (output) {
146
- output.writeStructBegin('NotImplementedException');
147
- if (this.message !== null && this.message !== undefined) {
148
- output.writeFieldBegin('message', Thrift.Type.STRING, 1);
149
- output.writeString(this.message);
150
- output.writeFieldEnd();
151
- }
152
- if (this.serEx !== null && this.serEx !== undefined) {
153
- output.writeFieldBegin('serEx', Thrift.Type.STRING, 2);
154
- output.writeBinary(this.serEx);
155
- output.writeFieldEnd();
156
- }
157
- output.writeFieldStop();
158
- output.writeStructEnd();
159
- return;
160
- }
161
-
162
- };
163
- const AsyncContactInfo = module.exports.AsyncContactInfo = class {
164
- constructor(args) {
165
- this.host = null;
166
- this.port = null;
167
- if (args) {
168
- if (args.host !== undefined && args.host !== null) {
169
- this.host = args.host;
170
- } else {
171
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field host is unset!');
172
- }
173
- if (args.port !== undefined && args.port !== null) {
174
- this.port = args.port;
175
- } else {
176
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field port is unset!');
177
- }
178
- }
179
- }
180
-
181
- read (input) {
182
- input.readStructBegin();
183
- while (true) {
184
- const ret = input.readFieldBegin();
185
- const ftype = ret.ftype;
186
- const fid = ret.fid;
187
- if (ftype == Thrift.Type.STOP) {
188
- break;
189
- }
190
- switch (fid) {
191
- case 1:
192
- if (ftype == Thrift.Type.STRING) {
193
- this.host = input.readString();
194
- } else {
195
- input.skip(ftype);
196
- }
197
- break;
198
- case 2:
199
- if (ftype == Thrift.Type.I32) {
200
- this.port = input.readI32();
201
- } else {
202
- input.skip(ftype);
203
- }
204
- break;
205
- default:
206
- input.skip(ftype);
207
- }
208
- input.readFieldEnd();
209
- }
210
- input.readStructEnd();
211
- return;
212
- }
213
-
214
- write (output) {
215
- output.writeStructBegin('AsyncContactInfo');
216
- if (this.host !== null && this.host !== undefined) {
217
- output.writeFieldBegin('host', Thrift.Type.STRING, 1);
218
- output.writeString(this.host);
219
- output.writeFieldEnd();
220
- }
221
- if (this.port !== null && this.port !== undefined) {
222
- output.writeFieldBegin('port', Thrift.Type.I32, 2);
223
- output.writeI32(this.port);
224
- output.writeFieldEnd();
225
- }
226
- output.writeFieldStop();
227
- output.writeStructEnd();
228
- return;
229
- }
230
-
231
- };
232
- const AnnotationUnitIdentifier = module.exports.AnnotationUnitIdentifier = class {
233
- constructor(args) {
234
- this.communicationId = null;
235
- this.sentenceId = null;
236
- if (args) {
237
- if (args.communicationId !== undefined && args.communicationId !== null) {
238
- this.communicationId = args.communicationId;
239
- } else {
240
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationId is unset!');
241
- }
242
- if (args.sentenceId !== undefined && args.sentenceId !== null) {
243
- this.sentenceId = new uuid_ttypes.UUID(args.sentenceId);
244
- }
245
- }
246
- }
247
-
248
- read (input) {
249
- input.readStructBegin();
250
- while (true) {
251
- const ret = input.readFieldBegin();
252
- const ftype = ret.ftype;
253
- const fid = ret.fid;
254
- if (ftype == Thrift.Type.STOP) {
255
- break;
256
- }
257
- switch (fid) {
258
- case 1:
259
- if (ftype == Thrift.Type.STRING) {
260
- this.communicationId = input.readString();
261
- } else {
262
- input.skip(ftype);
263
- }
264
- break;
265
- case 2:
266
- if (ftype == Thrift.Type.STRUCT) {
267
- this.sentenceId = new uuid_ttypes.UUID();
268
- this.sentenceId.read(input);
269
- } else {
270
- input.skip(ftype);
271
- }
272
- break;
273
- default:
274
- input.skip(ftype);
275
- }
276
- input.readFieldEnd();
277
- }
278
- input.readStructEnd();
279
- return;
280
- }
281
-
282
- write (output) {
283
- output.writeStructBegin('AnnotationUnitIdentifier');
284
- if (this.communicationId !== null && this.communicationId !== undefined) {
285
- output.writeFieldBegin('communicationId', Thrift.Type.STRING, 1);
286
- output.writeString(this.communicationId);
287
- output.writeFieldEnd();
288
- }
289
- if (this.sentenceId !== null && this.sentenceId !== undefined) {
290
- output.writeFieldBegin('sentenceId', Thrift.Type.STRUCT, 2);
291
- this.sentenceId.write(output);
292
- output.writeFieldEnd();
293
- }
294
- output.writeFieldStop();
295
- output.writeStructEnd();
296
- return;
297
- }
298
-
299
- };
300
- const ServiceInfo = module.exports.ServiceInfo = class {
301
- constructor(args) {
302
- this.name = null;
303
- this.version = null;
304
- this.description = null;
305
- if (args) {
306
- if (args.name !== undefined && args.name !== null) {
307
- this.name = args.name;
308
- } else {
309
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
310
- }
311
- if (args.version !== undefined && args.version !== null) {
312
- this.version = args.version;
313
- } else {
314
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field version is unset!');
315
- }
316
- if (args.description !== undefined && args.description !== null) {
317
- this.description = args.description;
318
- }
319
- }
320
- }
321
-
322
- read (input) {
323
- input.readStructBegin();
324
- while (true) {
325
- const ret = input.readFieldBegin();
326
- const ftype = ret.ftype;
327
- const fid = ret.fid;
328
- if (ftype == Thrift.Type.STOP) {
329
- break;
330
- }
331
- switch (fid) {
332
- case 1:
333
- if (ftype == Thrift.Type.STRING) {
334
- this.name = input.readString();
335
- } else {
336
- input.skip(ftype);
337
- }
338
- break;
339
- case 2:
340
- if (ftype == Thrift.Type.STRING) {
341
- this.version = input.readString();
342
- } else {
343
- input.skip(ftype);
344
- }
345
- break;
346
- case 3:
347
- if (ftype == Thrift.Type.STRING) {
348
- this.description = input.readString();
349
- } else {
350
- input.skip(ftype);
351
- }
352
- break;
353
- default:
354
- input.skip(ftype);
355
- }
356
- input.readFieldEnd();
357
- }
358
- input.readStructEnd();
359
- return;
360
- }
361
-
362
- write (output) {
363
- output.writeStructBegin('ServiceInfo');
364
- if (this.name !== null && this.name !== undefined) {
365
- output.writeFieldBegin('name', Thrift.Type.STRING, 1);
366
- output.writeString(this.name);
367
- output.writeFieldEnd();
368
- }
369
- if (this.version !== null && this.version !== undefined) {
370
- output.writeFieldBegin('version', Thrift.Type.STRING, 2);
371
- output.writeString(this.version);
372
- output.writeFieldEnd();
373
- }
374
- if (this.description !== null && this.description !== undefined) {
375
- output.writeFieldBegin('description', Thrift.Type.STRING, 3);
376
- output.writeString(this.description);
377
- output.writeFieldEnd();
378
- }
379
- output.writeFieldStop();
380
- output.writeStructEnd();
381
- return;
382
- }
383
-
384
- };
1
+ //
2
+ // Autogenerated by Thrift Compiler (0.15.0)
3
+ //
4
+ // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ //
6
+ "use strict";
7
+
8
+ const thrift = require('thrift');
9
+ const Thrift = thrift.Thrift;
10
+ const Int64 = require('node-int64');
11
+
12
+ const uuid_ttypes = require('./uuid_types');
13
+
14
+
15
+ const ttypes = module.exports = {};
16
+ ttypes.AnnotationTaskType = {
17
+ 'TRANSLATION' : 1,
18
+ 'NER' : 2,
19
+ 'TOPICID' : 3
20
+ };
21
+ ttypes.AnnotationUnitType = {
22
+ 'COMMUNICATION' : 1,
23
+ 'SENTENCE' : 2
24
+ };
25
+ const ServicesException = module.exports.ServicesException = class extends Thrift.TException {
26
+ constructor(args) {
27
+ super(args);
28
+ this.name = "ServicesException";
29
+ this.message = null;
30
+ this.serEx = null;
31
+ if (args) {
32
+ if (args.message !== undefined && args.message !== null) {
33
+ this.message = args.message;
34
+ } else {
35
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
36
+ }
37
+ if (args.serEx !== undefined && args.serEx !== null) {
38
+ this.serEx = args.serEx;
39
+ }
40
+ }
41
+ }
42
+
43
+ read (input) {
44
+ input.readStructBegin();
45
+ while (true) {
46
+ const ret = input.readFieldBegin();
47
+ const ftype = ret.ftype;
48
+ const fid = ret.fid;
49
+ if (ftype == Thrift.Type.STOP) {
50
+ break;
51
+ }
52
+ switch (fid) {
53
+ case 1:
54
+ if (ftype == Thrift.Type.STRING) {
55
+ this.message = input.readString();
56
+ } else {
57
+ input.skip(ftype);
58
+ }
59
+ break;
60
+ case 2:
61
+ if (ftype == Thrift.Type.STRING) {
62
+ this.serEx = input.readBinary();
63
+ } else {
64
+ input.skip(ftype);
65
+ }
66
+ break;
67
+ default:
68
+ input.skip(ftype);
69
+ }
70
+ input.readFieldEnd();
71
+ }
72
+ input.readStructEnd();
73
+ return;
74
+ }
75
+
76
+ write (output) {
77
+ output.writeStructBegin('ServicesException');
78
+ if (this.message !== null && this.message !== undefined) {
79
+ output.writeFieldBegin('message', Thrift.Type.STRING, 1);
80
+ output.writeString(this.message);
81
+ output.writeFieldEnd();
82
+ }
83
+ if (this.serEx !== null && this.serEx !== undefined) {
84
+ output.writeFieldBegin('serEx', Thrift.Type.STRING, 2);
85
+ output.writeBinary(this.serEx);
86
+ output.writeFieldEnd();
87
+ }
88
+ output.writeFieldStop();
89
+ output.writeStructEnd();
90
+ return;
91
+ }
92
+
93
+ };
94
+ const NotImplementedException = module.exports.NotImplementedException = class extends Thrift.TException {
95
+ constructor(args) {
96
+ super(args);
97
+ this.name = "NotImplementedException";
98
+ this.message = null;
99
+ this.serEx = null;
100
+ if (args) {
101
+ if (args.message !== undefined && args.message !== null) {
102
+ this.message = args.message;
103
+ } else {
104
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
105
+ }
106
+ if (args.serEx !== undefined && args.serEx !== null) {
107
+ this.serEx = args.serEx;
108
+ }
109
+ }
110
+ }
111
+
112
+ read (input) {
113
+ input.readStructBegin();
114
+ while (true) {
115
+ const ret = input.readFieldBegin();
116
+ const ftype = ret.ftype;
117
+ const fid = ret.fid;
118
+ if (ftype == Thrift.Type.STOP) {
119
+ break;
120
+ }
121
+ switch (fid) {
122
+ case 1:
123
+ if (ftype == Thrift.Type.STRING) {
124
+ this.message = input.readString();
125
+ } else {
126
+ input.skip(ftype);
127
+ }
128
+ break;
129
+ case 2:
130
+ if (ftype == Thrift.Type.STRING) {
131
+ this.serEx = input.readBinary();
132
+ } else {
133
+ input.skip(ftype);
134
+ }
135
+ break;
136
+ default:
137
+ input.skip(ftype);
138
+ }
139
+ input.readFieldEnd();
140
+ }
141
+ input.readStructEnd();
142
+ return;
143
+ }
144
+
145
+ write (output) {
146
+ output.writeStructBegin('NotImplementedException');
147
+ if (this.message !== null && this.message !== undefined) {
148
+ output.writeFieldBegin('message', Thrift.Type.STRING, 1);
149
+ output.writeString(this.message);
150
+ output.writeFieldEnd();
151
+ }
152
+ if (this.serEx !== null && this.serEx !== undefined) {
153
+ output.writeFieldBegin('serEx', Thrift.Type.STRING, 2);
154
+ output.writeBinary(this.serEx);
155
+ output.writeFieldEnd();
156
+ }
157
+ output.writeFieldStop();
158
+ output.writeStructEnd();
159
+ return;
160
+ }
161
+
162
+ };
163
+ const AsyncContactInfo = module.exports.AsyncContactInfo = class {
164
+ constructor(args) {
165
+ this.host = null;
166
+ this.port = null;
167
+ if (args) {
168
+ if (args.host !== undefined && args.host !== null) {
169
+ this.host = args.host;
170
+ } else {
171
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field host is unset!');
172
+ }
173
+ if (args.port !== undefined && args.port !== null) {
174
+ this.port = args.port;
175
+ } else {
176
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field port is unset!');
177
+ }
178
+ }
179
+ }
180
+
181
+ read (input) {
182
+ input.readStructBegin();
183
+ while (true) {
184
+ const ret = input.readFieldBegin();
185
+ const ftype = ret.ftype;
186
+ const fid = ret.fid;
187
+ if (ftype == Thrift.Type.STOP) {
188
+ break;
189
+ }
190
+ switch (fid) {
191
+ case 1:
192
+ if (ftype == Thrift.Type.STRING) {
193
+ this.host = input.readString();
194
+ } else {
195
+ input.skip(ftype);
196
+ }
197
+ break;
198
+ case 2:
199
+ if (ftype == Thrift.Type.I32) {
200
+ this.port = input.readI32();
201
+ } else {
202
+ input.skip(ftype);
203
+ }
204
+ break;
205
+ default:
206
+ input.skip(ftype);
207
+ }
208
+ input.readFieldEnd();
209
+ }
210
+ input.readStructEnd();
211
+ return;
212
+ }
213
+
214
+ write (output) {
215
+ output.writeStructBegin('AsyncContactInfo');
216
+ if (this.host !== null && this.host !== undefined) {
217
+ output.writeFieldBegin('host', Thrift.Type.STRING, 1);
218
+ output.writeString(this.host);
219
+ output.writeFieldEnd();
220
+ }
221
+ if (this.port !== null && this.port !== undefined) {
222
+ output.writeFieldBegin('port', Thrift.Type.I32, 2);
223
+ output.writeI32(this.port);
224
+ output.writeFieldEnd();
225
+ }
226
+ output.writeFieldStop();
227
+ output.writeStructEnd();
228
+ return;
229
+ }
230
+
231
+ };
232
+ const AnnotationUnitIdentifier = module.exports.AnnotationUnitIdentifier = class {
233
+ constructor(args) {
234
+ this.communicationId = null;
235
+ this.sentenceId = null;
236
+ if (args) {
237
+ if (args.communicationId !== undefined && args.communicationId !== null) {
238
+ this.communicationId = args.communicationId;
239
+ } else {
240
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationId is unset!');
241
+ }
242
+ if (args.sentenceId !== undefined && args.sentenceId !== null) {
243
+ this.sentenceId = new uuid_ttypes.UUID(args.sentenceId);
244
+ }
245
+ }
246
+ }
247
+
248
+ read (input) {
249
+ input.readStructBegin();
250
+ while (true) {
251
+ const ret = input.readFieldBegin();
252
+ const ftype = ret.ftype;
253
+ const fid = ret.fid;
254
+ if (ftype == Thrift.Type.STOP) {
255
+ break;
256
+ }
257
+ switch (fid) {
258
+ case 1:
259
+ if (ftype == Thrift.Type.STRING) {
260
+ this.communicationId = input.readString();
261
+ } else {
262
+ input.skip(ftype);
263
+ }
264
+ break;
265
+ case 2:
266
+ if (ftype == Thrift.Type.STRUCT) {
267
+ this.sentenceId = new uuid_ttypes.UUID();
268
+ this.sentenceId.read(input);
269
+ } else {
270
+ input.skip(ftype);
271
+ }
272
+ break;
273
+ default:
274
+ input.skip(ftype);
275
+ }
276
+ input.readFieldEnd();
277
+ }
278
+ input.readStructEnd();
279
+ return;
280
+ }
281
+
282
+ write (output) {
283
+ output.writeStructBegin('AnnotationUnitIdentifier');
284
+ if (this.communicationId !== null && this.communicationId !== undefined) {
285
+ output.writeFieldBegin('communicationId', Thrift.Type.STRING, 1);
286
+ output.writeString(this.communicationId);
287
+ output.writeFieldEnd();
288
+ }
289
+ if (this.sentenceId !== null && this.sentenceId !== undefined) {
290
+ output.writeFieldBegin('sentenceId', Thrift.Type.STRUCT, 2);
291
+ this.sentenceId.write(output);
292
+ output.writeFieldEnd();
293
+ }
294
+ output.writeFieldStop();
295
+ output.writeStructEnd();
296
+ return;
297
+ }
298
+
299
+ };
300
+ const ServiceInfo = module.exports.ServiceInfo = class {
301
+ constructor(args) {
302
+ this.name = null;
303
+ this.version = null;
304
+ this.description = null;
305
+ if (args) {
306
+ if (args.name !== undefined && args.name !== null) {
307
+ this.name = args.name;
308
+ } else {
309
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
310
+ }
311
+ if (args.version !== undefined && args.version !== null) {
312
+ this.version = args.version;
313
+ } else {
314
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field version is unset!');
315
+ }
316
+ if (args.description !== undefined && args.description !== null) {
317
+ this.description = args.description;
318
+ }
319
+ }
320
+ }
321
+
322
+ read (input) {
323
+ input.readStructBegin();
324
+ while (true) {
325
+ const ret = input.readFieldBegin();
326
+ const ftype = ret.ftype;
327
+ const fid = ret.fid;
328
+ if (ftype == Thrift.Type.STOP) {
329
+ break;
330
+ }
331
+ switch (fid) {
332
+ case 1:
333
+ if (ftype == Thrift.Type.STRING) {
334
+ this.name = input.readString();
335
+ } else {
336
+ input.skip(ftype);
337
+ }
338
+ break;
339
+ case 2:
340
+ if (ftype == Thrift.Type.STRING) {
341
+ this.version = input.readString();
342
+ } else {
343
+ input.skip(ftype);
344
+ }
345
+ break;
346
+ case 3:
347
+ if (ftype == Thrift.Type.STRING) {
348
+ this.description = input.readString();
349
+ } else {
350
+ input.skip(ftype);
351
+ }
352
+ break;
353
+ default:
354
+ input.skip(ftype);
355
+ }
356
+ input.readFieldEnd();
357
+ }
358
+ input.readStructEnd();
359
+ return;
360
+ }
361
+
362
+ write (output) {
363
+ output.writeStructBegin('ServiceInfo');
364
+ if (this.name !== null && this.name !== undefined) {
365
+ output.writeFieldBegin('name', Thrift.Type.STRING, 1);
366
+ output.writeString(this.name);
367
+ output.writeFieldEnd();
368
+ }
369
+ if (this.version !== null && this.version !== undefined) {
370
+ output.writeFieldBegin('version', Thrift.Type.STRING, 2);
371
+ output.writeString(this.version);
372
+ output.writeFieldEnd();
373
+ }
374
+ if (this.description !== null && this.description !== undefined) {
375
+ output.writeFieldBegin('description', Thrift.Type.STRING, 3);
376
+ output.writeString(this.description);
377
+ output.writeFieldEnd();
378
+ }
379
+ output.writeFieldStop();
380
+ output.writeStructEnd();
381
+ return;
382
+ }
383
+
384
+ };