relevanced_client 0.9.0rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1120 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require_relative 'relevanced_protocol_types'
9
+
10
+ module Relevanced
11
+ class Client
12
+ include ::Thrift::Client
13
+
14
+ def ping()
15
+ send_ping()
16
+ recv_ping()
17
+ end
18
+
19
+ def send_ping()
20
+ send_message('ping', Ping_args)
21
+ end
22
+
23
+ def recv_ping()
24
+ result = receive_message(Ping_result)
25
+ return
26
+ end
27
+
28
+ def getServerMetadata()
29
+ send_getServerMetadata()
30
+ return recv_getServerMetadata()
31
+ end
32
+
33
+ def send_getServerMetadata()
34
+ send_message('getServerMetadata', GetServerMetadata_args)
35
+ end
36
+
37
+ def recv_getServerMetadata()
38
+ result = receive_message(GetServerMetadata_result)
39
+ return result.success unless result.success.nil?
40
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getServerMetadata failed: unknown result')
41
+ end
42
+
43
+ def getDocumentSimilarity(centroidId, docId)
44
+ send_getDocumentSimilarity(centroidId, docId)
45
+ return recv_getDocumentSimilarity()
46
+ end
47
+
48
+ def send_getDocumentSimilarity(centroidId, docId)
49
+ send_message('getDocumentSimilarity', GetDocumentSimilarity_args, :centroidId => centroidId, :docId => docId)
50
+ end
51
+
52
+ def recv_getDocumentSimilarity()
53
+ result = receive_message(GetDocumentSimilarity_result)
54
+ return result.success unless result.success.nil?
55
+ raise result.centroidErr unless result.centroidErr.nil?
56
+ raise result.docErr unless result.docErr.nil?
57
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getDocumentSimilarity failed: unknown result')
58
+ end
59
+
60
+ def multiGetTextSimilarity(centroidIds, text)
61
+ send_multiGetTextSimilarity(centroidIds, text)
62
+ return recv_multiGetTextSimilarity()
63
+ end
64
+
65
+ def send_multiGetTextSimilarity(centroidIds, text)
66
+ send_message('multiGetTextSimilarity', MultiGetTextSimilarity_args, :centroidIds => centroidIds, :text => text)
67
+ end
68
+
69
+ def recv_multiGetTextSimilarity()
70
+ result = receive_message(MultiGetTextSimilarity_result)
71
+ return result.success unless result.success.nil?
72
+ raise result.err unless result.err.nil?
73
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'multiGetTextSimilarity failed: unknown result')
74
+ end
75
+
76
+ def getTextSimilarity(centroidId, text)
77
+ send_getTextSimilarity(centroidId, text)
78
+ return recv_getTextSimilarity()
79
+ end
80
+
81
+ def send_getTextSimilarity(centroidId, text)
82
+ send_message('getTextSimilarity', GetTextSimilarity_args, :centroidId => centroidId, :text => text)
83
+ end
84
+
85
+ def recv_getTextSimilarity()
86
+ result = receive_message(GetTextSimilarity_result)
87
+ return result.success unless result.success.nil?
88
+ raise result.err unless result.err.nil?
89
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTextSimilarity failed: unknown result')
90
+ end
91
+
92
+ def getCentroidSimilarity(centroid1Id, centroid2Id)
93
+ send_getCentroidSimilarity(centroid1Id, centroid2Id)
94
+ return recv_getCentroidSimilarity()
95
+ end
96
+
97
+ def send_getCentroidSimilarity(centroid1Id, centroid2Id)
98
+ send_message('getCentroidSimilarity', GetCentroidSimilarity_args, :centroid1Id => centroid1Id, :centroid2Id => centroid2Id)
99
+ end
100
+
101
+ def recv_getCentroidSimilarity()
102
+ result = receive_message(GetCentroidSimilarity_result)
103
+ return result.success unless result.success.nil?
104
+ raise result.err unless result.err.nil?
105
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getCentroidSimilarity failed: unknown result')
106
+ end
107
+
108
+ def createDocument(text)
109
+ send_createDocument(text)
110
+ return recv_createDocument()
111
+ end
112
+
113
+ def send_createDocument(text)
114
+ send_message('createDocument', CreateDocument_args, :text => text)
115
+ end
116
+
117
+ def recv_createDocument()
118
+ result = receive_message(CreateDocument_result)
119
+ return result.success unless result.success.nil?
120
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'createDocument failed: unknown result')
121
+ end
122
+
123
+ def createDocumentWithID(id, text)
124
+ send_createDocumentWithID(id, text)
125
+ return recv_createDocumentWithID()
126
+ end
127
+
128
+ def send_createDocumentWithID(id, text)
129
+ send_message('createDocumentWithID', CreateDocumentWithID_args, :id => id, :text => text)
130
+ end
131
+
132
+ def recv_createDocumentWithID()
133
+ result = receive_message(CreateDocumentWithID_result)
134
+ return result.success unless result.success.nil?
135
+ raise result.err unless result.err.nil?
136
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'createDocumentWithID failed: unknown result')
137
+ end
138
+
139
+ def deleteDocument(id)
140
+ send_deleteDocument(id)
141
+ return recv_deleteDocument()
142
+ end
143
+
144
+ def send_deleteDocument(id)
145
+ send_message('deleteDocument', DeleteDocument_args, :id => id)
146
+ end
147
+
148
+ def recv_deleteDocument()
149
+ result = receive_message(DeleteDocument_result)
150
+ return result.success unless result.success.nil?
151
+ raise result.err unless result.err.nil?
152
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'deleteDocument failed: unknown result')
153
+ end
154
+
155
+ def getDocumentMetadata(id)
156
+ send_getDocumentMetadata(id)
157
+ return recv_getDocumentMetadata()
158
+ end
159
+
160
+ def send_getDocumentMetadata(id)
161
+ send_message('getDocumentMetadata', GetDocumentMetadata_args, :id => id)
162
+ end
163
+
164
+ def recv_getDocumentMetadata()
165
+ result = receive_message(GetDocumentMetadata_result)
166
+ return result.success unless result.success.nil?
167
+ raise result.err unless result.err.nil?
168
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getDocumentMetadata failed: unknown result')
169
+ end
170
+
171
+ def createCentroid(centroidId)
172
+ send_createCentroid(centroidId)
173
+ return recv_createCentroid()
174
+ end
175
+
176
+ def send_createCentroid(centroidId)
177
+ send_message('createCentroid', CreateCentroid_args, :centroidId => centroidId)
178
+ end
179
+
180
+ def recv_createCentroid()
181
+ result = receive_message(CreateCentroid_result)
182
+ return result.success unless result.success.nil?
183
+ raise result.err unless result.err.nil?
184
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'createCentroid failed: unknown result')
185
+ end
186
+
187
+ def deleteCentroid(centroidId)
188
+ send_deleteCentroid(centroidId)
189
+ return recv_deleteCentroid()
190
+ end
191
+
192
+ def send_deleteCentroid(centroidId)
193
+ send_message('deleteCentroid', DeleteCentroid_args, :centroidId => centroidId)
194
+ end
195
+
196
+ def recv_deleteCentroid()
197
+ result = receive_message(DeleteCentroid_result)
198
+ return result.success unless result.success.nil?
199
+ raise result.err unless result.err.nil?
200
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'deleteCentroid failed: unknown result')
201
+ end
202
+
203
+ def listAllDocumentsForCentroid(centroidId)
204
+ send_listAllDocumentsForCentroid(centroidId)
205
+ return recv_listAllDocumentsForCentroid()
206
+ end
207
+
208
+ def send_listAllDocumentsForCentroid(centroidId)
209
+ send_message('listAllDocumentsForCentroid', ListAllDocumentsForCentroid_args, :centroidId => centroidId)
210
+ end
211
+
212
+ def recv_listAllDocumentsForCentroid()
213
+ result = receive_message(ListAllDocumentsForCentroid_result)
214
+ return result.success unless result.success.nil?
215
+ raise result.err unless result.err.nil?
216
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'listAllDocumentsForCentroid failed: unknown result')
217
+ end
218
+
219
+ def addDocumentToCentroid(centroidId, docId)
220
+ send_addDocumentToCentroid(centroidId, docId)
221
+ return recv_addDocumentToCentroid()
222
+ end
223
+
224
+ def send_addDocumentToCentroid(centroidId, docId)
225
+ send_message('addDocumentToCentroid', AddDocumentToCentroid_args, :centroidId => centroidId, :docId => docId)
226
+ end
227
+
228
+ def recv_addDocumentToCentroid()
229
+ result = receive_message(AddDocumentToCentroid_result)
230
+ return result.success unless result.success.nil?
231
+ raise result.centroidErr unless result.centroidErr.nil?
232
+ raise result.docErr unless result.docErr.nil?
233
+ raise result.bothErr unless result.bothErr.nil?
234
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'addDocumentToCentroid failed: unknown result')
235
+ end
236
+
237
+ def removeDocumentFromCentroid(centroidId, docId)
238
+ send_removeDocumentFromCentroid(centroidId, docId)
239
+ return recv_removeDocumentFromCentroid()
240
+ end
241
+
242
+ def send_removeDocumentFromCentroid(centroidId, docId)
243
+ send_message('removeDocumentFromCentroid', RemoveDocumentFromCentroid_args, :centroidId => centroidId, :docId => docId)
244
+ end
245
+
246
+ def recv_removeDocumentFromCentroid()
247
+ result = receive_message(RemoveDocumentFromCentroid_result)
248
+ return result.success unless result.success.nil?
249
+ raise result.centroidErr unless result.centroidErr.nil?
250
+ raise result.docErr unless result.docErr.nil?
251
+ raise result.bothErr unless result.bothErr.nil?
252
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'removeDocumentFromCentroid failed: unknown result')
253
+ end
254
+
255
+ def joinCentroid(centroidId)
256
+ send_joinCentroid(centroidId)
257
+ return recv_joinCentroid()
258
+ end
259
+
260
+ def send_joinCentroid(centroidId)
261
+ send_message('joinCentroid', JoinCentroid_args, :centroidId => centroidId)
262
+ end
263
+
264
+ def recv_joinCentroid()
265
+ result = receive_message(JoinCentroid_result)
266
+ return result.success unless result.success.nil?
267
+ raise result.err unless result.err.nil?
268
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'joinCentroid failed: unknown result')
269
+ end
270
+
271
+ def listAllCentroids()
272
+ send_listAllCentroids()
273
+ return recv_listAllCentroids()
274
+ end
275
+
276
+ def send_listAllCentroids()
277
+ send_message('listAllCentroids', ListAllCentroids_args)
278
+ end
279
+
280
+ def recv_listAllCentroids()
281
+ result = receive_message(ListAllCentroids_result)
282
+ return result.success unless result.success.nil?
283
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'listAllCentroids failed: unknown result')
284
+ end
285
+
286
+ def listAllDocuments()
287
+ send_listAllDocuments()
288
+ return recv_listAllDocuments()
289
+ end
290
+
291
+ def send_listAllDocuments()
292
+ send_message('listAllDocuments', ListAllDocuments_args)
293
+ end
294
+
295
+ def recv_listAllDocuments()
296
+ result = receive_message(ListAllDocuments_result)
297
+ return result.success unless result.success.nil?
298
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'listAllDocuments failed: unknown result')
299
+ end
300
+
301
+ end
302
+
303
+ class Processor
304
+ include ::Thrift::Processor
305
+
306
+ def process_ping(seqid, iprot, oprot)
307
+ args = read_args(iprot, Ping_args)
308
+ result = Ping_result.new()
309
+ @handler.ping()
310
+ write_result(result, oprot, 'ping', seqid)
311
+ end
312
+
313
+ def process_getServerMetadata(seqid, iprot, oprot)
314
+ args = read_args(iprot, GetServerMetadata_args)
315
+ result = GetServerMetadata_result.new()
316
+ result.success = @handler.getServerMetadata()
317
+ write_result(result, oprot, 'getServerMetadata', seqid)
318
+ end
319
+
320
+ def process_getDocumentSimilarity(seqid, iprot, oprot)
321
+ args = read_args(iprot, GetDocumentSimilarity_args)
322
+ result = GetDocumentSimilarity_result.new()
323
+ begin
324
+ result.success = @handler.getDocumentSimilarity(args.centroidId, args.docId)
325
+ rescue ::ECentroidDoesNotExist => centroidErr
326
+ result.centroidErr = centroidErr
327
+ rescue ::EDocumentDoesNotExist => docErr
328
+ result.docErr = docErr
329
+ end
330
+ write_result(result, oprot, 'getDocumentSimilarity', seqid)
331
+ end
332
+
333
+ def process_multiGetTextSimilarity(seqid, iprot, oprot)
334
+ args = read_args(iprot, MultiGetTextSimilarity_args)
335
+ result = MultiGetTextSimilarity_result.new()
336
+ begin
337
+ result.success = @handler.multiGetTextSimilarity(args.centroidIds, args.text)
338
+ rescue ::ECentroidDoesNotExist => err
339
+ result.err = err
340
+ end
341
+ write_result(result, oprot, 'multiGetTextSimilarity', seqid)
342
+ end
343
+
344
+ def process_getTextSimilarity(seqid, iprot, oprot)
345
+ args = read_args(iprot, GetTextSimilarity_args)
346
+ result = GetTextSimilarity_result.new()
347
+ begin
348
+ result.success = @handler.getTextSimilarity(args.centroidId, args.text)
349
+ rescue ::ECentroidDoesNotExist => err
350
+ result.err = err
351
+ end
352
+ write_result(result, oprot, 'getTextSimilarity', seqid)
353
+ end
354
+
355
+ def process_getCentroidSimilarity(seqid, iprot, oprot)
356
+ args = read_args(iprot, GetCentroidSimilarity_args)
357
+ result = GetCentroidSimilarity_result.new()
358
+ begin
359
+ result.success = @handler.getCentroidSimilarity(args.centroid1Id, args.centroid2Id)
360
+ rescue ::ECentroidDoesNotExist => err
361
+ result.err = err
362
+ end
363
+ write_result(result, oprot, 'getCentroidSimilarity', seqid)
364
+ end
365
+
366
+ def process_createDocument(seqid, iprot, oprot)
367
+ args = read_args(iprot, CreateDocument_args)
368
+ result = CreateDocument_result.new()
369
+ result.success = @handler.createDocument(args.text)
370
+ write_result(result, oprot, 'createDocument', seqid)
371
+ end
372
+
373
+ def process_createDocumentWithID(seqid, iprot, oprot)
374
+ args = read_args(iprot, CreateDocumentWithID_args)
375
+ result = CreateDocumentWithID_result.new()
376
+ begin
377
+ result.success = @handler.createDocumentWithID(args.id, args.text)
378
+ rescue ::EDocumentAlreadyExists => err
379
+ result.err = err
380
+ end
381
+ write_result(result, oprot, 'createDocumentWithID', seqid)
382
+ end
383
+
384
+ def process_deleteDocument(seqid, iprot, oprot)
385
+ args = read_args(iprot, DeleteDocument_args)
386
+ result = DeleteDocument_result.new()
387
+ begin
388
+ result.success = @handler.deleteDocument(args.id)
389
+ rescue ::EDocumentDoesNotExist => err
390
+ result.err = err
391
+ end
392
+ write_result(result, oprot, 'deleteDocument', seqid)
393
+ end
394
+
395
+ def process_getDocumentMetadata(seqid, iprot, oprot)
396
+ args = read_args(iprot, GetDocumentMetadata_args)
397
+ result = GetDocumentMetadata_result.new()
398
+ begin
399
+ result.success = @handler.getDocumentMetadata(args.id)
400
+ rescue ::EDocumentDoesNotExist => err
401
+ result.err = err
402
+ end
403
+ write_result(result, oprot, 'getDocumentMetadata', seqid)
404
+ end
405
+
406
+ def process_createCentroid(seqid, iprot, oprot)
407
+ args = read_args(iprot, CreateCentroid_args)
408
+ result = CreateCentroid_result.new()
409
+ begin
410
+ result.success = @handler.createCentroid(args.centroidId)
411
+ rescue ::ECentroidAlreadyExists => err
412
+ result.err = err
413
+ end
414
+ write_result(result, oprot, 'createCentroid', seqid)
415
+ end
416
+
417
+ def process_deleteCentroid(seqid, iprot, oprot)
418
+ args = read_args(iprot, DeleteCentroid_args)
419
+ result = DeleteCentroid_result.new()
420
+ begin
421
+ result.success = @handler.deleteCentroid(args.centroidId)
422
+ rescue ::ECentroidDoesNotExist => err
423
+ result.err = err
424
+ end
425
+ write_result(result, oprot, 'deleteCentroid', seqid)
426
+ end
427
+
428
+ def process_listAllDocumentsForCentroid(seqid, iprot, oprot)
429
+ args = read_args(iprot, ListAllDocumentsForCentroid_args)
430
+ result = ListAllDocumentsForCentroid_result.new()
431
+ begin
432
+ result.success = @handler.listAllDocumentsForCentroid(args.centroidId)
433
+ rescue ::ECentroidDoesNotExist => err
434
+ result.err = err
435
+ end
436
+ write_result(result, oprot, 'listAllDocumentsForCentroid', seqid)
437
+ end
438
+
439
+ def process_addDocumentToCentroid(seqid, iprot, oprot)
440
+ args = read_args(iprot, AddDocumentToCentroid_args)
441
+ result = AddDocumentToCentroid_result.new()
442
+ begin
443
+ result.success = @handler.addDocumentToCentroid(args.centroidId, args.docId)
444
+ rescue ::ECentroidDoesNotExist => centroidErr
445
+ result.centroidErr = centroidErr
446
+ rescue ::EDocumentDoesNotExist => docErr
447
+ result.docErr = docErr
448
+ rescue ::EDocumentAlreadyInCentroid => bothErr
449
+ result.bothErr = bothErr
450
+ end
451
+ write_result(result, oprot, 'addDocumentToCentroid', seqid)
452
+ end
453
+
454
+ def process_removeDocumentFromCentroid(seqid, iprot, oprot)
455
+ args = read_args(iprot, RemoveDocumentFromCentroid_args)
456
+ result = RemoveDocumentFromCentroid_result.new()
457
+ begin
458
+ result.success = @handler.removeDocumentFromCentroid(args.centroidId, args.docId)
459
+ rescue ::ECentroidDoesNotExist => centroidErr
460
+ result.centroidErr = centroidErr
461
+ rescue ::EDocumentDoesNotExist => docErr
462
+ result.docErr = docErr
463
+ rescue ::EDocumentNotInCentroid => bothErr
464
+ result.bothErr = bothErr
465
+ end
466
+ write_result(result, oprot, 'removeDocumentFromCentroid', seqid)
467
+ end
468
+
469
+ def process_joinCentroid(seqid, iprot, oprot)
470
+ args = read_args(iprot, JoinCentroid_args)
471
+ result = JoinCentroid_result.new()
472
+ begin
473
+ result.success = @handler.joinCentroid(args.centroidId)
474
+ rescue ::ECentroidDoesNotExist => err
475
+ result.err = err
476
+ end
477
+ write_result(result, oprot, 'joinCentroid', seqid)
478
+ end
479
+
480
+ def process_listAllCentroids(seqid, iprot, oprot)
481
+ args = read_args(iprot, ListAllCentroids_args)
482
+ result = ListAllCentroids_result.new()
483
+ result.success = @handler.listAllCentroids()
484
+ write_result(result, oprot, 'listAllCentroids', seqid)
485
+ end
486
+
487
+ def process_listAllDocuments(seqid, iprot, oprot)
488
+ args = read_args(iprot, ListAllDocuments_args)
489
+ result = ListAllDocuments_result.new()
490
+ result.success = @handler.listAllDocuments()
491
+ write_result(result, oprot, 'listAllDocuments', seqid)
492
+ end
493
+
494
+ end
495
+
496
+ # HELPER FUNCTIONS AND STRUCTURES
497
+
498
+ class Ping_args
499
+ include ::Thrift::Struct, ::Thrift::Struct_Union
500
+
501
+ FIELDS = {
502
+
503
+ }
504
+
505
+ def struct_fields; FIELDS; end
506
+
507
+ def validate
508
+ end
509
+
510
+ ::Thrift::Struct.generate_accessors self
511
+ end
512
+
513
+ class Ping_result
514
+ include ::Thrift::Struct, ::Thrift::Struct_Union
515
+
516
+ FIELDS = {
517
+
518
+ }
519
+
520
+ def struct_fields; FIELDS; end
521
+
522
+ def validate
523
+ end
524
+
525
+ ::Thrift::Struct.generate_accessors self
526
+ end
527
+
528
+ class GetServerMetadata_args
529
+ include ::Thrift::Struct, ::Thrift::Struct_Union
530
+
531
+ FIELDS = {
532
+
533
+ }
534
+
535
+ def struct_fields; FIELDS; end
536
+
537
+ def validate
538
+ end
539
+
540
+ ::Thrift::Struct.generate_accessors self
541
+ end
542
+
543
+ class GetServerMetadata_result
544
+ include ::Thrift::Struct, ::Thrift::Struct_Union
545
+ SUCCESS = 0
546
+
547
+ FIELDS = {
548
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
549
+ }
550
+
551
+ def struct_fields; FIELDS; end
552
+
553
+ def validate
554
+ end
555
+
556
+ ::Thrift::Struct.generate_accessors self
557
+ end
558
+
559
+ class GetDocumentSimilarity_args
560
+ include ::Thrift::Struct, ::Thrift::Struct_Union
561
+ CENTROIDID = 1
562
+ DOCID = 2
563
+
564
+ FIELDS = {
565
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'},
566
+ DOCID => {:type => ::Thrift::Types::STRING, :name => 'docId'}
567
+ }
568
+
569
+ def struct_fields; FIELDS; end
570
+
571
+ def validate
572
+ end
573
+
574
+ ::Thrift::Struct.generate_accessors self
575
+ end
576
+
577
+ class GetDocumentSimilarity_result
578
+ include ::Thrift::Struct, ::Thrift::Struct_Union
579
+ SUCCESS = 0
580
+ CENTROIDERR = 1
581
+ DOCERR = 2
582
+
583
+ FIELDS = {
584
+ SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'},
585
+ CENTROIDERR => {:type => ::Thrift::Types::STRUCT, :name => 'centroidErr', :class => ::ECentroidDoesNotExist},
586
+ DOCERR => {:type => ::Thrift::Types::STRUCT, :name => 'docErr', :class => ::EDocumentDoesNotExist}
587
+ }
588
+
589
+ def struct_fields; FIELDS; end
590
+
591
+ def validate
592
+ end
593
+
594
+ ::Thrift::Struct.generate_accessors self
595
+ end
596
+
597
+ class MultiGetTextSimilarity_args
598
+ include ::Thrift::Struct, ::Thrift::Struct_Union
599
+ CENTROIDIDS = 1
600
+ TEXT = 2
601
+
602
+ FIELDS = {
603
+ CENTROIDIDS => {:type => ::Thrift::Types::LIST, :name => 'centroidIds', :element => {:type => ::Thrift::Types::STRING}},
604
+ TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'}
605
+ }
606
+
607
+ def struct_fields; FIELDS; end
608
+
609
+ def validate
610
+ end
611
+
612
+ ::Thrift::Struct.generate_accessors self
613
+ end
614
+
615
+ class MultiGetTextSimilarity_result
616
+ include ::Thrift::Struct, ::Thrift::Struct_Union
617
+ SUCCESS = 0
618
+ ERR = 1
619
+
620
+ FIELDS = {
621
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::MultiSimilarityResponse},
622
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
623
+ }
624
+
625
+ def struct_fields; FIELDS; end
626
+
627
+ def validate
628
+ end
629
+
630
+ ::Thrift::Struct.generate_accessors self
631
+ end
632
+
633
+ class GetTextSimilarity_args
634
+ include ::Thrift::Struct, ::Thrift::Struct_Union
635
+ CENTROIDID = 1
636
+ TEXT = 2
637
+
638
+ FIELDS = {
639
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'},
640
+ TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'}
641
+ }
642
+
643
+ def struct_fields; FIELDS; end
644
+
645
+ def validate
646
+ end
647
+
648
+ ::Thrift::Struct.generate_accessors self
649
+ end
650
+
651
+ class GetTextSimilarity_result
652
+ include ::Thrift::Struct, ::Thrift::Struct_Union
653
+ SUCCESS = 0
654
+ ERR = 1
655
+
656
+ FIELDS = {
657
+ SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'},
658
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
659
+ }
660
+
661
+ def struct_fields; FIELDS; end
662
+
663
+ def validate
664
+ end
665
+
666
+ ::Thrift::Struct.generate_accessors self
667
+ end
668
+
669
+ class GetCentroidSimilarity_args
670
+ include ::Thrift::Struct, ::Thrift::Struct_Union
671
+ CENTROID1ID = 1
672
+ CENTROID2ID = 2
673
+
674
+ FIELDS = {
675
+ CENTROID1ID => {:type => ::Thrift::Types::STRING, :name => 'centroid1Id'},
676
+ CENTROID2ID => {:type => ::Thrift::Types::STRING, :name => 'centroid2Id'}
677
+ }
678
+
679
+ def struct_fields; FIELDS; end
680
+
681
+ def validate
682
+ end
683
+
684
+ ::Thrift::Struct.generate_accessors self
685
+ end
686
+
687
+ class GetCentroidSimilarity_result
688
+ include ::Thrift::Struct, ::Thrift::Struct_Union
689
+ SUCCESS = 0
690
+ ERR = 1
691
+
692
+ FIELDS = {
693
+ SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'},
694
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
695
+ }
696
+
697
+ def struct_fields; FIELDS; end
698
+
699
+ def validate
700
+ end
701
+
702
+ ::Thrift::Struct.generate_accessors self
703
+ end
704
+
705
+ class CreateDocument_args
706
+ include ::Thrift::Struct, ::Thrift::Struct_Union
707
+ TEXT = 1
708
+
709
+ FIELDS = {
710
+ TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'}
711
+ }
712
+
713
+ def struct_fields; FIELDS; end
714
+
715
+ def validate
716
+ end
717
+
718
+ ::Thrift::Struct.generate_accessors self
719
+ end
720
+
721
+ class CreateDocument_result
722
+ include ::Thrift::Struct, ::Thrift::Struct_Union
723
+ SUCCESS = 0
724
+
725
+ FIELDS = {
726
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CreateDocumentResponse}
727
+ }
728
+
729
+ def struct_fields; FIELDS; end
730
+
731
+ def validate
732
+ end
733
+
734
+ ::Thrift::Struct.generate_accessors self
735
+ end
736
+
737
+ class CreateDocumentWithID_args
738
+ include ::Thrift::Struct, ::Thrift::Struct_Union
739
+ ID = 1
740
+ TEXT = 2
741
+
742
+ FIELDS = {
743
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
744
+ TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'}
745
+ }
746
+
747
+ def struct_fields; FIELDS; end
748
+
749
+ def validate
750
+ end
751
+
752
+ ::Thrift::Struct.generate_accessors self
753
+ end
754
+
755
+ class CreateDocumentWithID_result
756
+ include ::Thrift::Struct, ::Thrift::Struct_Union
757
+ SUCCESS = 0
758
+ ERR = 1
759
+
760
+ FIELDS = {
761
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CreateDocumentResponse},
762
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::EDocumentAlreadyExists}
763
+ }
764
+
765
+ def struct_fields; FIELDS; end
766
+
767
+ def validate
768
+ end
769
+
770
+ ::Thrift::Struct.generate_accessors self
771
+ end
772
+
773
+ class DeleteDocument_args
774
+ include ::Thrift::Struct, ::Thrift::Struct_Union
775
+ ID = 1
776
+
777
+ FIELDS = {
778
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
779
+ }
780
+
781
+ def struct_fields; FIELDS; end
782
+
783
+ def validate
784
+ end
785
+
786
+ ::Thrift::Struct.generate_accessors self
787
+ end
788
+
789
+ class DeleteDocument_result
790
+ include ::Thrift::Struct, ::Thrift::Struct_Union
791
+ SUCCESS = 0
792
+ ERR = 1
793
+
794
+ FIELDS = {
795
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::DeleteDocumentResponse},
796
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::EDocumentDoesNotExist}
797
+ }
798
+
799
+ def struct_fields; FIELDS; end
800
+
801
+ def validate
802
+ end
803
+
804
+ ::Thrift::Struct.generate_accessors self
805
+ end
806
+
807
+ class GetDocumentMetadata_args
808
+ include ::Thrift::Struct, ::Thrift::Struct_Union
809
+ ID = 1
810
+
811
+ FIELDS = {
812
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
813
+ }
814
+
815
+ def struct_fields; FIELDS; end
816
+
817
+ def validate
818
+ end
819
+
820
+ ::Thrift::Struct.generate_accessors self
821
+ end
822
+
823
+ class GetDocumentMetadata_result
824
+ include ::Thrift::Struct, ::Thrift::Struct_Union
825
+ SUCCESS = 0
826
+ ERR = 1
827
+
828
+ FIELDS = {
829
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetDocumentMetadataResponse},
830
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::EDocumentDoesNotExist}
831
+ }
832
+
833
+ def struct_fields; FIELDS; end
834
+
835
+ def validate
836
+ end
837
+
838
+ ::Thrift::Struct.generate_accessors self
839
+ end
840
+
841
+ class CreateCentroid_args
842
+ include ::Thrift::Struct, ::Thrift::Struct_Union
843
+ CENTROIDID = 1
844
+
845
+ FIELDS = {
846
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'}
847
+ }
848
+
849
+ def struct_fields; FIELDS; end
850
+
851
+ def validate
852
+ end
853
+
854
+ ::Thrift::Struct.generate_accessors self
855
+ end
856
+
857
+ class CreateCentroid_result
858
+ include ::Thrift::Struct, ::Thrift::Struct_Union
859
+ SUCCESS = 0
860
+ ERR = 1
861
+
862
+ FIELDS = {
863
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CreateCentroidResponse},
864
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidAlreadyExists}
865
+ }
866
+
867
+ def struct_fields; FIELDS; end
868
+
869
+ def validate
870
+ end
871
+
872
+ ::Thrift::Struct.generate_accessors self
873
+ end
874
+
875
+ class DeleteCentroid_args
876
+ include ::Thrift::Struct, ::Thrift::Struct_Union
877
+ CENTROIDID = 1
878
+
879
+ FIELDS = {
880
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'}
881
+ }
882
+
883
+ def struct_fields; FIELDS; end
884
+
885
+ def validate
886
+ end
887
+
888
+ ::Thrift::Struct.generate_accessors self
889
+ end
890
+
891
+ class DeleteCentroid_result
892
+ include ::Thrift::Struct, ::Thrift::Struct_Union
893
+ SUCCESS = 0
894
+ ERR = 1
895
+
896
+ FIELDS = {
897
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::DeleteCentroidResponse},
898
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
899
+ }
900
+
901
+ def struct_fields; FIELDS; end
902
+
903
+ def validate
904
+ end
905
+
906
+ ::Thrift::Struct.generate_accessors self
907
+ end
908
+
909
+ class ListAllDocumentsForCentroid_args
910
+ include ::Thrift::Struct, ::Thrift::Struct_Union
911
+ CENTROIDID = 1
912
+
913
+ FIELDS = {
914
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'}
915
+ }
916
+
917
+ def struct_fields; FIELDS; end
918
+
919
+ def validate
920
+ end
921
+
922
+ ::Thrift::Struct.generate_accessors self
923
+ end
924
+
925
+ class ListAllDocumentsForCentroid_result
926
+ include ::Thrift::Struct, ::Thrift::Struct_Union
927
+ SUCCESS = 0
928
+ ERR = 1
929
+
930
+ FIELDS = {
931
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ListCentroidDocumentsResponse},
932
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
933
+ }
934
+
935
+ def struct_fields; FIELDS; end
936
+
937
+ def validate
938
+ end
939
+
940
+ ::Thrift::Struct.generate_accessors self
941
+ end
942
+
943
+ class AddDocumentToCentroid_args
944
+ include ::Thrift::Struct, ::Thrift::Struct_Union
945
+ CENTROIDID = 1
946
+ DOCID = 2
947
+
948
+ FIELDS = {
949
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'},
950
+ DOCID => {:type => ::Thrift::Types::STRING, :name => 'docId'}
951
+ }
952
+
953
+ def struct_fields; FIELDS; end
954
+
955
+ def validate
956
+ end
957
+
958
+ ::Thrift::Struct.generate_accessors self
959
+ end
960
+
961
+ class AddDocumentToCentroid_result
962
+ include ::Thrift::Struct, ::Thrift::Struct_Union
963
+ SUCCESS = 0
964
+ CENTROIDERR = 1
965
+ DOCERR = 2
966
+ BOTHERR = 3
967
+
968
+ FIELDS = {
969
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AddDocumentToCentroidResponse},
970
+ CENTROIDERR => {:type => ::Thrift::Types::STRUCT, :name => 'centroidErr', :class => ::ECentroidDoesNotExist},
971
+ DOCERR => {:type => ::Thrift::Types::STRUCT, :name => 'docErr', :class => ::EDocumentDoesNotExist},
972
+ BOTHERR => {:type => ::Thrift::Types::STRUCT, :name => 'bothErr', :class => ::EDocumentAlreadyInCentroid}
973
+ }
974
+
975
+ def struct_fields; FIELDS; end
976
+
977
+ def validate
978
+ end
979
+
980
+ ::Thrift::Struct.generate_accessors self
981
+ end
982
+
983
+ class RemoveDocumentFromCentroid_args
984
+ include ::Thrift::Struct, ::Thrift::Struct_Union
985
+ CENTROIDID = 1
986
+ DOCID = 2
987
+
988
+ FIELDS = {
989
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'},
990
+ DOCID => {:type => ::Thrift::Types::STRING, :name => 'docId'}
991
+ }
992
+
993
+ def struct_fields; FIELDS; end
994
+
995
+ def validate
996
+ end
997
+
998
+ ::Thrift::Struct.generate_accessors self
999
+ end
1000
+
1001
+ class RemoveDocumentFromCentroid_result
1002
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1003
+ SUCCESS = 0
1004
+ CENTROIDERR = 1
1005
+ DOCERR = 2
1006
+ BOTHERR = 3
1007
+
1008
+ FIELDS = {
1009
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::RemoveDocumentFromCentroidResponse},
1010
+ CENTROIDERR => {:type => ::Thrift::Types::STRUCT, :name => 'centroidErr', :class => ::ECentroidDoesNotExist},
1011
+ DOCERR => {:type => ::Thrift::Types::STRUCT, :name => 'docErr', :class => ::EDocumentDoesNotExist},
1012
+ BOTHERR => {:type => ::Thrift::Types::STRUCT, :name => 'bothErr', :class => ::EDocumentNotInCentroid}
1013
+ }
1014
+
1015
+ def struct_fields; FIELDS; end
1016
+
1017
+ def validate
1018
+ end
1019
+
1020
+ ::Thrift::Struct.generate_accessors self
1021
+ end
1022
+
1023
+ class JoinCentroid_args
1024
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1025
+ CENTROIDID = 1
1026
+
1027
+ FIELDS = {
1028
+ CENTROIDID => {:type => ::Thrift::Types::STRING, :name => 'centroidId'}
1029
+ }
1030
+
1031
+ def struct_fields; FIELDS; end
1032
+
1033
+ def validate
1034
+ end
1035
+
1036
+ ::Thrift::Struct.generate_accessors self
1037
+ end
1038
+
1039
+ class JoinCentroid_result
1040
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1041
+ SUCCESS = 0
1042
+ ERR = 1
1043
+
1044
+ FIELDS = {
1045
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::JoinCentroidResponse},
1046
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::ECentroidDoesNotExist}
1047
+ }
1048
+
1049
+ def struct_fields; FIELDS; end
1050
+
1051
+ def validate
1052
+ end
1053
+
1054
+ ::Thrift::Struct.generate_accessors self
1055
+ end
1056
+
1057
+ class ListAllCentroids_args
1058
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1059
+
1060
+ FIELDS = {
1061
+
1062
+ }
1063
+
1064
+ def struct_fields; FIELDS; end
1065
+
1066
+ def validate
1067
+ end
1068
+
1069
+ ::Thrift::Struct.generate_accessors self
1070
+ end
1071
+
1072
+ class ListAllCentroids_result
1073
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1074
+ SUCCESS = 0
1075
+
1076
+ FIELDS = {
1077
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ListCentroidsResponse}
1078
+ }
1079
+
1080
+ def struct_fields; FIELDS; end
1081
+
1082
+ def validate
1083
+ end
1084
+
1085
+ ::Thrift::Struct.generate_accessors self
1086
+ end
1087
+
1088
+ class ListAllDocuments_args
1089
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1090
+
1091
+ FIELDS = {
1092
+
1093
+ }
1094
+
1095
+ def struct_fields; FIELDS; end
1096
+
1097
+ def validate
1098
+ end
1099
+
1100
+ ::Thrift::Struct.generate_accessors self
1101
+ end
1102
+
1103
+ class ListAllDocuments_result
1104
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1105
+ SUCCESS = 0
1106
+
1107
+ FIELDS = {
1108
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ListDocumentsResponse}
1109
+ }
1110
+
1111
+ def struct_fields; FIELDS; end
1112
+
1113
+ def validate
1114
+ end
1115
+
1116
+ ::Thrift::Struct.generate_accessors self
1117
+ end
1118
+
1119
+ end
1120
+