@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.
- package/ActiveLearnerClientService.js +249 -249
- package/ActiveLearnerServerService.js +642 -642
- package/AnnotateCommunicationService.js +696 -696
- package/AnnotateWithContextService.js +298 -298
- package/FeedbackService.js +750 -750
- package/FetchCommunicationService.js +709 -709
- package/README.md +125 -0
- package/ResultsServerService.js +2138 -2138
- package/SearchProxyService.js +962 -962
- package/SearchService.js +685 -685
- package/Service.js +373 -373
- package/StoreCommunicationService.js +255 -255
- package/SummarizationService.js +479 -479
- package/access_types.js +168 -168
- package/annotate_types.js +26 -26
- package/audio_types.js +110 -110
- package/cluster_types.js +398 -398
- package/communication_fu.js +432 -432
- package/communication_types.js +845 -845
- package/concrete.js +64 -64
- package/context_types.js +65 -65
- package/email_types.js +477 -477
- package/entities_types.js +658 -658
- package/ex_types.js +82 -82
- package/language_types.js +123 -123
- package/learn_types.js +207 -207
- package/linking_types.js +286 -286
- package/metadata_types.js +926 -926
- package/nitf_types.js +1005 -1005
- package/package.json +26 -5
- package/results_types.js +18 -18
- package/search_types.js +661 -661
- package/services_types.js +384 -384
- package/situations_types.js +1268 -1268
- package/spans_types.js +151 -151
- package/structure_types.js +2311 -2311
- package/summarization_types.js +433 -433
- package/tokenization_fu.js +33 -33
- package/tokentagging_fu.js +241 -241
- package/twitter_types.js +1553 -1553
- package/util.js +117 -117
- package/uuid_types.js +67 -67
package/access_types.js
CHANGED
@@ -1,168 +1,168 @@
|
|
1
|
-
//
|
2
|
-
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
-
//
|
4
|
-
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
//
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
const thrift = require('thrift');
|
9
|
-
const Thrift = thrift.Thrift;
|
10
|
-
const Int64 = require('node-int64');
|
11
|
-
|
12
|
-
const communication_ttypes = require('./communication_types');
|
13
|
-
const services_ttypes = require('./services_types');
|
14
|
-
|
15
|
-
|
16
|
-
const ttypes = module.exports = {};
|
17
|
-
const FetchResult = module.exports.FetchResult = class {
|
18
|
-
constructor(args) {
|
19
|
-
this.communications = null;
|
20
|
-
if (args) {
|
21
|
-
if (args.communications !== undefined && args.communications !== null) {
|
22
|
-
this.communications = Thrift.copyList(args.communications, [communication_ttypes.Communication]);
|
23
|
-
} else {
|
24
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communications is unset!');
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
read (input) {
|
30
|
-
input.readStructBegin();
|
31
|
-
while (true) {
|
32
|
-
const ret = input.readFieldBegin();
|
33
|
-
const ftype = ret.ftype;
|
34
|
-
const fid = ret.fid;
|
35
|
-
if (ftype == Thrift.Type.STOP) {
|
36
|
-
break;
|
37
|
-
}
|
38
|
-
switch (fid) {
|
39
|
-
case 1:
|
40
|
-
if (ftype == Thrift.Type.LIST) {
|
41
|
-
this.communications = [];
|
42
|
-
const _rtmp31 = input.readListBegin();
|
43
|
-
const _size0 = _rtmp31.size || 0;
|
44
|
-
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
45
|
-
let elem3 = null;
|
46
|
-
elem3 = new communication_ttypes.Communication();
|
47
|
-
elem3.read(input);
|
48
|
-
this.communications.push(elem3);
|
49
|
-
}
|
50
|
-
input.readListEnd();
|
51
|
-
} else {
|
52
|
-
input.skip(ftype);
|
53
|
-
}
|
54
|
-
break;
|
55
|
-
case 0:
|
56
|
-
input.skip(ftype);
|
57
|
-
break;
|
58
|
-
default:
|
59
|
-
input.skip(ftype);
|
60
|
-
}
|
61
|
-
input.readFieldEnd();
|
62
|
-
}
|
63
|
-
input.readStructEnd();
|
64
|
-
return;
|
65
|
-
}
|
66
|
-
|
67
|
-
write (output) {
|
68
|
-
output.writeStructBegin('FetchResult');
|
69
|
-
if (this.communications !== null && this.communications !== undefined) {
|
70
|
-
output.writeFieldBegin('communications', Thrift.Type.LIST, 1);
|
71
|
-
output.writeListBegin(Thrift.Type.STRUCT, this.communications.length);
|
72
|
-
for (let iter4 in this.communications) {
|
73
|
-
if (this.communications.hasOwnProperty(iter4)) {
|
74
|
-
iter4 = this.communications[iter4];
|
75
|
-
iter4.write(output);
|
76
|
-
}
|
77
|
-
}
|
78
|
-
output.writeListEnd();
|
79
|
-
output.writeFieldEnd();
|
80
|
-
}
|
81
|
-
output.writeFieldStop();
|
82
|
-
output.writeStructEnd();
|
83
|
-
return;
|
84
|
-
}
|
85
|
-
|
86
|
-
};
|
87
|
-
const FetchRequest = module.exports.FetchRequest = class {
|
88
|
-
constructor(args) {
|
89
|
-
this.communicationIds = null;
|
90
|
-
this.auths = null;
|
91
|
-
if (args) {
|
92
|
-
if (args.communicationIds !== undefined && args.communicationIds !== null) {
|
93
|
-
this.communicationIds = Thrift.copyList(args.communicationIds, [null]);
|
94
|
-
} else {
|
95
|
-
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationIds is unset!');
|
96
|
-
}
|
97
|
-
if (args.auths !== undefined && args.auths !== null) {
|
98
|
-
this.auths = args.auths;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
read (input) {
|
104
|
-
input.readStructBegin();
|
105
|
-
while (true) {
|
106
|
-
const ret = input.readFieldBegin();
|
107
|
-
const ftype = ret.ftype;
|
108
|
-
const fid = ret.fid;
|
109
|
-
if (ftype == Thrift.Type.STOP) {
|
110
|
-
break;
|
111
|
-
}
|
112
|
-
switch (fid) {
|
113
|
-
case 1:
|
114
|
-
if (ftype == Thrift.Type.LIST) {
|
115
|
-
this.communicationIds = [];
|
116
|
-
const _rtmp36 = input.readListBegin();
|
117
|
-
const _size5 = _rtmp36.size || 0;
|
118
|
-
for (let _i7 = 0; _i7 < _size5; ++_i7) {
|
119
|
-
let elem8 = null;
|
120
|
-
elem8 = input.readString();
|
121
|
-
this.communicationIds.push(elem8);
|
122
|
-
}
|
123
|
-
input.readListEnd();
|
124
|
-
} else {
|
125
|
-
input.skip(ftype);
|
126
|
-
}
|
127
|
-
break;
|
128
|
-
case 2:
|
129
|
-
if (ftype == Thrift.Type.STRING) {
|
130
|
-
this.auths = input.readString();
|
131
|
-
} else {
|
132
|
-
input.skip(ftype);
|
133
|
-
}
|
134
|
-
break;
|
135
|
-
default:
|
136
|
-
input.skip(ftype);
|
137
|
-
}
|
138
|
-
input.readFieldEnd();
|
139
|
-
}
|
140
|
-
input.readStructEnd();
|
141
|
-
return;
|
142
|
-
}
|
143
|
-
|
144
|
-
write (output) {
|
145
|
-
output.writeStructBegin('FetchRequest');
|
146
|
-
if (this.communicationIds !== null && this.communicationIds !== undefined) {
|
147
|
-
output.writeFieldBegin('communicationIds', Thrift.Type.LIST, 1);
|
148
|
-
output.writeListBegin(Thrift.Type.STRING, this.communicationIds.length);
|
149
|
-
for (let iter9 in this.communicationIds) {
|
150
|
-
if (this.communicationIds.hasOwnProperty(iter9)) {
|
151
|
-
iter9 = this.communicationIds[iter9];
|
152
|
-
output.writeString(iter9);
|
153
|
-
}
|
154
|
-
}
|
155
|
-
output.writeListEnd();
|
156
|
-
output.writeFieldEnd();
|
157
|
-
}
|
158
|
-
if (this.auths !== null && this.auths !== undefined) {
|
159
|
-
output.writeFieldBegin('auths', Thrift.Type.STRING, 2);
|
160
|
-
output.writeString(this.auths);
|
161
|
-
output.writeFieldEnd();
|
162
|
-
}
|
163
|
-
output.writeFieldStop();
|
164
|
-
output.writeStructEnd();
|
165
|
-
return;
|
166
|
-
}
|
167
|
-
|
168
|
-
};
|
1
|
+
//
|
2
|
+
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
+
//
|
4
|
+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
//
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
const thrift = require('thrift');
|
9
|
+
const Thrift = thrift.Thrift;
|
10
|
+
const Int64 = require('node-int64');
|
11
|
+
|
12
|
+
const communication_ttypes = require('./communication_types');
|
13
|
+
const services_ttypes = require('./services_types');
|
14
|
+
|
15
|
+
|
16
|
+
const ttypes = module.exports = {};
|
17
|
+
const FetchResult = module.exports.FetchResult = class {
|
18
|
+
constructor(args) {
|
19
|
+
this.communications = null;
|
20
|
+
if (args) {
|
21
|
+
if (args.communications !== undefined && args.communications !== null) {
|
22
|
+
this.communications = Thrift.copyList(args.communications, [communication_ttypes.Communication]);
|
23
|
+
} else {
|
24
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communications is unset!');
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
read (input) {
|
30
|
+
input.readStructBegin();
|
31
|
+
while (true) {
|
32
|
+
const ret = input.readFieldBegin();
|
33
|
+
const ftype = ret.ftype;
|
34
|
+
const fid = ret.fid;
|
35
|
+
if (ftype == Thrift.Type.STOP) {
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
switch (fid) {
|
39
|
+
case 1:
|
40
|
+
if (ftype == Thrift.Type.LIST) {
|
41
|
+
this.communications = [];
|
42
|
+
const _rtmp31 = input.readListBegin();
|
43
|
+
const _size0 = _rtmp31.size || 0;
|
44
|
+
for (let _i2 = 0; _i2 < _size0; ++_i2) {
|
45
|
+
let elem3 = null;
|
46
|
+
elem3 = new communication_ttypes.Communication();
|
47
|
+
elem3.read(input);
|
48
|
+
this.communications.push(elem3);
|
49
|
+
}
|
50
|
+
input.readListEnd();
|
51
|
+
} else {
|
52
|
+
input.skip(ftype);
|
53
|
+
}
|
54
|
+
break;
|
55
|
+
case 0:
|
56
|
+
input.skip(ftype);
|
57
|
+
break;
|
58
|
+
default:
|
59
|
+
input.skip(ftype);
|
60
|
+
}
|
61
|
+
input.readFieldEnd();
|
62
|
+
}
|
63
|
+
input.readStructEnd();
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
|
67
|
+
write (output) {
|
68
|
+
output.writeStructBegin('FetchResult');
|
69
|
+
if (this.communications !== null && this.communications !== undefined) {
|
70
|
+
output.writeFieldBegin('communications', Thrift.Type.LIST, 1);
|
71
|
+
output.writeListBegin(Thrift.Type.STRUCT, this.communications.length);
|
72
|
+
for (let iter4 in this.communications) {
|
73
|
+
if (this.communications.hasOwnProperty(iter4)) {
|
74
|
+
iter4 = this.communications[iter4];
|
75
|
+
iter4.write(output);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
output.writeListEnd();
|
79
|
+
output.writeFieldEnd();
|
80
|
+
}
|
81
|
+
output.writeFieldStop();
|
82
|
+
output.writeStructEnd();
|
83
|
+
return;
|
84
|
+
}
|
85
|
+
|
86
|
+
};
|
87
|
+
const FetchRequest = module.exports.FetchRequest = class {
|
88
|
+
constructor(args) {
|
89
|
+
this.communicationIds = null;
|
90
|
+
this.auths = null;
|
91
|
+
if (args) {
|
92
|
+
if (args.communicationIds !== undefined && args.communicationIds !== null) {
|
93
|
+
this.communicationIds = Thrift.copyList(args.communicationIds, [null]);
|
94
|
+
} else {
|
95
|
+
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field communicationIds is unset!');
|
96
|
+
}
|
97
|
+
if (args.auths !== undefined && args.auths !== null) {
|
98
|
+
this.auths = args.auths;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
read (input) {
|
104
|
+
input.readStructBegin();
|
105
|
+
while (true) {
|
106
|
+
const ret = input.readFieldBegin();
|
107
|
+
const ftype = ret.ftype;
|
108
|
+
const fid = ret.fid;
|
109
|
+
if (ftype == Thrift.Type.STOP) {
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
switch (fid) {
|
113
|
+
case 1:
|
114
|
+
if (ftype == Thrift.Type.LIST) {
|
115
|
+
this.communicationIds = [];
|
116
|
+
const _rtmp36 = input.readListBegin();
|
117
|
+
const _size5 = _rtmp36.size || 0;
|
118
|
+
for (let _i7 = 0; _i7 < _size5; ++_i7) {
|
119
|
+
let elem8 = null;
|
120
|
+
elem8 = input.readString();
|
121
|
+
this.communicationIds.push(elem8);
|
122
|
+
}
|
123
|
+
input.readListEnd();
|
124
|
+
} else {
|
125
|
+
input.skip(ftype);
|
126
|
+
}
|
127
|
+
break;
|
128
|
+
case 2:
|
129
|
+
if (ftype == Thrift.Type.STRING) {
|
130
|
+
this.auths = input.readString();
|
131
|
+
} else {
|
132
|
+
input.skip(ftype);
|
133
|
+
}
|
134
|
+
break;
|
135
|
+
default:
|
136
|
+
input.skip(ftype);
|
137
|
+
}
|
138
|
+
input.readFieldEnd();
|
139
|
+
}
|
140
|
+
input.readStructEnd();
|
141
|
+
return;
|
142
|
+
}
|
143
|
+
|
144
|
+
write (output) {
|
145
|
+
output.writeStructBegin('FetchRequest');
|
146
|
+
if (this.communicationIds !== null && this.communicationIds !== undefined) {
|
147
|
+
output.writeFieldBegin('communicationIds', Thrift.Type.LIST, 1);
|
148
|
+
output.writeListBegin(Thrift.Type.STRING, this.communicationIds.length);
|
149
|
+
for (let iter9 in this.communicationIds) {
|
150
|
+
if (this.communicationIds.hasOwnProperty(iter9)) {
|
151
|
+
iter9 = this.communicationIds[iter9];
|
152
|
+
output.writeString(iter9);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
output.writeListEnd();
|
156
|
+
output.writeFieldEnd();
|
157
|
+
}
|
158
|
+
if (this.auths !== null && this.auths !== undefined) {
|
159
|
+
output.writeFieldBegin('auths', Thrift.Type.STRING, 2);
|
160
|
+
output.writeString(this.auths);
|
161
|
+
output.writeFieldEnd();
|
162
|
+
}
|
163
|
+
output.writeFieldStop();
|
164
|
+
output.writeStructEnd();
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
|
168
|
+
};
|
package/annotate_types.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
//
|
2
|
-
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
-
//
|
4
|
-
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
//
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
const thrift = require('thrift');
|
9
|
-
const Thrift = thrift.Thrift;
|
10
|
-
const Int64 = require('node-int64');
|
11
|
-
|
12
|
-
const context_ttypes = require('./context_types');
|
13
|
-
const metadata_ttypes = require('./metadata_types');
|
14
|
-
const language_ttypes = require('./language_types');
|
15
|
-
const structure_ttypes = require('./structure_types');
|
16
|
-
const entities_ttypes = require('./entities_types');
|
17
|
-
const situations_ttypes = require('./situations_types');
|
18
|
-
const ex_ttypes = require('./ex_types');
|
19
|
-
const email_ttypes = require('./email_types');
|
20
|
-
const twitter_ttypes = require('./twitter_types');
|
21
|
-
const audio_ttypes = require('./audio_types');
|
22
|
-
const communication_ttypes = require('./communication_types');
|
23
|
-
const services_ttypes = require('./services_types');
|
24
|
-
|
25
|
-
|
26
|
-
const ttypes = module.exports = {};
|
1
|
+
//
|
2
|
+
// Autogenerated by Thrift Compiler (0.15.0)
|
3
|
+
//
|
4
|
+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
//
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
const thrift = require('thrift');
|
9
|
+
const Thrift = thrift.Thrift;
|
10
|
+
const Int64 = require('node-int64');
|
11
|
+
|
12
|
+
const context_ttypes = require('./context_types');
|
13
|
+
const metadata_ttypes = require('./metadata_types');
|
14
|
+
const language_ttypes = require('./language_types');
|
15
|
+
const structure_ttypes = require('./structure_types');
|
16
|
+
const entities_ttypes = require('./entities_types');
|
17
|
+
const situations_ttypes = require('./situations_types');
|
18
|
+
const ex_ttypes = require('./ex_types');
|
19
|
+
const email_ttypes = require('./email_types');
|
20
|
+
const twitter_ttypes = require('./twitter_types');
|
21
|
+
const audio_ttypes = require('./audio_types');
|
22
|
+
const communication_ttypes = require('./communication_types');
|
23
|
+
const services_ttypes = require('./services_types');
|
24
|
+
|
25
|
+
|
26
|
+
const ttypes = module.exports = {};
|
package/audio_types.js
CHANGED
@@ -1,110 +1,110 @@
|
|
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 Sound = module.exports.Sound = class {
|
15
|
-
constructor(args) {
|
16
|
-
this.wav = null;
|
17
|
-
this.mp3 = null;
|
18
|
-
this.sph = null;
|
19
|
-
this.path = null;
|
20
|
-
if (args) {
|
21
|
-
if (args.wav !== undefined && args.wav !== null) {
|
22
|
-
this.wav = args.wav;
|
23
|
-
}
|
24
|
-
if (args.mp3 !== undefined && args.mp3 !== null) {
|
25
|
-
this.mp3 = args.mp3;
|
26
|
-
}
|
27
|
-
if (args.sph !== undefined && args.sph !== null) {
|
28
|
-
this.sph = args.sph;
|
29
|
-
}
|
30
|
-
if (args.path !== undefined && args.path !== null) {
|
31
|
-
this.path = args.path;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
read (input) {
|
37
|
-
input.readStructBegin();
|
38
|
-
while (true) {
|
39
|
-
const ret = input.readFieldBegin();
|
40
|
-
const ftype = ret.ftype;
|
41
|
-
const fid = ret.fid;
|
42
|
-
if (ftype == Thrift.Type.STOP) {
|
43
|
-
break;
|
44
|
-
}
|
45
|
-
switch (fid) {
|
46
|
-
case 1:
|
47
|
-
if (ftype == Thrift.Type.STRING) {
|
48
|
-
this.wav = input.readBinary();
|
49
|
-
} else {
|
50
|
-
input.skip(ftype);
|
51
|
-
}
|
52
|
-
break;
|
53
|
-
case 2:
|
54
|
-
if (ftype == Thrift.Type.STRING) {
|
55
|
-
this.mp3 = input.readBinary();
|
56
|
-
} else {
|
57
|
-
input.skip(ftype);
|
58
|
-
}
|
59
|
-
break;
|
60
|
-
case 3:
|
61
|
-
if (ftype == Thrift.Type.STRING) {
|
62
|
-
this.sph = input.readBinary();
|
63
|
-
} else {
|
64
|
-
input.skip(ftype);
|
65
|
-
}
|
66
|
-
break;
|
67
|
-
case 4:
|
68
|
-
if (ftype == Thrift.Type.STRING) {
|
69
|
-
this.path = input.readString();
|
70
|
-
} else {
|
71
|
-
input.skip(ftype);
|
72
|
-
}
|
73
|
-
break;
|
74
|
-
default:
|
75
|
-
input.skip(ftype);
|
76
|
-
}
|
77
|
-
input.readFieldEnd();
|
78
|
-
}
|
79
|
-
input.readStructEnd();
|
80
|
-
return;
|
81
|
-
}
|
82
|
-
|
83
|
-
write (output) {
|
84
|
-
output.writeStructBegin('Sound');
|
85
|
-
if (this.wav !== null && this.wav !== undefined) {
|
86
|
-
output.writeFieldBegin('wav', Thrift.Type.STRING, 1);
|
87
|
-
output.writeBinary(this.wav);
|
88
|
-
output.writeFieldEnd();
|
89
|
-
}
|
90
|
-
if (this.mp3 !== null && this.mp3 !== undefined) {
|
91
|
-
output.writeFieldBegin('mp3', Thrift.Type.STRING, 2);
|
92
|
-
output.writeBinary(this.mp3);
|
93
|
-
output.writeFieldEnd();
|
94
|
-
}
|
95
|
-
if (this.sph !== null && this.sph !== undefined) {
|
96
|
-
output.writeFieldBegin('sph', Thrift.Type.STRING, 3);
|
97
|
-
output.writeBinary(this.sph);
|
98
|
-
output.writeFieldEnd();
|
99
|
-
}
|
100
|
-
if (this.path !== null && this.path !== undefined) {
|
101
|
-
output.writeFieldBegin('path', Thrift.Type.STRING, 4);
|
102
|
-
output.writeString(this.path);
|
103
|
-
output.writeFieldEnd();
|
104
|
-
}
|
105
|
-
output.writeFieldStop();
|
106
|
-
output.writeStructEnd();
|
107
|
-
return;
|
108
|
-
}
|
109
|
-
|
110
|
-
};
|
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 Sound = module.exports.Sound = class {
|
15
|
+
constructor(args) {
|
16
|
+
this.wav = null;
|
17
|
+
this.mp3 = null;
|
18
|
+
this.sph = null;
|
19
|
+
this.path = null;
|
20
|
+
if (args) {
|
21
|
+
if (args.wav !== undefined && args.wav !== null) {
|
22
|
+
this.wav = args.wav;
|
23
|
+
}
|
24
|
+
if (args.mp3 !== undefined && args.mp3 !== null) {
|
25
|
+
this.mp3 = args.mp3;
|
26
|
+
}
|
27
|
+
if (args.sph !== undefined && args.sph !== null) {
|
28
|
+
this.sph = args.sph;
|
29
|
+
}
|
30
|
+
if (args.path !== undefined && args.path !== null) {
|
31
|
+
this.path = args.path;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
read (input) {
|
37
|
+
input.readStructBegin();
|
38
|
+
while (true) {
|
39
|
+
const ret = input.readFieldBegin();
|
40
|
+
const ftype = ret.ftype;
|
41
|
+
const fid = ret.fid;
|
42
|
+
if (ftype == Thrift.Type.STOP) {
|
43
|
+
break;
|
44
|
+
}
|
45
|
+
switch (fid) {
|
46
|
+
case 1:
|
47
|
+
if (ftype == Thrift.Type.STRING) {
|
48
|
+
this.wav = input.readBinary();
|
49
|
+
} else {
|
50
|
+
input.skip(ftype);
|
51
|
+
}
|
52
|
+
break;
|
53
|
+
case 2:
|
54
|
+
if (ftype == Thrift.Type.STRING) {
|
55
|
+
this.mp3 = input.readBinary();
|
56
|
+
} else {
|
57
|
+
input.skip(ftype);
|
58
|
+
}
|
59
|
+
break;
|
60
|
+
case 3:
|
61
|
+
if (ftype == Thrift.Type.STRING) {
|
62
|
+
this.sph = input.readBinary();
|
63
|
+
} else {
|
64
|
+
input.skip(ftype);
|
65
|
+
}
|
66
|
+
break;
|
67
|
+
case 4:
|
68
|
+
if (ftype == Thrift.Type.STRING) {
|
69
|
+
this.path = input.readString();
|
70
|
+
} else {
|
71
|
+
input.skip(ftype);
|
72
|
+
}
|
73
|
+
break;
|
74
|
+
default:
|
75
|
+
input.skip(ftype);
|
76
|
+
}
|
77
|
+
input.readFieldEnd();
|
78
|
+
}
|
79
|
+
input.readStructEnd();
|
80
|
+
return;
|
81
|
+
}
|
82
|
+
|
83
|
+
write (output) {
|
84
|
+
output.writeStructBegin('Sound');
|
85
|
+
if (this.wav !== null && this.wav !== undefined) {
|
86
|
+
output.writeFieldBegin('wav', Thrift.Type.STRING, 1);
|
87
|
+
output.writeBinary(this.wav);
|
88
|
+
output.writeFieldEnd();
|
89
|
+
}
|
90
|
+
if (this.mp3 !== null && this.mp3 !== undefined) {
|
91
|
+
output.writeFieldBegin('mp3', Thrift.Type.STRING, 2);
|
92
|
+
output.writeBinary(this.mp3);
|
93
|
+
output.writeFieldEnd();
|
94
|
+
}
|
95
|
+
if (this.sph !== null && this.sph !== undefined) {
|
96
|
+
output.writeFieldBegin('sph', Thrift.Type.STRING, 3);
|
97
|
+
output.writeBinary(this.sph);
|
98
|
+
output.writeFieldEnd();
|
99
|
+
}
|
100
|
+
if (this.path !== null && this.path !== undefined) {
|
101
|
+
output.writeFieldBegin('path', Thrift.Type.STRING, 4);
|
102
|
+
output.writeString(this.path);
|
103
|
+
output.writeFieldEnd();
|
104
|
+
}
|
105
|
+
output.writeFieldStop();
|
106
|
+
output.writeStructEnd();
|
107
|
+
return;
|
108
|
+
}
|
109
|
+
|
110
|
+
};
|