cassandra 0.8.2 → 0.9.0

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.
@@ -24,15 +24,14 @@ module CassandraThrift
24
24
  # @param value. Some data
25
25
  # @param timestamp. Used to record when data was sent to be written.
26
26
  class Column
27
- include ::Thrift::Struct
27
+ include ::Thrift::Struct, ::Thrift::Struct_Union
28
28
  NAME = 1
29
29
  VALUE = 2
30
30
  TIMESTAMP = 3
31
31
 
32
- ::Thrift::Struct.field_accessor self, :name, :value, :timestamp
33
32
  FIELDS = {
34
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
35
- VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
33
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
34
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
36
35
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}
37
36
  }
38
37
 
@@ -44,6 +43,7 @@ module CassandraThrift
44
43
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
45
44
  end
46
45
 
46
+ ::Thrift::Struct.generate_accessors self
47
47
  end
48
48
 
49
49
  # A named list of columns.
@@ -51,13 +51,12 @@ module CassandraThrift
51
51
  # @param columns. A collection of standard Columns. The columns within a super column are defined in an adhoc manner.
52
52
  # Columns within a super column do not have to have matching structures (similarly named child columns).
53
53
  class SuperColumn
54
- include ::Thrift::Struct
54
+ include ::Thrift::Struct, ::Thrift::Struct_Union
55
55
  NAME = 1
56
56
  COLUMNS = 2
57
57
 
58
- ::Thrift::Struct.field_accessor self, :name, :columns
59
58
  FIELDS = {
60
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
59
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
61
60
  COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Column}}
62
61
  }
63
62
 
@@ -68,6 +67,7 @@ module CassandraThrift
68
67
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
69
68
  end
70
69
 
70
+ ::Thrift::Struct.generate_accessors self
71
71
  end
72
72
 
73
73
  # Methods for fetching rows/records from Cassandra will return either a single instance of ColumnOrSuperColumn or a list
@@ -79,11 +79,10 @@ module CassandraThrift
79
79
  # @param column. The Column returned by get() or get_slice().
80
80
  # @param super_column. The SuperColumn returned by get() or get_slice().
81
81
  class ColumnOrSuperColumn
82
- include ::Thrift::Struct
82
+ include ::Thrift::Struct, ::Thrift::Struct_Union
83
83
  COLUMN = 1
84
84
  SUPER_COLUMN = 2
85
85
 
86
- ::Thrift::Struct.field_accessor self, :column, :super_column
87
86
  FIELDS = {
88
87
  COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => CassandraThrift::Column, :optional => true},
89
88
  SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => CassandraThrift::SuperColumn, :optional => true}
@@ -94,11 +93,12 @@ module CassandraThrift
94
93
  def validate
95
94
  end
96
95
 
96
+ ::Thrift::Struct.generate_accessors self
97
97
  end
98
98
 
99
99
  # A specific column was requested that does not exist.
100
100
  class NotFoundException < ::Thrift::Exception
101
- include ::Thrift::Struct
101
+ include ::Thrift::Struct, ::Thrift::Struct_Union
102
102
 
103
103
  FIELDS = {
104
104
 
@@ -109,12 +109,13 @@ module CassandraThrift
109
109
  def validate
110
110
  end
111
111
 
112
+ ::Thrift::Struct.generate_accessors self
112
113
  end
113
114
 
114
115
  # Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
115
116
  # why contains an associated error message.
116
117
  class InvalidRequestException < ::Thrift::Exception
117
- include ::Thrift::Struct
118
+ include ::Thrift::Struct, ::Thrift::Struct_Union
118
119
  def initialize(message=nil)
119
120
  super()
120
121
  self.why = message
@@ -124,7 +125,6 @@ module CassandraThrift
124
125
 
125
126
  WHY = 1
126
127
 
127
- ::Thrift::Struct.field_accessor self, :why
128
128
  FIELDS = {
129
129
  WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
130
130
  }
@@ -135,11 +135,12 @@ module CassandraThrift
135
135
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
136
136
  end
137
137
 
138
+ ::Thrift::Struct.generate_accessors self
138
139
  end
139
140
 
140
141
  # Not all the replicas required could be created and/or read.
141
142
  class UnavailableException < ::Thrift::Exception
142
- include ::Thrift::Struct
143
+ include ::Thrift::Struct, ::Thrift::Struct_Union
143
144
 
144
145
  FIELDS = {
145
146
 
@@ -150,11 +151,12 @@ module CassandraThrift
150
151
  def validate
151
152
  end
152
153
 
154
+ ::Thrift::Struct.generate_accessors self
153
155
  end
154
156
 
155
157
  # RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
156
158
  class TimedOutException < ::Thrift::Exception
157
- include ::Thrift::Struct
159
+ include ::Thrift::Struct, ::Thrift::Struct_Union
158
160
 
159
161
  FIELDS = {
160
162
 
@@ -165,11 +167,12 @@ module CassandraThrift
165
167
  def validate
166
168
  end
167
169
 
170
+ ::Thrift::Struct.generate_accessors self
168
171
  end
169
172
 
170
173
  # invalid authentication request (user does not exist or credentials invalid)
171
174
  class AuthenticationException < ::Thrift::Exception
172
- include ::Thrift::Struct
175
+ include ::Thrift::Struct, ::Thrift::Struct_Union
173
176
  def initialize(message=nil)
174
177
  super()
175
178
  self.why = message
@@ -179,7 +182,6 @@ module CassandraThrift
179
182
 
180
183
  WHY = 1
181
184
 
182
- ::Thrift::Struct.field_accessor self, :why
183
185
  FIELDS = {
184
186
  WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
185
187
  }
@@ -190,11 +192,12 @@ module CassandraThrift
190
192
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
191
193
  end
192
194
 
195
+ ::Thrift::Struct.generate_accessors self
193
196
  end
194
197
 
195
198
  # invalid authorization request (user does not have access to keyspace)
196
199
  class AuthorizationException < ::Thrift::Exception
197
- include ::Thrift::Struct
200
+ include ::Thrift::Struct, ::Thrift::Struct_Union
198
201
  def initialize(message=nil)
199
202
  super()
200
203
  self.why = message
@@ -204,7 +207,6 @@ module CassandraThrift
204
207
 
205
208
  WHY = 1
206
209
 
207
- ::Thrift::Struct.field_accessor self, :why
208
210
  FIELDS = {
209
211
  WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
210
212
  }
@@ -215,6 +217,7 @@ module CassandraThrift
215
217
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
216
218
  end
217
219
 
220
+ ::Thrift::Struct.generate_accessors self
218
221
  end
219
222
 
220
223
  # ColumnParent is used when selecting groups of columns from the same ColumnFamily. In directory structure terms, imagine
@@ -222,14 +225,13 @@ module CassandraThrift
222
225
  #
223
226
  # See also <a href="cassandra.html#Struct_ColumnPath">ColumnPath</a>
224
227
  class ColumnParent
225
- include ::Thrift::Struct
228
+ include ::Thrift::Struct, ::Thrift::Struct_Union
226
229
  COLUMN_FAMILY = 3
227
230
  SUPER_COLUMN = 4
228
231
 
229
- ::Thrift::Struct.field_accessor self, :column_family, :super_column
230
232
  FIELDS = {
231
233
  COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
232
- SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true}
234
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true}
233
235
  }
234
236
 
235
237
  def struct_fields; FIELDS; end
@@ -238,6 +240,7 @@ module CassandraThrift
238
240
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
239
241
  end
240
242
 
243
+ ::Thrift::Struct.generate_accessors self
241
244
  end
242
245
 
243
246
  # The ColumnPath is the path to a single column in Cassandra. It might make sense to think of ColumnPath and
@@ -249,16 +252,15 @@ module CassandraThrift
249
252
  # @param super_column. The super column name.
250
253
  # @param column. The column name.
251
254
  class ColumnPath
252
- include ::Thrift::Struct
255
+ include ::Thrift::Struct, ::Thrift::Struct_Union
253
256
  COLUMN_FAMILY = 3
254
257
  SUPER_COLUMN = 4
255
258
  COLUMN = 5
256
259
 
257
- ::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
258
260
  FIELDS = {
259
261
  COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
260
- SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
261
- COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true}
262
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
263
+ COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true, :optional => true}
262
264
  }
263
265
 
264
266
  def struct_fields; FIELDS; end
@@ -267,6 +269,7 @@ module CassandraThrift
267
269
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
268
270
  end
269
271
 
272
+ ::Thrift::Struct.generate_accessors self
270
273
  end
271
274
 
272
275
  # A slice range is a structure that stores basic range, ordering and limit information for a query that will return
@@ -284,16 +287,15 @@ module CassandraThrift
284
287
  # be better served by iterating through slices by passing the last value of one call in as the 'start'
285
288
  # of the next instead of increasing 'count' arbitrarily large.
286
289
  class SliceRange
287
- include ::Thrift::Struct
290
+ include ::Thrift::Struct, ::Thrift::Struct_Union
288
291
  START = 1
289
292
  FINISH = 2
290
293
  REVERSED = 3
291
294
  COUNT = 4
292
295
 
293
- ::Thrift::Struct.field_accessor self, :start, :finish, :reversed, :count
294
296
  FIELDS = {
295
- START => {:type => ::Thrift::Types::STRING, :name => 'start'},
296
- FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
297
+ START => {:type => ::Thrift::Types::STRING, :name => 'start', :binary => true},
298
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish', :binary => true},
297
299
  REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
298
300
  COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
299
301
  }
