profile_service_thrift_client 0.0.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.
@@ -0,0 +1,352 @@
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 RemoteNicknameService
14
+ class Client
15
+ include ::Thrift::Client
16
+
17
+ def exist(nickname)
18
+ send_exist(nickname)
19
+ return recv_exist()
20
+ end
21
+
22
+ def send_exist(nickname)
23
+ send_message('exist', Exist_args, :nickname => nickname)
24
+ end
25
+
26
+ def recv_exist()
27
+ result = receive_message(Exist_result)
28
+ return result.success unless result.success.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exist failed: unknown result')
30
+ end
31
+
32
+ def delNicknameMatchUid(nickname, uid)
33
+ send_delNicknameMatchUid(nickname, uid)
34
+ recv_delNicknameMatchUid()
35
+ end
36
+
37
+ def send_delNicknameMatchUid(nickname, uid)
38
+ send_message('delNicknameMatchUid', DelNicknameMatchUid_args, :nickname => nickname, :uid => uid)
39
+ end
40
+
41
+ def recv_delNicknameMatchUid()
42
+ result = receive_message(DelNicknameMatchUid_result)
43
+ return
44
+ end
45
+
46
+ def delNickname(nickname)
47
+ send_delNickname(nickname)
48
+ recv_delNickname()
49
+ end
50
+
51
+ def send_delNickname(nickname)
52
+ send_message('delNickname', DelNickname_args, :nickname => nickname)
53
+ end
54
+
55
+ def recv_delNickname()
56
+ result = receive_message(DelNickname_result)
57
+ return
58
+ end
59
+
60
+ def getBasicUserInfoByNickname(nickname)
61
+ send_getBasicUserInfoByNickname(nickname)
62
+ return recv_getBasicUserInfoByNickname()
63
+ end
64
+
65
+ def send_getBasicUserInfoByNickname(nickname)
66
+ send_message('getBasicUserInfoByNickname', GetBasicUserInfoByNickname_args, :nickname => nickname)
67
+ end
68
+
69
+ def recv_getBasicUserInfoByNickname()
70
+ result = receive_message(GetBasicUserInfoByNickname_result)
71
+ return result.success unless result.success.nil?
72
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getBasicUserInfoByNickname failed: unknown result')
73
+ end
74
+
75
+ def getDetailUserInfoByNickname(nickname)
76
+ send_getDetailUserInfoByNickname(nickname)
77
+ return recv_getDetailUserInfoByNickname()
78
+ end
79
+
80
+ def send_getDetailUserInfoByNickname(nickname)
81
+ send_message('getDetailUserInfoByNickname', GetDetailUserInfoByNickname_args, :nickname => nickname)
82
+ end
83
+
84
+ def recv_getDetailUserInfoByNickname()
85
+ result = receive_message(GetDetailUserInfoByNickname_result)
86
+ return result.success unless result.success.nil?
87
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getDetailUserInfoByNickname failed: unknown result')
88
+ end
89
+
90
+ def generateNoUseNickname(nickname)
91
+ send_generateNoUseNickname(nickname)
92
+ return recv_generateNoUseNickname()
93
+ end
94
+
95
+ def send_generateNoUseNickname(nickname)
96
+ send_message('generateNoUseNickname', GenerateNoUseNickname_args, :nickname => nickname)
97
+ end
98
+
99
+ def recv_generateNoUseNickname()
100
+ result = receive_message(GenerateNoUseNickname_result)
101
+ return result.success unless result.success.nil?
102
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'generateNoUseNickname failed: unknown result')
103
+ end
104
+
105
+ end
106
+
107
+ class Processor
108
+ include ::Thrift::Processor
109
+
110
+ def process_exist(seqid, iprot, oprot)
111
+ args = read_args(iprot, Exist_args)
112
+ result = Exist_result.new()
113
+ result.success = @handler.exist(args.nickname)
114
+ write_result(result, oprot, 'exist', seqid)
115
+ end
116
+
117
+ def process_delNicknameMatchUid(seqid, iprot, oprot)
118
+ args = read_args(iprot, DelNicknameMatchUid_args)
119
+ result = DelNicknameMatchUid_result.new()
120
+ @handler.delNicknameMatchUid(args.nickname, args.uid)
121
+ write_result(result, oprot, 'delNicknameMatchUid', seqid)
122
+ end
123
+
124
+ def process_delNickname(seqid, iprot, oprot)
125
+ args = read_args(iprot, DelNickname_args)
126
+ result = DelNickname_result.new()
127
+ @handler.delNickname(args.nickname)
128
+ write_result(result, oprot, 'delNickname', seqid)
129
+ end
130
+
131
+ def process_getBasicUserInfoByNickname(seqid, iprot, oprot)
132
+ args = read_args(iprot, GetBasicUserInfoByNickname_args)
133
+ result = GetBasicUserInfoByNickname_result.new()
134
+ result.success = @handler.getBasicUserInfoByNickname(args.nickname)
135
+ write_result(result, oprot, 'getBasicUserInfoByNickname', seqid)
136
+ end
137
+
138
+ def process_getDetailUserInfoByNickname(seqid, iprot, oprot)
139
+ args = read_args(iprot, GetDetailUserInfoByNickname_args)
140
+ result = GetDetailUserInfoByNickname_result.new()
141
+ result.success = @handler.getDetailUserInfoByNickname(args.nickname)
142
+ write_result(result, oprot, 'getDetailUserInfoByNickname', seqid)
143
+ end
144
+
145
+ def process_generateNoUseNickname(seqid, iprot, oprot)
146
+ args = read_args(iprot, GenerateNoUseNickname_args)
147
+ result = GenerateNoUseNickname_result.new()
148
+ result.success = @handler.generateNoUseNickname(args.nickname)
149
+ write_result(result, oprot, 'generateNoUseNickname', seqid)
150
+ end
151
+
152
+ end
153
+
154
+ # HELPER FUNCTIONS AND STRUCTURES
155
+
156
+ class Exist_args
157
+ include ::Thrift::Struct, ::Thrift::Struct_Union
158
+ NICKNAME = 1
159
+
160
+ FIELDS = {
161
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'}
162
+ }
163
+
164
+ def struct_fields; FIELDS; end
165
+
166
+ def validate
167
+ end
168
+
169
+ ::Thrift::Struct.generate_accessors self
170
+ end
171
+
172
+ class Exist_result
173
+ include ::Thrift::Struct, ::Thrift::Struct_Union
174
+ SUCCESS = 0
175
+
176
+ FIELDS = {
177
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
178
+ }
179
+
180
+ def struct_fields; FIELDS; end
181
+
182
+ def validate
183
+ end
184
+
185
+ ::Thrift::Struct.generate_accessors self
186
+ end
187
+
188
+ class DelNicknameMatchUid_args
189
+ include ::Thrift::Struct, ::Thrift::Struct_Union
190
+ NICKNAME = 1
191
+ UID = 2
192
+
193
+ FIELDS = {
194
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
195
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
196
+ }
197
+
198
+ def struct_fields; FIELDS; end
199
+
200
+ def validate
201
+ end
202
+
203
+ ::Thrift::Struct.generate_accessors self
204
+ end
205
+
206
+ class DelNicknameMatchUid_result
207
+ include ::Thrift::Struct, ::Thrift::Struct_Union
208
+
209
+ FIELDS = {
210
+
211
+ }
212
+
213
+ def struct_fields; FIELDS; end
214
+
215
+ def validate
216
+ end
217
+
218
+ ::Thrift::Struct.generate_accessors self
219
+ end
220
+
221
+ class DelNickname_args
222
+ include ::Thrift::Struct, ::Thrift::Struct_Union
223
+ NICKNAME = 1
224
+
225
+ FIELDS = {
226
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'}
227
+ }
228
+
229
+ def struct_fields; FIELDS; end
230
+
231
+ def validate
232
+ end
233
+
234
+ ::Thrift::Struct.generate_accessors self
235
+ end
236
+
237
+ class DelNickname_result
238
+ include ::Thrift::Struct, ::Thrift::Struct_Union
239
+
240
+ FIELDS = {
241
+
242
+ }
243
+
244
+ def struct_fields; FIELDS; end
245
+
246
+ def validate
247
+ end
248
+
249
+ ::Thrift::Struct.generate_accessors self
250
+ end
251
+
252
+ class GetBasicUserInfoByNickname_args
253
+ include ::Thrift::Struct, ::Thrift::Struct_Union
254
+ NICKNAME = 1
255
+
256
+ FIELDS = {
257
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'}
258
+ }
259
+
260
+ def struct_fields; FIELDS; end
261
+
262
+ def validate
263
+ end
264
+
265
+ ::Thrift::Struct.generate_accessors self
266
+ end
267
+
268
+ class GetBasicUserInfoByNickname_result
269
+ include ::Thrift::Struct, ::Thrift::Struct_Union
270
+ SUCCESS = 0
271
+
272
+ FIELDS = {
273
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::BasicUserInfo}
274
+ }
275
+
276
+ def struct_fields; FIELDS; end
277
+
278
+ def validate
279
+ end
280
+
281
+ ::Thrift::Struct.generate_accessors self
282
+ end
283
+
284
+ class GetDetailUserInfoByNickname_args
285
+ include ::Thrift::Struct, ::Thrift::Struct_Union
286
+ NICKNAME = 1
287
+
288
+ FIELDS = {
289
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'}
290
+ }
291
+
292
+ def struct_fields; FIELDS; end
293
+
294
+ def validate
295
+ end
296
+
297
+ ::Thrift::Struct.generate_accessors self
298
+ end
299
+
300
+ class GetDetailUserInfoByNickname_result
301
+ include ::Thrift::Struct, ::Thrift::Struct_Union
302
+ SUCCESS = 0
303
+
304
+ FIELDS = {
305
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Service::Profile::Thrift::DetailUserInfo}
306
+ }
307
+
308
+ def struct_fields; FIELDS; end
309
+
310
+ def validate
311
+ end
312
+
313
+ ::Thrift::Struct.generate_accessors self
314
+ end
315
+
316
+ class GenerateNoUseNickname_args
317
+ include ::Thrift::Struct, ::Thrift::Struct_Union
318
+ NICKNAME = 1
319
+
320
+ FIELDS = {
321
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'}
322
+ }
323
+
324
+ def struct_fields; FIELDS; end
325
+
326
+ def validate
327
+ end
328
+
329
+ ::Thrift::Struct.generate_accessors self
330
+ end
331
+
332
+ class GenerateNoUseNickname_result
333
+ include ::Thrift::Struct, ::Thrift::Struct_Union
334
+ SUCCESS = 0
335
+
336
+ FIELDS = {
337
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
338
+ }
339
+
340
+ def struct_fields; FIELDS; end
341
+
342
+ def validate
343
+ end
344
+
345
+ ::Thrift::Struct.generate_accessors self
346
+ end
347
+
348
+ end
349
+
350
+ end
351
+ end
352
+ end