cassandra 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
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 'cassandra_types'
8
+
9
+ module CassandraThrift
10
+ VERSION = %q"19.4.0"
11
+
12
+ end
@@ -0,0 +1,679 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+
8
+ module CassandraThrift
9
+ module ConsistencyLevel
10
+ ONE = 1
11
+ QUORUM = 2
12
+ LOCAL_QUORUM = 3
13
+ EACH_QUORUM = 4
14
+ ALL = 5
15
+ ANY = 6
16
+ VALUE_MAP = {1 => "ONE", 2 => "QUORUM", 3 => "LOCAL_QUORUM", 4 => "EACH_QUORUM", 5 => "ALL", 6 => "ANY"}
17
+ VALID_VALUES = Set.new([ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, ANY]).freeze
18
+ end
19
+
20
+ module IndexOperator
21
+ EQ = 0
22
+ GTE = 1
23
+ GT = 2
24
+ LTE = 3
25
+ LT = 4
26
+ VALUE_MAP = {0 => "EQ", 1 => "GTE", 2 => "GT", 3 => "LTE", 4 => "LT"}
27
+ VALID_VALUES = Set.new([EQ, GTE, GT, LTE, LT]).freeze
28
+ end
29
+
30
+ module IndexType
31
+ KEYS = 0
32
+ VALUE_MAP = {0 => "KEYS"}
33
+ VALID_VALUES = Set.new([KEYS]).freeze
34
+ end
35
+
36
+ # Basic unit of data within a ColumnFamily.
37
+ # @param name, the name by which this column is set and retrieved. Maximum 64KB long.
38
+ # @param value. The data associated with the name. Maximum 2GB long, but in practice you should limit it to small numbers of MB (since Thrift must read the full value into memory to operate on it).
39
+ # @param timestamp. The timestamp is used for conflict detection/resolution when two columns with same name need to be compared.
40
+ # @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted.
41
+ class Column
42
+ include ::Thrift::Struct, ::Thrift::Struct_Union
43
+ NAME = 1
44
+ VALUE = 2
45
+ TIMESTAMP = 3
46
+ TTL = 4
47
+
48
+ FIELDS = {
49
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
50
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
51
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
52
+ TTL => {:type => ::Thrift::Types::I32, :name => 'ttl', :optional => true}
53
+ }
54
+
55
+ def struct_fields; FIELDS; end
56
+
57
+ def validate
58
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
59
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
60
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
61
+ end
62
+
63
+ ::Thrift::Struct.generate_accessors self
64
+ end
65
+
66
+ # A named list of columns.
67
+ # @param name. see Column.name.
68
+ # @param columns. A collection of standard Columns. The columns within a super column are defined in an adhoc manner.
69
+ # Columns within a super column do not have to have matching structures (similarly named child columns).
70
+ class SuperColumn
71
+ include ::Thrift::Struct, ::Thrift::Struct_Union
72
+ NAME = 1
73
+ COLUMNS = 2
74
+
75
+ FIELDS = {
76
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
77
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Column}}
78
+ }
79
+
80
+ def struct_fields; FIELDS; end
81
+
82
+ def validate
83
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
84
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
85
+ end
86
+
87
+ ::Thrift::Struct.generate_accessors self
88
+ end
89
+
90
+ # Methods for fetching rows/records from Cassandra will return either a single instance of ColumnOrSuperColumn or a list
91
+ # of ColumnOrSuperColumns (get_slice()). If you're looking up a SuperColumn (or list of SuperColumns) then the resulting
92
+ # instances of ColumnOrSuperColumn will have the requested SuperColumn in the attribute super_column. For queries resulting
93
+ # in Columns, those values will be in the attribute column. This change was made between 0.3 and 0.4 to standardize on
94
+ # single query methods that may return either a SuperColumn or Column.
95
+ #
96
+ # @param column. The Column returned by get() or get_slice().
97
+ # @param super_column. The SuperColumn returned by get() or get_slice().
98
+ class ColumnOrSuperColumn
99
+ include ::Thrift::Struct, ::Thrift::Struct_Union
100
+ COLUMN = 1
101
+ SUPER_COLUMN = 2
102
+
103
+ FIELDS = {
104
+ COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => CassandraThrift::Column, :optional => true},
105
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => CassandraThrift::SuperColumn, :optional => true}
106
+ }
107
+
108
+ def struct_fields; FIELDS; end
109
+
110
+ def validate
111
+ end
112
+
113
+ ::Thrift::Struct.generate_accessors self
114
+ end
115
+
116
+ # A specific column was requested that does not exist.
117
+ class NotFoundException < ::Thrift::Exception
118
+ include ::Thrift::Struct, ::Thrift::Struct_Union
119
+
120
+ FIELDS = {
121
+
122
+ }
123
+
124
+ def struct_fields; FIELDS; end
125
+
126
+ def validate
127
+ end
128
+
129
+ ::Thrift::Struct.generate_accessors self
130
+ end
131
+
132
+ # Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
133
+ # why contains an associated error message.
134
+ class InvalidRequestException < ::Thrift::Exception
135
+ include ::Thrift::Struct, ::Thrift::Struct_Union
136
+ def initialize(message=nil)
137
+ super()
138
+ self.why = message
139
+ end
140
+
141
+ def message; why end
142
+
143
+ WHY = 1
144
+
145
+ FIELDS = {
146
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
147
+ }
148
+
149
+ def struct_fields; FIELDS; end
150
+
151
+ def validate
152
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
153
+ end
154
+
155
+ ::Thrift::Struct.generate_accessors self
156
+ end
157
+
158
+ # Not all the replicas required could be created and/or read.
159
+ class UnavailableException < ::Thrift::Exception
160
+ include ::Thrift::Struct, ::Thrift::Struct_Union
161
+
162
+ FIELDS = {
163
+
164
+ }
165
+
166
+ def struct_fields; FIELDS; end
167
+
168
+ def validate
169
+ end
170
+
171
+ ::Thrift::Struct.generate_accessors self
172
+ end
173
+
174
+ # RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
175
+ class TimedOutException < ::Thrift::Exception
176
+ include ::Thrift::Struct, ::Thrift::Struct_Union
177
+
178
+ FIELDS = {
179
+
180
+ }
181
+
182
+ def struct_fields; FIELDS; end
183
+
184
+ def validate
185
+ end
186
+
187
+ ::Thrift::Struct.generate_accessors self
188
+ end
189
+
190
+ # invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
191
+ class AuthenticationException < ::Thrift::Exception
192
+ include ::Thrift::Struct, ::Thrift::Struct_Union
193
+ def initialize(message=nil)
194
+ super()
195
+ self.why = message
196
+ end
197
+
198
+ def message; why end
199
+
200
+ WHY = 1
201
+
202
+ FIELDS = {
203
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
204
+ }
205
+
206
+ def struct_fields; FIELDS; end
207
+
208
+ def validate
209
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
210
+ end
211
+
212
+ ::Thrift::Struct.generate_accessors self
213
+ end
214
+
215
+ # invalid authorization request (user does not have access to keyspace)
216
+ class AuthorizationException < ::Thrift::Exception
217
+ include ::Thrift::Struct, ::Thrift::Struct_Union
218
+ def initialize(message=nil)
219
+ super()
220
+ self.why = message
221
+ end
222
+
223
+ def message; why end
224
+
225
+ WHY = 1
226
+
227
+ FIELDS = {
228
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
229
+ }
230
+
231
+ def struct_fields; FIELDS; end
232
+
233
+ def validate
234
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
235
+ end
236
+
237
+ ::Thrift::Struct.generate_accessors self
238
+ end
239
+
240
+ # ColumnParent is used when selecting groups of columns from the same ColumnFamily. In directory structure terms, imagine
241
+ # ColumnParent as ColumnPath + '/../'.
242
+ #
243
+ # See also <a href="cassandra.html#Struct_ColumnPath">ColumnPath</a>
244
+ class ColumnParent
245
+ include ::Thrift::Struct, ::Thrift::Struct_Union
246
+ COLUMN_FAMILY = 3
247
+ SUPER_COLUMN = 4
248
+
249
+ FIELDS = {
250
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
251
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true}
252
+ }
253
+
254
+ def struct_fields; FIELDS; end
255
+
256
+ def validate
257
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
258
+ end
259
+
260
+ ::Thrift::Struct.generate_accessors self
261
+ end
262
+
263
+ # The ColumnPath is the path to a single column in Cassandra. It might make sense to think of ColumnPath and
264
+ # ColumnParent in terms of a directory structure.
265
+ #
266
+ # ColumnPath is used to looking up a single column.
267
+ #
268
+ # @param column_family. The name of the CF of the column being looked up.
269
+ # @param super_column. The super column name.
270
+ # @param column. The column name.
271
+ class ColumnPath
272
+ include ::Thrift::Struct, ::Thrift::Struct_Union
273
+ COLUMN_FAMILY = 3
274
+ SUPER_COLUMN = 4
275
+ COLUMN = 5
276
+
277
+ FIELDS = {
278
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
279
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
280
+ COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true, :optional => true}
281
+ }
282
+
283
+ def struct_fields; FIELDS; end
284
+
285
+ def validate
286
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
287
+ end
288
+
289
+ ::Thrift::Struct.generate_accessors self
290
+ end
291
+
292
+ # A slice range is a structure that stores basic range, ordering and limit information for a query that will return
293
+ # multiple columns. It could be thought of as Cassandra's version of LIMIT and ORDER BY
294
+ #
295
+ # @param start. The column name to start the slice with. This attribute is not required, though there is no default value,
296
+ # and can be safely set to '', i.e., an empty byte array, to start with the first column name. Otherwise, it
297
+ # must a valid value under the rules of the Comparator defined for the given ColumnFamily.
298
+ # @param finish. The column name to stop the slice at. This attribute is not required, though there is no default value,
299
+ # and can be safely set to an empty byte array to not stop until 'count' results are seen. Otherwise, it
300
+ # must also be a valid value to the ColumnFamily Comparator.
301
+ # @param reversed. Whether the results should be ordered in reversed order. Similar to ORDER BY blah DESC in SQL.
302
+ # @param count. How many columns to return. Similar to LIMIT in SQL. May be arbitrarily large, but Thrift will
303
+ # materialize the whole result into memory before returning it to the client, so be aware that you may
304
+ # be better served by iterating through slices by passing the last value of one call in as the 'start'
305
+ # of the next instead of increasing 'count' arbitrarily large.
306
+ class SliceRange
307
+ include ::Thrift::Struct, ::Thrift::Struct_Union
308
+ START = 1
309
+ FINISH = 2
310
+ REVERSED = 3
311
+ COUNT = 4
312
+
313
+ FIELDS = {
314
+ START => {:type => ::Thrift::Types::STRING, :name => 'start', :binary => true},
315
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish', :binary => true},
316
+ REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
317
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
318
+ }
319
+
320
+ def struct_fields; FIELDS; end
321
+
322
+ def validate
323
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start
324
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish is unset!') unless @finish
325
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field reversed is unset!') if @reversed.nil?
326
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
327
+ end
328
+
329
+ ::Thrift::Struct.generate_accessors self
330
+ end
331
+
332
+ # A SlicePredicate is similar to a mathematic predicate (see http://en.wikipedia.org/wiki/Predicate_(mathematical_logic)),
333
+ # which is described as "a property that the elements of a set have in common."
334
+ #
335
+ # SlicePredicate's in Cassandra are described with either a list of column_names or a SliceRange. If column_names is
336
+ # specified, slice_range is ignored.
337
+ #
338
+ # @param column_name. A list of column names to retrieve. This can be used similar to Memcached's "multi-get" feature
339
+ # to fetch N known column names. For instance, if you know you wish to fetch columns 'Joe', 'Jack',
340
+ # and 'Jim' you can pass those column names as a list to fetch all three at once.
341
+ # @param slice_range. A SliceRange describing how to range, order, and/or limit the slice.
342
+ class SlicePredicate
343
+ include ::Thrift::Struct, ::Thrift::Struct_Union
344
+ COLUMN_NAMES = 1
345
+ SLICE_RANGE = 2
346
+
347
+ FIELDS = {
348
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
349
+ SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => CassandraThrift::SliceRange, :optional => true}
350
+ }
351
+
352
+ def struct_fields; FIELDS; end
353
+
354
+ def validate
355
+ end
356
+
357
+ ::Thrift::Struct.generate_accessors self
358
+ end
359
+
360
+ class IndexExpression
361
+ include ::Thrift::Struct, ::Thrift::Struct_Union
362
+ COLUMN_NAME = 1
363
+ OP = 2
364
+ VALUE = 3
365
+
366
+ FIELDS = {
367
+ COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name', :binary => true},
368
+ OP => {:type => ::Thrift::Types::I32, :name => 'op', :enum_class => CassandraThrift::IndexOperator},
369
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}
370
+ }
371
+
372
+ def struct_fields; FIELDS; end
373
+
374
+ def validate
375
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_name is unset!') unless @column_name
376
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
377
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
378
+ unless @op.nil? || CassandraThrift::IndexOperator::VALID_VALUES.include?(@op)
379
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
380
+ end
381
+ end
382
+
383
+ ::Thrift::Struct.generate_accessors self
384
+ end
385
+
386
+ class IndexClause
387
+ include ::Thrift::Struct, ::Thrift::Struct_Union
388
+ EXPRESSIONS = 1
389
+ START_KEY = 2
390
+ COUNT = 3
391
+
392
+ FIELDS = {
393
+ EXPRESSIONS => {:type => ::Thrift::Types::LIST, :name => 'expressions', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::IndexExpression}},
394
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true},
395
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
396
+ }
397
+
398
+ def struct_fields; FIELDS; end
399
+
400
+ def validate
401
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expressions is unset!') unless @expressions
402
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_key is unset!') unless @start_key
403
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
404
+ end
405
+
406
+ ::Thrift::Struct.generate_accessors self
407
+ end
408
+
409
+ # The semantics of start keys and tokens are slightly different.
410
+ # Keys are start-inclusive; tokens are start-exclusive. Token
411
+ # ranges may also wrap -- that is, the end token may be less
412
+ # than the start one. Thus, a range from keyX to keyX is a
413
+ # one-element range, but a range from tokenY to tokenY is the
414
+ # full ring.
415
+ class KeyRange
416
+ include ::Thrift::Struct, ::Thrift::Struct_Union
417
+ START_KEY = 1
418
+ END_KEY = 2
419
+ START_TOKEN = 3
420
+ END_TOKEN = 4
421
+ COUNT = 5
422
+
423
+ FIELDS = {
424
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true, :optional => true},
425
+ END_KEY => {:type => ::Thrift::Types::STRING, :name => 'end_key', :binary => true, :optional => true},
426
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token', :optional => true},
427
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token', :optional => true},
428
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
429
+ }
430
+
431
+ def struct_fields; FIELDS; end
432
+
433
+ def validate
434
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
435
+ end
436
+
437
+ ::Thrift::Struct.generate_accessors self
438
+ end
439
+
440
+ # A KeySlice is key followed by the data it maps to. A collection of KeySlice is returned by the get_range_slice operation.
441
+ #
442
+ # @param key. a row key
443
+ # @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
444
+ # a SlicePredicate.
445
+ class KeySlice
446
+ include ::Thrift::Struct, ::Thrift::Struct_Union
447
+ KEY = 1
448
+ COLUMNS = 2
449
+
450
+ FIELDS = {
451
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
452
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}}
453
+ }
454
+
455
+ def struct_fields; FIELDS; end
456
+
457
+ def validate
458
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
459
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
460
+ end
461
+
462
+ ::Thrift::Struct.generate_accessors self
463
+ end
464
+
465
+ class KeyCount
466
+ include ::Thrift::Struct, ::Thrift::Struct_Union
467
+ KEY = 1
468
+ COUNT = 2
469
+
470
+ FIELDS = {
471
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
472
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
473
+ }
474
+
475
+ def struct_fields; FIELDS; end
476
+
477
+ def validate
478
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
479
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
480
+ end
481
+
482
+ ::Thrift::Struct.generate_accessors self
483
+ end
484
+
485
+ class Deletion
486
+ include ::Thrift::Struct, ::Thrift::Struct_Union
487
+ TIMESTAMP = 1
488
+ SUPER_COLUMN = 2
489
+ PREDICATE = 3
490
+
491
+ FIELDS = {
492
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
493
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
494
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate, :optional => true}
495
+ }
496
+
497
+ def struct_fields; FIELDS; end
498
+
499
+ def validate
500
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
501
+ end
502
+
503
+ ::Thrift::Struct.generate_accessors self
504
+ end
505
+
506
+ # A Mutation is either an insert, represented by filling column_or_supercolumn, or a deletion, represented by filling the deletion attribute.
507
+ # @param column_or_supercolumn. An insert to a column or supercolumn
508
+ # @param deletion. A deletion of a column or supercolumn
509
+ class Mutation
510
+ include ::Thrift::Struct, ::Thrift::Struct_Union
511
+ COLUMN_OR_SUPERCOLUMN = 1
512
+ DELETION = 2
513
+
514
+ FIELDS = {
515
+ COLUMN_OR_SUPERCOLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column_or_supercolumn', :class => CassandraThrift::ColumnOrSuperColumn, :optional => true},
516
+ DELETION => {:type => ::Thrift::Types::STRUCT, :name => 'deletion', :class => CassandraThrift::Deletion, :optional => true}
517
+ }
518
+
519
+ def struct_fields; FIELDS; end
520
+
521
+ def validate
522
+ end
523
+
524
+ ::Thrift::Struct.generate_accessors self
525
+ end
526
+
527
+ class TokenRange
528
+ include ::Thrift::Struct, ::Thrift::Struct_Union
529
+ START_TOKEN = 1
530
+ END_TOKEN = 2
531
+ ENDPOINTS = 3
532
+
533
+ FIELDS = {
534
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
535
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
536
+ ENDPOINTS => {:type => ::Thrift::Types::LIST, :name => 'endpoints', :element => {:type => ::Thrift::Types::STRING}}
537
+ }
538
+
539
+ def struct_fields; FIELDS; end
540
+
541
+ def validate
542
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
543
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
544
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field endpoints is unset!') unless @endpoints
545
+ end
546
+
547
+ ::Thrift::Struct.generate_accessors self
548
+ end
549
+
550
+ # Authentication requests can contain any data, dependent on the IAuthenticator used
551
+ class AuthenticationRequest
552
+ include ::Thrift::Struct, ::Thrift::Struct_Union
553
+ CREDENTIALS = 1
554
+
555
+ FIELDS = {
556
+ CREDENTIALS => {:type => ::Thrift::Types::MAP, :name => 'credentials', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
557
+ }
558
+
559
+ def struct_fields; FIELDS; end
560
+
561
+ def validate
562
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field credentials is unset!') unless @credentials
563
+ end
564
+
565
+ ::Thrift::Struct.generate_accessors self
566
+ end
567
+
568
+ class ColumnDef
569
+ include ::Thrift::Struct, ::Thrift::Struct_Union
570
+ NAME = 1
571
+ VALIDATION_CLASS = 2
572
+ INDEX_TYPE = 3
573
+ INDEX_NAME = 4
574
+
575
+ FIELDS = {
576
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
577
+ VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'validation_class'},
578
+ INDEX_TYPE => {:type => ::Thrift::Types::I32, :name => 'index_type', :optional => true, :enum_class => CassandraThrift::IndexType},
579
+ INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name', :optional => true}
580
+ }
581
+
582
+ def struct_fields; FIELDS; end
583
+
584
+ def validate
585
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
586
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field validation_class is unset!') unless @validation_class
587
+ unless @index_type.nil? || CassandraThrift::IndexType::VALID_VALUES.include?(@index_type)
588
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field index_type!')
589
+ end
590
+ end
591
+
592
+ ::Thrift::Struct.generate_accessors self
593
+ end
594
+
595
+ class CfDef
596
+ include ::Thrift::Struct, ::Thrift::Struct_Union
597
+ KEYSPACE = 1
598
+ NAME = 2
599
+ COLUMN_TYPE = 3
600
+ COMPARATOR_TYPE = 5
601
+ SUBCOMPARATOR_TYPE = 6
602
+ COMMENT = 8
603
+ ROW_CACHE_SIZE = 9
604
+ KEY_CACHE_SIZE = 11
605
+ READ_REPAIR_CHANCE = 12
606
+ COLUMN_METADATA = 13
607
+ GC_GRACE_SECONDS = 14
608
+ DEFAULT_VALIDATION_CLASS = 15
609
+ ID = 16
610
+ MIN_COMPACTION_THRESHOLD = 17
611
+ MAX_COMPACTION_THRESHOLD = 18
612
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS = 19
613
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS = 20
614
+ MEMTABLE_FLUSH_AFTER_MINS = 21
615
+ MEMTABLE_THROUGHPUT_IN_MB = 22
616
+ MEMTABLE_OPERATIONS_IN_MILLIONS = 23
617
+
618
+ FIELDS = {
619
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
620
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
621
+ COLUMN_TYPE => {:type => ::Thrift::Types::STRING, :name => 'column_type', :default => %q"Standard", :optional => true},
622
+ COMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'comparator_type', :default => %q"BytesType", :optional => true},
623
+ SUBCOMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'subcomparator_type', :optional => true},
624
+ COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment', :optional => true},
625
+ ROW_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'row_cache_size', :default => 0, :optional => true},
626
+ KEY_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'key_cache_size', :default => 200000, :optional => true},
627
+ READ_REPAIR_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'read_repair_chance', :default => 1, :optional => true},
628
+ COLUMN_METADATA => {:type => ::Thrift::Types::LIST, :name => 'column_metadata', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnDef}, :optional => true},
629
+ GC_GRACE_SECONDS => {:type => ::Thrift::Types::I32, :name => 'gc_grace_seconds', :optional => true},
630
+ DEFAULT_VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'default_validation_class', :optional => true},
631
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
632
+ MIN_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'min_compaction_threshold', :optional => true},
633
+ MAX_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'max_compaction_threshold', :optional => true},
634
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'row_cache_save_period_in_seconds', :optional => true},
635
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'key_cache_save_period_in_seconds', :optional => true},
636
+ MEMTABLE_FLUSH_AFTER_MINS => {:type => ::Thrift::Types::I32, :name => 'memtable_flush_after_mins', :optional => true},
637
+ MEMTABLE_THROUGHPUT_IN_MB => {:type => ::Thrift::Types::I32, :name => 'memtable_throughput_in_mb', :optional => true},
638
+ MEMTABLE_OPERATIONS_IN_MILLIONS => {:type => ::Thrift::Types::DOUBLE, :name => 'memtable_operations_in_millions', :optional => true}
639
+ }
640
+
641
+ def struct_fields; FIELDS; end
642
+
643
+ def validate
644
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
645
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
646
+ end
647
+
648
+ ::Thrift::Struct.generate_accessors self
649
+ end
650
+
651
+ class KsDef
652
+ include ::Thrift::Struct, ::Thrift::Struct_Union
653
+ NAME = 1
654
+ STRATEGY_CLASS = 2
655
+ STRATEGY_OPTIONS = 3
656
+ REPLICATION_FACTOR = 4
657
+ CF_DEFS = 5
658
+
659
+ FIELDS = {
660
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
661
+ STRATEGY_CLASS => {:type => ::Thrift::Types::STRING, :name => 'strategy_class'},
662
+ STRATEGY_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'strategy_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
663
+ REPLICATION_FACTOR => {:type => ::Thrift::Types::I32, :name => 'replication_factor'},
664
+ CF_DEFS => {:type => ::Thrift::Types::LIST, :name => 'cf_defs', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::CfDef}}
665
+ }
666
+
667
+ def struct_fields; FIELDS; end
668
+
669
+ def validate
670
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
671
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field strategy_class is unset!') unless @strategy_class
672
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field replication_factor is unset!') unless @replication_factor
673
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cf_defs is unset!') unless @cf_defs
674
+ end
675
+
676
+ ::Thrift::Struct.generate_accessors self
677
+ end
678
+
679
+ end