passport_thrift_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,632 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'remote_passport_types'
9
+
10
+ module Passport
11
+ module Thrift
12
+ module RemotePassportService
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def queryPassportByEmail(email)
17
+ send_queryPassportByEmail(email)
18
+ return recv_queryPassportByEmail()
19
+ end
20
+
21
+ def send_queryPassportByEmail(email)
22
+ send_message('queryPassportByEmail', QueryPassportByEmail_args, :email => email)
23
+ end
24
+
25
+ def recv_queryPassportByEmail()
26
+ result = receive_message(QueryPassportByEmail_result)
27
+ return result.success unless result.success.nil?
28
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryPassportByEmail failed: unknown result')
29
+ end
30
+
31
+ def queryPassportByUid(uid)
32
+ send_queryPassportByUid(uid)
33
+ return recv_queryPassportByUid()
34
+ end
35
+
36
+ def send_queryPassportByUid(uid)
37
+ send_message('queryPassportByUid', QueryPassportByUid_args, :uid => uid)
38
+ end
39
+
40
+ def recv_queryPassportByUid()
41
+ result = receive_message(QueryPassportByUid_result)
42
+ return result.success unless result.success.nil?
43
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryPassportByUid failed: unknown result')
44
+ end
45
+
46
+ def validatePassword(uid, password)
47
+ send_validatePassword(uid, password)
48
+ return recv_validatePassword()
49
+ end
50
+
51
+ def send_validatePassword(uid, password)
52
+ send_message('validatePassword', ValidatePassword_args, :uid => uid, :password => password)
53
+ end
54
+
55
+ def recv_validatePassword()
56
+ result = receive_message(ValidatePassword_result)
57
+ return result.success unless result.success.nil?
58
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'validatePassword failed: unknown result')
59
+ end
60
+
61
+ def getNickNameByUid(uid)
62
+ send_getNickNameByUid(uid)
63
+ return recv_getNickNameByUid()
64
+ end
65
+
66
+ def send_getNickNameByUid(uid)
67
+ send_message('getNickNameByUid', GetNickNameByUid_args, :uid => uid)
68
+ end
69
+
70
+ def recv_getNickNameByUid()
71
+ result = receive_message(GetNickNameByUid_result)
72
+ return result.success unless result.success.nil?
73
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getNickNameByUid failed: unknown result')
74
+ end
75
+
76
+ def getMultiNickNameByUids(uidList)
77
+ send_getMultiNickNameByUids(uidList)
78
+ return recv_getMultiNickNameByUids()
79
+ end
80
+
81
+ def send_getMultiNickNameByUids(uidList)
82
+ send_message('getMultiNickNameByUids', GetMultiNickNameByUids_args, :uidList => uidList)
83
+ end
84
+
85
+ def recv_getMultiNickNameByUids()
86
+ result = receive_message(GetMultiNickNameByUids_result)
87
+ return result.success unless result.success.nil?
88
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMultiNickNameByUids failed: unknown result')
89
+ end
90
+
91
+ def queryPassportUidMap(uidList)
92
+ send_queryPassportUidMap(uidList)
93
+ return recv_queryPassportUidMap()
94
+ end
95
+
96
+ def send_queryPassportUidMap(uidList)
97
+ send_message('queryPassportUidMap', QueryPassportUidMap_args, :uidList => uidList)
98
+ end
99
+
100
+ def recv_queryPassportUidMap()
101
+ result = receive_message(QueryPassportUidMap_result)
102
+ return result.success unless result.success.nil?
103
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryPassportUidMap failed: unknown result')
104
+ end
105
+
106
+ def getPassportByLoginName(loginName)
107
+ send_getPassportByLoginName(loginName)
108
+ return recv_getPassportByLoginName()
109
+ end
110
+
111
+ def send_getPassportByLoginName(loginName)
112
+ send_message('getPassportByLoginName', GetPassportByLoginName_args, :loginName => loginName)
113
+ end
114
+
115
+ def recv_getPassportByLoginName()
116
+ result = receive_message(GetPassportByLoginName_result)
117
+ return result.success unless result.success.nil?
118
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPassportByLoginName failed: unknown result')
119
+ end
120
+
121
+ def modifyPasswordDirectly(uid, password)
122
+ send_modifyPasswordDirectly(uid, password)
123
+ recv_modifyPasswordDirectly()
124
+ end
125
+
126
+ def send_modifyPasswordDirectly(uid, password)
127
+ send_message('modifyPasswordDirectly', ModifyPasswordDirectly_args, :uid => uid, :password => password)
128
+ end
129
+
130
+ def recv_modifyPasswordDirectly()
131
+ result = receive_message(ModifyPasswordDirectly_result)
132
+ raise result.ex unless result.ex.nil?
133
+ return
134
+ end
135
+
136
+ def queryNewRegistUsers(endTime, usersCount)
137
+ send_queryNewRegistUsers(endTime, usersCount)
138
+ return recv_queryNewRegistUsers()
139
+ end
140
+
141
+ def send_queryNewRegistUsers(endTime, usersCount)
142
+ send_message('queryNewRegistUsers', QueryNewRegistUsers_args, :endTime => endTime, :usersCount => usersCount)
143
+ end
144
+
145
+ def recv_queryNewRegistUsers()
146
+ result = receive_message(QueryNewRegistUsers_result)
147
+ return result.success unless result.success.nil?
148
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryNewRegistUsers failed: unknown result')
149
+ end
150
+
151
+ def queryByMobile(mobile)
152
+ send_queryByMobile(mobile)
153
+ return recv_queryByMobile()
154
+ end
155
+
156
+ def send_queryByMobile(mobile)
157
+ send_message('queryByMobile', QueryByMobile_args, :mobile => mobile)
158
+ end
159
+
160
+ def recv_queryByMobile()
161
+ result = receive_message(QueryByMobile_result)
162
+ return result.success unless result.success.nil?
163
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryByMobile failed: unknown result')
164
+ end
165
+
166
+ def getMultiPassportByMobiles(mobiles)
167
+ send_getMultiPassportByMobiles(mobiles)
168
+ return recv_getMultiPassportByMobiles()
169
+ end
170
+
171
+ def send_getMultiPassportByMobiles(mobiles)
172
+ send_message('getMultiPassportByMobiles', GetMultiPassportByMobiles_args, :mobiles => mobiles)
173
+ end
174
+
175
+ def recv_getMultiPassportByMobiles()
176
+ result = receive_message(GetMultiPassportByMobiles_result)
177
+ return result.success unless result.success.nil?
178
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMultiPassportByMobiles failed: unknown result')
179
+ end
180
+
181
+ end
182
+
183
+ class Processor
184
+ include ::Thrift::Processor
185
+
186
+ def process_queryPassportByEmail(seqid, iprot, oprot)
187
+ args = read_args(iprot, QueryPassportByEmail_args)
188
+ result = QueryPassportByEmail_result.new()
189
+ result.success = @handler.queryPassportByEmail(args.email)
190
+ write_result(result, oprot, 'queryPassportByEmail', seqid)
191
+ end
192
+
193
+ def process_queryPassportByUid(seqid, iprot, oprot)
194
+ args = read_args(iprot, QueryPassportByUid_args)
195
+ result = QueryPassportByUid_result.new()
196
+ result.success = @handler.queryPassportByUid(args.uid)
197
+ write_result(result, oprot, 'queryPassportByUid', seqid)
198
+ end
199
+
200
+ def process_validatePassword(seqid, iprot, oprot)
201
+ args = read_args(iprot, ValidatePassword_args)
202
+ result = ValidatePassword_result.new()
203
+ result.success = @handler.validatePassword(args.uid, args.password)
204
+ write_result(result, oprot, 'validatePassword', seqid)
205
+ end
206
+
207
+ def process_getNickNameByUid(seqid, iprot, oprot)
208
+ args = read_args(iprot, GetNickNameByUid_args)
209
+ result = GetNickNameByUid_result.new()
210
+ result.success = @handler.getNickNameByUid(args.uid)
211
+ write_result(result, oprot, 'getNickNameByUid', seqid)
212
+ end
213
+
214
+ def process_getMultiNickNameByUids(seqid, iprot, oprot)
215
+ args = read_args(iprot, GetMultiNickNameByUids_args)
216
+ result = GetMultiNickNameByUids_result.new()
217
+ result.success = @handler.getMultiNickNameByUids(args.uidList)
218
+ write_result(result, oprot, 'getMultiNickNameByUids', seqid)
219
+ end
220
+
221
+ def process_queryPassportUidMap(seqid, iprot, oprot)
222
+ args = read_args(iprot, QueryPassportUidMap_args)
223
+ result = QueryPassportUidMap_result.new()
224
+ result.success = @handler.queryPassportUidMap(args.uidList)
225
+ write_result(result, oprot, 'queryPassportUidMap', seqid)
226
+ end
227
+
228
+ def process_getPassportByLoginName(seqid, iprot, oprot)
229
+ args = read_args(iprot, GetPassportByLoginName_args)
230
+ result = GetPassportByLoginName_result.new()
231
+ result.success = @handler.getPassportByLoginName(args.loginName)
232
+ write_result(result, oprot, 'getPassportByLoginName', seqid)
233
+ end
234
+
235
+ def process_modifyPasswordDirectly(seqid, iprot, oprot)
236
+ args = read_args(iprot, ModifyPasswordDirectly_args)
237
+ result = ModifyPasswordDirectly_result.new()
238
+ begin
239
+ @handler.modifyPasswordDirectly(args.uid, args.password)
240
+ rescue ::Passport::Thrift::PassportException => ex
241
+ result.ex = ex
242
+ end
243
+ write_result(result, oprot, 'modifyPasswordDirectly', seqid)
244
+ end
245
+
246
+ def process_queryNewRegistUsers(seqid, iprot, oprot)
247
+ args = read_args(iprot, QueryNewRegistUsers_args)
248
+ result = QueryNewRegistUsers_result.new()
249
+ result.success = @handler.queryNewRegistUsers(args.endTime, args.usersCount)
250
+ write_result(result, oprot, 'queryNewRegistUsers', seqid)
251
+ end
252
+
253
+ def process_queryByMobile(seqid, iprot, oprot)
254
+ args = read_args(iprot, QueryByMobile_args)
255
+ result = QueryByMobile_result.new()
256
+ result.success = @handler.queryByMobile(args.mobile)
257
+ write_result(result, oprot, 'queryByMobile', seqid)
258
+ end
259
+
260
+ def process_getMultiPassportByMobiles(seqid, iprot, oprot)
261
+ args = read_args(iprot, GetMultiPassportByMobiles_args)
262
+ result = GetMultiPassportByMobiles_result.new()
263
+ result.success = @handler.getMultiPassportByMobiles(args.mobiles)
264
+ write_result(result, oprot, 'getMultiPassportByMobiles', seqid)
265
+ end
266
+
267
+ end
268
+
269
+ # HELPER FUNCTIONS AND STRUCTURES
270
+
271
+ class QueryPassportByEmail_args
272
+ include ::Thrift::Struct, ::Thrift::Struct_Union
273
+ EMAIL = 1
274
+
275
+ FIELDS = {
276
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email'}
277
+ }
278
+
279
+ def struct_fields; FIELDS; end
280
+
281
+ def validate
282
+ end
283
+
284
+ ::Thrift::Struct.generate_accessors self
285
+ end
286
+
287
+ class QueryPassportByEmail_result
288
+ include ::Thrift::Struct, ::Thrift::Struct_Union
289
+ SUCCESS = 0
290
+
291
+ FIELDS = {
292
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Passport::Thrift::Passport}
293
+ }
294
+
295
+ def struct_fields; FIELDS; end
296
+
297
+ def validate
298
+ end
299
+
300
+ ::Thrift::Struct.generate_accessors self
301
+ end
302
+
303
+ class QueryPassportByUid_args
304
+ include ::Thrift::Struct, ::Thrift::Struct_Union
305
+ UID = 1
306
+
307
+ FIELDS = {
308
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
309
+ }
310
+
311
+ def struct_fields; FIELDS; end
312
+
313
+ def validate
314
+ end
315
+
316
+ ::Thrift::Struct.generate_accessors self
317
+ end
318
+
319
+ class QueryPassportByUid_result
320
+ include ::Thrift::Struct, ::Thrift::Struct_Union
321
+ SUCCESS = 0
322
+
323
+ FIELDS = {
324
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Passport::Thrift::Passport}
325
+ }
326
+
327
+ def struct_fields; FIELDS; end
328
+
329
+ def validate
330
+ end
331
+
332
+ ::Thrift::Struct.generate_accessors self
333
+ end
334
+
335
+ class ValidatePassword_args
336
+ include ::Thrift::Struct, ::Thrift::Struct_Union
337
+ UID = 1
338
+ PASSWORD = 2
339
+
340
+ FIELDS = {
341
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
342
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'}
343
+ }
344
+
345
+ def struct_fields; FIELDS; end
346
+
347
+ def validate
348
+ end
349
+
350
+ ::Thrift::Struct.generate_accessors self
351
+ end
352
+
353
+ class ValidatePassword_result
354
+ include ::Thrift::Struct, ::Thrift::Struct_Union
355
+ SUCCESS = 0
356
+
357
+ FIELDS = {
358
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
359
+ }
360
+
361
+ def struct_fields; FIELDS; end
362
+
363
+ def validate
364
+ end
365
+
366
+ ::Thrift::Struct.generate_accessors self
367
+ end
368
+
369
+ class GetNickNameByUid_args
370
+ include ::Thrift::Struct, ::Thrift::Struct_Union
371
+ UID = 1
372
+
373
+ FIELDS = {
374
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
375
+ }
376
+
377
+ def struct_fields; FIELDS; end
378
+
379
+ def validate
380
+ end
381
+
382
+ ::Thrift::Struct.generate_accessors self
383
+ end
384
+
385
+ class GetNickNameByUid_result
386
+ include ::Thrift::Struct, ::Thrift::Struct_Union
387
+ SUCCESS = 0
388
+
389
+ FIELDS = {
390
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
391
+ }
392
+
393
+ def struct_fields; FIELDS; end
394
+
395
+ def validate
396
+ end
397
+
398
+ ::Thrift::Struct.generate_accessors self
399
+ end
400
+
401
+ class GetMultiNickNameByUids_args
402
+ include ::Thrift::Struct, ::Thrift::Struct_Union
403
+ UIDLIST = 1
404
+
405
+ FIELDS = {
406
+ UIDLIST => {:type => ::Thrift::Types::LIST, :name => 'uidList', :element => {:type => ::Thrift::Types::I64}}
407
+ }
408
+
409
+ def struct_fields; FIELDS; end
410
+
411
+ def validate
412
+ end
413
+
414
+ ::Thrift::Struct.generate_accessors self
415
+ end
416
+
417
+ class GetMultiNickNameByUids_result
418
+ include ::Thrift::Struct, ::Thrift::Struct_Union
419
+ SUCCESS = 0
420
+
421
+ FIELDS = {
422
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRING}}
423
+ }
424
+
425
+ def struct_fields; FIELDS; end
426
+
427
+ def validate
428
+ end
429
+
430
+ ::Thrift::Struct.generate_accessors self
431
+ end
432
+
433
+ class QueryPassportUidMap_args
434
+ include ::Thrift::Struct, ::Thrift::Struct_Union
435
+ UIDLIST = 1
436
+
437
+ FIELDS = {
438
+ UIDLIST => {:type => ::Thrift::Types::LIST, :name => 'uidList', :element => {:type => ::Thrift::Types::I64}}
439
+ }
440
+
441
+ def struct_fields; FIELDS; end
442
+
443
+ def validate
444
+ end
445
+
446
+ ::Thrift::Struct.generate_accessors self
447
+ end
448
+
449
+ class QueryPassportUidMap_result
450
+ include ::Thrift::Struct, ::Thrift::Struct_Union
451
+ SUCCESS = 0
452
+
453
+ FIELDS = {
454
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Passport::Thrift::Passport}}
455
+ }
456
+
457
+ def struct_fields; FIELDS; end
458
+
459
+ def validate
460
+ end
461
+
462
+ ::Thrift::Struct.generate_accessors self
463
+ end
464
+
465
+ class GetPassportByLoginName_args
466
+ include ::Thrift::Struct, ::Thrift::Struct_Union
467
+ LOGINNAME = 1
468
+
469
+ FIELDS = {
470
+ LOGINNAME => {:type => ::Thrift::Types::STRING, :name => 'loginName'}
471
+ }
472
+
473
+ def struct_fields; FIELDS; end
474
+
475
+ def validate
476
+ end
477
+
478
+ ::Thrift::Struct.generate_accessors self
479
+ end
480
+
481
+ class GetPassportByLoginName_result
482
+ include ::Thrift::Struct, ::Thrift::Struct_Union
483
+ SUCCESS = 0
484
+
485
+ FIELDS = {
486
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Passport::Thrift::Passport}
487
+ }
488
+
489
+ def struct_fields; FIELDS; end
490
+
491
+ def validate
492
+ end
493
+
494
+ ::Thrift::Struct.generate_accessors self
495
+ end
496
+
497
+ class ModifyPasswordDirectly_args
498
+ include ::Thrift::Struct, ::Thrift::Struct_Union
499
+ UID = 1
500
+ PASSWORD = 2
501
+
502
+ FIELDS = {
503
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
504
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'}
505
+ }
506
+
507
+ def struct_fields; FIELDS; end
508
+
509
+ def validate
510
+ end
511
+
512
+ ::Thrift::Struct.generate_accessors self
513
+ end
514
+
515
+ class ModifyPasswordDirectly_result
516
+ include ::Thrift::Struct, ::Thrift::Struct_Union
517
+ EX = 1
518
+
519
+ FIELDS = {
520
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Passport::Thrift::PassportException}
521
+ }
522
+
523
+ def struct_fields; FIELDS; end
524
+
525
+ def validate
526
+ end
527
+
528
+ ::Thrift::Struct.generate_accessors self
529
+ end
530
+
531
+ class QueryNewRegistUsers_args
532
+ include ::Thrift::Struct, ::Thrift::Struct_Union
533
+ ENDTIME = 1
534
+ USERSCOUNT = 2
535
+
536
+ FIELDS = {
537
+ ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime'},
538
+ USERSCOUNT => {:type => ::Thrift::Types::I32, :name => 'usersCount'}
539
+ }
540
+
541
+ def struct_fields; FIELDS; end
542
+
543
+ def validate
544
+ end
545
+
546
+ ::Thrift::Struct.generate_accessors self
547
+ end
548
+
549
+ class QueryNewRegistUsers_result
550
+ include ::Thrift::Struct, ::Thrift::Struct_Union
551
+ SUCCESS = 0
552
+
553
+ FIELDS = {
554
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Passport::Thrift::Passport}}
555
+ }
556
+
557
+ def struct_fields; FIELDS; end
558
+
559
+ def validate
560
+ end
561
+
562
+ ::Thrift::Struct.generate_accessors self
563
+ end
564
+
565
+ class QueryByMobile_args
566
+ include ::Thrift::Struct, ::Thrift::Struct_Union
567
+ MOBILE = 1
568
+
569
+ FIELDS = {
570
+ MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile'}
571
+ }
572
+
573
+ def struct_fields; FIELDS; end
574
+
575
+ def validate
576
+ end
577
+
578
+ ::Thrift::Struct.generate_accessors self
579
+ end
580
+
581
+ class QueryByMobile_result
582
+ include ::Thrift::Struct, ::Thrift::Struct_Union
583
+ SUCCESS = 0
584
+
585
+ FIELDS = {
586
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Passport::Thrift::Passport}
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 GetMultiPassportByMobiles_args
598
+ include ::Thrift::Struct, ::Thrift::Struct_Union
599
+ MOBILES = 1
600
+
601
+ FIELDS = {
602
+ MOBILES => {:type => ::Thrift::Types::LIST, :name => 'mobiles', :element => {:type => ::Thrift::Types::STRING}}
603
+ }
604
+
605
+ def struct_fields; FIELDS; end
606
+
607
+ def validate
608
+ end
609
+
610
+ ::Thrift::Struct.generate_accessors self
611
+ end
612
+
613
+ class GetMultiPassportByMobiles_result
614
+ include ::Thrift::Struct, ::Thrift::Struct_Union
615
+ SUCCESS = 0
616
+
617
+ FIELDS = {
618
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Passport::Thrift::Passport}}
619
+ }
620
+
621
+ def struct_fields; FIELDS; end
622
+
623
+ def validate
624
+ end
625
+
626
+ ::Thrift::Struct.generate_accessors self
627
+ end
628
+
629
+ end
630
+
631
+ end
632
+ end