@@ -307,6 +309,7 @@ module CassandraThrift
307
309
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
308
310
  end
309
311
 
312
+ ::Thrift::Struct.generate_accessors self
310
313
  end
311
314
 
312
315
  # A SlicePredicate is similar to a mathematic predicate (see http://en.wikipedia.org/wiki/Predicate_(mathematical_logic)),
@@ -320,13 +323,12 @@ module CassandraThrift
320
323
  # and 'Jim' you can pass those column names as a list to fetch all three at once.
321
324
  # @param slice_range. A SliceRange describing how to range, order, and/or limit the slice.
322
325
  class SlicePredicate
323
- include ::Thrift::Struct
326
+ include ::Thrift::Struct, ::Thrift::Struct_Union
324
327
  COLUMN_NAMES = 1
325
328
  SLICE_RANGE = 2
326
329
 
327
- ::Thrift::Struct.field_accessor self, :column_names, :slice_range
328
330
  FIELDS = {
329
- COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
331
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
330
332
  SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => CassandraThrift::SliceRange, :optional => true}
331
333
  }
332
334
 
@@ -335,6 +337,7 @@ module CassandraThrift
335
337
  def validate
336
338
  end
337
339
 
340
+ ::Thrift::Struct.generate_accessors self
338
341
  end
339
342
 
340
343
  # The semantics of start keys and tokens are slightly different.
@@ -344,14 +347,13 @@ module CassandraThrift
344
347
  # one-element range, but a range from tokenY to tokenY is the
345
348
  # full ring.
346
349
  class KeyRange
347
- include ::Thrift::Struct
350
+ include ::Thrift::Struct, ::Thrift::Struct_Union
348
351
  START_KEY = 1
349
352
  END_KEY = 2
350
353
  START_TOKEN = 3
351
354
  END_TOKEN = 4
352
355
  COUNT = 5
353
356
 
354
- ::Thrift::Struct.field_accessor self, :start_key, :end_key, :start_token, :end_token, :count
355
357
  FIELDS = {
356
358
  START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :optional => true},
357
359
  END_KEY => {:type => ::Thrift::Types::STRING, :name => 'end_key', :optional => true},
@@ -366,6 +368,7 @@ module CassandraThrift
366
368
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
367
369
  end
368
370
 
371
+ ::Thrift::Struct.generate_accessors self
369
372
  end
370
373
 
371
374
  # A KeySlice is key followed by the data it maps to. A collection of KeySlice is returned by the get_range_slice operation.
@@ -374,11 +377,10 @@ module CassandraThrift
374
377
  # @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
375
378
  # a SlicePredicate.
376
379
  class KeySlice
377
- include ::Thrift::Struct
380
+ include ::Thrift::Struct, ::Thrift::Struct_Union
378
381
  KEY = 1
379
382
  COLUMNS = 2
380
383
 
381
- ::Thrift::Struct.field_accessor self, :key, :columns
382
384
  FIELDS = {
383
385
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
384
386
  COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}}
@@ -391,18 +393,18 @@ module CassandraThrift
391
393
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
392
394
  end
393
395
 
396
+ ::Thrift::Struct.generate_accessors self
394
397
  end
395
398
 
396
399
  class Deletion
397
- include ::Thrift::Struct
400
+ include ::Thrift::Struct, ::Thrift::Struct_Union
398
401
  TIMESTAMP = 1
399
402
  SUPER_COLUMN = 2
400
403
  PREDICATE = 3
401
404
 
402
- ::Thrift::Struct.field_accessor self, :timestamp, :super_column, :predicate
403
405
  FIELDS = {
404
406
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
405
- SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
407
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
406
408
  PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate, :optional => true}
407
409
  }
408
410
 
@@ -412,17 +414,17 @@ module CassandraThrift
412
414
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
413
415
  end
414
416
 
417
+ ::Thrift::Struct.generate_accessors self
415
418
  end
416
419
 
417
420
  # A Mutation is either an insert, represented by filling column_or_supercolumn, or a deletion, represented by filling the deletion attribute.
418
421
  # @param column_or_supercolumn. An insert to a column or supercolumn
419
422
  # @param deletion. A deletion of a column or supercolumn
420
423
  class Mutation
421
- include ::Thrift::Struct
424
+ include ::Thrift::Struct, ::Thrift::Struct_Union
422
425
  COLUMN_OR_SUPERCOLUMN = 1
423
426
  DELETION = 2
424
427
 
