@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/twitter_types.js CHANGED
@@ -1,1553 +1,1553 @@
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
-
13
- const ttypes = module.exports = {};
14
- const TwitterUser = module.exports.TwitterUser = class {
15
- constructor(args) {
16
- this.id = null;
17
- this.name = null;
18
- this.screenName = null;
19
- this.lang = null;
20
- this.geoEnabled = null;
21
- this.createdAt = null;
22
- this.friendsCount = null;
23
- this.statusesCount = null;
24
- this.verified = null;
25
- this.listedCount = null;
26
- this.favouritesCount = null;
27
- this.followersCount = null;
28
- this.location = null;
29
- this.timeZone = null;
30
- this.description = null;
31
- this.utcOffset = null;
32
- this.url = null;
33
- if (args) {
34
- if (args.id !== undefined && args.id !== null) {
35
- this.id = args.id;
36
- }
37
- if (args.name !== undefined && args.name !== null) {
38
- this.name = args.name;
39
- }
40
- if (args.screenName !== undefined && args.screenName !== null) {
41
- this.screenName = args.screenName;
42
- }
43
- if (args.lang !== undefined && args.lang !== null) {
44
- this.lang = args.lang;
45
- }
46
- if (args.geoEnabled !== undefined && args.geoEnabled !== null) {
47
- this.geoEnabled = args.geoEnabled;
48
- }
49
- if (args.createdAt !== undefined && args.createdAt !== null) {
50
- this.createdAt = args.createdAt;
51
- }
52
- if (args.friendsCount !== undefined && args.friendsCount !== null) {
53
- this.friendsCount = args.friendsCount;
54
- }
55
- if (args.statusesCount !== undefined && args.statusesCount !== null) {
56
- this.statusesCount = args.statusesCount;
57
- }
58
- if (args.verified !== undefined && args.verified !== null) {
59
- this.verified = args.verified;
60
- }
61
- if (args.listedCount !== undefined && args.listedCount !== null) {
62
- this.listedCount = args.listedCount;
63
- }
64
- if (args.favouritesCount !== undefined && args.favouritesCount !== null) {
65
- this.favouritesCount = args.favouritesCount;
66
- }
67
- if (args.followersCount !== undefined && args.followersCount !== null) {
68
- this.followersCount = args.followersCount;
69
- }
70
- if (args.location !== undefined && args.location !== null) {
71
- this.location = args.location;
72
- }
73
- if (args.timeZone !== undefined && args.timeZone !== null) {
74
- this.timeZone = args.timeZone;
75
- }
76
- if (args.description !== undefined && args.description !== null) {
77
- this.description = args.description;
78
- }
79
- if (args.utcOffset !== undefined && args.utcOffset !== null) {
80
- this.utcOffset = args.utcOffset;
81
- }
82
- if (args.url !== undefined && args.url !== null) {
83
- this.url = args.url;
84
- }
85
- }
86
- }
87
-
88
- read (input) {
89
- input.readStructBegin();
90
- while (true) {
91
- const ret = input.readFieldBegin();
92
- const ftype = ret.ftype;
93
- const fid = ret.fid;
94
- if (ftype == Thrift.Type.STOP) {
95
- break;
96
- }
97
- switch (fid) {
98
- case 1:
99
- if (ftype == Thrift.Type.I64) {
100
- this.id = input.readI64();
101
- } else {
102
- input.skip(ftype);
103
- }
104
- break;
105
- case 3:
106
- if (ftype == Thrift.Type.STRING) {
107
- this.name = input.readString();
108
- } else {
109
- input.skip(ftype);
110
- }
111
- break;
112
- case 4:
113
- if (ftype == Thrift.Type.STRING) {
114
- this.screenName = input.readString();
115
- } else {
116
- input.skip(ftype);
117
- }
118
- break;
119
- case 5:
120
- if (ftype == Thrift.Type.STRING) {
121
- this.lang = input.readString();
122
- } else {
123
- input.skip(ftype);
124
- }
125
- break;
126
- case 6:
127
- if (ftype == Thrift.Type.BOOL) {
128
- this.geoEnabled = input.readBool();
129
- } else {
130
- input.skip(ftype);
131
- }
132
- break;
133
- case 7:
134
- if (ftype == Thrift.Type.STRING) {
135
- this.createdAt = input.readString();
136
- } else {
137
- input.skip(ftype);
138
- }
139
- break;
140
- case 8:
141
- if (ftype == Thrift.Type.I32) {
142
- this.friendsCount = input.readI32();
143
- } else {
144
- input.skip(ftype);
145
- }
146
- break;
147
- case 9:
148
- if (ftype == Thrift.Type.I32) {
149
- this.statusesCount = input.readI32();
150
- } else {
151
- input.skip(ftype);
152
- }
153
- break;
154
- case 10:
155
- if (ftype == Thrift.Type.BOOL) {
156
- this.verified = input.readBool();
157
- } else {
158
- input.skip(ftype);
159
- }
160
- break;
161
- case 11:
162
- if (ftype == Thrift.Type.I32) {
163
- this.listedCount = input.readI32();
164
- } else {
165
- input.skip(ftype);
166
- }
167
- break;
168
- case 12:
169
- if (ftype == Thrift.Type.I32) {
170
- this.favouritesCount = input.readI32();
171
- } else {
172
- input.skip(ftype);
173
- }
174
- break;
175
- case 13:
176
- if (ftype == Thrift.Type.I32) {
177
- this.followersCount = input.readI32();
178
- } else {
179
- input.skip(ftype);
180
- }
181
- break;
182
- case 14:
183
- if (ftype == Thrift.Type.STRING) {
184
- this.location = input.readString();
185
- } else {
186
- input.skip(ftype);
187
- }
188
- break;
189
- case 15:
190
- if (ftype == Thrift.Type.STRING) {
191
- this.timeZone = input.readString();
192
- } else {
193
- input.skip(ftype);
194
- }
195
- break;
196
- case 16:
197
- if (ftype == Thrift.Type.STRING) {
198
- this.description = input.readString();
199
- } else {
200
- input.skip(ftype);
201
- }
202
- break;
203
- case 18:
204
- if (ftype == Thrift.Type.I32) {
205
- this.utcOffset = input.readI32();
206
- } else {
207
- input.skip(ftype);
208
- }
209
- break;
210
- case 19:
211
- if (ftype == Thrift.Type.STRING) {
212
- this.url = input.readString();
213
- } else {
214
- input.skip(ftype);
215
- }
216
- break;
217
- default:
218
- input.skip(ftype);
219
- }
220
- input.readFieldEnd();
221
- }
222
- input.readStructEnd();
223
- return;
224
- }
225
-
226
- write (output) {
227
- output.writeStructBegin('TwitterUser');
228
- if (this.id !== null && this.id !== undefined) {
229
- output.writeFieldBegin('id', Thrift.Type.I64, 1);
230
- output.writeI64(this.id);
231
- output.writeFieldEnd();
232
- }
233
- if (this.name !== null && this.name !== undefined) {
234
- output.writeFieldBegin('name', Thrift.Type.STRING, 3);
235
- output.writeString(this.name);
236
- output.writeFieldEnd();
237
- }
238
- if (this.screenName !== null && this.screenName !== undefined) {
239
- output.writeFieldBegin('screenName', Thrift.Type.STRING, 4);
240
- output.writeString(this.screenName);
241
- output.writeFieldEnd();
242
- }
243
- if (this.lang !== null && this.lang !== undefined) {
244
- output.writeFieldBegin('lang', Thrift.Type.STRING, 5);
245
- output.writeString(this.lang);
246
- output.writeFieldEnd();
247
- }
248
- if (this.geoEnabled !== null && this.geoEnabled !== undefined) {
249
- output.writeFieldBegin('geoEnabled', Thrift.Type.BOOL, 6);
250
- output.writeBool(this.geoEnabled);
251
- output.writeFieldEnd();
252
- }
253
- if (this.createdAt !== null && this.createdAt !== undefined) {
254
- output.writeFieldBegin('createdAt', Thrift.Type.STRING, 7);
255
- output.writeString(this.createdAt);
256
- output.writeFieldEnd();
257
- }
258
- if (this.friendsCount !== null && this.friendsCount !== undefined) {
259
- output.writeFieldBegin('friendsCount', Thrift.Type.I32, 8);
260
- output.writeI32(this.friendsCount);
261
- output.writeFieldEnd();
262
- }
263
- if (this.statusesCount !== null && this.statusesCount !== undefined) {
264
- output.writeFieldBegin('statusesCount', Thrift.Type.I32, 9);
265
- output.writeI32(this.statusesCount);
266
- output.writeFieldEnd();
267
- }
268
- if (this.verified !== null && this.verified !== undefined) {
269
- output.writeFieldBegin('verified', Thrift.Type.BOOL, 10);
270
- output.writeBool(this.verified);
271
- output.writeFieldEnd();
272
- }
273
- if (this.listedCount !== null && this.listedCount !== undefined) {
274
- output.writeFieldBegin('listedCount', Thrift.Type.I32, 11);
275
- output.writeI32(this.listedCount);
276
- output.writeFieldEnd();
277
- }
278
- if (this.favouritesCount !== null && this.favouritesCount !== undefined) {
279
- output.writeFieldBegin('favouritesCount', Thrift.Type.I32, 12);
280
- output.writeI32(this.favouritesCount);
281
- output.writeFieldEnd();
282
- }
283
- if (this.followersCount !== null && this.followersCount !== undefined) {
284
- output.writeFieldBegin('followersCount', Thrift.Type.I32, 13);
285
- output.writeI32(this.followersCount);
286
- output.writeFieldEnd();
287
- }
288
- if (this.location !== null && this.location !== undefined) {
289
- output.writeFieldBegin('location', Thrift.Type.STRING, 14);
290
- output.writeString(this.location);
291
- output.writeFieldEnd();
292
- }
293
- if (this.timeZone !== null && this.timeZone !== undefined) {
294
- output.writeFieldBegin('timeZone', Thrift.Type.STRING, 15);
295
- output.writeString(this.timeZone);
296
- output.writeFieldEnd();
297
- }
298
- if (this.description !== null && this.description !== undefined) {
299
- output.writeFieldBegin('description', Thrift.Type.STRING, 16);
300
- output.writeString(this.description);
301
- output.writeFieldEnd();
302
- }
303
- if (this.utcOffset !== null && this.utcOffset !== undefined) {
304
- output.writeFieldBegin('utcOffset', Thrift.Type.I32, 18);
305
- output.writeI32(this.utcOffset);
306
- output.writeFieldEnd();
307
- }
308
- if (this.url !== null && this.url !== undefined) {
309
- output.writeFieldBegin('url', Thrift.Type.STRING, 19);
310
- output.writeString(this.url);
311
- output.writeFieldEnd();
312
- }
313
- output.writeFieldStop();
314
- output.writeStructEnd();
315
- return;
316
- }
317
-
318
- };
319
- const TwitterLatLong = module.exports.TwitterLatLong = class {
320
- constructor(args) {
321
- this.latitude = null;
322
- this.longitude = null;
323
- if (args) {
324
- if (args.latitude !== undefined && args.latitude !== null) {
325
- this.latitude = args.latitude;
326
- }
327
- if (args.longitude !== undefined && args.longitude !== null) {
328
- this.longitude = args.longitude;
329
- }
330
- }
331
- }
332
-
333
- read (input) {
334
- input.readStructBegin();
335
- while (true) {
336
- const ret = input.readFieldBegin();
337
- const ftype = ret.ftype;
338
- const fid = ret.fid;
339
- if (ftype == Thrift.Type.STOP) {
340
- break;
341
- }
342
- switch (fid) {
343
- case 1:
344
- if (ftype == Thrift.Type.DOUBLE) {
345
- this.latitude = input.readDouble();
346
- } else {
347
- input.skip(ftype);
348
- }
349
- break;
350
- case 2:
351
- if (ftype == Thrift.Type.DOUBLE) {
352
- this.longitude = input.readDouble();
353
- } else {
354
- input.skip(ftype);
355
- }
356
- break;
357
- default:
358
- input.skip(ftype);
359
- }
360
- input.readFieldEnd();
361
- }
362
- input.readStructEnd();
363
- return;
364
- }
365
-
366
- write (output) {
367
- output.writeStructBegin('TwitterLatLong');
368
- if (this.latitude !== null && this.latitude !== undefined) {
369
- output.writeFieldBegin('latitude', Thrift.Type.DOUBLE, 1);
370
- output.writeDouble(this.latitude);
371
- output.writeFieldEnd();
372
- }
373
- if (this.longitude !== null && this.longitude !== undefined) {
374
- output.writeFieldBegin('longitude', Thrift.Type.DOUBLE, 2);
375
- output.writeDouble(this.longitude);
376
- output.writeFieldEnd();
377
- }
378
- output.writeFieldStop();
379
- output.writeStructEnd();
380
- return;
381
- }
382
-
383
- };
384
- const BoundingBox = module.exports.BoundingBox = class {
385
- constructor(args) {
386
- this.type = null;
387
- this.coordinateList = null;
388
- if (args) {
389
- if (args.type !== undefined && args.type !== null) {
390
- this.type = args.type;
391
- }
392
- if (args.coordinateList !== undefined && args.coordinateList !== null) {
393
- this.coordinateList = Thrift.copyList(args.coordinateList, [ttypes.TwitterLatLong]);
394
- } else {
395
- throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field coordinateList is unset!');
396
- }
397
- }
398
- }
399
-
400
- read (input) {
401
- input.readStructBegin();
402
- while (true) {
403
- const ret = input.readFieldBegin();
404
- const ftype = ret.ftype;
405
- const fid = ret.fid;
406
- if (ftype == Thrift.Type.STOP) {
407
- break;
408
- }
409
- switch (fid) {
410
- case 1:
411
- if (ftype == Thrift.Type.STRING) {
412
- this.type = input.readString();
413
- } else {
414
- input.skip(ftype);
415
- }
416
- break;
417
- case 2:
418
- if (ftype == Thrift.Type.LIST) {
419
- this.coordinateList = [];
420
- const _rtmp31 = input.readListBegin();
421
- const _size0 = _rtmp31.size || 0;
422
- for (let _i2 = 0; _i2 < _size0; ++_i2) {
423
- let elem3 = null;
424
- elem3 = new ttypes.TwitterLatLong();
425
- elem3.read(input);
426
- this.coordinateList.push(elem3);
427
- }
428
- input.readListEnd();
429
- } else {
430
- input.skip(ftype);
431
- }
432
- break;
433
- default:
434
- input.skip(ftype);
435
- }
436
- input.readFieldEnd();
437
- }
438
- input.readStructEnd();
439
- return;
440
- }
441
-
442
- write (output) {
443
- output.writeStructBegin('BoundingBox');
444
- if (this.type !== null && this.type !== undefined) {
445
- output.writeFieldBegin('type', Thrift.Type.STRING, 1);
446
- output.writeString(this.type);
447
- output.writeFieldEnd();
448
- }
449
- if (this.coordinateList !== null && this.coordinateList !== undefined) {
450
- output.writeFieldBegin('coordinateList', Thrift.Type.LIST, 2);
451
- output.writeListBegin(Thrift.Type.STRUCT, this.coordinateList.length);
452
- for (let iter4 in this.coordinateList) {
453
- if (this.coordinateList.hasOwnProperty(iter4)) {
454
- iter4 = this.coordinateList[iter4];
455
- iter4.write(output);
456
- }
457
- }
458
- output.writeListEnd();
459
- output.writeFieldEnd();
460
- }
461
- output.writeFieldStop();
462
- output.writeStructEnd();
463
- return;
464
- }
465
-
466
- };
467
- const PlaceAttributes = module.exports.PlaceAttributes = class {
468
- constructor(args) {
469
- this.streetAddress = null;
470
- this.region = null;
471
- this.locality = null;
472
- if (args) {
473
- if (args.streetAddress !== undefined && args.streetAddress !== null) {
474
- this.streetAddress = args.streetAddress;
475
- }
476
- if (args.region !== undefined && args.region !== null) {
477
- this.region = args.region;
478
- }
479
- if (args.locality !== undefined && args.locality !== null) {
480
- this.locality = args.locality;
481
- }
482
- }
483
- }
484
-
485
- read (input) {
486
- input.readStructBegin();
487
- while (true) {
488
- const ret = input.readFieldBegin();
489
- const ftype = ret.ftype;
490
- const fid = ret.fid;
491
- if (ftype == Thrift.Type.STOP) {
492
- break;
493
- }
494
- switch (fid) {
495
- case 1:
496
- if (ftype == Thrift.Type.STRING) {
497
- this.streetAddress = input.readString();
498
- } else {
499
- input.skip(ftype);
500
- }
501
- break;
502
- case 2:
503
- if (ftype == Thrift.Type.STRING) {
504
- this.region = input.readString();
505
- } else {
506
- input.skip(ftype);
507
- }
508
- break;
509
- case 3:
510
- if (ftype == Thrift.Type.STRING) {
511
- this.locality = input.readString();
512
- } else {
513
- input.skip(ftype);
514
- }
515
- break;
516
- default:
517
- input.skip(ftype);
518
- }
519
- input.readFieldEnd();
520
- }
521
- input.readStructEnd();
522
- return;
523
- }
524
-
525
- write (output) {
526
- output.writeStructBegin('PlaceAttributes');
527
- if (this.streetAddress !== null && this.streetAddress !== undefined) {
528
- output.writeFieldBegin('streetAddress', Thrift.Type.STRING, 1);
529
- output.writeString(this.streetAddress);
530
- output.writeFieldEnd();
531
- }
532
- if (this.region !== null && this.region !== undefined) {
533
- output.writeFieldBegin('region', Thrift.Type.STRING, 2);
534
- output.writeString(this.region);
535
- output.writeFieldEnd();
536
- }
537
- if (this.locality !== null && this.locality !== undefined) {
538
- output.writeFieldBegin('locality', Thrift.Type.STRING, 3);
539
- output.writeString(this.locality);
540
- output.writeFieldEnd();
541
- }
542
- output.writeFieldStop();
543
- output.writeStructEnd();
544
- return;
545
- }
546
-
547
- };
548
- const UserMention = module.exports.UserMention = class {
549
- constructor(args) {
550
- this.startOffset = null;
551
- this.endOffset = null;
552
- this.screenName = null;
553
- this.name = null;
554
- this.id = null;
555
- if (args) {
556
- if (args.startOffset !== undefined && args.startOffset !== null) {
557
- this.startOffset = args.startOffset;
558
- }
559
- if (args.endOffset !== undefined && args.endOffset !== null) {
560
- this.endOffset = args.endOffset;
561
- }
562
- if (args.screenName !== undefined && args.screenName !== null) {
563
- this.screenName = args.screenName;
564
- }
565
- if (args.name !== undefined && args.name !== null) {
566
- this.name = args.name;
567
- }
568
- if (args.id !== undefined && args.id !== null) {
569
- this.id = args.id;
570
- }
571
- }
572
- }
573
-
574
- read (input) {
575
- input.readStructBegin();
576
- while (true) {
577
- const ret = input.readFieldBegin();
578
- const ftype = ret.ftype;
579
- const fid = ret.fid;
580
- if (ftype == Thrift.Type.STOP) {
581
- break;
582
- }
583
- switch (fid) {
584
- case 1:
585
- if (ftype == Thrift.Type.I32) {
586
- this.startOffset = input.readI32();
587
- } else {
588
- input.skip(ftype);
589
- }
590
- break;
591
- case 2:
592
- if (ftype == Thrift.Type.I32) {
593
- this.endOffset = input.readI32();
594
- } else {
595
- input.skip(ftype);
596
- }
597
- break;
598
- case 4:
599
- if (ftype == Thrift.Type.STRING) {
600
- this.screenName = input.readString();
601
- } else {
602
- input.skip(ftype);
603
- }
604
- break;
605
- case 5:
606
- if (ftype == Thrift.Type.STRING) {
607
- this.name = input.readString();
608
- } else {
609
- input.skip(ftype);
610
- }
611
- break;
612
- case 6:
613
- if (ftype == Thrift.Type.I64) {
614
- this.id = input.readI64();
615
- } else {
616
- input.skip(ftype);
617
- }
618
- break;
619
- default:
620
- input.skip(ftype);
621
- }
622
- input.readFieldEnd();
623
- }
624
- input.readStructEnd();
625
- return;
626
- }
627
-
628
- write (output) {
629
- output.writeStructBegin('UserMention');
630
- if (this.startOffset !== null && this.startOffset !== undefined) {
631
- output.writeFieldBegin('startOffset', Thrift.Type.I32, 1);
632
- output.writeI32(this.startOffset);
633
- output.writeFieldEnd();
634
- }
635
- if (this.endOffset !== null && this.endOffset !== undefined) {
636
- output.writeFieldBegin('endOffset', Thrift.Type.I32, 2);
637
- output.writeI32(this.endOffset);
638
- output.writeFieldEnd();
639
- }
640
- if (this.screenName !== null && this.screenName !== undefined) {
641
- output.writeFieldBegin('screenName', Thrift.Type.STRING, 4);
642
- output.writeString(this.screenName);
643
- output.writeFieldEnd();
644
- }
645
- if (this.name !== null && this.name !== undefined) {
646
- output.writeFieldBegin('name', Thrift.Type.STRING, 5);
647
- output.writeString(this.name);
648
- output.writeFieldEnd();
649
- }
650
- if (this.id !== null && this.id !== undefined) {
651
- output.writeFieldBegin('id', Thrift.Type.I64, 6);
652
- output.writeI64(this.id);
653
- output.writeFieldEnd();
654
- }
655
- output.writeFieldStop();
656
- output.writeStructEnd();
657
- return;
658
- }
659
-
660
- };
661
- const URL = module.exports.URL = class {
662
- constructor(args) {
663
- this.startOffset = null;
664
- this.endOffset = null;
665
- this.expandedUrl = null;
666
- this.url = null;
667
- this.displayUrl = null;
668
- if (args) {
669
- if (args.startOffset !== undefined && args.startOffset !== null) {
670
- this.startOffset = args.startOffset;
671
- }
672
- if (args.endOffset !== undefined && args.endOffset !== null) {
673
- this.endOffset = args.endOffset;
674
- }
675
- if (args.expandedUrl !== undefined && args.expandedUrl !== null) {
676
- this.expandedUrl = args.expandedUrl;
677
- }
678
- if (args.url !== undefined && args.url !== null) {
679
- this.url = args.url;
680
- }
681
- if (args.displayUrl !== undefined && args.displayUrl !== null) {
682
- this.displayUrl = args.displayUrl;
683
- }
684
- }
685
- }
686
-
687
- read (input) {
688
- input.readStructBegin();
689
- while (true) {
690
- const ret = input.readFieldBegin();
691
- const ftype = ret.ftype;
692
- const fid = ret.fid;
693
- if (ftype == Thrift.Type.STOP) {
694
- break;
695
- }
696
- switch (fid) {
697
- case 1:
698
- if (ftype == Thrift.Type.I32) {
699
- this.startOffset = input.readI32();
700
- } else {
701
- input.skip(ftype);
702
- }
703
- break;
704
- case 2:
705
- if (ftype == Thrift.Type.I32) {
706
- this.endOffset = input.readI32();
707
- } else {
708
- input.skip(ftype);
709
- }
710
- break;
711
- case 3:
712
- if (ftype == Thrift.Type.STRING) {
713
- this.expandedUrl = input.readString();
714
- } else {
715
- input.skip(ftype);
716
- }
717
- break;
718
- case 4:
719
- if (ftype == Thrift.Type.STRING) {
720
- this.url = input.readString();
721
- } else {
722
- input.skip(ftype);
723
- }
724
- break;
725
- case 5:
726
- if (ftype == Thrift.Type.STRING) {
727
- this.displayUrl = input.readString();
728
- } else {
729
- input.skip(ftype);
730
- }
731
- break;
732
- default:
733
- input.skip(ftype);
734
- }
735
- input.readFieldEnd();
736
- }
737
- input.readStructEnd();
738
- return;
739
- }
740
-
741
- write (output) {
742
- output.writeStructBegin('URL');
743
- if (this.startOffset !== null && this.startOffset !== undefined) {
744
- output.writeFieldBegin('startOffset', Thrift.Type.I32, 1);
745
- output.writeI32(this.startOffset);
746
- output.writeFieldEnd();
747
- }
748
- if (this.endOffset !== null && this.endOffset !== undefined) {
749
- output.writeFieldBegin('endOffset', Thrift.Type.I32, 2);
750
- output.writeI32(this.endOffset);
751
- output.writeFieldEnd();
752
- }
753
- if (this.expandedUrl !== null && this.expandedUrl !== undefined) {
754
- output.writeFieldBegin('expandedUrl', Thrift.Type.STRING, 3);
755
- output.writeString(this.expandedUrl);
756
- output.writeFieldEnd();
757
- }
758
- if (this.url !== null && this.url !== undefined) {
759
- output.writeFieldBegin('url', Thrift.Type.STRING, 4);
760
- output.writeString(this.url);
761
- output.writeFieldEnd();
762
- }
763
- if (this.displayUrl !== null && this.displayUrl !== undefined) {
764
- output.writeFieldBegin('displayUrl', Thrift.Type.STRING, 5);
765
- output.writeString(this.displayUrl);
766
- output.writeFieldEnd();
767
- }
768
- output.writeFieldStop();
769
- output.writeStructEnd();
770
- return;
771
- }
772
-
773
- };
774
- const HashTag = module.exports.HashTag = class {
775
- constructor(args) {
776
- this.text = null;
777
- this.startOffset = null;
778
- this.endOffset = null;
779
- if (args) {
780
- if (args.text !== undefined && args.text !== null) {
781
- this.text = args.text;
782
- }
783
- if (args.startOffset !== undefined && args.startOffset !== null) {
784
- this.startOffset = args.startOffset;
785
- }
786
- if (args.endOffset !== undefined && args.endOffset !== null) {
787
- this.endOffset = args.endOffset;
788
- }
789
- }
790
- }
791
-
792
- read (input) {
793
- input.readStructBegin();
794
- while (true) {
795
- const ret = input.readFieldBegin();
796
- const ftype = ret.ftype;
797
- const fid = ret.fid;
798
- if (ftype == Thrift.Type.STOP) {
799
- break;
800
- }
801
- switch (fid) {
802
- case 1:
803
- if (ftype == Thrift.Type.STRING) {
804
- this.text = input.readString();
805
- } else {
806
- input.skip(ftype);
807
- }
808
- break;
809
- case 2:
810
- if (ftype == Thrift.Type.I32) {
811
- this.startOffset = input.readI32();
812
- } else {
813
- input.skip(ftype);
814
- }
815
- break;
816
- case 3:
817
- if (ftype == Thrift.Type.I32) {
818
- this.endOffset = input.readI32();
819
- } else {
820
- input.skip(ftype);
821
- }
822
- break;
823
- default:
824
- input.skip(ftype);
825
- }
826
- input.readFieldEnd();
827
- }
828
- input.readStructEnd();
829
- return;
830
- }
831
-
832
- write (output) {
833
- output.writeStructBegin('HashTag');
834
- if (this.text !== null && this.text !== undefined) {
835
- output.writeFieldBegin('text', Thrift.Type.STRING, 1);
836
- output.writeString(this.text);
837
- output.writeFieldEnd();
838
- }
839
- if (this.startOffset !== null && this.startOffset !== undefined) {
840
- output.writeFieldBegin('startOffset', Thrift.Type.I32, 2);
841
- output.writeI32(this.startOffset);
842
- output.writeFieldEnd();
843
- }
844
- if (this.endOffset !== null && this.endOffset !== undefined) {
845
- output.writeFieldBegin('endOffset', Thrift.Type.I32, 3);
846
- output.writeI32(this.endOffset);
847
- output.writeFieldEnd();
848
- }
849
- output.writeFieldStop();
850
- output.writeStructEnd();
851
- return;
852
- }
853
-
854
- };
855
- const TwitterEntities = module.exports.TwitterEntities = class {
856
- constructor(args) {
857
- this.hashtagList = null;
858
- this.urlList = null;
859
- this.userMentionList = null;
860
- if (args) {
861
- if (args.hashtagList !== undefined && args.hashtagList !== null) {
862
- this.hashtagList = Thrift.copyList(args.hashtagList, [ttypes.HashTag]);
863
- }
864
- if (args.urlList !== undefined && args.urlList !== null) {
865
- this.urlList = Thrift.copyList(args.urlList, [ttypes.URL]);
866
- }
867
- if (args.userMentionList !== undefined && args.userMentionList !== null) {
868
- this.userMentionList = Thrift.copyList(args.userMentionList, [ttypes.UserMention]);
869
- }
870
- }
871
- }
872
-
873
- read (input) {
874
- input.readStructBegin();
875
- while (true) {
876
- const ret = input.readFieldBegin();
877
- const ftype = ret.ftype;
878
- const fid = ret.fid;
879
- if (ftype == Thrift.Type.STOP) {
880
- break;
881
- }
882
- switch (fid) {
883
- case 1:
884
- if (ftype == Thrift.Type.LIST) {
885
- this.hashtagList = [];
886
- const _rtmp36 = input.readListBegin();
887
- const _size5 = _rtmp36.size || 0;
888
- for (let _i7 = 0; _i7 < _size5; ++_i7) {
889
- let elem8 = null;
890
- elem8 = new ttypes.HashTag();
891
- elem8.read(input);
892
- this.hashtagList.push(elem8);
893
- }
894
- input.readListEnd();
895
- } else {
896
- input.skip(ftype);
897
- }
898
- break;
899
- case 2:
900
- if (ftype == Thrift.Type.LIST) {
901
- this.urlList = [];
902
- const _rtmp310 = input.readListBegin();
903
- const _size9 = _rtmp310.size || 0;
904
- for (let _i11 = 0; _i11 < _size9; ++_i11) {
905
- let elem12 = null;
906
- elem12 = new ttypes.URL();
907
- elem12.read(input);
908
- this.urlList.push(elem12);
909
- }
910
- input.readListEnd();
911
- } else {
912
- input.skip(ftype);
913
- }
914
- break;
915
- case 3:
916
- if (ftype == Thrift.Type.LIST) {
917
- this.userMentionList = [];
918
- const _rtmp314 = input.readListBegin();
919
- const _size13 = _rtmp314.size || 0;
920
- for (let _i15 = 0; _i15 < _size13; ++_i15) {
921
- let elem16 = null;
922
- elem16 = new ttypes.UserMention();
923
- elem16.read(input);
924
- this.userMentionList.push(elem16);
925
- }
926
- input.readListEnd();
927
- } else {
928
- input.skip(ftype);
929
- }
930
- break;
931
- default:
932
- input.skip(ftype);
933
- }
934
- input.readFieldEnd();
935
- }
936
- input.readStructEnd();
937
- return;
938
- }
939
-
940
- write (output) {
941
- output.writeStructBegin('TwitterEntities');
942
- if (this.hashtagList !== null && this.hashtagList !== undefined) {
943
- output.writeFieldBegin('hashtagList', Thrift.Type.LIST, 1);
944
- output.writeListBegin(Thrift.Type.STRUCT, this.hashtagList.length);
945
- for (let iter17 in this.hashtagList) {
946
- if (this.hashtagList.hasOwnProperty(iter17)) {
947
- iter17 = this.hashtagList[iter17];
948
- iter17.write(output);
949
- }
950
- }
951
- output.writeListEnd();
952
- output.writeFieldEnd();
953
- }
954
- if (this.urlList !== null && this.urlList !== undefined) {
955
- output.writeFieldBegin('urlList', Thrift.Type.LIST, 2);
956
- output.writeListBegin(Thrift.Type.STRUCT, this.urlList.length);
957
- for (let iter18 in this.urlList) {
958
- if (this.urlList.hasOwnProperty(iter18)) {
959
- iter18 = this.urlList[iter18];
960
- iter18.write(output);
961
- }
962
- }
963
- output.writeListEnd();
964
- output.writeFieldEnd();
965
- }
966
- if (this.userMentionList !== null && this.userMentionList !== undefined) {
967
- output.writeFieldBegin('userMentionList', Thrift.Type.LIST, 3);
968
- output.writeListBegin(Thrift.Type.STRUCT, this.userMentionList.length);
969
- for (let iter19 in this.userMentionList) {
970
- if (this.userMentionList.hasOwnProperty(iter19)) {
971
- iter19 = this.userMentionList[iter19];
972
- iter19.write(output);
973
- }
974
- }
975
- output.writeListEnd();
976
- output.writeFieldEnd();
977
- }
978
- output.writeFieldStop();
979
- output.writeStructEnd();
980
- return;
981
- }
982
-
983
- };
984
- const TwitterPlace = module.exports.TwitterPlace = class {
985
- constructor(args) {
986
- this.placeType = null;
987
- this.countryCode = null;
988
- this.country = null;
989
- this.fullName = null;
990
- this.name = null;
991
- this.id = null;
992
- this.url = null;
993
- this.boundingBox = null;
994
- this.attributes = null;
995
- if (args) {
996
- if (args.placeType !== undefined && args.placeType !== null) {
997
- this.placeType = args.placeType;
998
- }
999
- if (args.countryCode !== undefined && args.countryCode !== null) {
1000
- this.countryCode = args.countryCode;
1001
- }
1002
- if (args.country !== undefined && args.country !== null) {
1003
- this.country = args.country;
1004
- }
1005
- if (args.fullName !== undefined && args.fullName !== null) {
1006
- this.fullName = args.fullName;
1007
- }
1008
- if (args.name !== undefined && args.name !== null) {
1009
- this.name = args.name;
1010
- }
1011
- if (args.id !== undefined && args.id !== null) {
1012
- this.id = args.id;
1013
- }
1014
- if (args.url !== undefined && args.url !== null) {
1015
- this.url = args.url;
1016
- }
1017
- if (args.boundingBox !== undefined && args.boundingBox !== null) {
1018
- this.boundingBox = new ttypes.BoundingBox(args.boundingBox);
1019
- }
1020
- if (args.attributes !== undefined && args.attributes !== null) {
1021
- this.attributes = new ttypes.PlaceAttributes(args.attributes);
1022
- }
1023
- }
1024
- }
1025
-
1026
- read (input) {
1027
- input.readStructBegin();
1028
- while (true) {
1029
- const ret = input.readFieldBegin();
1030
- const ftype = ret.ftype;
1031
- const fid = ret.fid;
1032
- if (ftype == Thrift.Type.STOP) {
1033
- break;
1034
- }
1035
- switch (fid) {
1036
- case 1:
1037
- if (ftype == Thrift.Type.STRING) {
1038
- this.placeType = input.readString();
1039
- } else {
1040
- input.skip(ftype);
1041
- }
1042
- break;
1043
- case 2:
1044
- if (ftype == Thrift.Type.STRING) {
1045
- this.countryCode = input.readString();
1046
- } else {
1047
- input.skip(ftype);
1048
- }
1049
- break;
1050
- case 3:
1051
- if (ftype == Thrift.Type.STRING) {
1052
- this.country = input.readString();
1053
- } else {
1054
- input.skip(ftype);
1055
- }
1056
- break;
1057
- case 4:
1058
- if (ftype == Thrift.Type.STRING) {
1059
- this.fullName = input.readString();
1060
- } else {
1061
- input.skip(ftype);
1062
- }
1063
- break;
1064
- case 5:
1065
- if (ftype == Thrift.Type.STRING) {
1066
- this.name = input.readString();
1067
- } else {
1068
- input.skip(ftype);
1069
- }
1070
- break;
1071
- case 6:
1072
- if (ftype == Thrift.Type.STRING) {
1073
- this.id = input.readString();
1074
- } else {
1075
- input.skip(ftype);
1076
- }
1077
- break;
1078
- case 7:
1079
- if (ftype == Thrift.Type.STRING) {
1080
- this.url = input.readString();
1081
- } else {
1082
- input.skip(ftype);
1083
- }
1084
- break;
1085
- case 8:
1086
- if (ftype == Thrift.Type.STRUCT) {
1087
- this.boundingBox = new ttypes.BoundingBox();
1088
- this.boundingBox.read(input);
1089
- } else {
1090
- input.skip(ftype);
1091
- }
1092
- break;
1093
- case 9:
1094
- if (ftype == Thrift.Type.STRUCT) {
1095
- this.attributes = new ttypes.PlaceAttributes();
1096
- this.attributes.read(input);
1097
- } else {
1098
- input.skip(ftype);
1099
- }
1100
- break;
1101
- default:
1102
- input.skip(ftype);
1103
- }
1104
- input.readFieldEnd();
1105
- }
1106
- input.readStructEnd();
1107
- return;
1108
- }
1109
-
1110
- write (output) {
1111
- output.writeStructBegin('TwitterPlace');
1112
- if (this.placeType !== null && this.placeType !== undefined) {
1113
- output.writeFieldBegin('placeType', Thrift.Type.STRING, 1);
1114
- output.writeString(this.placeType);
1115
- output.writeFieldEnd();
1116
- }
1117
- if (this.countryCode !== null && this.countryCode !== undefined) {
1118
- output.writeFieldBegin('countryCode', Thrift.Type.STRING, 2);
1119
- output.writeString(this.countryCode);
1120
- output.writeFieldEnd();
1121
- }
1122
- if (this.country !== null && this.country !== undefined) {
1123
- output.writeFieldBegin('country', Thrift.Type.STRING, 3);
1124
- output.writeString(this.country);
1125
- output.writeFieldEnd();
1126
- }
1127
- if (this.fullName !== null && this.fullName !== undefined) {
1128
- output.writeFieldBegin('fullName', Thrift.Type.STRING, 4);
1129
- output.writeString(this.fullName);
1130
- output.writeFieldEnd();
1131
- }
1132
- if (this.name !== null && this.name !== undefined) {
1133
- output.writeFieldBegin('name', Thrift.Type.STRING, 5);
1134
- output.writeString(this.name);
1135
- output.writeFieldEnd();
1136
- }
1137
- if (this.id !== null && this.id !== undefined) {
1138
- output.writeFieldBegin('id', Thrift.Type.STRING, 6);
1139
- output.writeString(this.id);
1140
- output.writeFieldEnd();
1141
- }
1142
- if (this.url !== null && this.url !== undefined) {
1143
- output.writeFieldBegin('url', Thrift.Type.STRING, 7);
1144
- output.writeString(this.url);
1145
- output.writeFieldEnd();
1146
- }
1147
- if (this.boundingBox !== null && this.boundingBox !== undefined) {
1148
- output.writeFieldBegin('boundingBox', Thrift.Type.STRUCT, 8);
1149
- this.boundingBox.write(output);
1150
- output.writeFieldEnd();
1151
- }
1152
- if (this.attributes !== null && this.attributes !== undefined) {
1153
- output.writeFieldBegin('attributes', Thrift.Type.STRUCT, 9);
1154
- this.attributes.write(output);
1155
- output.writeFieldEnd();
1156
- }
1157
- output.writeFieldStop();
1158
- output.writeStructEnd();
1159
- return;
1160
- }
1161
-
1162
- };
1163
- const TwitterCoordinates = module.exports.TwitterCoordinates = class {
1164
- constructor(args) {
1165
- this.type = null;
1166
- this.coordinates = null;
1167
- if (args) {
1168
- if (args.type !== undefined && args.type !== null) {
1169
- this.type = args.type;
1170
- }
1171
- if (args.coordinates !== undefined && args.coordinates !== null) {
1172
- this.coordinates = new ttypes.TwitterLatLong(args.coordinates);
1173
- }
1174
- }
1175
- }
1176
-
1177
- read (input) {
1178
- input.readStructBegin();
1179
- while (true) {
1180
- const ret = input.readFieldBegin();
1181
- const ftype = ret.ftype;
1182
- const fid = ret.fid;
1183
- if (ftype == Thrift.Type.STOP) {
1184
- break;
1185
- }
1186
- switch (fid) {
1187
- case 1:
1188
- if (ftype == Thrift.Type.STRING) {
1189
- this.type = input.readString();
1190
- } else {
1191
- input.skip(ftype);
1192
- }
1193
- break;
1194
- case 2:
1195
- if (ftype == Thrift.Type.STRUCT) {
1196
- this.coordinates = new ttypes.TwitterLatLong();
1197
- this.coordinates.read(input);
1198
- } else {
1199
- input.skip(ftype);
1200
- }
1201
- break;
1202
- default:
1203
- input.skip(ftype);
1204
- }
1205
- input.readFieldEnd();
1206
- }
1207
- input.readStructEnd();
1208
- return;
1209
- }
1210
-
1211
- write (output) {
1212
- output.writeStructBegin('TwitterCoordinates');
1213
- if (this.type !== null && this.type !== undefined) {
1214
- output.writeFieldBegin('type', Thrift.Type.STRING, 1);
1215
- output.writeString(this.type);
1216
- output.writeFieldEnd();
1217
- }
1218
- if (this.coordinates !== null && this.coordinates !== undefined) {
1219
- output.writeFieldBegin('coordinates', Thrift.Type.STRUCT, 2);
1220
- this.coordinates.write(output);
1221
- output.writeFieldEnd();
1222
- }
1223
- output.writeFieldStop();
1224
- output.writeStructEnd();
1225
- return;
1226
- }
1227
-
1228
- };
1229
- const TweetInfo = module.exports.TweetInfo = class {
1230
- constructor(args) {
1231
- this.id = null;
1232
- this.text = null;
1233
- this.createdAt = null;
1234
- this.user = null;
1235
- this.truncated = null;
1236
- this.entities = null;
1237
- this.source = null;
1238
- this.coordinates = null;
1239
- this.place = null;
1240
- this.favorited = null;
1241
- this.retweeted = null;
1242
- this.retweetCount = null;
1243
- this.inReplyToScreenName = null;
1244
- this.inReplyToStatusId = null;
1245
- this.inReplyToUserId = null;
1246
- this.retweetedScreenName = null;
1247
- this.retweetedStatusId = null;
1248
- this.retweetedUserId = null;
1249
- if (args) {
1250
- if (args.id !== undefined && args.id !== null) {
1251
- this.id = args.id;
1252
- }
1253
- if (args.text !== undefined && args.text !== null) {
1254
- this.text = args.text;
1255
- }
1256
- if (args.createdAt !== undefined && args.createdAt !== null) {
1257
- this.createdAt = args.createdAt;
1258
- }
1259
- if (args.user !== undefined && args.user !== null) {
1260
- this.user = new ttypes.TwitterUser(args.user);
1261
- }
1262
- if (args.truncated !== undefined && args.truncated !== null) {
1263
- this.truncated = args.truncated;
1264
- }
1265
- if (args.entities !== undefined && args.entities !== null) {
1266
- this.entities = new ttypes.TwitterEntities(args.entities);
1267
- }
1268
- if (args.source !== undefined && args.source !== null) {
1269
- this.source = args.source;
1270
- }
1271
- if (args.coordinates !== undefined && args.coordinates !== null) {
1272
- this.coordinates = new ttypes.TwitterCoordinates(args.coordinates);
1273
- }
1274
- if (args.place !== undefined && args.place !== null) {
1275
- this.place = new ttypes.TwitterPlace(args.place);
1276
- }
1277
- if (args.favorited !== undefined && args.favorited !== null) {
1278
- this.favorited = args.favorited;
1279
- }
1280
- if (args.retweeted !== undefined && args.retweeted !== null) {
1281
- this.retweeted = args.retweeted;
1282
- }
1283
- if (args.retweetCount !== undefined && args.retweetCount !== null) {
1284
- this.retweetCount = args.retweetCount;
1285
- }
1286
- if (args.inReplyToScreenName !== undefined && args.inReplyToScreenName !== null) {
1287
- this.inReplyToScreenName = args.inReplyToScreenName;
1288
- }
1289
- if (args.inReplyToStatusId !== undefined && args.inReplyToStatusId !== null) {
1290
- this.inReplyToStatusId = args.inReplyToStatusId;
1291
- }
1292
- if (args.inReplyToUserId !== undefined && args.inReplyToUserId !== null) {
1293
- this.inReplyToUserId = args.inReplyToUserId;
1294
- }
1295
- if (args.retweetedScreenName !== undefined && args.retweetedScreenName !== null) {
1296
- this.retweetedScreenName = args.retweetedScreenName;
1297
- }
1298
- if (args.retweetedStatusId !== undefined && args.retweetedStatusId !== null) {
1299
- this.retweetedStatusId = args.retweetedStatusId;
1300
- }
1301
- if (args.retweetedUserId !== undefined && args.retweetedUserId !== null) {
1302
- this.retweetedUserId = args.retweetedUserId;
1303
- }
1304
- }
1305
- }
1306
-
1307
- read (input) {
1308
- input.readStructBegin();
1309
- while (true) {
1310
- const ret = input.readFieldBegin();
1311
- const ftype = ret.ftype;
1312
- const fid = ret.fid;
1313
- if (ftype == Thrift.Type.STOP) {
1314
- break;
1315
- }
1316
- switch (fid) {
1317
- case 1:
1318
- if (ftype == Thrift.Type.I64) {
1319
- this.id = input.readI64();
1320
- } else {
1321
- input.skip(ftype);
1322
- }
1323
- break;
1324
- case 3:
1325
- if (ftype == Thrift.Type.STRING) {
1326
- this.text = input.readString();
1327
- } else {
1328
- input.skip(ftype);
1329
- }
1330
- break;
1331
- case 4:
1332
- if (ftype == Thrift.Type.STRING) {
1333
- this.createdAt = input.readString();
1334
- } else {
1335
- input.skip(ftype);
1336
- }
1337
- break;
1338
- case 5:
1339
- if (ftype == Thrift.Type.STRUCT) {
1340
- this.user = new ttypes.TwitterUser();
1341
- this.user.read(input);
1342
- } else {
1343
- input.skip(ftype);
1344
- }
1345
- break;
1346
- case 6:
1347
- if (ftype == Thrift.Type.BOOL) {
1348
- this.truncated = input.readBool();
1349
- } else {
1350
- input.skip(ftype);
1351
- }
1352
- break;
1353
- case 7:
1354
- if (ftype == Thrift.Type.STRUCT) {
1355
- this.entities = new ttypes.TwitterEntities();
1356
- this.entities.read(input);
1357
- } else {
1358
- input.skip(ftype);
1359
- }
1360
- break;
1361
- case 8:
1362
- if (ftype == Thrift.Type.STRING) {
1363
- this.source = input.readString();
1364
- } else {
1365
- input.skip(ftype);
1366
- }
1367
- break;
1368
- case 9:
1369
- if (ftype == Thrift.Type.STRUCT) {
1370
- this.coordinates = new ttypes.TwitterCoordinates();
1371
- this.coordinates.read(input);
1372
- } else {
1373
- input.skip(ftype);
1374
- }
1375
- break;
1376
- case 11:
1377
- if (ftype == Thrift.Type.STRUCT) {
1378
- this.place = new ttypes.TwitterPlace();
1379
- this.place.read(input);
1380
- } else {
1381
- input.skip(ftype);
1382
- }
1383
- break;
1384
- case 12:
1385
- if (ftype == Thrift.Type.BOOL) {
1386
- this.favorited = input.readBool();
1387
- } else {
1388
- input.skip(ftype);
1389
- }
1390
- break;
1391
- case 13:
1392
- if (ftype == Thrift.Type.BOOL) {
1393
- this.retweeted = input.readBool();
1394
- } else {
1395
- input.skip(ftype);
1396
- }
1397
- break;
1398
- case 14:
1399
- if (ftype == Thrift.Type.I32) {
1400
- this.retweetCount = input.readI32();
1401
- } else {
1402
- input.skip(ftype);
1403
- }
1404
- break;
1405
- case 15:
1406
- if (ftype == Thrift.Type.STRING) {
1407
- this.inReplyToScreenName = input.readString();
1408
- } else {
1409
- input.skip(ftype);
1410
- }
1411
- break;
1412
- case 16:
1413
- if (ftype == Thrift.Type.I64) {
1414
- this.inReplyToStatusId = input.readI64();
1415
- } else {
1416
- input.skip(ftype);
1417
- }
1418
- break;
1419
- case 18:
1420
- if (ftype == Thrift.Type.I64) {
1421
- this.inReplyToUserId = input.readI64();
1422
- } else {
1423
- input.skip(ftype);
1424
- }
1425
- break;
1426
- case 19:
1427
- if (ftype == Thrift.Type.STRING) {
1428
- this.retweetedScreenName = input.readString();
1429
- } else {
1430
- input.skip(ftype);
1431
- }
1432
- break;
1433
- case 20:
1434
- if (ftype == Thrift.Type.I64) {
1435
- this.retweetedStatusId = input.readI64();
1436
- } else {
1437
- input.skip(ftype);
1438
- }
1439
- break;
1440
- case 21:
1441
- if (ftype == Thrift.Type.I64) {
1442
- this.retweetedUserId = input.readI64();
1443
- } else {
1444
- input.skip(ftype);
1445
- }
1446
- break;
1447
- default:
1448
- input.skip(ftype);
1449
- }
1450
- input.readFieldEnd();
1451
- }
1452
- input.readStructEnd();
1453
- return;
1454
- }
1455
-
1456
- write (output) {
1457
- output.writeStructBegin('TweetInfo');
1458
- if (this.id !== null && this.id !== undefined) {
1459
- output.writeFieldBegin('id', Thrift.Type.I64, 1);
1460
- output.writeI64(this.id);
1461
- output.writeFieldEnd();
1462
- }
1463
- if (this.text !== null && this.text !== undefined) {
1464
- output.writeFieldBegin('text', Thrift.Type.STRING, 3);
1465
- output.writeString(this.text);
1466
- output.writeFieldEnd();
1467
- }
1468
- if (this.createdAt !== null && this.createdAt !== undefined) {
1469
- output.writeFieldBegin('createdAt', Thrift.Type.STRING, 4);
1470
- output.writeString(this.createdAt);
1471
- output.writeFieldEnd();
1472
- }
1473
- if (this.user !== null && this.user !== undefined) {
1474
- output.writeFieldBegin('user', Thrift.Type.STRUCT, 5);
1475
- this.user.write(output);
1476
- output.writeFieldEnd();
1477
- }
1478
- if (this.truncated !== null && this.truncated !== undefined) {
1479
- output.writeFieldBegin('truncated', Thrift.Type.BOOL, 6);
1480
- output.writeBool(this.truncated);
1481
- output.writeFieldEnd();
1482
- }
1483
- if (this.entities !== null && this.entities !== undefined) {
1484
- output.writeFieldBegin('entities', Thrift.Type.STRUCT, 7);
1485
- this.entities.write(output);
1486
- output.writeFieldEnd();
1487
- }
1488
- if (this.source !== null && this.source !== undefined) {
1489
- output.writeFieldBegin('source', Thrift.Type.STRING, 8);
1490
- output.writeString(this.source);
1491
- output.writeFieldEnd();
1492
- }
1493
- if (this.coordinates !== null && this.coordinates !== undefined) {
1494
- output.writeFieldBegin('coordinates', Thrift.Type.STRUCT, 9);
1495
- this.coordinates.write(output);
1496
- output.writeFieldEnd();
1497
- }
1498
- if (this.place !== null && this.place !== undefined) {
1499
- output.writeFieldBegin('place', Thrift.Type.STRUCT, 11);
1500
- this.place.write(output);
1501
- output.writeFieldEnd();
1502
- }
1503
- if (this.favorited !== null && this.favorited !== undefined) {
1504
- output.writeFieldBegin('favorited', Thrift.Type.BOOL, 12);
1505
- output.writeBool(this.favorited);
1506
- output.writeFieldEnd();
1507
- }
1508
- if (this.retweeted !== null && this.retweeted !== undefined) {
1509
- output.writeFieldBegin('retweeted', Thrift.Type.BOOL, 13);
1510
- output.writeBool(this.retweeted);
1511
- output.writeFieldEnd();
1512
- }
1513
- if (this.retweetCount !== null && this.retweetCount !== undefined) {
1514
- output.writeFieldBegin('retweetCount', Thrift.Type.I32, 14);
1515
- output.writeI32(this.retweetCount);
1516
- output.writeFieldEnd();
1517
- }
1518
- if (this.inReplyToScreenName !== null && this.inReplyToScreenName !== undefined) {
1519
- output.writeFieldBegin('inReplyToScreenName', Thrift.Type.STRING, 15);
1520
- output.writeString(this.inReplyToScreenName);
1521
- output.writeFieldEnd();
1522
- }
1523
- if (this.inReplyToStatusId !== null && this.inReplyToStatusId !== undefined) {
1524
- output.writeFieldBegin('inReplyToStatusId', Thrift.Type.I64, 16);
1525
- output.writeI64(this.inReplyToStatusId);
1526
- output.writeFieldEnd();
1527
- }
1528
- if (this.inReplyToUserId !== null && this.inReplyToUserId !== undefined) {
1529
- output.writeFieldBegin('inReplyToUserId', Thrift.Type.I64, 18);
1530
- output.writeI64(this.inReplyToUserId);
1531
- output.writeFieldEnd();
1532
- }
1533
- if (this.retweetedScreenName !== null && this.retweetedScreenName !== undefined) {
1534
- output.writeFieldBegin('retweetedScreenName', Thrift.Type.STRING, 19);
1535
- output.writeString(this.retweetedScreenName);
1536
- output.writeFieldEnd();
1537
- }
1538
- if (this.retweetedStatusId !== null && this.retweetedStatusId !== undefined) {
1539
- output.writeFieldBegin('retweetedStatusId', Thrift.Type.I64, 20);
1540
- output.writeI64(this.retweetedStatusId);
1541
- output.writeFieldEnd();
1542
- }
1543
- if (this.retweetedUserId !== null && this.retweetedUserId !== undefined) {
1544
- output.writeFieldBegin('retweetedUserId', Thrift.Type.I64, 21);
1545
- output.writeI64(this.retweetedUserId);
1546
- output.writeFieldEnd();
1547
- }
1548
- output.writeFieldStop();
1549
- output.writeStructEnd();
1550
- return;
1551
- }
1552
-
1553
- };
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
+
13
+ const ttypes = module.exports = {};
14
+ const TwitterUser = module.exports.TwitterUser = class {
15
+ constructor(args) {
16
+ this.id = null;
17
+ this.name = null;
18
+ this.screenName = null;
19
+ this.lang = null;
20
+ this.geoEnabled = null;
21
+ this.createdAt = null;
22
+ this.friendsCount = null;
23
+ this.statusesCount = null;
24
+ this.verified = null;
25
+ this.listedCount = null;
26
+ this.favouritesCount = null;
27
+ this.followersCount = null;
28
+ this.location = null;
29
+ this.timeZone = null;
30
+ this.description = null;
31
+ this.utcOffset = null;
32
+ this.url = null;
33
+ if (args) {
34
+ if (args.id !== undefined && args.id !== null) {
35
+ this.id = args.id;
36
+ }
37
+ if (args.name !== undefined && args.name !== null) {
38
+ this.name = args.name;
39
+ }
40
+ if (args.screenName !== undefined && args.screenName !== null) {
41
+ this.screenName = args.screenName;
42
+ }
43
+ if (args.lang !== undefined && args.lang !== null) {
44
+ this.lang = args.lang;
45
+ }
46
+ if (args.geoEnabled !== undefined && args.geoEnabled !== null) {
47
+ this.geoEnabled = args.geoEnabled;
48
+ }
49
+ if (args.createdAt !== undefined && args.createdAt !== null) {
50
+ this.createdAt = args.createdAt;
51
+ }
52
+ if (args.friendsCount !== undefined && args.friendsCount !== null) {
53
+ this.friendsCount = args.friendsCount;
54
+ }
55
+ if (args.statusesCount !== undefined && args.statusesCount !== null) {
56
+ this.statusesCount = args.statusesCount;
57
+ }
58
+ if (args.verified !== undefined && args.verified !== null) {
59
+ this.verified = args.verified;
60
+ }
61
+ if (args.listedCount !== undefined && args.listedCount !== null) {
62
+ this.listedCount = args.listedCount;
63
+ }
64
+ if (args.favouritesCount !== undefined && args.favouritesCount !== null) {
65
+ this.favouritesCount = args.favouritesCount;
66
+ }
67
+ if (args.followersCount !== undefined && args.followersCount !== null) {
68
+ this.followersCount = args.followersCount;
69
+ }
70
+ if (args.location !== undefined && args.location !== null) {
71
+ this.location = args.location;
72
+ }
73
+ if (args.timeZone !== undefined && args.timeZone !== null) {
74
+ this.timeZone = args.timeZone;
75
+ }
76
+ if (args.description !== undefined && args.description !== null) {
77
+ this.description = args.description;
78
+ }
79
+ if (args.utcOffset !== undefined && args.utcOffset !== null) {
80
+ this.utcOffset = args.utcOffset;
81
+ }
82
+ if (args.url !== undefined && args.url !== null) {
83
+ this.url = args.url;
84
+ }
85
+ }
86
+ }
87
+
88
+ read (input) {
89
+ input.readStructBegin();
90
+ while (true) {
91
+ const ret = input.readFieldBegin();
92
+ const ftype = ret.ftype;
93
+ const fid = ret.fid;
94
+ if (ftype == Thrift.Type.STOP) {
95
+ break;
96
+ }
97
+ switch (fid) {
98
+ case 1:
99
+ if (ftype == Thrift.Type.I64) {
100
+ this.id = input.readI64();
101
+ } else {
102
+ input.skip(ftype);
103
+ }
104
+ break;
105
+ case 3:
106
+ if (ftype == Thrift.Type.STRING) {
107
+ this.name = input.readString();
108
+ } else {
109
+ input.skip(ftype);
110
+ }
111
+ break;
112
+ case 4:
113
+ if (ftype == Thrift.Type.STRING) {
114
+ this.screenName = input.readString();
115
+ } else {
116
+ input.skip(ftype);
117
+ }
118
+ break;
119
+ case 5:
120
+ if (ftype == Thrift.Type.STRING) {
121
+ this.lang = input.readString();
122
+ } else {
123
+ input.skip(ftype);
124
+ }
125
+ break;
126
+ case 6:
127
+ if (ftype == Thrift.Type.BOOL) {
128
+ this.geoEnabled = input.readBool();
129
+ } else {
130
+ input.skip(ftype);
131
+ }
132
+ break;
133
+ case 7:
134
+ if (ftype == Thrift.Type.STRING) {
135
+ this.createdAt = input.readString();
136
+ } else {
137
+ input.skip(ftype);
138
+ }
139
+ break;
140
+ case 8:
141
+ if (ftype == Thrift.Type.I32) {
142
+ this.friendsCount = input.readI32();
143
+ } else {
144
+ input.skip(ftype);
145
+ }
146
+ break;
147
+ case 9:
148
+ if (ftype == Thrift.Type.I32) {
149
+ this.statusesCount = input.readI32();
150
+ } else {
151
+ input.skip(ftype);
152
+ }
153
+ break;
154
+ case 10:
155
+ if (ftype == Thrift.Type.BOOL) {
156
+ this.verified = input.readBool();
157
+ } else {
158
+ input.skip(ftype);
159
+ }
160
+ break;
161
+ case 11:
162
+ if (ftype == Thrift.Type.I32) {
163
+ this.listedCount = input.readI32();
164
+ } else {
165
+ input.skip(ftype);
166
+ }
167
+ break;
168
+ case 12:
169
+ if (ftype == Thrift.Type.I32) {
170
+ this.favouritesCount = input.readI32();
171
+ } else {
172
+ input.skip(ftype);
173
+ }
174
+ break;
175
+ case 13:
176
+ if (ftype == Thrift.Type.I32) {
177
+ this.followersCount = input.readI32();
178
+ } else {
179
+ input.skip(ftype);
180
+ }
181
+ break;
182
+ case 14:
183
+ if (ftype == Thrift.Type.STRING) {
184
+ this.location = input.readString();
185
+ } else {
186
+ input.skip(ftype);
187
+ }
188
+ break;
189
+ case 15:
190
+ if (ftype == Thrift.Type.STRING) {
191
+ this.timeZone = input.readString();
192
+ } else {
193
+ input.skip(ftype);
194
+ }
195
+ break;
196
+ case 16:
197
+ if (ftype == Thrift.Type.STRING) {
198
+ this.description = input.readString();
199
+ } else {
200
+ input.skip(ftype);
201
+ }
202
+ break;
203
+ case 18:
204
+ if (ftype == Thrift.Type.I32) {
205
+ this.utcOffset = input.readI32();
206
+ } else {
207
+ input.skip(ftype);
208
+ }
209
+ break;
210
+ case 19:
211
+ if (ftype == Thrift.Type.STRING) {
212
+ this.url = input.readString();
213
+ } else {
214
+ input.skip(ftype);
215
+ }
216
+ break;
217
+ default:
218
+ input.skip(ftype);
219
+ }
220
+ input.readFieldEnd();
221
+ }
222
+ input.readStructEnd();
223
+ return;
224
+ }
225
+
226
+ write (output) {
227
+ output.writeStructBegin('TwitterUser');
228
+ if (this.id !== null && this.id !== undefined) {
229
+ output.writeFieldBegin('id', Thrift.Type.I64, 1);
230
+ output.writeI64(this.id);
231
+ output.writeFieldEnd();
232
+ }
233
+ if (this.name !== null && this.name !== undefined) {
234
+ output.writeFieldBegin('name', Thrift.Type.STRING, 3);
235
+ output.writeString(this.name);
236
+ output.writeFieldEnd();
237
+ }
238
+ if (this.screenName !== null && this.screenName !== undefined) {
239
+ output.writeFieldBegin('screenName', Thrift.Type.STRING, 4);
240
+ output.writeString(this.screenName);
241
+ output.writeFieldEnd();
242
+ }
243
+ if (this.lang !== null && this.lang !== undefined) {
244
+ output.writeFieldBegin('lang', Thrift.Type.STRING, 5);
245
+ output.writeString(this.lang);
246
+ output.writeFieldEnd();
247
+ }
248
+ if (this.geoEnabled !== null && this.geoEnabled !== undefined) {
249
+ output.writeFieldBegin('geoEnabled', Thrift.Type.BOOL, 6);
250
+ output.writeBool(this.geoEnabled);
251
+ output.writeFieldEnd();
252
+ }
253
+ if (this.createdAt !== null && this.createdAt !== undefined) {
254
+ output.writeFieldBegin('createdAt', Thrift.Type.STRING, 7);
255
+ output.writeString(this.createdAt);
256
+ output.writeFieldEnd();
257
+ }
258
+ if (this.friendsCount !== null && this.friendsCount !== undefined) {
259
+ output.writeFieldBegin('friendsCount', Thrift.Type.I32, 8);
260
+ output.writeI32(this.friendsCount);
261
+ output.writeFieldEnd();
262
+ }
263
+ if (this.statusesCount !== null && this.statusesCount !== undefined) {
264
+ output.writeFieldBegin('statusesCount', Thrift.Type.I32, 9);
265
+ output.writeI32(this.statusesCount);
266
+ output.writeFieldEnd();
267
+ }
268
+ if (this.verified !== null && this.verified !== undefined) {
269
+ output.writeFieldBegin('verified', Thrift.Type.BOOL, 10);
270
+ output.writeBool(this.verified);
271
+ output.writeFieldEnd();
272
+ }
273
+ if (this.listedCount !== null && this.listedCount !== undefined) {
274
+ output.writeFieldBegin('listedCount', Thrift.Type.I32, 11);
275
+ output.writeI32(this.listedCount);
276
+ output.writeFieldEnd();
277
+ }
278
+ if (this.favouritesCount !== null && this.favouritesCount !== undefined) {
279
+ output.writeFieldBegin('favouritesCount', Thrift.Type.I32, 12);
280
+ output.writeI32(this.favouritesCount);
281
+ output.writeFieldEnd();
282
+ }
283
+ if (this.followersCount !== null && this.followersCount !== undefined) {
284
+ output.writeFieldBegin('followersCount', Thrift.Type.I32, 13);
285
+ output.writeI32(this.followersCount);
286
+ output.writeFieldEnd();
287
+ }
288
+ if (this.location !== null && this.location !== undefined) {
289
+ output.writeFieldBegin('location', Thrift.Type.STRING, 14);
290
+ output.writeString(this.location);
291
+ output.writeFieldEnd();
292
+ }
293
+ if (this.timeZone !== null && this.timeZone !== undefined) {
294
+ output.writeFieldBegin('timeZone', Thrift.Type.STRING, 15);
295
+ output.writeString(this.timeZone);
296
+ output.writeFieldEnd();
297
+ }
298
+ if (this.description !== null && this.description !== undefined) {
299
+ output.writeFieldBegin('description', Thrift.Type.STRING, 16);
300
+ output.writeString(this.description);
301
+ output.writeFieldEnd();
302
+ }
303
+ if (this.utcOffset !== null && this.utcOffset !== undefined) {
304
+ output.writeFieldBegin('utcOffset', Thrift.Type.I32, 18);
305
+ output.writeI32(this.utcOffset);
306
+ output.writeFieldEnd();
307
+ }
308
+ if (this.url !== null && this.url !== undefined) {
309
+ output.writeFieldBegin('url', Thrift.Type.STRING, 19);
310
+ output.writeString(this.url);
311
+ output.writeFieldEnd();
312
+ }
313
+ output.writeFieldStop();
314
+ output.writeStructEnd();
315
+ return;
316
+ }
317
+
318
+ };
319
+ const TwitterLatLong = module.exports.TwitterLatLong = class {
320
+ constructor(args) {
321
+ this.latitude = null;
322
+ this.longitude = null;
323
+ if (args) {
324
+ if (args.latitude !== undefined && args.latitude !== null) {
325
+ this.latitude = args.latitude;
326
+ }
327
+ if (args.longitude !== undefined && args.longitude !== null) {
328
+ this.longitude = args.longitude;
329
+ }
330
+ }
331
+ }
332
+
333
+ read (input) {
334
+ input.readStructBegin();
335
+ while (true) {
336
+ const ret = input.readFieldBegin();
337
+ const ftype = ret.ftype;
338
+ const fid = ret.fid;
339
+ if (ftype == Thrift.Type.STOP) {
340
+ break;
341
+ }
342
+ switch (fid) {
343
+ case 1:
344
+ if (ftype == Thrift.Type.DOUBLE) {
345
+ this.latitude = input.readDouble();
346
+ } else {
347
+ input.skip(ftype);
348
+ }
349
+ break;
350
+ case 2:
351
+ if (ftype == Thrift.Type.DOUBLE) {
352
+ this.longitude = input.readDouble();
353
+ } else {
354
+ input.skip(ftype);
355
+ }
356
+ break;
357
+ default:
358
+ input.skip(ftype);
359
+ }
360
+ input.readFieldEnd();
361
+ }
362
+ input.readStructEnd();
363
+ return;
364
+ }
365
+
366
+ write (output) {
367
+ output.writeStructBegin('TwitterLatLong');
368
+ if (this.latitude !== null && this.latitude !== undefined) {
369
+ output.writeFieldBegin('latitude', Thrift.Type.DOUBLE, 1);
370
+ output.writeDouble(this.latitude);
371
+ output.writeFieldEnd();
372
+ }
373
+ if (this.longitude !== null && this.longitude !== undefined) {
374
+ output.writeFieldBegin('longitude', Thrift.Type.DOUBLE, 2);
375
+ output.writeDouble(this.longitude);
376
+ output.writeFieldEnd();
377
+ }
378
+ output.writeFieldStop();
379
+ output.writeStructEnd();
380
+ return;
381
+ }
382
+
383
+ };
384
+ const BoundingBox = module.exports.BoundingBox = class {
385
+ constructor(args) {
386
+ this.type = null;
387
+ this.coordinateList = null;
388
+ if (args) {
389
+ if (args.type !== undefined && args.type !== null) {
390
+ this.type = args.type;
391
+ }
392
+ if (args.coordinateList !== undefined && args.coordinateList !== null) {
393
+ this.coordinateList = Thrift.copyList(args.coordinateList, [ttypes.TwitterLatLong]);
394
+ } else {
395
+ throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field coordinateList is unset!');
396
+ }
397
+ }
398
+ }
399
+
400
+ read (input) {
401
+ input.readStructBegin();
402
+ while (true) {
403
+ const ret = input.readFieldBegin();
404
+ const ftype = ret.ftype;
405
+ const fid = ret.fid;
406
+ if (ftype == Thrift.Type.STOP) {
407
+ break;
408
+ }
409
+ switch (fid) {
410
+ case 1:
411
+ if (ftype == Thrift.Type.STRING) {
412
+ this.type = input.readString();
413
+ } else {
414
+ input.skip(ftype);
415
+ }
416
+ break;
417
+ case 2:
418
+ if (ftype == Thrift.Type.LIST) {
419
+ this.coordinateList = [];
420
+ const _rtmp31 = input.readListBegin();
421
+ const _size0 = _rtmp31.size || 0;
422
+ for (let _i2 = 0; _i2 < _size0; ++_i2) {
423
+ let elem3 = null;
424
+ elem3 = new ttypes.TwitterLatLong();
425
+ elem3.read(input);
426
+ this.coordinateList.push(elem3);
427
+ }
428
+ input.readListEnd();
429
+ } else {
430
+ input.skip(ftype);
431
+ }
432
+ break;
433
+ default:
434
+ input.skip(ftype);
435
+ }
436
+ input.readFieldEnd();
437
+ }
438
+ input.readStructEnd();
439
+ return;
440
+ }
441
+
442
+ write (output) {
443
+ output.writeStructBegin('BoundingBox');
444
+ if (this.type !== null && this.type !== undefined) {
445
+ output.writeFieldBegin('type', Thrift.Type.STRING, 1);
446
+ output.writeString(this.type);
447
+ output.writeFieldEnd();
448
+ }
449
+ if (this.coordinateList !== null && this.coordinateList !== undefined) {
450
+ output.writeFieldBegin('coordinateList', Thrift.Type.LIST, 2);
451
+ output.writeListBegin(Thrift.Type.STRUCT, this.coordinateList.length);
452
+ for (let iter4 in this.coordinateList) {
453
+ if (this.coordinateList.hasOwnProperty(iter4)) {
454
+ iter4 = this.coordinateList[iter4];
455
+ iter4.write(output);
456
+ }
457
+ }
458
+ output.writeListEnd();
459
+ output.writeFieldEnd();
460
+ }
461
+ output.writeFieldStop();
462
+ output.writeStructEnd();
463
+ return;
464
+ }
465
+
466
+ };
467
+ const PlaceAttributes = module.exports.PlaceAttributes = class {
468
+ constructor(args) {
469
+ this.streetAddress = null;
470
+ this.region = null;
471
+ this.locality = null;
472
+ if (args) {
473
+ if (args.streetAddress !== undefined && args.streetAddress !== null) {
474
+ this.streetAddress = args.streetAddress;
475
+ }
476
+ if (args.region !== undefined && args.region !== null) {
477
+ this.region = args.region;
478
+ }
479
+ if (args.locality !== undefined && args.locality !== null) {
480
+ this.locality = args.locality;
481
+ }
482
+ }
483
+ }
484
+
485
+ read (input) {
486
+ input.readStructBegin();
487
+ while (true) {
488
+ const ret = input.readFieldBegin();
489
+ const ftype = ret.ftype;
490
+ const fid = ret.fid;
491
+ if (ftype == Thrift.Type.STOP) {
492
+ break;
493
+ }
494
+ switch (fid) {
495
+ case 1:
496
+ if (ftype == Thrift.Type.STRING) {
497
+ this.streetAddress = input.readString();
498
+ } else {
499
+ input.skip(ftype);
500
+ }
501
+ break;
502
+ case 2:
503
+ if (ftype == Thrift.Type.STRING) {
504
+ this.region = input.readString();
505
+ } else {
506
+ input.skip(ftype);
507
+ }
508
+ break;
509
+ case 3:
510
+ if (ftype == Thrift.Type.STRING) {
511
+ this.locality = input.readString();
512
+ } else {
513
+ input.skip(ftype);
514
+ }
515
+ break;
516
+ default:
517
+ input.skip(ftype);
518
+ }
519
+ input.readFieldEnd();
520
+ }
521
+ input.readStructEnd();
522
+ return;
523
+ }
524
+
525
+ write (output) {
526
+ output.writeStructBegin('PlaceAttributes');
527
+ if (this.streetAddress !== null && this.streetAddress !== undefined) {
528
+ output.writeFieldBegin('streetAddress', Thrift.Type.STRING, 1);
529
+ output.writeString(this.streetAddress);
530
+ output.writeFieldEnd();
531
+ }
532
+ if (this.region !== null && this.region !== undefined) {
533
+ output.writeFieldBegin('region', Thrift.Type.STRING, 2);
534
+ output.writeString(this.region);
535
+ output.writeFieldEnd();
536
+ }
537
+ if (this.locality !== null && this.locality !== undefined) {
538
+ output.writeFieldBegin('locality', Thrift.Type.STRING, 3);
539
+ output.writeString(this.locality);
540
+ output.writeFieldEnd();
541
+ }
542
+ output.writeFieldStop();
543
+ output.writeStructEnd();
544
+ return;
545
+ }
546
+
547
+ };
548
+ const UserMention = module.exports.UserMention = class {
549
+ constructor(args) {
550
+ this.startOffset = null;
551
+ this.endOffset = null;
552
+ this.screenName = null;
553
+ this.name = null;
554
+ this.id = null;
555
+ if (args) {
556
+ if (args.startOffset !== undefined && args.startOffset !== null) {
557
+ this.startOffset = args.startOffset;
558
+ }
559
+ if (args.endOffset !== undefined && args.endOffset !== null) {
560
+ this.endOffset = args.endOffset;
561
+ }
562
+ if (args.screenName !== undefined && args.screenName !== null) {
563
+ this.screenName = args.screenName;
564
+ }
565
+ if (args.name !== undefined && args.name !== null) {
566
+ this.name = args.name;
567
+ }
568
+ if (args.id !== undefined && args.id !== null) {
569
+ this.id = args.id;
570
+ }
571
+ }
572
+ }
573
+
574
+ read (input) {
575
+ input.readStructBegin();
576
+ while (true) {
577
+ const ret = input.readFieldBegin();
578
+ const ftype = ret.ftype;
579
+ const fid = ret.fid;
580
+ if (ftype == Thrift.Type.STOP) {
581
+ break;
582
+ }
583
+ switch (fid) {
584
+ case 1:
585
+ if (ftype == Thrift.Type.I32) {
586
+ this.startOffset = input.readI32();
587
+ } else {
588
+ input.skip(ftype);
589
+ }
590
+ break;
591
+ case 2:
592
+ if (ftype == Thrift.Type.I32) {
593
+ this.endOffset = input.readI32();
594
+ } else {
595
+ input.skip(ftype);
596
+ }
597
+ break;
598
+ case 4:
599
+ if (ftype == Thrift.Type.STRING) {
600
+ this.screenName = input.readString();
601
+ } else {
602
+ input.skip(ftype);
603
+ }
604
+ break;
605
+ case 5:
606
+ if (ftype == Thrift.Type.STRING) {
607
+ this.name = input.readString();
608
+ } else {
609
+ input.skip(ftype);
610
+ }
611
+ break;
612
+ case 6:
613
+ if (ftype == Thrift.Type.I64) {
614
+ this.id = input.readI64();
615
+ } else {
616
+ input.skip(ftype);
617
+ }
618
+ break;
619
+ default:
620
+ input.skip(ftype);
621
+ }
622
+ input.readFieldEnd();
623
+ }
624
+ input.readStructEnd();
625
+ return;
626
+ }
627
+
628
+ write (output) {
629
+ output.writeStructBegin('UserMention');
630
+ if (this.startOffset !== null && this.startOffset !== undefined) {
631
+ output.writeFieldBegin('startOffset', Thrift.Type.I32, 1);
632
+ output.writeI32(this.startOffset);
633
+ output.writeFieldEnd();
634
+ }
635
+ if (this.endOffset !== null && this.endOffset !== undefined) {
636
+ output.writeFieldBegin('endOffset', Thrift.Type.I32, 2);
637
+ output.writeI32(this.endOffset);
638
+ output.writeFieldEnd();
639
+ }
640
+ if (this.screenName !== null && this.screenName !== undefined) {
641
+ output.writeFieldBegin('screenName', Thrift.Type.STRING, 4);
642
+ output.writeString(this.screenName);
643
+ output.writeFieldEnd();
644
+ }
645
+ if (this.name !== null && this.name !== undefined) {
646
+ output.writeFieldBegin('name', Thrift.Type.STRING, 5);
647
+ output.writeString(this.name);
648
+ output.writeFieldEnd();
649
+ }
650
+ if (this.id !== null && this.id !== undefined) {
651
+ output.writeFieldBegin('id', Thrift.Type.I64, 6);
652
+ output.writeI64(this.id);
653
+ output.writeFieldEnd();
654
+ }
655
+ output.writeFieldStop();
656
+ output.writeStructEnd();
657
+ return;
658
+ }
659
+
660
+ };
661
+ const URL = module.exports.URL = class {
662
+ constructor(args) {
663
+ this.startOffset = null;
664
+ this.endOffset = null;
665
+ this.expandedUrl = null;
666
+ this.url = null;
667
+ this.displayUrl = null;
668
+ if (args) {
669
+ if (args.startOffset !== undefined && args.startOffset !== null) {
670
+ this.startOffset = args.startOffset;
671
+ }
672
+ if (args.endOffset !== undefined && args.endOffset !== null) {
673
+ this.endOffset = args.endOffset;
674
+ }
675
+ if (args.expandedUrl !== undefined && args.expandedUrl !== null) {
676
+ this.expandedUrl = args.expandedUrl;
677
+ }
678
+ if (args.url !== undefined && args.url !== null) {
679
+ this.url = args.url;
680
+ }
681
+ if (args.displayUrl !== undefined && args.displayUrl !== null) {
682
+ this.displayUrl = args.displayUrl;
683
+ }
684
+ }
685
+ }
686
+
687
+ read (input) {
688
+ input.readStructBegin();
689
+ while (true) {
690
+ const ret = input.readFieldBegin();
691
+ const ftype = ret.ftype;
692
+ const fid = ret.fid;
693
+ if (ftype == Thrift.Type.STOP) {
694
+ break;
695
+ }
696
+ switch (fid) {
697
+ case 1:
698
+ if (ftype == Thrift.Type.I32) {
699
+ this.startOffset = input.readI32();
700
+ } else {
701
+ input.skip(ftype);
702
+ }
703
+ break;
704
+ case 2:
705
+ if (ftype == Thrift.Type.I32) {
706
+ this.endOffset = input.readI32();
707
+ } else {
708
+ input.skip(ftype);
709
+ }
710
+ break;
711
+ case 3:
712
+ if (ftype == Thrift.Type.STRING) {
713
+ this.expandedUrl = input.readString();
714
+ } else {
715
+ input.skip(ftype);
716
+ }
717
+ break;
718
+ case 4:
719
+ if (ftype == Thrift.Type.STRING) {
720
+ this.url = input.readString();
721
+ } else {
722
+ input.skip(ftype);
723
+ }
724
+ break;
725
+ case 5:
726
+ if (ftype == Thrift.Type.STRING) {
727
+ this.displayUrl = input.readString();
728
+ } else {
729
+ input.skip(ftype);
730
+ }
731
+ break;
732
+ default:
733
+ input.skip(ftype);
734
+ }
735
+ input.readFieldEnd();
736
+ }
737
+ input.readStructEnd();
738
+ return;
739
+ }
740
+
741
+ write (output) {
742
+ output.writeStructBegin('URL');
743
+ if (this.startOffset !== null && this.startOffset !== undefined) {
744
+ output.writeFieldBegin('startOffset', Thrift.Type.I32, 1);
745
+ output.writeI32(this.startOffset);
746
+ output.writeFieldEnd();
747
+ }
748
+ if (this.endOffset !== null && this.endOffset !== undefined) {
749
+ output.writeFieldBegin('endOffset', Thrift.Type.I32, 2);
750
+ output.writeI32(this.endOffset);
751
+ output.writeFieldEnd();
752
+ }
753
+ if (this.expandedUrl !== null && this.expandedUrl !== undefined) {
754
+ output.writeFieldBegin('expandedUrl', Thrift.Type.STRING, 3);
755
+ output.writeString(this.expandedUrl);
756
+ output.writeFieldEnd();
757
+ }
758
+ if (this.url !== null && this.url !== undefined) {
759
+ output.writeFieldBegin('url', Thrift.Type.STRING, 4);
760
+ output.writeString(this.url);
761
+ output.writeFieldEnd();
762
+ }
763
+ if (this.displayUrl !== null && this.displayUrl !== undefined) {
764
+ output.writeFieldBegin('displayUrl', Thrift.Type.STRING, 5);
765
+ output.writeString(this.displayUrl);
766
+ output.writeFieldEnd();
767
+ }
768
+ output.writeFieldStop();
769
+ output.writeStructEnd();
770
+ return;
771
+ }
772
+
773
+ };
774
+ const HashTag = module.exports.HashTag = class {
775
+ constructor(args) {
776
+ this.text = null;
777
+ this.startOffset = null;
778
+ this.endOffset = null;
779
+ if (args) {
780
+ if (args.text !== undefined && args.text !== null) {
781
+ this.text = args.text;
782
+ }
783
+ if (args.startOffset !== undefined && args.startOffset !== null) {
784
+ this.startOffset = args.startOffset;
785
+ }
786
+ if (args.endOffset !== undefined && args.endOffset !== null) {
787
+ this.endOffset = args.endOffset;
788
+ }
789
+ }
790
+ }
791
+
792
+ read (input) {
793
+ input.readStructBegin();
794
+ while (true) {
795
+ const ret = input.readFieldBegin();
796
+ const ftype = ret.ftype;
797
+ const fid = ret.fid;
798
+ if (ftype == Thrift.Type.STOP) {
799
+ break;
800
+ }
801
+ switch (fid) {
802
+ case 1:
803
+ if (ftype == Thrift.Type.STRING) {
804
+ this.text = input.readString();
805
+ } else {
806
+ input.skip(ftype);
807
+ }
808
+ break;
809
+ case 2:
810
+ if (ftype == Thrift.Type.I32) {
811
+ this.startOffset = input.readI32();
812
+ } else {
813
+ input.skip(ftype);
814
+ }
815
+ break;
816
+ case 3:
817
+ if (ftype == Thrift.Type.I32) {
818
+ this.endOffset = input.readI32();
819
+ } else {
820
+ input.skip(ftype);
821
+ }
822
+ break;
823
+ default:
824
+ input.skip(ftype);
825
+ }
826
+ input.readFieldEnd();
827
+ }
828
+ input.readStructEnd();
829
+ return;
830
+ }
831
+
832
+ write (output) {
833
+ output.writeStructBegin('HashTag');
834
+ if (this.text !== null && this.text !== undefined) {
835
+ output.writeFieldBegin('text', Thrift.Type.STRING, 1);
836
+ output.writeString(this.text);
837
+ output.writeFieldEnd();
838
+ }
839
+ if (this.startOffset !== null && this.startOffset !== undefined) {
840
+ output.writeFieldBegin('startOffset', Thrift.Type.I32, 2);
841
+ output.writeI32(this.startOffset);
842
+ output.writeFieldEnd();
843
+ }
844
+ if (this.endOffset !== null && this.endOffset !== undefined) {
845
+ output.writeFieldBegin('endOffset', Thrift.Type.I32, 3);
846
+ output.writeI32(this.endOffset);
847
+ output.writeFieldEnd();
848
+ }
849
+ output.writeFieldStop();
850
+ output.writeStructEnd();
851
+ return;
852
+ }
853
+
854
+ };
855
+ const TwitterEntities = module.exports.TwitterEntities = class {
856
+ constructor(args) {
857
+ this.hashtagList = null;
858
+ this.urlList = null;
859
+ this.userMentionList = null;
860
+ if (args) {
861
+ if (args.hashtagList !== undefined && args.hashtagList !== null) {
862
+ this.hashtagList = Thrift.copyList(args.hashtagList, [ttypes.HashTag]);
863
+ }
864
+ if (args.urlList !== undefined && args.urlList !== null) {
865
+ this.urlList = Thrift.copyList(args.urlList, [ttypes.URL]);
866
+ }
867
+ if (args.userMentionList !== undefined && args.userMentionList !== null) {
868
+ this.userMentionList = Thrift.copyList(args.userMentionList, [ttypes.UserMention]);
869
+ }
870
+ }
871
+ }
872
+
873
+ read (input) {
874
+ input.readStructBegin();
875
+ while (true) {
876
+ const ret = input.readFieldBegin();
877
+ const ftype = ret.ftype;
878
+ const fid = ret.fid;
879
+ if (ftype == Thrift.Type.STOP) {
880
+ break;
881
+ }
882
+ switch (fid) {
883
+ case 1:
884
+ if (ftype == Thrift.Type.LIST) {
885
+ this.hashtagList = [];
886
+ const _rtmp36 = input.readListBegin();
887
+ const _size5 = _rtmp36.size || 0;
888
+ for (let _i7 = 0; _i7 < _size5; ++_i7) {
889
+ let elem8 = null;
890
+ elem8 = new ttypes.HashTag();
891
+ elem8.read(input);
892
+ this.hashtagList.push(elem8);
893
+ }
894
+ input.readListEnd();
895
+ } else {
896
+ input.skip(ftype);
897
+ }
898
+ break;
899
+ case 2:
900
+ if (ftype == Thrift.Type.LIST) {
901
+ this.urlList = [];
902
+ const _rtmp310 = input.readListBegin();
903
+ const _size9 = _rtmp310.size || 0;
904
+ for (let _i11 = 0; _i11 < _size9; ++_i11) {
905
+ let elem12 = null;
906
+ elem12 = new ttypes.URL();
907
+ elem12.read(input);
908
+ this.urlList.push(elem12);
909
+ }
910
+ input.readListEnd();
911
+ } else {
912
+ input.skip(ftype);
913
+ }
914
+ break;
915
+ case 3:
916
+ if (ftype == Thrift.Type.LIST) {
917
+ this.userMentionList = [];
918
+ const _rtmp314 = input.readListBegin();
919
+ const _size13 = _rtmp314.size || 0;
920
+ for (let _i15 = 0; _i15 < _size13; ++_i15) {
921
+ let elem16 = null;
922
+ elem16 = new ttypes.UserMention();
923
+ elem16.read(input);
924
+ this.userMentionList.push(elem16);
925
+ }
926
+ input.readListEnd();
927
+ } else {
928
+ input.skip(ftype);
929
+ }
930
+ break;
931
+ default:
932
+ input.skip(ftype);
933
+ }
934
+ input.readFieldEnd();
935
+ }
936
+ input.readStructEnd();
937
+ return;
938
+ }
939
+
940
+ write (output) {
941
+ output.writeStructBegin('TwitterEntities');
942
+ if (this.hashtagList !== null && this.hashtagList !== undefined) {
943
+ output.writeFieldBegin('hashtagList', Thrift.Type.LIST, 1);
944
+ output.writeListBegin(Thrift.Type.STRUCT, this.hashtagList.length);
945
+ for (let iter17 in this.hashtagList) {
946
+ if (this.hashtagList.hasOwnProperty(iter17)) {
947
+ iter17 = this.hashtagList[iter17];
948
+ iter17.write(output);
949
+ }
950
+ }
951
+ output.writeListEnd();
952
+ output.writeFieldEnd();
953
+ }
954
+ if (this.urlList !== null && this.urlList !== undefined) {
955
+ output.writeFieldBegin('urlList', Thrift.Type.LIST, 2);
956
+ output.writeListBegin(Thrift.Type.STRUCT, this.urlList.length);
957
+ for (let iter18 in this.urlList) {
958
+ if (this.urlList.hasOwnProperty(iter18)) {
959
+ iter18 = this.urlList[iter18];
960
+ iter18.write(output);
961
+ }
962
+ }
963
+ output.writeListEnd();
964
+ output.writeFieldEnd();
965
+ }
966
+ if (this.userMentionList !== null && this.userMentionList !== undefined) {
967
+ output.writeFieldBegin('userMentionList', Thrift.Type.LIST, 3);
968
+ output.writeListBegin(Thrift.Type.STRUCT, this.userMentionList.length);
969
+ for (let iter19 in this.userMentionList) {
970
+ if (this.userMentionList.hasOwnProperty(iter19)) {
971
+ iter19 = this.userMentionList[iter19];
972
+ iter19.write(output);
973
+ }
974
+ }
975
+ output.writeListEnd();
976
+ output.writeFieldEnd();
977
+ }
978
+ output.writeFieldStop();
979
+ output.writeStructEnd();
980
+ return;
981
+ }
982
+
983
+ };
984
+ const TwitterPlace = module.exports.TwitterPlace = class {
985
+ constructor(args) {
986
+ this.placeType = null;
987
+ this.countryCode = null;
988
+ this.country = null;
989
+ this.fullName = null;
990
+ this.name = null;
991
+ this.id = null;
992
+ this.url = null;
993
+ this.boundingBox = null;
994
+ this.attributes = null;
995
+ if (args) {
996
+ if (args.placeType !== undefined && args.placeType !== null) {
997
+ this.placeType = args.placeType;
998
+ }
999
+ if (args.countryCode !== undefined && args.countryCode !== null) {
1000
+ this.countryCode = args.countryCode;
1001
+ }
1002
+ if (args.country !== undefined && args.country !== null) {
1003
+ this.country = args.country;
1004
+ }
1005
+ if (args.fullName !== undefined && args.fullName !== null) {
1006
+ this.fullName = args.fullName;
1007
+ }
1008
+ if (args.name !== undefined && args.name !== null) {
1009
+ this.name = args.name;
1010
+ }
1011
+ if (args.id !== undefined && args.id !== null) {
1012
+ this.id = args.id;
1013
+ }
1014
+ if (args.url !== undefined && args.url !== null) {
1015
+ this.url = args.url;
1016
+ }
1017
+ if (args.boundingBox !== undefined && args.boundingBox !== null) {
1018
+ this.boundingBox = new ttypes.BoundingBox(args.boundingBox);
1019
+ }
1020
+ if (args.attributes !== undefined && args.attributes !== null) {
1021
+ this.attributes = new ttypes.PlaceAttributes(args.attributes);
1022
+ }
1023
+ }
1024
+ }
1025
+
1026
+ read (input) {
1027
+ input.readStructBegin();
1028
+ while (true) {
1029
+ const ret = input.readFieldBegin();
1030
+ const ftype = ret.ftype;
1031
+ const fid = ret.fid;
1032
+ if (ftype == Thrift.Type.STOP) {
1033
+ break;
1034
+ }
1035
+ switch (fid) {
1036
+ case 1:
1037
+ if (ftype == Thrift.Type.STRING) {
1038
+ this.placeType = input.readString();
1039
+ } else {
1040
+ input.skip(ftype);
1041
+ }
1042
+ break;
1043
+ case 2:
1044
+ if (ftype == Thrift.Type.STRING) {
1045
+ this.countryCode = input.readString();
1046
+ } else {
1047
+ input.skip(ftype);
1048
+ }
1049
+ break;
1050
+ case 3:
1051
+ if (ftype == Thrift.Type.STRING) {
1052
+ this.country = input.readString();
1053
+ } else {
1054
+ input.skip(ftype);
1055
+ }
1056
+ break;
1057
+ case 4:
1058
+ if (ftype == Thrift.Type.STRING) {
1059
+ this.fullName = input.readString();
1060
+ } else {
1061
+ input.skip(ftype);
1062
+ }
1063
+ break;
1064
+ case 5:
1065
+ if (ftype == Thrift.Type.STRING) {
1066
+ this.name = input.readString();
1067
+ } else {
1068
+ input.skip(ftype);
1069
+ }
1070
+ break;
1071
+ case 6:
1072
+ if (ftype == Thrift.Type.STRING) {
1073
+ this.id = input.readString();
1074
+ } else {
1075
+ input.skip(ftype);
1076
+ }
1077
+ break;
1078
+ case 7:
1079
+ if (ftype == Thrift.Type.STRING) {
1080
+ this.url = input.readString();
1081
+ } else {
1082
+ input.skip(ftype);
1083
+ }
1084
+ break;
1085
+ case 8:
1086
+ if (ftype == Thrift.Type.STRUCT) {
1087
+ this.boundingBox = new ttypes.BoundingBox();
1088
+ this.boundingBox.read(input);
1089
+ } else {
1090
+ input.skip(ftype);
1091
+ }
1092
+ break;
1093
+ case 9:
1094
+ if (ftype == Thrift.Type.STRUCT) {
1095
+ this.attributes = new ttypes.PlaceAttributes();
1096
+ this.attributes.read(input);
1097
+ } else {
1098
+ input.skip(ftype);
1099
+ }
1100
+ break;
1101
+ default:
1102
+ input.skip(ftype);
1103
+ }
1104
+ input.readFieldEnd();
1105
+ }
1106
+ input.readStructEnd();
1107
+ return;
1108
+ }
1109
+
1110
+ write (output) {
1111
+ output.writeStructBegin('TwitterPlace');
1112
+ if (this.placeType !== null && this.placeType !== undefined) {
1113
+ output.writeFieldBegin('placeType', Thrift.Type.STRING, 1);
1114
+ output.writeString(this.placeType);
1115
+ output.writeFieldEnd();
1116
+ }
1117
+ if (this.countryCode !== null && this.countryCode !== undefined) {
1118
+ output.writeFieldBegin('countryCode', Thrift.Type.STRING, 2);
1119
+ output.writeString(this.countryCode);
1120
+ output.writeFieldEnd();
1121
+ }
1122
+ if (this.country !== null && this.country !== undefined) {
1123
+ output.writeFieldBegin('country', Thrift.Type.STRING, 3);
1124
+ output.writeString(this.country);
1125
+ output.writeFieldEnd();
1126
+ }
1127
+ if (this.fullName !== null && this.fullName !== undefined) {
1128
+ output.writeFieldBegin('fullName', Thrift.Type.STRING, 4);
1129
+ output.writeString(this.fullName);
1130
+ output.writeFieldEnd();
1131
+ }
1132
+ if (this.name !== null && this.name !== undefined) {
1133
+ output.writeFieldBegin('name', Thrift.Type.STRING, 5);
1134
+ output.writeString(this.name);
1135
+ output.writeFieldEnd();
1136
+ }
1137
+ if (this.id !== null && this.id !== undefined) {
1138
+ output.writeFieldBegin('id', Thrift.Type.STRING, 6);
1139
+ output.writeString(this.id);
1140
+ output.writeFieldEnd();
1141
+ }
1142
+ if (this.url !== null && this.url !== undefined) {
1143
+ output.writeFieldBegin('url', Thrift.Type.STRING, 7);
1144
+ output.writeString(this.url);
1145
+ output.writeFieldEnd();
1146
+ }
1147
+ if (this.boundingBox !== null && this.boundingBox !== undefined) {
1148
+ output.writeFieldBegin('boundingBox', Thrift.Type.STRUCT, 8);
1149
+ this.boundingBox.write(output);
1150
+ output.writeFieldEnd();
1151
+ }
1152
+ if (this.attributes !== null && this.attributes !== undefined) {
1153
+ output.writeFieldBegin('attributes', Thrift.Type.STRUCT, 9);
1154
+ this.attributes.write(output);
1155
+ output.writeFieldEnd();
1156
+ }
1157
+ output.writeFieldStop();
1158
+ output.writeStructEnd();
1159
+ return;
1160
+ }
1161
+
1162
+ };
1163
+ const TwitterCoordinates = module.exports.TwitterCoordinates = class {
1164
+ constructor(args) {
1165
+ this.type = null;
1166
+ this.coordinates = null;
1167
+ if (args) {
1168
+ if (args.type !== undefined && args.type !== null) {
1169
+ this.type = args.type;
1170
+ }
1171
+ if (args.coordinates !== undefined && args.coordinates !== null) {
1172
+ this.coordinates = new ttypes.TwitterLatLong(args.coordinates);
1173
+ }
1174
+ }
1175
+ }
1176
+
1177
+ read (input) {
1178
+ input.readStructBegin();
1179
+ while (true) {
1180
+ const ret = input.readFieldBegin();
1181
+ const ftype = ret.ftype;
1182
+ const fid = ret.fid;
1183
+ if (ftype == Thrift.Type.STOP) {
1184
+ break;
1185
+ }
1186
+ switch (fid) {
1187
+ case 1:
1188
+ if (ftype == Thrift.Type.STRING) {
1189
+ this.type = input.readString();
1190
+ } else {
1191
+ input.skip(ftype);
1192
+ }
1193
+ break;
1194
+ case 2:
1195
+ if (ftype == Thrift.Type.STRUCT) {
1196
+ this.coordinates = new ttypes.TwitterLatLong();
1197
+ this.coordinates.read(input);
1198
+ } else {
1199
+ input.skip(ftype);
1200
+ }
1201
+ break;
1202
+ default:
1203
+ input.skip(ftype);
1204
+ }
1205
+ input.readFieldEnd();
1206
+ }
1207
+ input.readStructEnd();
1208
+ return;
1209
+ }
1210
+
1211
+ write (output) {
1212
+ output.writeStructBegin('TwitterCoordinates');
1213
+ if (this.type !== null && this.type !== undefined) {
1214
+ output.writeFieldBegin('type', Thrift.Type.STRING, 1);
1215
+ output.writeString(this.type);
1216
+ output.writeFieldEnd();
1217
+ }
1218
+ if (this.coordinates !== null && this.coordinates !== undefined) {
1219
+ output.writeFieldBegin('coordinates', Thrift.Type.STRUCT, 2);
1220
+ this.coordinates.write(output);
1221
+ output.writeFieldEnd();
1222
+ }
1223
+ output.writeFieldStop();
1224
+ output.writeStructEnd();
1225
+ return;
1226
+ }
1227
+
1228
+ };
1229
+ const TweetInfo = module.exports.TweetInfo = class {
1230
+ constructor(args) {
1231
+ this.id = null;
1232
+ this.text = null;
1233
+ this.createdAt = null;
1234
+ this.user = null;
1235
+ this.truncated = null;
1236
+ this.entities = null;
1237
+ this.source = null;
1238
+ this.coordinates = null;
1239
+ this.place = null;
1240
+ this.favorited = null;
1241
+ this.retweeted = null;
1242
+ this.retweetCount = null;
1243
+ this.inReplyToScreenName = null;
1244
+ this.inReplyToStatusId = null;
1245
+ this.inReplyToUserId = null;
1246
+ this.retweetedScreenName = null;
1247
+ this.retweetedStatusId = null;
1248
+ this.retweetedUserId = null;
1249
+ if (args) {
1250
+ if (args.id !== undefined && args.id !== null) {
1251
+ this.id = args.id;
1252
+ }
1253
+ if (args.text !== undefined && args.text !== null) {
1254
+ this.text = args.text;
1255
+ }
1256
+ if (args.createdAt !== undefined && args.createdAt !== null) {
1257
+ this.createdAt = args.createdAt;
1258
+ }
1259
+ if (args.user !== undefined && args.user !== null) {
1260
+ this.user = new ttypes.TwitterUser(args.user);
1261
+ }
1262
+ if (args.truncated !== undefined && args.truncated !== null) {
1263
+ this.truncated = args.truncated;
1264
+ }
1265
+ if (args.entities !== undefined && args.entities !== null) {
1266
+ this.entities = new ttypes.TwitterEntities(args.entities);
1267
+ }
1268
+ if (args.source !== undefined && args.source !== null) {
1269
+ this.source = args.source;
1270
+ }
1271
+ if (args.coordinates !== undefined && args.coordinates !== null) {
1272
+ this.coordinates = new ttypes.TwitterCoordinates(args.coordinates);
1273
+ }
1274
+ if (args.place !== undefined && args.place !== null) {
1275
+ this.place = new ttypes.TwitterPlace(args.place);
1276
+ }
1277
+ if (args.favorited !== undefined && args.favorited !== null) {
1278
+ this.favorited = args.favorited;
1279
+ }
1280
+ if (args.retweeted !== undefined && args.retweeted !== null) {
1281
+ this.retweeted = args.retweeted;
1282
+ }
1283
+ if (args.retweetCount !== undefined && args.retweetCount !== null) {
1284
+ this.retweetCount = args.retweetCount;
1285
+ }
1286
+ if (args.inReplyToScreenName !== undefined && args.inReplyToScreenName !== null) {
1287
+ this.inReplyToScreenName = args.inReplyToScreenName;
1288
+ }
1289
+ if (args.inReplyToStatusId !== undefined && args.inReplyToStatusId !== null) {
1290
+ this.inReplyToStatusId = args.inReplyToStatusId;
1291
+ }
1292
+ if (args.inReplyToUserId !== undefined && args.inReplyToUserId !== null) {
1293
+ this.inReplyToUserId = args.inReplyToUserId;
1294
+ }
1295
+ if (args.retweetedScreenName !== undefined && args.retweetedScreenName !== null) {
1296
+ this.retweetedScreenName = args.retweetedScreenName;
1297
+ }
1298
+ if (args.retweetedStatusId !== undefined && args.retweetedStatusId !== null) {
1299
+ this.retweetedStatusId = args.retweetedStatusId;
1300
+ }
1301
+ if (args.retweetedUserId !== undefined && args.retweetedUserId !== null) {
1302
+ this.retweetedUserId = args.retweetedUserId;
1303
+ }
1304
+ }
1305
+ }
1306
+
1307
+ read (input) {
1308
+ input.readStructBegin();
1309
+ while (true) {
1310
+ const ret = input.readFieldBegin();
1311
+ const ftype = ret.ftype;
1312
+ const fid = ret.fid;
1313
+ if (ftype == Thrift.Type.STOP) {
1314
+ break;
1315
+ }
1316
+ switch (fid) {
1317
+ case 1:
1318
+ if (ftype == Thrift.Type.I64) {
1319
+ this.id = input.readI64();
1320
+ } else {
1321
+ input.skip(ftype);
1322
+ }
1323
+ break;
1324
+ case 3:
1325
+ if (ftype == Thrift.Type.STRING) {
1326
+ this.text = input.readString();
1327
+ } else {
1328
+ input.skip(ftype);
1329
+ }
1330
+ break;
1331
+ case 4:
1332
+ if (ftype == Thrift.Type.STRING) {
1333
+ this.createdAt = input.readString();
1334
+ } else {
1335
+ input.skip(ftype);
1336
+ }
1337
+ break;
1338
+ case 5:
1339
+ if (ftype == Thrift.Type.STRUCT) {
1340
+ this.user = new ttypes.TwitterUser();
1341
+ this.user.read(input);
1342
+ } else {
1343
+ input.skip(ftype);
1344
+ }
1345
+ break;
1346
+ case 6:
1347
+ if (ftype == Thrift.Type.BOOL) {
1348
+ this.truncated = input.readBool();
1349
+ } else {
1350
+ input.skip(ftype);
1351
+ }
1352
+ break;
1353
+ case 7:
1354
+ if (ftype == Thrift.Type.STRUCT) {
1355
+ this.entities = new ttypes.TwitterEntities();
1356
+ this.entities.read(input);
1357
+ } else {
1358
+ input.skip(ftype);
1359
+ }
1360
+ break;
1361
+ case 8:
1362
+ if (ftype == Thrift.Type.STRING) {
1363
+ this.source = input.readString();
1364
+ } else {
1365
+ input.skip(ftype);
1366
+ }
1367
+ break;
1368
+ case 9:
1369
+ if (ftype == Thrift.Type.STRUCT) {
1370
+ this.coordinates = new ttypes.TwitterCoordinates();
1371
+ this.coordinates.read(input);
1372
+ } else {
1373
+ input.skip(ftype);
1374
+ }
1375
+ break;
1376
+ case 11:
1377
+ if (ftype == Thrift.Type.STRUCT) {
1378
+ this.place = new ttypes.TwitterPlace();
1379
+ this.place.read(input);
1380
+ } else {
1381
+ input.skip(ftype);
1382
+ }
1383
+ break;
1384
+ case 12:
1385
+ if (ftype == Thrift.Type.BOOL) {
1386
+ this.favorited = input.readBool();
1387
+ } else {
1388
+ input.skip(ftype);
1389
+ }
1390
+ break;
1391
+ case 13:
1392
+ if (ftype == Thrift.Type.BOOL) {
1393
+ this.retweeted = input.readBool();
1394
+ } else {
1395
+ input.skip(ftype);
1396
+ }
1397
+ break;
1398
+ case 14:
1399
+ if (ftype == Thrift.Type.I32) {
1400
+ this.retweetCount = input.readI32();
1401
+ } else {
1402
+ input.skip(ftype);
1403
+ }
1404
+ break;
1405
+ case 15:
1406
+ if (ftype == Thrift.Type.STRING) {
1407
+ this.inReplyToScreenName = input.readString();
1408
+ } else {
1409
+ input.skip(ftype);
1410
+ }
1411
+ break;
1412
+ case 16:
1413
+ if (ftype == Thrift.Type.I64) {
1414
+ this.inReplyToStatusId = input.readI64();
1415
+ } else {
1416
+ input.skip(ftype);
1417
+ }
1418
+ break;
1419
+ case 18:
1420
+ if (ftype == Thrift.Type.I64) {
1421
+ this.inReplyToUserId = input.readI64();
1422
+ } else {
1423
+ input.skip(ftype);
1424
+ }
1425
+ break;
1426
+ case 19:
1427
+ if (ftype == Thrift.Type.STRING) {
1428
+ this.retweetedScreenName = input.readString();
1429
+ } else {
1430
+ input.skip(ftype);
1431
+ }
1432
+ break;
1433
+ case 20:
1434
+ if (ftype == Thrift.Type.I64) {
1435
+ this.retweetedStatusId = input.readI64();
1436
+ } else {
1437
+ input.skip(ftype);
1438
+ }
1439
+ break;
1440
+ case 21:
1441
+ if (ftype == Thrift.Type.I64) {
1442
+ this.retweetedUserId = input.readI64();
1443
+ } else {
1444
+ input.skip(ftype);
1445
+ }
1446
+ break;
1447
+ default:
1448
+ input.skip(ftype);
1449
+ }
1450
+ input.readFieldEnd();
1451
+ }
1452
+ input.readStructEnd();
1453
+ return;
1454
+ }
1455
+
1456
+ write (output) {
1457
+ output.writeStructBegin('TweetInfo');
1458
+ if (this.id !== null && this.id !== undefined) {
1459
+ output.writeFieldBegin('id', Thrift.Type.I64, 1);
1460
+ output.writeI64(this.id);
1461
+ output.writeFieldEnd();
1462
+ }
1463
+ if (this.text !== null && this.text !== undefined) {
1464
+ output.writeFieldBegin('text', Thrift.Type.STRING, 3);
1465
+ output.writeString(this.text);
1466
+ output.writeFieldEnd();
1467
+ }
1468
+ if (this.createdAt !== null && this.createdAt !== undefined) {
1469
+ output.writeFieldBegin('createdAt', Thrift.Type.STRING, 4);
1470
+ output.writeString(this.createdAt);
1471
+ output.writeFieldEnd();
1472
+ }
1473
+ if (this.user !== null && this.user !== undefined) {
1474
+ output.writeFieldBegin('user', Thrift.Type.STRUCT, 5);
1475
+ this.user.write(output);
1476
+ output.writeFieldEnd();
1477
+ }
1478
+ if (this.truncated !== null && this.truncated !== undefined) {
1479
+ output.writeFieldBegin('truncated', Thrift.Type.BOOL, 6);
1480
+ output.writeBool(this.truncated);
1481
+ output.writeFieldEnd();
1482
+ }
1483
+ if (this.entities !== null && this.entities !== undefined) {
1484
+ output.writeFieldBegin('entities', Thrift.Type.STRUCT, 7);
1485
+ this.entities.write(output);
1486
+ output.writeFieldEnd();
1487
+ }
1488
+ if (this.source !== null && this.source !== undefined) {
1489
+ output.writeFieldBegin('source', Thrift.Type.STRING, 8);
1490
+ output.writeString(this.source);
1491
+ output.writeFieldEnd();
1492
+ }
1493
+ if (this.coordinates !== null && this.coordinates !== undefined) {
1494
+ output.writeFieldBegin('coordinates', Thrift.Type.STRUCT, 9);
1495
+ this.coordinates.write(output);
1496
+ output.writeFieldEnd();
1497
+ }
1498
+ if (this.place !== null && this.place !== undefined) {
1499
+ output.writeFieldBegin('place', Thrift.Type.STRUCT, 11);
1500
+ this.place.write(output);
1501
+ output.writeFieldEnd();
1502
+ }
1503
+ if (this.favorited !== null && this.favorited !== undefined) {
1504
+ output.writeFieldBegin('favorited', Thrift.Type.BOOL, 12);
1505
+ output.writeBool(this.favorited);
1506
+ output.writeFieldEnd();
1507
+ }
1508
+ if (this.retweeted !== null && this.retweeted !== undefined) {
1509
+ output.writeFieldBegin('retweeted', Thrift.Type.BOOL, 13);
1510
+ output.writeBool(this.retweeted);
1511
+ output.writeFieldEnd();
1512
+ }
1513
+ if (this.retweetCount !== null && this.retweetCount !== undefined) {
1514
+ output.writeFieldBegin('retweetCount', Thrift.Type.I32, 14);
1515
+ output.writeI32(this.retweetCount);
1516
+ output.writeFieldEnd();
1517
+ }
1518
+ if (this.inReplyToScreenName !== null && this.inReplyToScreenName !== undefined) {
1519
+ output.writeFieldBegin('inReplyToScreenName', Thrift.Type.STRING, 15);
1520
+ output.writeString(this.inReplyToScreenName);
1521
+ output.writeFieldEnd();
1522
+ }
1523
+ if (this.inReplyToStatusId !== null && this.inReplyToStatusId !== undefined) {
1524
+ output.writeFieldBegin('inReplyToStatusId', Thrift.Type.I64, 16);
1525
+ output.writeI64(this.inReplyToStatusId);
1526
+ output.writeFieldEnd();
1527
+ }
1528
+ if (this.inReplyToUserId !== null && this.inReplyToUserId !== undefined) {
1529
+ output.writeFieldBegin('inReplyToUserId', Thrift.Type.I64, 18);
1530
+ output.writeI64(this.inReplyToUserId);
1531
+ output.writeFieldEnd();
1532
+ }
1533
+ if (this.retweetedScreenName !== null && this.retweetedScreenName !== undefined) {
1534
+ output.writeFieldBegin('retweetedScreenName', Thrift.Type.STRING, 19);
1535
+ output.writeString(this.retweetedScreenName);
1536
+ output.writeFieldEnd();
1537
+ }
1538
+ if (this.retweetedStatusId !== null && this.retweetedStatusId !== undefined) {
1539
+ output.writeFieldBegin('retweetedStatusId', Thrift.Type.I64, 20);
1540
+ output.writeI64(this.retweetedStatusId);
1541
+ output.writeFieldEnd();
1542
+ }
1543
+ if (this.retweetedUserId !== null && this.retweetedUserId !== undefined) {
1544
+ output.writeFieldBegin('retweetedUserId', Thrift.Type.I64, 21);
1545
+ output.writeI64(this.retweetedUserId);
1546
+ output.writeFieldEnd();
1547
+ }
1548
+ output.writeFieldStop();
1549
+ output.writeStructEnd();
1550
+ return;
1551
+ }
1552
+
1553
+ };