profile_service_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,482 @@
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 'profile_types'
9
+
10
+ module Service
11
+ module Profile
12
+ module Thrift
13
+ module RemoteBackendProfileService
14
+ class Client
15
+ include ::Thrift::Client
16
+
17
+ def verify(uid, ptitle, vCompany, vTags, vCategoryId, personDescribe)
18
+ send_verify(uid, ptitle, vCompany, vTags, vCategoryId, personDescribe)
19
+ return recv_verify()
20
+ end
21
+
22
+ def send_verify(uid, ptitle, vCompany, vTags, vCategoryId, personDescribe)
23
+ send_message('verify', Verify_args, :uid => uid, :ptitle => ptitle, :vCompany => vCompany, :vTags => vTags, :vCategoryId => vCategoryId, :personDescribe => personDescribe)
24
+ end
25
+
26
+ def recv_verify()
27
+ result = receive_message(Verify_result)
28
+ return result.success unless result.success.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'verify failed: unknown result')
30
+ end
31
+
32
+ def revokeVerified(uid)
33
+ send_revokeVerified(uid)
34
+ return recv_revokeVerified()
35
+ end
36
+
37
+ def send_revokeVerified(uid)
38
+ send_message('revokeVerified', RevokeVerified_args, :uid => uid)
39
+ end
40
+
41
+ def recv_revokeVerified()
42
+ result = receive_message(RevokeVerified_result)
43
+ return result.success unless result.success.nil?
44
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revokeVerified failed: unknown result')
45
+ end
46
+
47
+ def batchRevokeVerified(uids)
48
+ send_batchRevokeVerified(uids)
49
+ return recv_batchRevokeVerified()
50
+ end
51
+
52
+ def send_batchRevokeVerified(uids)
53
+ send_message('batchRevokeVerified', BatchRevokeVerified_args, :uids => uids)
54
+ end
55
+
56
+ def recv_batchRevokeVerified()
57
+ result = receive_message(BatchRevokeVerified_result)
58
+ return result.success unless result.success.nil?
59
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'batchRevokeVerified failed: unknown result')
60
+ end
61
+
62
+ def changeRobotFlag(uid, isRobot)
63
+ send_changeRobotFlag(uid, isRobot)
64
+ return recv_changeRobotFlag()
65
+ end
66
+
67
+ def send_changeRobotFlag(uid, isRobot)
68
+ send_message('changeRobotFlag', ChangeRobotFlag_args, :uid => uid, :isRobot => isRobot)
69
+ end
70
+
71
+ def recv_changeRobotFlag()
72
+ result = receive_message(ChangeRobotFlag_result)
73
+ return result.success unless result.success.nil?
74
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'changeRobotFlag failed: unknown result')
75
+ end
76
+
77
+ def batchChangeRobotFlag(uids, isRobot)
78
+ send_batchChangeRobotFlag(uids, isRobot)
79
+ return recv_batchChangeRobotFlag()
80
+ end
81
+
82
+ def send_batchChangeRobotFlag(uids, isRobot)
83
+ send_message('batchChangeRobotFlag', BatchChangeRobotFlag_args, :uids => uids, :isRobot => isRobot)
84
+ end
85
+
86
+ def recv_batchChangeRobotFlag()
87
+ result = receive_message(BatchChangeRobotFlag_result)
88
+ return result.success unless result.success.nil?
89
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'batchChangeRobotFlag failed: unknown result')
90
+ end
91
+
92
+ def changeUserVCategoryId(uid, categoryId)
93
+ send_changeUserVCategoryId(uid, categoryId)
94
+ return recv_changeUserVCategoryId()
95
+ end
96
+
97
+ def send_changeUserVCategoryId(uid, categoryId)
98
+ send_message('changeUserVCategoryId', ChangeUserVCategoryId_args, :uid => uid, :categoryId => categoryId)
99
+ end
100
+
101
+ def recv_changeUserVCategoryId()
102
+ result = receive_message(ChangeUserVCategoryId_result)
103
+ return result.success unless result.success.nil?
104
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'changeUserVCategoryId failed: unknown result')
105
+ end
106
+
107
+ def banLogin(uid, startBanDate, endBanDate)
108
+ send_banLogin(uid, startBanDate, endBanDate)
109
+ return recv_banLogin()
110
+ end
111
+
112
+ def send_banLogin(uid, startBanDate, endBanDate)
113
+ send_message('banLogin', BanLogin_args, :uid => uid, :startBanDate => startBanDate, :endBanDate => endBanDate)
114
+ end
115
+
116
+ def recv_banLogin()
117
+ result = receive_message(BanLogin_result)
118
+ return result.success unless result.success.nil?
119
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'banLogin failed: unknown result')
120
+ end
121
+
122
+ def unbannedLogin(uid)
123
+ send_unbannedLogin(uid)
124
+ return recv_unbannedLogin()
125
+ end
126
+
127
+ def send_unbannedLogin(uid)
128
+ send_message('unbannedLogin', UnbannedLogin_args, :uid => uid)
129
+ end
130
+
131
+ def recv_unbannedLogin()
132
+ result = receive_message(UnbannedLogin_result)
133
+ return result.success unless result.success.nil?
134
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'unbannedLogin failed: unknown result')
135
+ end
136
+
137
+ end
138
+
139
+ class Processor
140
+ include ::Thrift::Processor
141
+
142
+ def process_verify(seqid, iprot, oprot)
143
+ args = read_args(iprot, Verify_args)
144
+ result = Verify_result.new()
145
+ result.success = @handler.verify(args.uid, args.ptitle, args.vCompany, args.vTags, args.vCategoryId, args.personDescribe)
146
+ write_result(result, oprot, 'verify', seqid)
147
+ end
148
+
149
+ def process_revokeVerified(seqid, iprot, oprot)
150
+ args = read_args(iprot, RevokeVerified_args)
151
+ result = RevokeVerified_result.new()
152
+ result.success = @handler.revokeVerified(args.uid)
153
+ write_result(result, oprot, 'revokeVerified', seqid)
154
+ end
155
+
156
+ def process_batchRevokeVerified(seqid, iprot, oprot)
157
+ args = read_args(iprot, BatchRevokeVerified_args)
158
+ result = BatchRevokeVerified_result.new()
159
+ result.success = @handler.batchRevokeVerified(args.uids)
160
+ write_result(result, oprot, 'batchRevokeVerified', seqid)
161
+ end
162
+
163
+ def process_changeRobotFlag(seqid, iprot, oprot)
164
+ args = read_args(iprot, ChangeRobotFlag_args)
165
+ result = ChangeRobotFlag_result.new()
166
+ result.success = @handler.changeRobotFlag(args.uid, args.isRobot)
167
+ write_result(result, oprot, 'changeRobotFlag', seqid)
168
+ end
169
+
170
+ def process_batchChangeRobotFlag(seqid, iprot, oprot)
171
+ args = read_args(iprot, BatchChangeRobotFlag_args)
172
+ result = BatchChangeRobotFlag_result.new()
173
+ result.success = @handler.batchChangeRobotFlag(args.uids, args.isRobot)
174
+ write_result(result, oprot, 'batchChangeRobotFlag', seqid)
175
+ end
176
+
177
+ def process_changeUserVCategoryId(seqid, iprot, oprot)
178
+ args = read_args(iprot, ChangeUserVCategoryId_args)
179
+ result = ChangeUserVCategoryId_result.new()
180
+ result.success = @handler.changeUserVCategoryId(args.uid, args.categoryId)
181
+ write_result(result, oprot, 'changeUserVCategoryId', seqid)
182
+ end
183
+
184
+ def process_banLogin(seqid, iprot, oprot)
185
+ args = read_args(iprot, BanLogin_args)
186
+ result = BanLogin_result.new()
187
+ result.success = @handler.banLogin(args.uid, args.startBanDate, args.endBanDate)
188
+ write_result(result, oprot, 'banLogin', seqid)
189
+ end
190
+
191
+ def process_unbannedLogin(seqid, iprot, oprot)
192
+ args = read_args(iprot, UnbannedLogin_args)
193
+ result = UnbannedLogin_result.new()
194
+ result.success = @handler.unbannedLogin(args.uid)
195
+ write_result(result, oprot, 'unbannedLogin', seqid)
196
+ end
197
+
198
+ end
199
+
200
+ # HELPER FUNCTIONS AND STRUCTURES
201
+
202
+ class Verify_args
203
+ include ::Thrift::Struct, ::Thrift::Struct_Union
204
+ UID = 1
205
+ PTITLE = 2
206
+ VCOMPANY = 3
207
+ VTAGS = 4
208
+ VCATEGORYID = 5
209
+ PERSONDESCRIBE = 6
210
+
211
+ FIELDS = {
212
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
213
+ PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle'},
214
+ VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany'},
215
+ VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags'},
216
+ VCATEGORYID => {:type => ::Thrift::Types::I32, :name => 'vCategoryId'},
217
+ PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe'}
218
+ }
219
+
220
+ def struct_fields; FIELDS; end
221
+
222
+ def validate
223
+ end
224
+
225
+ ::Thrift::Struct.generate_accessors self
226
+ end
227
+
228
+ class Verify_result
229
+ include ::Thrift::Struct, ::Thrift::Struct_Union
230
+ SUCCESS = 0
231
+
232
+ FIELDS = {
233
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
234
+ }
235
+
236
+ def struct_fields; FIELDS; end
237
+
238
+ def validate
239
+ end
240
+
241
+ ::Thrift::Struct.generate_accessors self
242
+ end
243
+
244
+ class RevokeVerified_args
245
+ include ::Thrift::Struct, ::Thrift::Struct_Union
246
+ UID = 1
247
+
248
+ FIELDS = {
249
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
250
+ }
251
+
252
+ def struct_fields; FIELDS; end
253
+
254
+ def validate
255
+ end
256
+
257
+ ::Thrift::Struct.generate_accessors self
258
+ end
259
+
260
+ class RevokeVerified_result
261
+ include ::Thrift::Struct, ::Thrift::Struct_Union
262
+ SUCCESS = 0
263
+
264
+ FIELDS = {
265
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
266
+ }
267
+
268
+ def struct_fields; FIELDS; end
269
+
270
+ def validate
271
+ end
272
+
273
+ ::Thrift::Struct.generate_accessors self
274
+ end
275
+
276
+ class BatchRevokeVerified_args
277
+ include ::Thrift::Struct, ::Thrift::Struct_Union
278
+ UIDS = 2
279
+
280
+ FIELDS = {
281
+ UIDS => {:type => ::Thrift::Types::LIST, :name => 'uids', :element => {:type => ::Thrift::Types::I64}}
282
+ }
283
+
284
+ def struct_fields; FIELDS; end
285
+
286
+ def validate
287
+ end
288
+
289
+ ::Thrift::Struct.generate_accessors self
290
+ end
291
+
292
+ class BatchRevokeVerified_result
293
+ include ::Thrift::Struct, ::Thrift::Struct_Union
294
+ SUCCESS = 0
295
+
296
+ FIELDS = {
297
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
298
+ }
299
+
300
+ def struct_fields; FIELDS; end
301
+
302
+ def validate
303
+ end
304
+
305
+ ::Thrift::Struct.generate_accessors self
306
+ end
307
+
308
+ class ChangeRobotFlag_args
309
+ include ::Thrift::Struct, ::Thrift::Struct_Union
310
+ UID = 1
311
+ ISROBOT = 2
312
+
313
+ FIELDS = {
314
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
315
+ ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'}
316
+ }
317
+
318
+ def struct_fields; FIELDS; end
319
+
320
+ def validate
321
+ end
322
+
323
+ ::Thrift::Struct.generate_accessors self
324
+ end
325
+
326
+ class ChangeRobotFlag_result
327
+ include ::Thrift::Struct, ::Thrift::Struct_Union
328
+ SUCCESS = 0
329
+
330
+ FIELDS = {
331
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
332
+ }
333
+
334
+ def struct_fields; FIELDS; end
335
+
336
+ def validate
337
+ end
338
+
339
+ ::Thrift::Struct.generate_accessors self
340
+ end
341
+
342
+ class BatchChangeRobotFlag_args
343
+ include ::Thrift::Struct, ::Thrift::Struct_Union
344
+ UIDS = 1
345
+ ISROBOT = 2
346
+
347
+ FIELDS = {
348
+ UIDS => {:type => ::Thrift::Types::LIST, :name => 'uids', :element => {:type => ::Thrift::Types::I64}},
349
+ ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'}
350
+ }
351
+
352
+ def struct_fields; FIELDS; end
353
+
354
+ def validate
355
+ end
356
+
357
+ ::Thrift::Struct.generate_accessors self
358
+ end
359
+
360
+ class BatchChangeRobotFlag_result
361
+ include ::Thrift::Struct, ::Thrift::Struct_Union
362
+ SUCCESS = 0
363
+
364
+ FIELDS = {
365
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
366
+ }
367
+
368
+ def struct_fields; FIELDS; end
369
+
370
+ def validate
371
+ end
372
+
373
+ ::Thrift::Struct.generate_accessors self
374
+ end
375
+
376
+ class ChangeUserVCategoryId_args
377
+ include ::Thrift::Struct, ::Thrift::Struct_Union
378
+ UID = 1
379
+ CATEGORYID = 2
380
+
381
+ FIELDS = {
382
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
383
+ CATEGORYID => {:type => ::Thrift::Types::I32, :name => 'categoryId'}
384
+ }
385
+
386
+ def struct_fields; FIELDS; end
387
+
388
+ def validate
389
+ end
390
+
391
+ ::Thrift::Struct.generate_accessors self
392
+ end
393
+
394
+ class ChangeUserVCategoryId_result
395
+ include ::Thrift::Struct, ::Thrift::Struct_Union
396
+ SUCCESS = 0
397
+
398
+ FIELDS = {
399
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
400
+ }
401
+
402
+ def struct_fields; FIELDS; end
403
+
404
+ def validate
405
+ end
406
+
407
+ ::Thrift::Struct.generate_accessors self
408
+ end
409
+
410
+ class BanLogin_args
411
+ include ::Thrift::Struct, ::Thrift::Struct_Union
412
+ UID = 1
413
+ STARTBANDATE = 2
414
+ ENDBANDATE = 3
415
+
416
+ FIELDS = {
417
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
418
+ STARTBANDATE => {:type => ::Thrift::Types::I64, :name => 'startBanDate'},
419
+ ENDBANDATE => {:type => ::Thrift::Types::I64, :name => 'endBanDate'}
420
+ }
421
+
422
+ def struct_fields; FIELDS; end
423
+
424
+ def validate
425
+ end
426
+
427
+ ::Thrift::Struct.generate_accessors self
428
+ end
429
+
430
+ class BanLogin_result
431
+ include ::Thrift::Struct, ::Thrift::Struct_Union
432
+ SUCCESS = 0
433
+
434
+ FIELDS = {
435
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
436
+ }
437
+
438
+ def struct_fields; FIELDS; end
439
+
440
+ def validate
441
+ end
442
+
443
+ ::Thrift::Struct.generate_accessors self
444
+ end
445
+
446
+ class UnbannedLogin_args
447
+ include ::Thrift::Struct, ::Thrift::Struct_Union
448
+ UID = 1
449
+
450
+ FIELDS = {
451
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
452
+ }
453
+
454
+ def struct_fields; FIELDS; end
455
+
456
+ def validate
457
+ end
458
+
459
+ ::Thrift::Struct.generate_accessors self
460
+ end
461
+
462
+ class UnbannedLogin_result
463
+ include ::Thrift::Struct, ::Thrift::Struct_Union
464
+ SUCCESS = 0
465
+
466
+ FIELDS = {
467
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::VoidResponse}
468
+ }
469
+
470
+ def struct_fields; FIELDS; end
471
+
472
+ def validate
473
+ end
474
+
475
+ ::Thrift::Struct.generate_accessors self
476
+ end
477
+
478
+ end
479
+
480
+ end
481
+ end
482
+ end