425
- ::Thrift::Struct.field_accessor self, :column_or_supercolumn, :deletion
426
428
  FIELDS = {
427
429
  COLUMN_OR_SUPERCOLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column_or_supercolumn', :class => CassandraThrift::ColumnOrSuperColumn, :optional => true},
428
430
  DELETION => {:type => ::Thrift::Types::STRUCT, :name => 'deletion', :class => CassandraThrift::Deletion, :optional => true}
@@ -433,15 +435,15 @@ module CassandraThrift
433
435
  def validate
434
436
  end
435
437
 
438
+ ::Thrift::Struct.generate_accessors self
436
439
  end
437
440
 
438
441
  class TokenRange
439
- include ::Thrift::Struct
442
+ include ::Thrift::Struct, ::Thrift::Struct_Union
440
443
  START_TOKEN = 1
441
444
  END_TOKEN = 2
442
445
  ENDPOINTS = 3
443
446
 
444
- ::Thrift::Struct.field_accessor self, :start_token, :end_token, :endpoints
445
447
  FIELDS = {
446
448
  START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
447
449
  END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
@@ -456,14 +458,14 @@ module CassandraThrift
456
458
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field endpoints is unset!') unless @endpoints
457
459
  end
458
460
 
461
+ ::Thrift::Struct.generate_accessors self
459
462
  end
460
463
 
461
464
  # Authentication requests can contain any data, dependent on the AuthenticationBackend used
462
465
  class AuthenticationRequest
463
- include ::Thrift::Struct
466
+ include ::Thrift::Struct, ::Thrift::Struct_Union
464
467
  CREDENTIALS = 1
465
468
 
466
- ::Thrift::Struct.field_accessor self, :credentials
467
469
  FIELDS = {
468
470
  CREDENTIALS => {:type => ::Thrift::Types::MAP, :name => 'credentials', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
469
471
  }
@@ -474,6 +476,7 @@ module CassandraThrift
474
476
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field credentials is unset!') unless @credentials
475
477
  end
476
478
 
479
+ ::Thrift::Struct.generate_accessors self
477
480
  end
478
481
 
479
482
  end
@@ -0,0 +1,1936 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'cassandra_types'
9
+
10
+ module CassandraThrift
11
+ module Cassandra
12
+ class Client
13
+ include ::Thrift::Client
14
+
15
+ def login(auth_request)
16
+ send_login(auth_request)
17
+ recv_login()
18
+ end
19
+
20
+ def send_login(auth_request)
21
+ send_message('login', Login_args, :auth_request => auth_request)
22
+ end
23
+
24
+ def recv_login()
25
+ result = receive_message(Login_result)
26
+ raise result.authnx unless result.authnx.nil?
27
+ raise result.authzx unless result.authzx.nil?
28
+ return
29
+ end
30
+
31
+ def set_keyspace(keyspace)
32
+ send_set_keyspace(keyspace)
33
+ recv_set_keyspace()
34
+ end
35
+
36
+ def send_set_keyspace(keyspace)
37
+ send_message('set_keyspace', Set_keyspace_args, :keyspace => keyspace)
38
+ end
39
+
40
+ def recv_set_keyspace()
41
+ result = receive_message(Set_keyspace_result)
42
+ raise result.ire unless result.ire.nil?
43
+ return
44
+ end
45
+
46
+ def get(key, column_path, consistency_level)
47
+ send_get(key, column_path, consistency_level)
48
+ return recv_get()
49
+ end
50
+
51
+ def send_get(key, column_path, consistency_level)
52
+ send_message('get', Get_args, :key => key, :column_path => column_path, :consistency_level => consistency_level)
53
+ end
54
+
55
+ def recv_get()
56
+ result = receive_message(Get_result)
57
+ return result.success unless result.success.nil?
58
+ raise result.ire unless result.ire.nil?
59
+ raise result.nfe unless result.nfe.nil?
60
+ raise result.ue unless result.ue.nil?
61
+ raise result.te unless result.te.nil?
62
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result')
63
+ end
64
+
65
+ def get_slice(key, column_parent, predicate, consistency_level)
66
+ send_get_slice(key, column_parent, predicate, consistency_level)
67
+ return recv_get_slice()
68
+ end
69
+
70
+ def send_get_slice(key, column_parent, predicate, consistency_level)
71
+ send_message('get_slice', Get_slice_args, :key => key, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
72
+ end
73
+
74
+ def recv_get_slice()
75
+ result = receive_message(Get_slice_result)
76
+ return result.success unless result.success.nil?
77
+ raise result.ire unless result.ire.nil?
78
+ raise result.ue unless result.ue.nil?
79
+ raise result.te unless result.te.nil?
80
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice failed: unknown result')
81
+ end
82
+
83
+ def get_count(key, column_parent, predicate, consistency_level)
84
+ send_get_count(key, column_parent, predicate, consistency_level)
85
+ return recv_get_count()
86
+ end
87
+
88
+ def send_get_count(key, column_parent, predicate, consistency_level)
89
+ send_message('get_count', Get_count_args, :key => key, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
90
+ end
91
+
92
+ def recv_get_count()
93
+ result = receive_message(Get_count_result)
94
+ return result.success unless result.success.nil?
95
+ raise result.ire unless result.ire.nil?
96
+ raise result.ue unless result.ue.nil?
97
+ raise result.te unless result.te.nil?
98
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_count failed: unknown result')
99
+ end
100
+
101
+ def multiget_slice(keys, column_parent, predicate, consistency_level)
102
+ send_multiget_slice(keys, column_parent, predicate, consistency_level)
103
+ return recv_multiget_slice()
104
+ end
105
+
106
+ def send_multiget_slice(keys, column_parent, predicate, consistency_level)
107
+ send_message('multiget_slice', Multiget_slice_args, :keys => keys, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
108
+ end
109
+
110
+ def recv_multiget_slice()
111
+ result = receive_message(Multiget_slice_result)
112
+ return result.success unless result.success.nil?
113
+ raise result.ire unless result.ire.nil?
114
+ raise result.ue unless result.ue.nil?
115
+ raise result.te unless result.te.nil?
116
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'multiget_slice failed: unknown result')
117
+ end
118
+
119
+ def multiget_count(keys, column_parent, predicate, consistency_level)
120
+ send_multiget_count(keys, column_parent, predicate, consistency_level)
121
+ return recv_multiget_count()
122
+ end
123
+
124
+ def send_multiget_count(keys, column_parent, predicate, consistency_level)
125
+ send_message('multiget_count', Multiget_count_args, :keys => keys, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
126
+ end
127
+
128
+ def recv_multiget_count()
129
+ result = receive_message(Multiget_count_result)
130
+ return result.success unless result.success.nil?
131
+ raise result.ire unless result.ire.nil?
132
+ raise result.ue unless result.ue.nil?
133
+ raise result.te unless result.te.nil?
134
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'multiget_count failed: unknown result')
135
+ end
136
+
137
+ def get_range_slices(column_parent, predicate, range, consistency_level)
138
+ send_get_range_slices(column_parent, predicate, range, consistency_level)
139
+ return recv_get_range_slices()
140
+ end
141
+
142
+ def send_get_range_slices(column_parent, predicate, range, consistency_level)
143
+ send_message('get_range_slices', Get_range_slices_args, :column_parent => column_parent, :predicate => predicate, :range => range, :consistency_level => consistency_level)
144
+ end
145
+
146
+ def recv_get_range_slices()
147
+ result = receive_message(Get_range_slices_result)
148
+ return result.success unless result.success.nil?
149
+ raise result.ire unless result.ire.nil?
150
+ raise result.ue unless result.ue.nil?
151
+ raise result.te unless result.te.nil?
152
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slices failed: unknown result')
153
+ end
154
+
155
+ def get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level)
156
+ send_get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level)
157
+ return recv_get_indexed_slices()
158
+ end
159
+
160
+ def send_get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level)
161
+ send_message('get_indexed_slices', Get_indexed_slices_args, :column_parent => column_parent, :index_clause => index_clause, :column_predicate => column_predicate, :consistency_level => consistency_level)
162
+ end
163
+
164
+ def recv_get_indexed_slices()
165
+ result = receive_message(Get_indexed_slices_result)
166
+ return result.success unless result.success.nil?
167
+ raise result.ire unless result.ire.nil?
168
+ raise result.ue unless result.ue.nil?
169
+ raise result.te unless result.te.nil?
170
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_indexed_slices failed: unknown result')
171
+ end
172
+
173
+ def insert(key, column_parent, column, consistency_level)
174
+ send_insert(key, column_parent, column, consistency_level)
175
+ recv_insert()
176
+ end
177
+
178
+ def send_insert(key, column_parent, column, consistency_level)
179
+ send_message('insert', Insert_args, :key => key, :column_parent => column_parent, :column => column, :consistency_level => consistency_level)
180
+ end
181
+
182
+ def recv_insert()
183
+ result = receive_message(Insert_result)
184
+ raise result.ire unless result.ire.nil?
185
+ raise result.ue unless result.ue.nil?
186
+ raise result.te unless result.te.nil?
187
+ return
188
+ end
189
+
190
+ def remove(key, column_path, timestamp, consistency_level)
191
+ send_remove(key, column_path, timestamp, consistency_level)
192
+ recv_remove()
193
+ end
194
+
195
+ def send_remove(key, column_path, timestamp, consistency_level)
196
+ send_message('remove', Remove_args, :key => key, :column_path => column_path, :timestamp => timestamp, :consistency_level => consistency_level)
197
+ end
198
+
199
+ def recv_remove()
200
+ result = receive_message(Remove_result)
201
+ raise result.ire unless result.ire.nil?
202
+ raise result.ue unless result.ue.nil?
203
+ raise result.te unless result.te.nil?
204
+ return
205
+ end
206
+
207
+ def batch_mutate(mutation_map, consistency_level)
208
+ send_batch_mutate(mutation_map, consistency_level)
209
+ recv_batch_mutate()
210
+ end
211
+
212
+ def send_batch_mutate(mutation_map, consistency_level)
213
+ send_message('batch_mutate', Batch_mutate_args, :mutation_map => mutation_map, :consistency_level => consistency_level)
214
+ end
215
+
216
+ def recv_batch_mutate()
217
+ result = receive_message(Batch_mutate_result)
218
+ raise result.ire unless result.ire.nil?
219
+ raise result.ue unless result.ue.nil?
220
+ raise result.te unless result.te.nil?
221
+ return
222
+ end
223
+
224
+ def truncate(cfname)
225
+ send_truncate(cfname)
226
+ recv_truncate()
227
+ end
228
+
229
+ def send_truncate(cfname)
230
+ send_message('truncate', Truncate_args, :cfname => cfname)
231
+ end
232
+
233
+ def recv_truncate()
234
+ result = receive_message(Truncate_result)
235
+ raise result.ire unless result.ire.nil?
236
+ raise result.ue unless result.ue.nil?
237
+ return
238
+ end
239
+
240
+ def describe_schema_versions()
241
+ send_describe_schema_versions()
242
+ return recv_describe_schema_versions()
243
+ end
244
+
245
+ def send_describe_schema_versions()
246
+ send_message('describe_schema_versions', Describe_schema_versions_args)
247
+ end
248
+
249
+ def recv_describe_schema_versions()
250
+ result = receive_message(Describe_schema_versions_result)
251
+ return result.success unless result.success.nil?
252
+ raise result.ire unless result.ire.nil?
253
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_schema_versions failed: unknown result')
254
+ end
255
+
256
+ def describe_keyspaces()
257
+ send_describe_keyspaces()
258
+ return recv_describe_keyspaces()
259
+ end
260
+
261
+ def send_describe_keyspaces()
262
+ send_message('describe_keyspaces', Describe_keyspaces_args)
263
+ end
264
+
265
+ def recv_describe_keyspaces()
266
+ result = receive_message(Describe_keyspaces_result)
267
+ return result.success unless result.success.nil?
268
+ raise result.ire unless result.ire.nil?
269
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspaces failed: unknown result')
270
+ end
271
+
272
+ def describe_cluster_name()
273
+ send_describe_cluster_name()
274
+ return recv_describe_cluster_name()
275
+ end
276
+
277
+ def send_describe_cluster_name()
278
+ send_message('describe_cluster_name', Describe_cluster_name_args)
279
+ end
280
+
281
+ def recv_describe_cluster_name()
282
+ result = receive_message(Describe_cluster_name_result)
283
+ return result.success unless result.success.nil?
284
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_cluster_name failed: unknown result')
285
+ end
286
+
287
+ def describe_version()
288
+ send_describe_version()
289
+ return recv_describe_version()
290
+ end
291
+
292
+ def send_describe_version()
293
+ send_message('describe_version', Describe_version_args)
294
+ end
295
+
296
+ def recv_describe_version()
297
+ result = receive_message(Describe_version_result)
298
+ return result.success unless result.success.nil?
299
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_version failed: unknown result')
300
+ end
301
+
302
+ def describe_ring(keyspace)
303
+ send_describe_ring(keyspace)
304
+ return recv_describe_ring()
305
+ end
306
+
307
+ def send_describe_ring(keyspace)
308
+ send_message('describe_ring', Describe_ring_args, :keyspace => keyspace)
309
+ end
310
+
311
+ def recv_describe_ring()
312
+ result = receive_message(Describe_ring_result)
313
+ return result.success unless result.success.nil?
314
+ raise result.ire unless result.ire.nil?
315
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_ring failed: unknown result')
316
+ end
317
+
318
+ def describe_partitioner()
319
+ send_describe_partitioner()
320
+ return recv_describe_partitioner()
321
+ end
322
+
323
+ def send_describe_partitioner()
324
+ send_message('describe_partitioner', Describe_partitioner_args)
325
+ end
326
+
327
+ def recv_describe_partitioner()
328
+ result = receive_message(Describe_partitioner_result)
329
+ return result.success unless result.success.nil?
330
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_partitioner failed: unknown result')
331
+ end
332
+
333
+ def describe_snitch()
334
+ send_describe_snitch()
335
+ return recv_describe_snitch()
336
+ end
337
+
338
+ def send_describe_snitch()
339
+ send_message('describe_snitch', Describe_snitch_args)
340
+ end
341
+
342
+ def recv_describe_snitch()
343
+ result = receive_message(Describe_snitch_result)
344
+ return result.success unless result.success.nil?
345
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_snitch failed: unknown result')
346
+ end
347
+
348
+ def describe_keyspace(keyspace)
349
+ send_describe_keyspace(keyspace)
350
+ return recv_describe_keyspace()
351
+ end
352
+
353
+ def send_describe_keyspace(keyspace)
354
+ send_message('describe_keyspace', Describe_keyspace_args, :keyspace => keyspace)
355
+ end
356
+
357
+ def recv_describe_keyspace()
358
+ result = receive_message(Describe_keyspace_result)
359
+ return result.success unless result.success.nil?
360
+ raise result.nfe unless result.nfe.nil?
361
+ raise result.ire unless result.ire.nil?
362
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspace failed: unknown result')
363
+ end
364
+
365
+ def describe_splits(cfName, start_token, end_token, keys_per_split)
366
+ send_describe_splits(cfName, start_token, end_token, keys_per_split)
367
+ return recv_describe_splits()
368
+ end
369
+
370
+ def send_describe_splits(cfName, start_token, end_token, keys_per_split)
371
+ send_message('describe_splits', Describe_splits_args, :cfName => cfName, :start_token => start_token, :end_token => end_token, :keys_per_split => keys_per_split)
372
+ end
373
+
374
+ def recv_describe_splits()
375
+ result = receive_message(Describe_splits_result)
376
+ return result.success unless result.success.nil?
377
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_splits failed: unknown result')
378
+ end
379
+
380
+ def system_add_column_family(cf_def)
381
+ send_system_add_column_family(cf_def)
382
+ return recv_system_add_column_family()
383
+ end
384
+
385
+ def send_system_add_column_family(cf_def)
386
+ send_message('system_add_column_family', System_add_column_family_args, :cf_def => cf_def)
387
+ end
388
+
389
+ def recv_system_add_column_family()
390
+ result = receive_message(System_add_column_family_result)
391
+ return result.success unless result.success.nil?
392
+ raise result.ire unless result.ire.nil?
393
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_add_column_family failed: unknown result')
394
+ end
395
+
396
+ def system_drop_column_family(column_family)
397
+ send_system_drop_column_family(column_family)
398
+ return recv_system_drop_column_family()
399
+ end
400
+
401
+ def send_system_drop_column_family(column_family)
402
+ send_message('system_drop_column_family', System_drop_column_family_args, :column_family => column_family)
403
+ end
404
+
405
+ def recv_system_drop_column_family()
406
+ result = receive_message(System_drop_column_family_result)
407
+ return result.success unless result.success.nil?
408
+ raise result.ire unless result.ire.nil?
409
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_drop_column_family failed: unknown result')
410
+ end
411
+
412
+ def system_add_keyspace(ks_def)
413
+ send_system_add_keyspace(ks_def)
414
+ return recv_system_add_keyspace()
415
+ end
416
+
417
+ def send_system_add_keyspace(ks_def)
418
+ send_message('system_add_keyspace', System_add_keyspace_args, :ks_def => ks_def)
419
+ end
420
+
421
+ def recv_system_add_keyspace()
422
+ result = receive_message(System_add_keyspace_result)
423
+ return result.success unless result.success.nil?
424
+ raise result.ire unless result.ire.nil?
425
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_add_keyspace failed: unknown result')
426
+ end
427
+
428
+ def system_drop_keyspace(keyspace)
429
+ send_system_drop_keyspace(keyspace)
430
+ return recv_system_drop_keyspace()
431
+ end
432
+
433
+ def send_system_drop_keyspace(keyspace)
434
+ send_message('system_drop_keyspace', System_drop_keyspace_args, :keyspace => keyspace)
435
+ end
436
+
437
+ def recv_system_drop_keyspace()
438
+ result = receive_message(System_drop_keyspace_result)
439
+ return result.success unless result.success.nil?
440
+ raise result.ire unless result.ire.nil?
441
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_drop_keyspace failed: unknown result')
442
+ end
443
+
444
+ def system_update_keyspace(ks_def)
445
+ send_system_update_keyspace(ks_def)
446
+ return recv_system_update_keyspace()
447
+ end
448
+
449
+ def send_system_update_keyspace(ks_def)
450
+ send_message('system_update_keyspace', System_update_keyspace_args, :ks_def => ks_def)
451
+ end
452
+
453
+ def recv_system_update_keyspace()
454
+ result = receive_message(System_update_keyspace_result)
455
+ return result.success unless result.success.nil?
456
+ raise result.ire unless result.ire.nil?
457
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_update_keyspace failed: unknown result')
458
+ end
459
+
460
+ def system_update_column_family(cf_def)
461
+ send_system_update_column_family(cf_def)
462
+ return recv_system_update_column_family()
463
+ end
464
+
465
+ def send_system_update_column_family(cf_def)
466
+ send_message('system_update_column_family', System_update_column_family_args, :cf_def => cf_def)
467
+ end
468
+
469
+ def recv_system_update_column_family()
470
+ result = receive_message(System_update_column_family_result)
471
+ return result.success unless result.success.nil?
472
+ raise result.ire unless result.ire.nil?
473
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'system_update_column_family failed: unknown result')
474
+ end
475
+
476
+ end
477
+
478
+ class Processor
479
+ include ::Thrift::Processor
480
+
481
+ def process_login(seqid, iprot, oprot)
482
+ args = read_args(iprot, Login_args)
483
+ result = Login_result.new()
484
+ begin
485
+ @handler.login(args.auth_request)
486
+ rescue CassandraThrift::AuthenticationException => authnx
487
+ result.authnx = authnx
488
+ rescue CassandraThrift::AuthorizationException => authzx
489
+ result.authzx = authzx
490
+ end
491
+ write_result(result, oprot, 'login', seqid)
492
+ end
493
+
494
+ def process_set_keyspace(seqid, iprot, oprot)
495
+ args = read_args(iprot, Set_keyspace_args)
496
+ result = Set_keyspace_result.new()
497
+ begin
498
+ @handler.set_keyspace(args.keyspace)
499
+ rescue CassandraThrift::InvalidRequestException => ire
500
+ result.ire = ire
501
+ end
502
+ write_result(result, oprot, 'set_keyspace', seqid)
503
+ end
504
+
505
+ def process_get(seqid, iprot, oprot)
506
+ args = read_args(iprot, Get_args)
507
+ result = Get_result.new()
508
+ begin
509
+ result.success = @handler.get(args.key, args.column_path, args.consistency_level)
510
+ rescue CassandraThrift::InvalidRequestException => ire
511
+ result.ire = ire
512
+ rescue CassandraThrift::NotFoundException => nfe
513
+ result.nfe = nfe
514
+ rescue CassandraThrift::UnavailableException => ue
515
+ result.ue = ue
516
+ rescue CassandraThrift::TimedOutException => te
517
+ result.te = te
518
+ end
519
+ write_result(result, oprot, 'get', seqid)
520
+ end
521
+
522
+ def process_get_slice(seqid, iprot, oprot)
523
+ args = read_args(iprot, Get_slice_args)
524
+ result = Get_slice_result.new()
525
+ begin
526
+ result.success = @handler.get_slice(args.key, args.column_parent, args.predicate, args.consistency_level)
527
+ rescue CassandraThrift::InvalidRequestException => ire
528
+ result.ire = ire
529
+ rescue CassandraThrift::UnavailableException => ue
530
+ result.ue = ue
531
+ rescue CassandraThrift::TimedOutException => te
532
+ result.te = te
533
+ end
534
+ write_result(result, oprot, 'get_slice', seqid)
535
+ end
536
+
537
+ def process_get_count(seqid, iprot, oprot)
538
+ args = read_args(iprot, Get_count_args)
539
+ result = Get_count_result.new()
540
+ begin
541
+ result.success = @handler.get_count(args.key, args.column_parent, args.predicate, args.consistency_level)
542
+ rescue CassandraThrift::InvalidRequestException => ire
543
+ result.ire = ire
544
+ rescue CassandraThrift::UnavailableException => ue
545
+ result.ue = ue
546
+ rescue CassandraThrift::TimedOutException => te
547
+ result.te = te
548
+ end
549
+ write_result(result, oprot, 'get_count', seqid)
550
+ end
551
+
552
+ def process_multiget_slice(seqid, iprot, oprot)
553
+ args = read_args(iprot, Multiget_slice_args)
554
+ result = Multiget_slice_result.new()
555
+ begin
556
+ result.success = @handler.multiget_slice(args.keys, args.column_parent, args.predicate, args.consistency_level)
557
+ rescue CassandraThrift::InvalidRequestException => ire
558
+ result.ire = ire
559
+ rescue CassandraThrift::UnavailableException => ue
560
+ result.ue = ue
561
+ rescue CassandraThrift::TimedOutException => te
562
+ result.te = te
563
+ end
564
+ write_result(result, oprot, 'multiget_slice', seqid)
565
+ end
566
+
567
+ def process_multiget_count(seqid, iprot, oprot)
568
+ args = read_args(iprot, Multiget_count_args)
569
+ result = Multiget_count_result.new()
570
+ begin
571
+ result.success = @handler.multiget_count(args.keys, args.column_parent, args.predicate, args.consistency_level)
572
+ rescue CassandraThrift::InvalidRequestException => ire
573
+ result.ire = ire
574
+ rescue CassandraThrift::UnavailableException => ue
575
+ result.ue = ue
576
+ rescue CassandraThrift::TimedOutException => te
577
+ result.te = te
578
+ end
579
+ write_result(result, oprot, 'multiget_count', seqid)
580
+ end
581
+
582
+ def process_get_range_slices(seqid, iprot, oprot)
583
+ args = read_args(iprot, Get_range_slices_args)
584
+ result = Get_range_slices_result.new()
585
+ begin
586
+ result.success = @handler.get_range_slices(args.column_parent, args.predicate, args.range, args.consistency_level)
587
+ rescue CassandraThrift::InvalidRequestException => ire
588
+ result.ire = ire
589
+ rescue CassandraThrift::UnavailableException => ue
590
+ result.ue = ue
591
+ rescue CassandraThrift::TimedOutException => te
592
+ result.te = te
593
+ end
594
+ write_result(result, oprot, 'get_range_slices', seqid)
595
+ end
596
+
597
+ def process_get_indexed_slices(seqid, iprot, oprot)
598
+ args = read_args(iprot, Get_indexed_slices_args)
599
+ result = Get_indexed_slices_result.new()
600
+ begin
601
+ result.success = @handler.get_indexed_slices(args.column_parent, args.index_clause, args.column_predicate, args.consistency_level)
602
+ rescue CassandraThrift::InvalidRequestException => ire
603
+ result.ire = ire
604
+ rescue CassandraThrift::UnavailableException => ue
605
+ result.ue = ue
606
+ rescue CassandraThrift::TimedOutException => te
607
+ result.te = te
608
+ end
609
+ write_result(result, oprot, 'get_indexed_slices', seqid)
610
+ end
611
+
612
+ def process_insert(seqid, iprot, oprot)
613
+ args = read_args(iprot, Insert_args)
614
+ result = Insert_result.new()
615
+ begin
616
+ @handler.insert(args.key, args.column_parent, args.column, args.consistency_level)
617
+ rescue CassandraThrift::InvalidRequestException => ire
618
+ result.ire = ire
619
+ rescue CassandraThrift::UnavailableException => ue
620
+ result.ue = ue
621
+ rescue CassandraThrift::TimedOutException => te
622
+ result.te = te
623
+ end
624
+ write_result(result, oprot, 'insert', seqid)
625
+ end
626
+
627
+ def process_remove(seqid, iprot, oprot)
628
+ args = read_args(iprot, Remove_args)
629
+ result = Remove_result.new()
630
+ begin
631
+ @handler.remove(args.key, args.column_path, args.timestamp, args.consistency_level)
632
+ rescue CassandraThrift::InvalidRequestException => ire
633
+ result.ire = ire
634
+ rescue CassandraThrift::UnavailableException => ue
635
+ result.ue = ue
636
+ rescue CassandraThrift::TimedOutException => te
637
+ result.te = te
638
+ end
639
+ write_result(result, oprot, 'remove', seqid)
640
+ end
641
+
642
+ def process_batch_mutate(seqid, iprot, oprot)
643
+ args = read_args(iprot, Batch_mutate_args)
644
+ result = Batch_mutate_result.new()
645
+ begin
646
+ @handler.batch_mutate(args.mutation_map, args.consistency_level)
647
+ rescue CassandraThrift::InvalidRequestException => ire
648
+ result.ire = ire
649
+ rescue CassandraThrift::UnavailableException => ue
650
+ result.ue = ue
651
+ rescue CassandraThrift::TimedOutException => te
652
+ result.te = te
653
+ end
654
+ write_result(result, oprot, 'batch_mutate', seqid)
655
+ end
656
+
657
+ def process_truncate(seqid, iprot, oprot)
658
+ args = read_args(iprot, Truncate_args)
659
+ result = Truncate_result.new()
660
+ begin
661
+ @handler.truncate(args.cfname)
662
+ rescue CassandraThrift::InvalidRequestException => ire
663
+ result.ire = ire
664
+ rescue CassandraThrift::UnavailableException => ue
665
+ result.ue = ue
666
+ end
667
+ write_result(result, oprot, 'truncate', seqid)
668
+ end
669
+
670
+ def process_describe_schema_versions(seqid, iprot, oprot)
671
+ args = read_args(iprot, Describe_schema_versions_args)
672
+ result = Describe_schema_versions_result.new()
673
+ begin
674
+ result.success = @handler.describe_schema_versions()
675
+ rescue CassandraThrift::InvalidRequestException => ire
676
+ result.ire = ire
677
+ end
678
+ write_result(result, oprot, 'describe_schema_versions', seqid)
679
+ end
680
+
681
+ def process_describe_keyspaces(seqid, iprot, oprot)
682
+ args = read_args(iprot, Describe_keyspaces_args)
683
+ result = Describe_keyspaces_result.new()
684
+ begin
685
+ result.success = @handler.describe_keyspaces()
686
+ rescue CassandraThrift::InvalidRequestException => ire
687
+ result.ire = ire
688
+ end
689
+ write_result(result, oprot, 'describe_keyspaces', seqid)
690
+ end
691
+
692
+ def process_describe_cluster_name(seqid, iprot, oprot)
693
+ args = read_args(iprot, Describe_cluster_name_args)
694
+ result = Describe_cluster_name_result.new()
695
+ result.success = @handler.describe_cluster_name()
696
+ write_result(result, oprot, 'describe_cluster_name', seqid)
697
+ end
698
+
699
+ def process_describe_version(seqid, iprot, oprot)
700
+ args = read_args(iprot, Describe_version_args)
701
+ result = Describe_version_result.new()
702
+ result.success = @handler.describe_version()
703
+ write_result(result, oprot, 'describe_version', seqid)
704
+ end
705
+
706
+ def process_describe_ring(seqid, iprot, oprot)
707
+ args = read_args(iprot, Describe_ring_args)
708
+ result = Describe_ring_result.new()
709
+ begin
710
+ result.success = @handler.describe_ring(args.keyspace)
711
+ rescue CassandraThrift::InvalidRequestException => ire
712
+ result.ire = ire
713
+ end
714
+ write_result(result, oprot, 'describe_ring', seqid)
715
+ end
716
+
717
+ def process_describe_partitioner(seqid, iprot, oprot)
718
+ args = read_args(iprot, Describe_partitioner_args)
719
+ result = Describe_partitioner_result.new()
720
+ result.success = @handler.describe_partitioner()
721
+ write_result(result, oprot, 'describe_partitioner', seqid)
722
+ end
723
+
724
+ def process_describe_snitch(seqid, iprot, oprot)
725
+ args = read_args(iprot, Describe_snitch_args)
726
+ result = Describe_snitch_result.new()
727
+ result.success = @handler.describe_snitch()
728
+ write_result(result, oprot, 'describe_snitch', seqid)
729
+ end
730
+
731
+ def process_describe_keyspace(seqid, iprot, oprot)
732
+ args = read_args(iprot, Describe_keyspace_args)
733
+ result = Describe_keyspace_result.new()
734
+ begin
735
+ result.success = @handler.describe_keyspace(args.keyspace)
736
+ rescue CassandraThrift::NotFoundException => nfe
737
+ result.nfe = nfe
738
+ rescue CassandraThrift::InvalidRequestException => ire
739
+ result.ire = ire
740
+ end
741
+ write_result(result, oprot, 'describe_keyspace', seqid)
742
+ end
743
+
744
+ def process_describe_splits(seqid, iprot, oprot)
745
+ args = read_args(iprot, Describe_splits_args)
746
+ result = Describe_splits_result.new()
747
+ result.success = @handler.describe_splits(args.cfName, args.start_token, args.end_token, args.keys_per_split)
748
+ write_result(result, oprot, 'describe_splits', seqid)
749
+ end
750
+
751
+ def process_system_add_column_family(seqid, iprot, oprot)
752
+ args = read_args(iprot, System_add_column_family_args)
753
+ result = System_add_column_family_result.new()
754
+ begin
755
+ result.success = @handler.system_add_column_family(args.cf_def)
756
+ rescue CassandraThrift::InvalidRequestException => ire
757
+ result.ire = ire
758
+ end
759
+ write_result(result, oprot, 'system_add_column_family', seqid)
760
+ end
761
+
762
+ def process_system_drop_column_family(seqid, iprot, oprot)
763
+ args = read_args(iprot, System_drop_column_family_args)
764
+ result = System_drop_column_family_result.new()
765
+ begin
766
+ result.success = @handler.system_drop_column_family(args.column_family)
767
+ rescue CassandraThrift::InvalidRequestException => ire
768
+ result.ire = ire
769
+ end
770
+ write_result(result, oprot, 'system_drop_column_family', seqid)
771
+ end
772
+
773
+ def process_system_add_keyspace(seqid, iprot, oprot)
774
+ args = read_args(iprot, System_add_keyspace_args)
775
+ result = System_add_keyspace_result.new()
776
+ begin
777
+ result.success = @handler.system_add_keyspace(args.ks_def)
778
+ rescue CassandraThrift::InvalidRequestException => ire
779
+ result.ire = ire
780
+ end
781
+ write_result(result, oprot, 'system_add_keyspace', seqid)
782
+ end
783
+
784
+ def process_system_drop_keyspace(seqid, iprot, oprot)
785
+ args = read_args(iprot, System_drop_keyspace_args)
786
+ result = System_drop_keyspace_result.new()
787
+ begin
788
+ result.success = @handler.system_drop_keyspace(args.keyspace)
789
+ rescue CassandraThrift::InvalidRequestException => ire
790
+ result.ire = ire
791
+ end
792
+ write_result(result, oprot, 'system_drop_keyspace', seqid)
793
+ end
794
+
795
+ def process_system_update_keyspace(seqid, iprot, oprot)
796
+ args = read_args(iprot, System_update_keyspace_args)
797
+ result = System_update_keyspace_result.new()
798
+ begin
799
+ result.success = @handler.system_update_keyspace(args.ks_def)
800
+ rescue CassandraThrift::InvalidRequestException => ire
801
+ result.ire = ire
802
+ end
803
+ write_result(result, oprot, 'system_update_keyspace', seqid)
804
+ end
805
+
806
+ def process_system_update_column_family(seqid, iprot, oprot)
807
+ args = read_args(iprot, System_update_column_family_args)
808
+ result = System_update_column_family_result.new()
809
+ begin
810
+ result.success = @handler.system_update_column_family(args.cf_def)
811
+ rescue CassandraThrift::InvalidRequestException => ire
812
+ result.ire = ire
813
+ end
814
+ write_result(result, oprot, 'system_update_column_family', seqid)
815
+ end
816
+
817
+ end
818
+
819
+ # HELPER FUNCTIONS AND STRUCTURES
820
+
821
+ class Login_args
822
+ include ::Thrift::Struct, ::Thrift::Struct_Union
823
+ AUTH_REQUEST = 1
824
+
825
+ FIELDS = {
826
+ AUTH_REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'auth_request', :class => CassandraThrift::AuthenticationRequest}
827
+ }
828
+
829
+ def struct_fields; FIELDS; end
830
+
831
+ def validate
832
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field auth_request is unset!') unless @auth_request
833
+ end
834
+
835
+ ::Thrift::Struct.generate_accessors self
836
+ end
837
+
838
+ class Login_result
839
+ include ::Thrift::Struct, ::Thrift::Struct_Union
840
+ AUTHNX = 1
841
+ AUTHZX = 2
842
+
843
+ FIELDS = {
844
+ AUTHNX => {:type => ::Thrift::Types::STRUCT, :name => 'authnx', :class => CassandraThrift::AuthenticationException},
845
+ AUTHZX => {:type => ::Thrift::Types::STRUCT, :name => 'authzx', :class => CassandraThrift::AuthorizationException}
846
+ }
847
+
848
+ def struct_fields; FIELDS; end
849
+
850
+ def validate
851
+ end
852
+
853
+ ::Thrift::Struct.generate_accessors self
854
+ end
855
+
856
+ class Set_keyspace_args
857
+ include ::Thrift::Struct, ::Thrift::Struct_Union
858
+ KEYSPACE = 1
859
+
860
+ FIELDS = {
861
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
862
+ }
863
+
864
+ def struct_fields; FIELDS; end
865
+
866
+ def validate
867
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
868
+ end
869
+
870
+ ::Thrift::Struct.generate_accessors self
871
+ end
872
+
873
+ class Set_keyspace_result
874
+ include ::Thrift::Struct, ::Thrift::Struct_Union
875
+ IRE = 1
876
+
877
+ FIELDS = {
878
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
879
+ }
880
+
881
+ def struct_fields; FIELDS; end
882
+
883
+ def validate
884
+ end
885
+
886
+ ::Thrift::Struct.generate_accessors self
887
+ end
888
+
889
+ class Get_args
890
+ include ::Thrift::Struct, ::Thrift::Struct_Union
891
+ KEY = 1
892
+ COLUMN_PATH = 2
893
+ CONSISTENCY_LEVEL = 3
894
+
895
+ FIELDS = {
896
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
897
+ COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
898
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
899
+ }
900
+
901
+ def struct_fields; FIELDS; end
902
+
903
+ def validate
904
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
905
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
906
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
907
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
908
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
909
+ end
910
+ end
911
+
912
+ ::Thrift::Struct.generate_accessors self
913
+ end
914
+
915
+ class Get_result
916
+ include ::Thrift::Struct, ::Thrift::Struct_Union
917
+ SUCCESS = 0
918
+ IRE = 1
919
+ NFE = 2
920
+ UE = 3
921
+ TE = 4
922
+
923
+ FIELDS = {
924
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CassandraThrift::ColumnOrSuperColumn},
925
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
926
+ NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => CassandraThrift::NotFoundException},
927
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
928
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
929
+ }
930
+
931
+ def struct_fields; FIELDS; end
932
+
933
+ def validate
934
+ end
935
+
936
+ ::Thrift::Struct.generate_accessors self
937
+ end
938
+
939
+ class Get_slice_args
940
+ include ::Thrift::Struct, ::Thrift::Struct_Union
941
+ KEY = 1
942
+ COLUMN_PARENT = 2
943
+ PREDICATE = 3
944
+ CONSISTENCY_LEVEL = 4
945
+
946
+ FIELDS = {
947
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
948
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
949
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
950
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
951
+ }
952
+
953
+ def struct_fields; FIELDS; end
954
+
955
+ def validate
956
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
957
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
958
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
959
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
960
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
961
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
962
+ end
963
+ end
964
+
965
+ ::Thrift::Struct.generate_accessors self
966
+ end
967
+
968
+ class Get_slice_result
969
+ include ::Thrift::Struct, ::Thrift::Struct_Union
970
+ SUCCESS = 0
971
+ IRE = 1
972
+ UE = 2
973
+ TE = 3
974
+
975
+ FIELDS = {
976
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}},
977
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
978
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
979
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
980
+ }
981
+
982
+ def struct_fields; FIELDS; end
983
+
984
+ def validate
985
+ end
986
+
987
+ ::Thrift::Struct.generate_accessors self
988
+ end
989
+
990
+ class Get_count_args
991
+ include ::Thrift::Struct, ::Thrift::Struct_Union
992
+ KEY = 1
993
+ COLUMN_PARENT = 2
994
+ PREDICATE = 3
995
+ CONSISTENCY_LEVEL = 4
996
+
997
+ FIELDS = {
998
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
999
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1000
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
1001
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1002
+ }
1003
+
1004
+ def struct_fields; FIELDS; end
1005
+
1006
+ def validate
1007
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
1008
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1009
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
1010
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1011
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1012
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1013
+ end
1014
+ end
1015
+
1016
+ ::Thrift::Struct.generate_accessors self
1017
+ end
1018
+
1019
+ class Get_count_result
1020
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1021
+ SUCCESS = 0
1022
+ IRE = 1
1023
+ UE = 2
1024
+ TE = 3
1025
+
1026
+ FIELDS = {
1027
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
1028
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1029
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1030
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1031
+ }
1032
+
1033
+ def struct_fields; FIELDS; end
1034
+
1035
+ def validate
1036
+ end
1037
+
1038
+ ::Thrift::Struct.generate_accessors self
1039
+ end
1040
+
1041
+ class Multiget_slice_args
1042
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1043
+ KEYS = 1
1044
+ COLUMN_PARENT = 2
1045
+ PREDICATE = 3
1046
+ CONSISTENCY_LEVEL = 4
1047
+
1048
+ FIELDS = {
1049
+ KEYS => {:type => ::Thrift::Types::LIST, :name => 'keys', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
1050
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1051
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
1052
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1053
+ }
1054
+
1055
+ def struct_fields; FIELDS; end
1056
+
1057
+ def validate
1058
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
1059
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1060
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
1061
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1062
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1063
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1064
+ end
1065
+ end
1066
+
1067
+ ::Thrift::Struct.generate_accessors self
1068
+ end
1069
+
1070
+ class Multiget_slice_result
1071
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1072
+ SUCCESS = 0
1073
+ IRE = 1
1074
+ UE = 2
1075
+ TE = 3
1076
+
1077
+ FIELDS = {
1078
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}}},
1079
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1080
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1081
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1082
+ }
1083
+
1084
+ def struct_fields; FIELDS; end
1085
+
1086
+ def validate
1087
+ end
1088
+
1089
+ ::Thrift::Struct.generate_accessors self
1090
+ end
1091
+
1092
+ class Multiget_count_args
1093
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1094
+ KEYS = 1
1095
+ COLUMN_PARENT = 2
1096
+ PREDICATE = 3
1097
+ CONSISTENCY_LEVEL = 4
1098
+
1099
+ FIELDS = {
1100
+ KEYS => {:type => ::Thrift::Types::LIST, :name => 'keys', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
1101
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1102
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
1103
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1104
+ }
1105
+
1106
+ def struct_fields; FIELDS; end
1107
+
1108
+ def validate
1109
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
1110
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1111
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
1112
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1113
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1114
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1115
+ end
1116
+ end
1117
+
1118
+ ::Thrift::Struct.generate_accessors self
1119
+ end
1120
+
1121
+ class Multiget_count_result
1122
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1123
+ SUCCESS = 0
1124
+ IRE = 1
1125
+ UE = 2
1126
+ TE = 3
1127
+
1128
+ FIELDS = {
1129
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::I32}},
1130
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1131
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1132
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1133
+ }
1134
+
1135
+ def struct_fields; FIELDS; end
1136
+
1137
+ def validate
1138
+ end
1139
+
1140
+ ::Thrift::Struct.generate_accessors self
1141
+ end
1142
+
1143
+ class Get_range_slices_args
1144
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1145
+ COLUMN_PARENT = 1
1146
+ PREDICATE = 2
1147
+ RANGE = 3
1148
+ CONSISTENCY_LEVEL = 4
1149
+
1150
+ FIELDS = {
1151
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1152
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
1153
+ RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'range', :class => CassandraThrift::KeyRange},
1154
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1155
+ }
1156
+
1157
+ def struct_fields; FIELDS; end
1158
+
1159
+ def validate
1160
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1161
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
1162
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field range is unset!') unless @range
1163
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1164
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1165
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1166
+ end
1167
+ end
1168
+
1169
+ ::Thrift::Struct.generate_accessors self
1170
+ end
1171
+
1172
+ class Get_range_slices_result
1173
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1174
+ SUCCESS = 0
1175
+ IRE = 1
1176
+ UE = 2
1177
+ TE = 3
1178
+
1179
+ FIELDS = {
1180
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KeySlice}},
1181
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1182
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1183
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1184
+ }
1185
+
1186
+ def struct_fields; FIELDS; end
1187
+
1188
+ def validate
1189
+ end
1190
+
1191
+ ::Thrift::Struct.generate_accessors self
1192
+ end
1193
+
1194
+ class Get_indexed_slices_args
1195
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1196
+ COLUMN_PARENT = 1
1197
+ INDEX_CLAUSE = 2
1198
+ COLUMN_PREDICATE = 3
1199
+ CONSISTENCY_LEVEL = 4
1200
+
1201
+ FIELDS = {
1202
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1203
+ INDEX_CLAUSE => {:type => ::Thrift::Types::STRUCT, :name => 'index_clause', :class => CassandraThrift::IndexClause},
1204
+ COLUMN_PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'column_predicate', :class => CassandraThrift::SlicePredicate},
1205
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1206
+ }
1207
+
1208
+ def struct_fields; FIELDS; end
1209
+
1210
+ def validate
1211
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1212
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field index_clause is unset!') unless @index_clause
1213
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_predicate is unset!') unless @column_predicate
1214
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1215
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1216
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1217
+ end
1218
+ end
1219
+
1220
+ ::Thrift::Struct.generate_accessors self
1221
+ end
1222
+
1223
+ class Get_indexed_slices_result
1224
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1225
+ SUCCESS = 0
1226
+ IRE = 1
1227
+ UE = 2
1228
+ TE = 3
1229
+
1230
+ FIELDS = {
1231
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KeySlice}},
1232
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1233
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1234
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1235
+ }
1236
+
1237
+ def struct_fields; FIELDS; end
1238
+
1239
+ def validate
1240
+ end
1241
+
1242
+ ::Thrift::Struct.generate_accessors self
1243
+ end
1244
+
1245
+ class Insert_args
1246
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1247
+ KEY = 1
1248
+ COLUMN_PARENT = 2
1249
+ COLUMN = 3
1250
+ CONSISTENCY_LEVEL = 4
1251
+
1252
+ FIELDS = {
1253
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
1254
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
1255
+ COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => CassandraThrift::Column},
1256
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1257
+ }
1258
+
1259
+ def struct_fields; FIELDS; end
1260
+
1261
+ def validate
1262
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
1263
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
1264
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column is unset!') unless @column
1265
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1266
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1267
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1268
+ end
1269
+ end
1270
+
1271
+ ::Thrift::Struct.generate_accessors self
1272
+ end
1273
+
1274
+ class Insert_result
1275
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1276
+ IRE = 1
1277
+ UE = 2
1278
+ TE = 3
1279
+
1280
+ FIELDS = {
1281
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1282
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1283
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1284
+ }
1285
+
1286
+ def struct_fields; FIELDS; end
1287
+
1288
+ def validate
1289
+ end
1290
+
1291
+ ::Thrift::Struct.generate_accessors self
1292
+ end
1293
+
1294
+ class Remove_args
1295
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1296
+ KEY = 1
1297
+ COLUMN_PATH = 2
1298
+ TIMESTAMP = 3
1299
+ CONSISTENCY_LEVEL = 4
1300
+
1301
+ FIELDS = {
1302
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
1303
+ COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
1304
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
1305
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1306
+ }
1307
+
1308
+ def struct_fields; FIELDS; end
1309
+
1310
+ def validate
1311
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
1312
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
1313
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
1314
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1315
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1316
+ end
1317
+ end
1318
+
1319
+ ::Thrift::Struct.generate_accessors self
1320
+ end
1321
+
1322
+ class Remove_result
1323
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1324
+ IRE = 1
1325
+ UE = 2
1326
+ TE = 3
1327
+
1328
+ FIELDS = {
1329
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1330
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1331
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1332
+ }
1333
+
1334
+ def struct_fields; FIELDS; end
1335
+
1336
+ def validate
1337
+ end
1338
+
1339
+ ::Thrift::Struct.generate_accessors self
1340
+ end
1341
+
1342
+ class Batch_mutate_args
1343
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1344
+ MUTATION_MAP = 1
1345
+ CONSISTENCY_LEVEL = 2
1346
+
1347
+ FIELDS = {
1348
+ MUTATION_MAP => {:type => ::Thrift::Types::MAP, :name => 'mutation_map', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Mutation}}}},
1349
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
1350
+ }
1351
+
1352
+ def struct_fields; FIELDS; end
1353
+
1354
+ def validate
1355
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field mutation_map is unset!') unless @mutation_map
1356
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
1357
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
1358
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
1359
+ end
1360
+ end
1361
+
1362
+ ::Thrift::Struct.generate_accessors self
1363
+ end
1364
+
1365
+ class Batch_mutate_result
1366
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1367
+ IRE = 1
1368
+ UE = 2
1369
+ TE = 3
1370
+
1371
+ FIELDS = {
1372
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1373
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
1374
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
1375
+ }
1376
+
1377
+ def struct_fields; FIELDS; end
1378
+
1379
+ def validate
1380
+ end
1381
+
1382
+ ::Thrift::Struct.generate_accessors self
1383
+ end
1384
+
1385
+ class Truncate_args
1386
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1387
+ CFNAME = 1
1388
+
1389
+ FIELDS = {
1390
+ CFNAME => {:type => ::Thrift::Types::STRING, :name => 'cfname'}
1391
+ }
1392
+
1393
+ def struct_fields; FIELDS; end
1394
+
1395
+ def validate
1396
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cfname is unset!') unless @cfname
1397
+ end
1398
+
1399
+ ::Thrift::Struct.generate_accessors self
1400
+ end
1401
+
1402
+ class Truncate_result
1403
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1404
+ IRE = 1
1405
+ UE = 2
1406
+
1407
+ FIELDS = {
1408
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
1409
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException}
1410
+ }
1411
+
1412
+ def struct_fields; FIELDS; end
1413
+
1414
+ def validate
1415
+ end
1416
+
1417
+ ::Thrift::Struct.generate_accessors self
1418
+ end
1419
+
1420
+ class Describe_schema_versions_args
1421
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1422
+
1423
+ FIELDS = {
1424
+
1425
+ }
1426
+
1427
+ def struct_fields; FIELDS; end
1428
+
1429
+ def validate
1430
+ end
1431
+
1432
+ ::Thrift::Struct.generate_accessors self
1433
+ end
1434
+
1435
+ class Describe_schema_versions_result
1436
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1437
+ SUCCESS = 0
1438
+ IRE = 1
1439
+
1440
+ FIELDS = {
1441
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}},
1442
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1443
+ }
1444
+
1445
+ def struct_fields; FIELDS; end
1446
+
1447
+ def validate
1448
+ end
1449
+
1450
+ ::Thrift::Struct.generate_accessors self
1451
+ end
1452
+
1453
+ class Describe_keyspaces_args
1454
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1455
+
1456
+ FIELDS = {
1457
+
1458
+ }
1459
+
1460
+ def struct_fields; FIELDS; end
1461
+
1462
+ def validate
1463
+ end
1464
+
1465
+ ::Thrift::Struct.generate_accessors self
1466
+ end
1467
+
1468
+ class Describe_keyspaces_result
1469
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1470
+ SUCCESS = 0
1471
+ IRE = 1
1472
+
1473
+ FIELDS = {
1474
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KsDef}},
1475
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1476
+ }
1477
+
1478
+ def struct_fields; FIELDS; end
1479
+
1480
+ def validate
1481
+ end
1482
+
1483
+ ::Thrift::Struct.generate_accessors self
1484
+ end
1485
+
1486
+ class Describe_cluster_name_args
1487
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1488
+
1489
+ FIELDS = {
1490
+
1491
+ }
1492
+
1493
+ def struct_fields; FIELDS; end
1494
+
1495
+ def validate
1496
+ end
1497
+
1498
+ ::Thrift::Struct.generate_accessors self
1499
+ end
1500
+
1501
+ class Describe_cluster_name_result
1502
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1503
+ SUCCESS = 0
1504
+
1505
+ FIELDS = {
1506
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
1507
+ }
1508
+
1509
+ def struct_fields; FIELDS; end
1510
+
1511
+ def validate
1512
+ end
1513
+
1514
+ ::Thrift::Struct.generate_accessors self
1515
+ end
1516
+
1517
+ class Describe_version_args
1518
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1519
+
1520
+ FIELDS = {
1521
+
1522
+ }
1523
+
1524
+ def struct_fields; FIELDS; end
1525
+
1526
+ def validate
1527
+ end
1528
+
1529
+ ::Thrift::Struct.generate_accessors self
1530
+ end
1531
+
1532
+ class Describe_version_result
1533
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1534
+ SUCCESS = 0
1535
+
1536
+ FIELDS = {
1537
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
1538
+ }
1539
+
1540
+ def struct_fields; FIELDS; end
1541
+
1542
+ def validate
1543
+ end
1544
+
1545
+ ::Thrift::Struct.generate_accessors self
1546
+ end
1547
+
1548
+ class Describe_ring_args
1549
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1550
+ KEYSPACE = 1
1551
+
1552
+ FIELDS = {
1553
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
1554
+ }
1555
+
1556
+ def struct_fields; FIELDS; end
1557
+
1558
+ def validate
1559
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
1560
+ end
1561
+
1562
+ ::Thrift::Struct.generate_accessors self
1563
+ end
1564
+
1565
+ class Describe_ring_result
1566
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1567
+ SUCCESS = 0
1568
+ IRE = 1
1569
+
1570
+ FIELDS = {
1571
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::TokenRange}},
1572
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1573
+ }
1574
+
1575
+ def struct_fields; FIELDS; end
1576
+
1577
+ def validate
1578
+ end
1579
+
1580
+ ::Thrift::Struct.generate_accessors self
1581
+ end
1582
+
1583
+ class Describe_partitioner_args
1584
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1585
+
1586
+ FIELDS = {
1587
+
1588
+ }
1589
+
1590
+ def struct_fields; FIELDS; end
1591
+
1592
+ def validate
1593
+ end
1594
+
1595
+ ::Thrift::Struct.generate_accessors self
1596
+ end
1597
+
1598
+ class Describe_partitioner_result
1599
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1600
+ SUCCESS = 0
1601
+
1602
+ FIELDS = {
1603
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
1604
+ }
1605
+
1606
+ def struct_fields; FIELDS; end
1607
+
1608
+ def validate
1609
+ end
1610
+
1611
+ ::Thrift::Struct.generate_accessors self
1612
+ end
1613
+
1614
+ class Describe_snitch_args
1615
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1616
+
1617
+ FIELDS = {
1618
+
1619
+ }
1620
+
1621
+ def struct_fields; FIELDS; end
1622
+
1623
+ def validate
1624
+ end
1625
+
1626
+ ::Thrift::Struct.generate_accessors self
1627
+ end
1628
+
1629
+ class Describe_snitch_result
1630
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1631
+ SUCCESS = 0
1632
+
1633
+ FIELDS = {
1634
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
1635
+ }
1636
+
1637
+ def struct_fields; FIELDS; end
1638
+
1639
+ def validate
1640
+ end
1641
+
1642
+ ::Thrift::Struct.generate_accessors self
1643
+ end
1644
+
1645
+ class Describe_keyspace_args
1646
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1647
+ KEYSPACE = 1
1648
+
1649
+ FIELDS = {
1650
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
1651
+ }
1652
+
1653
+ def struct_fields; FIELDS; end
1654
+
1655
+ def validate
1656
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
1657
+ end
1658
+
1659
+ ::Thrift::Struct.generate_accessors self
1660
+ end
1661
+
1662
+ class Describe_keyspace_result
1663
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1664
+ SUCCESS = 0
1665
+ NFE = 1
1666
+ IRE = 2
1667
+
1668
+ FIELDS = {
1669
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CassandraThrift::KsDef},
1670
+ NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => CassandraThrift::NotFoundException},
1671
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1672
+ }
1673
+
1674
+ def struct_fields; FIELDS; end
1675
+
1676
+ def validate
1677
+ end
1678
+
1679
+ ::Thrift::Struct.generate_accessors self
1680
+ end
1681
+
1682
+ class Describe_splits_args
1683
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1684
+ CFNAME = 1
1685
+ START_TOKEN = 2
1686
+ END_TOKEN = 3
1687
+ KEYS_PER_SPLIT = 4
1688
+
1689
+ FIELDS = {
1690
+ CFNAME => {:type => ::Thrift::Types::STRING, :name => 'cfName'},
1691
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
1692
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
1693
+ KEYS_PER_SPLIT => {:type => ::Thrift::Types::I32, :name => 'keys_per_split'}
1694
+ }
1695
+
1696
+ def struct_fields; FIELDS; end
1697
+
1698
+ def validate
1699
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cfName is unset!') unless @cfName
1700
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
1701
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
1702
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys_per_split is unset!') unless @keys_per_split
1703
+ end
1704
+
1705
+ ::Thrift::Struct.generate_accessors self
1706
+ end
1707
+
1708
+ class Describe_splits_result
1709
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1710
+ SUCCESS = 0
1711
+
1712
+ FIELDS = {
1713
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
1714
+ }
1715
+
1716
+ def struct_fields; FIELDS; end
1717
+
1718
+ def validate
1719
+ end
1720
+
1721
+ ::Thrift::Struct.generate_accessors self
1722
+ end
1723
+
1724
+ class System_add_column_family_args
1725
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1726
+ CF_DEF = 1
1727
+
1728
+ FIELDS = {
1729
+ CF_DEF => {:type => ::Thrift::Types::STRUCT, :name => 'cf_def', :class => CassandraThrift::CfDef}
1730
+ }
1731
+
1732
+ def struct_fields; FIELDS; end
1733
+
1734
+ def validate
1735
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cf_def is unset!') unless @cf_def
1736
+ end
1737
+
1738
+ ::Thrift::Struct.generate_accessors self
1739
+ end
1740
+
1741
+ class System_add_column_family_result
1742
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1743
+ SUCCESS = 0
1744
+ IRE = 1
1745
+
1746
+ FIELDS = {
1747
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1748
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1749
+ }
1750
+
1751
+ def struct_fields; FIELDS; end
1752
+
1753
+ def validate
1754
+ end
1755
+
1756
+ ::Thrift::Struct.generate_accessors self
1757
+ end
1758
+
1759
+ class System_drop_column_family_args
1760
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1761
+ COLUMN_FAMILY = 1
1762
+
1763
+ FIELDS = {
1764
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'}
1765
+ }
1766
+
1767
+ def struct_fields; FIELDS; end
1768
+
1769
+ def validate
1770
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
1771
+ end
1772
+
1773
+ ::Thrift::Struct.generate_accessors self
1774
+ end
1775
+
1776
+ class System_drop_column_family_result
1777
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1778
+ SUCCESS = 0
1779
+ IRE = 1
1780
+
1781
+ FIELDS = {
1782
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1783
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1784
+ }
1785
+
1786
+ def struct_fields; FIELDS; end
1787
+
1788
+ def validate
1789
+ end
1790
+
1791
+ ::Thrift::Struct.generate_accessors self
1792
+ end
1793
+
1794
+ class System_add_keyspace_args
1795
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1796
+ KS_DEF = 1
1797
+
1798
+ FIELDS = {
1799
+ KS_DEF => {:type => ::Thrift::Types::STRUCT, :name => 'ks_def', :class => CassandraThrift::KsDef}
1800
+ }
1801
+
1802
+ def struct_fields; FIELDS; end
1803
+
1804
+ def validate
1805
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ks_def is unset!') unless @ks_def
1806
+ end
1807
+
1808
+ ::Thrift::Struct.generate_accessors self
1809
+ end
1810
+
1811
+ class System_add_keyspace_result
1812
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1813
+ SUCCESS = 0
1814
+ IRE = 1
1815
+
1816
+ FIELDS = {
1817
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1818
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1819
+ }
1820
+
1821
+ def struct_fields; FIELDS; end
1822
+
1823
+ def validate
1824
+ end
1825
+
1826
+ ::Thrift::Struct.generate_accessors self
1827
+ end
1828
+
1829
+ class System_drop_keyspace_args
1830
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1831
+ KEYSPACE = 1
1832
+
1833
+ FIELDS = {
1834
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
1835
+ }
1836
+
1837
+ def struct_fields; FIELDS; end
1838
+
1839
+ def validate
1840
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
1841
+ end
1842
+
1843
+ ::Thrift::Struct.generate_accessors self
1844
+ end
1845
+
1846
+ class System_drop_keyspace_result
1847
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1848
+ SUCCESS = 0
1849
+ IRE = 1
1850
+
1851
+ FIELDS = {
1852
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1853
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1854
+ }
1855
+
1856
+ def struct_fields; FIELDS; end
1857
+
1858
+ def validate
1859
+ end
1860
+
1861
+ ::Thrift::Struct.generate_accessors self
1862
+ end
1863
+
1864
+ class System_update_keyspace_args
1865
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1866
+ KS_DEF = 1
1867
+
1868
+ FIELDS = {
1869
+ KS_DEF => {:type => ::Thrift::Types::STRUCT, :name => 'ks_def', :class => CassandraThrift::KsDef}
1870
+ }
1871
+
1872
+ def struct_fields; FIELDS; end
1873
+
1874
+ def validate
1875
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ks_def is unset!') unless @ks_def
1876
+ end
1877
+
1878
+ ::Thrift::Struct.generate_accessors self
1879
+ end
1880
+
1881
+ class System_update_keyspace_result
1882
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1883
+ SUCCESS = 0
1884
+ IRE = 1
1885
+
1886
+ FIELDS = {
1887
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1888
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1889
+ }
1890
+
1891
+ def struct_fields; FIELDS; end
1892
+
1893
+ def validate
1894
+ end
1895
+
1896
+ ::Thrift::Struct.generate_accessors self
1897
+ end
1898
+
1899
+ class System_update_column_family_args
1900
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1901
+ CF_DEF = 1
1902
+
1903
+ FIELDS = {
1904
+ CF_DEF => {:type => ::Thrift::Types::STRUCT, :name => 'cf_def', :class => CassandraThrift::CfDef}
1905
+ }
1906
+
1907
+ def struct_fields; FIELDS; end
1908
+
1909
+ def validate
1910
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cf_def is unset!') unless @cf_def
1911
+ end
1912
+
1913
+ ::Thrift::Struct.generate_accessors self
1914
+ end
1915
+
1916
+ class System_update_column_family_result
1917
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1918
+ SUCCESS = 0
1919
+ IRE = 1
1920
+
1921
+ FIELDS = {
1922
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
1923
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException}
1924
+ }
1925
+
1926
+ def struct_fields; FIELDS; end
1927
+
1928
+ def validate
1929
+ end
1930
+
1931
+ ::Thrift::Struct.generate_accessors self
1932
+ end
1933
+
1934
+ end
1935
+
1936
+ end