00001
00006 #ifndef cassandra_TYPES_H
00007 #define cassandra_TYPES_H
00008
00009 #include <Thrift.h>
00010 #include <TApplicationException.h>
00011 #include <protocol/TProtocol.h>
00012 #include <transport/TTransport.h>
00013
00014
00015
00016 namespace org { namespace apache { namespace cassandra {
00017
00018 struct ConsistencyLevel {
00019 enum type {
00020 ONE = 1,
00021 QUORUM = 2,
00022 LOCAL_QUORUM = 3,
00023 EACH_QUORUM = 4,
00024 ALL = 5,
00025 ANY = 6,
00026 TWO = 7,
00027 THREE = 8
00028 };
00029 };
00030
00031 extern const std::map<int, const char*> _ConsistencyLevel_VALUES_TO_NAMES;
00032
00033 struct IndexOperator {
00034 enum type {
00035 EQ = 0,
00036 GTE = 1,
00037 GT = 2,
00038 LTE = 3,
00039 LT = 4
00040 };
00041 };
00042
00043 extern const std::map<int, const char*> _IndexOperator_VALUES_TO_NAMES;
00044
00045 struct IndexType {
00046 enum type {
00047 KEYS = 0,
00048 CUSTOM = 1
00049 };
00050 };
00051
00052 extern const std::map<int, const char*> _IndexType_VALUES_TO_NAMES;
00053
00054 struct Compression {
00055 enum type {
00056 GZIP = 1,
00057 NONE = 2
00058 };
00059 };
00060
00061 extern const std::map<int, const char*> _Compression_VALUES_TO_NAMES;
00062
00063 struct CqlResultType {
00064 enum type {
00065 ROWS = 1,
00066 VOID = 2,
00067 INT = 3
00068 };
00069 };
00070
00071 extern const std::map<int, const char*> _CqlResultType_VALUES_TO_NAMES;
00072
00073 typedef struct _Column__isset {
00074 _Column__isset() : value(false), timestamp(false), ttl(false) {}
00075 bool value;
00076 bool timestamp;
00077 bool ttl;
00078 } _Column__isset;
00079
00080 class Column {
00081 public:
00082
00083 static const char* ascii_fingerprint;
00084 static const uint8_t binary_fingerprint[16];
00085
00086 Column() : name(""), value(""), timestamp(0), ttl(0) {
00087 }
00088
00089 virtual ~Column() throw() {}
00090
00091 std::string name;
00092 std::string value;
00093 int64_t timestamp;
00094 int32_t ttl;
00095
00096 _Column__isset __isset;
00097
00098 bool operator == (const Column & rhs) const
00099 {
00100 if (!(name == rhs.name))
00101 return false;
00102 if (__isset.value != rhs.__isset.value)
00103 return false;
00104 else if (__isset.value && !(value == rhs.value))
00105 return false;
00106 if (__isset.timestamp != rhs.__isset.timestamp)
00107 return false;
00108 else if (__isset.timestamp && !(timestamp == rhs.timestamp))
00109 return false;
00110 if (__isset.ttl != rhs.__isset.ttl)
00111 return false;
00112 else if (__isset.ttl && !(ttl == rhs.ttl))
00113 return false;
00114 return true;
00115 }
00116 bool operator != (const Column &rhs) const {
00117 return !(*this == rhs);
00118 }
00119
00120 bool operator < (const Column & ) const;
00121
00122 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00123 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00124
00125 };
00126
00127
00128 class SuperColumn {
00129 public:
00130
00131 static const char* ascii_fingerprint;
00132 static const uint8_t binary_fingerprint[16];
00133
00134 SuperColumn() : name("") {
00135 }
00136
00137 virtual ~SuperColumn() throw() {}
00138
00139 std::string name;
00140 std::vector<Column> columns;
00141
00142 bool operator == (const SuperColumn & rhs) const
00143 {
00144 if (!(name == rhs.name))
00145 return false;
00146 if (!(columns == rhs.columns))
00147 return false;
00148 return true;
00149 }
00150 bool operator != (const SuperColumn &rhs) const {
00151 return !(*this == rhs);
00152 }
00153
00154 bool operator < (const SuperColumn & ) const;
00155
00156 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00157 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00158
00159 };
00160
00161
00162 class CounterColumn {
00163 public:
00164
00165 static const char* ascii_fingerprint;
00166 static const uint8_t binary_fingerprint[16];
00167
00168 CounterColumn() : name(""), value(0) {
00169 }
00170
00171 virtual ~CounterColumn() throw() {}
00172
00173 std::string name;
00174 int64_t value;
00175
00176 bool operator == (const CounterColumn & rhs) const
00177 {
00178 if (!(name == rhs.name))
00179 return false;
00180 if (!(value == rhs.value))
00181 return false;
00182 return true;
00183 }
00184 bool operator != (const CounterColumn &rhs) const {
00185 return !(*this == rhs);
00186 }
00187
00188 bool operator < (const CounterColumn & ) const;
00189
00190 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00191 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00192
00193 };
00194
00195
00196 class CounterSuperColumn {
00197 public:
00198
00199 static const char* ascii_fingerprint;
00200 static const uint8_t binary_fingerprint[16];
00201
00202 CounterSuperColumn() : name("") {
00203 }
00204
00205 virtual ~CounterSuperColumn() throw() {}
00206
00207 std::string name;
00208 std::vector<CounterColumn> columns;
00209
00210 bool operator == (const CounterSuperColumn & rhs) const
00211 {
00212 if (!(name == rhs.name))
00213 return false;
00214 if (!(columns == rhs.columns))
00215 return false;
00216 return true;
00217 }
00218 bool operator != (const CounterSuperColumn &rhs) const {
00219 return !(*this == rhs);
00220 }
00221
00222 bool operator < (const CounterSuperColumn & ) const;
00223
00224 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00225 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00226
00227 };
00228
00229 typedef struct _ColumnOrSuperColumn__isset {
00230 _ColumnOrSuperColumn__isset() : column(false), super_column(false), counter_column(false), counter_super_column(false) {}
00231 bool column;
00232 bool super_column;
00233 bool counter_column;
00234 bool counter_super_column;
00235 } _ColumnOrSuperColumn__isset;
00236
00237 class ColumnOrSuperColumn {
00238 public:
00239
00240 static const char* ascii_fingerprint;
00241 static const uint8_t binary_fingerprint[16];
00242
00243 ColumnOrSuperColumn() {
00244 }
00245
00246 virtual ~ColumnOrSuperColumn() throw() {}
00247
00248 Column column;
00249 SuperColumn super_column;
00250 CounterColumn counter_column;
00251 CounterSuperColumn counter_super_column;
00252
00253 _ColumnOrSuperColumn__isset __isset;
00254
00255 bool operator == (const ColumnOrSuperColumn & rhs) const
00256 {
00257 if (__isset.column != rhs.__isset.column)
00258 return false;
00259 else if (__isset.column && !(column == rhs.column))
00260 return false;
00261 if (__isset.super_column != rhs.__isset.super_column)
00262 return false;
00263 else if (__isset.super_column && !(super_column == rhs.super_column))
00264 return false;
00265 if (__isset.counter_column != rhs.__isset.counter_column)
00266 return false;
00267 else if (__isset.counter_column && !(counter_column == rhs.counter_column))
00268 return false;
00269 if (__isset.counter_super_column != rhs.__isset.counter_super_column)
00270 return false;
00271 else if (__isset.counter_super_column && !(counter_super_column == rhs.counter_super_column))
00272 return false;
00273 return true;
00274 }
00275 bool operator != (const ColumnOrSuperColumn &rhs) const {
00276 return !(*this == rhs);
00277 }
00278
00279 bool operator < (const ColumnOrSuperColumn & ) const;
00280
00281 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00282 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00283
00284 };
00285
00286
00287 class NotFoundException : public ::apache::thrift::TException {
00288 public:
00289
00290 static const char* ascii_fingerprint;
00291 static const uint8_t binary_fingerprint[16];
00292
00293 NotFoundException() {
00294 }
00295
00296 virtual ~NotFoundException() throw() {}
00297
00298
00299 bool operator == (const NotFoundException & ) const
00300 {
00301 return true;
00302 }
00303 bool operator != (const NotFoundException &rhs) const {
00304 return !(*this == rhs);
00305 }
00306
00307 bool operator < (const NotFoundException & ) const;
00308
00309 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00310 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00311
00312 };
00313
00314
00315 class InvalidRequestException : public ::apache::thrift::TException {
00316 public:
00317
00318 static const char* ascii_fingerprint;
00319 static const uint8_t binary_fingerprint[16];
00320
00321 InvalidRequestException() : why("") {
00322 }
00323
00324 virtual ~InvalidRequestException() throw() {}
00325
00326 std::string why;
00327
00328 bool operator == (const InvalidRequestException & rhs) const
00329 {
00330 if (!(why == rhs.why))
00331 return false;
00332 return true;
00333 }
00334 bool operator != (const InvalidRequestException &rhs) const {
00335 return !(*this == rhs);
00336 }
00337
00338 bool operator < (const InvalidRequestException & ) const;
00339
00340 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00341 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00342
00343 };
00344
00345
00346 class UnavailableException : public ::apache::thrift::TException {
00347 public:
00348
00349 static const char* ascii_fingerprint;
00350 static const uint8_t binary_fingerprint[16];
00351
00352 UnavailableException() {
00353 }
00354
00355 virtual ~UnavailableException() throw() {}
00356
00357
00358 bool operator == (const UnavailableException & ) const
00359 {
00360 return true;
00361 }
00362 bool operator != (const UnavailableException &rhs) const {
00363 return !(*this == rhs);
00364 }
00365
00366 bool operator < (const UnavailableException & ) const;
00367
00368 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00369 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00370
00371 };
00372
00373
00374 class TimedOutException : public ::apache::thrift::TException {
00375 public:
00376
00377 static const char* ascii_fingerprint;
00378 static const uint8_t binary_fingerprint[16];
00379
00380 TimedOutException() {
00381 }
00382
00383 virtual ~TimedOutException() throw() {}
00384
00385
00386 bool operator == (const TimedOutException & ) const
00387 {
00388 return true;
00389 }
00390 bool operator != (const TimedOutException &rhs) const {
00391 return !(*this == rhs);
00392 }
00393
00394 bool operator < (const TimedOutException & ) const;
00395
00396 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00397 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00398
00399 };
00400
00401
00402 class AuthenticationException : public ::apache::thrift::TException {
00403 public:
00404
00405 static const char* ascii_fingerprint;
00406 static const uint8_t binary_fingerprint[16];
00407
00408 AuthenticationException() : why("") {
00409 }
00410
00411 virtual ~AuthenticationException() throw() {}
00412
00413 std::string why;
00414
00415 bool operator == (const AuthenticationException & rhs) const
00416 {
00417 if (!(why == rhs.why))
00418 return false;
00419 return true;
00420 }
00421 bool operator != (const AuthenticationException &rhs) const {
00422 return !(*this == rhs);
00423 }
00424
00425 bool operator < (const AuthenticationException & ) const;
00426
00427 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00428 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00429
00430 };
00431
00432
00433 class AuthorizationException : public ::apache::thrift::TException {
00434 public:
00435
00436 static const char* ascii_fingerprint;
00437 static const uint8_t binary_fingerprint[16];
00438
00439 AuthorizationException() : why("") {
00440 }
00441
00442 virtual ~AuthorizationException() throw() {}
00443
00444 std::string why;
00445
00446 bool operator == (const AuthorizationException & rhs) const
00447 {
00448 if (!(why == rhs.why))
00449 return false;
00450 return true;
00451 }
00452 bool operator != (const AuthorizationException &rhs) const {
00453 return !(*this == rhs);
00454 }
00455
00456 bool operator < (const AuthorizationException & ) const;
00457
00458 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00459 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00460
00461 };
00462
00463
00464 class SchemaDisagreementException : public ::apache::thrift::TException {
00465 public:
00466
00467 static const char* ascii_fingerprint;
00468 static const uint8_t binary_fingerprint[16];
00469
00470 SchemaDisagreementException() {
00471 }
00472
00473 virtual ~SchemaDisagreementException() throw() {}
00474
00475
00476 bool operator == (const SchemaDisagreementException & ) const
00477 {
00478 return true;
00479 }
00480 bool operator != (const SchemaDisagreementException &rhs) const {
00481 return !(*this == rhs);
00482 }
00483
00484 bool operator < (const SchemaDisagreementException & ) const;
00485
00486 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00487 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00488
00489 };
00490
00491 typedef struct _ColumnParent__isset {
00492 _ColumnParent__isset() : super_column(false) {}
00493 bool super_column;
00494 } _ColumnParent__isset;
00495
00496 class ColumnParent {
00497 public:
00498
00499 static const char* ascii_fingerprint;
00500 static const uint8_t binary_fingerprint[16];
00501
00502 ColumnParent() : column_family(""), super_column("") {
00503 }
00504
00505 virtual ~ColumnParent() throw() {}
00506
00507 std::string column_family;
00508 std::string super_column;
00509
00510 _ColumnParent__isset __isset;
00511
00512 bool operator == (const ColumnParent & rhs) const
00513 {
00514 if (!(column_family == rhs.column_family))
00515 return false;
00516 if (__isset.super_column != rhs.__isset.super_column)
00517 return false;
00518 else if (__isset.super_column && !(super_column == rhs.super_column))
00519 return false;
00520 return true;
00521 }
00522 bool operator != (const ColumnParent &rhs) const {
00523 return !(*this == rhs);
00524 }
00525
00526 bool operator < (const ColumnParent & ) const;
00527
00528 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00529 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00530
00531 };
00532
00533 typedef struct _ColumnPath__isset {
00534 _ColumnPath__isset() : super_column(false), column(false) {}
00535 bool super_column;
00536 bool column;
00537 } _ColumnPath__isset;
00538
00539 class ColumnPath {
00540 public:
00541
00542 static const char* ascii_fingerprint;
00543 static const uint8_t binary_fingerprint[16];
00544
00545 ColumnPath() : column_family(""), super_column(""), column("") {
00546 }
00547
00548 virtual ~ColumnPath() throw() {}
00549
00550 std::string column_family;
00551 std::string super_column;
00552 std::string column;
00553
00554 _ColumnPath__isset __isset;
00555
00556 bool operator == (const ColumnPath & rhs) const
00557 {
00558 if (!(column_family == rhs.column_family))
00559 return false;
00560 if (__isset.super_column != rhs.__isset.super_column)
00561 return false;
00562 else if (__isset.super_column && !(super_column == rhs.super_column))
00563 return false;
00564 if (__isset.column != rhs.__isset.column)
00565 return false;
00566 else if (__isset.column && !(column == rhs.column))
00567 return false;
00568 return true;
00569 }
00570 bool operator != (const ColumnPath &rhs) const {
00571 return !(*this == rhs);
00572 }
00573
00574 bool operator < (const ColumnPath & ) const;
00575
00576 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00577 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00578
00579 };
00580
00581
00582 class SliceRange {
00583 public:
00584
00585 static const char* ascii_fingerprint;
00586 static const uint8_t binary_fingerprint[16];
00587
00588 SliceRange() : start(""), finish(""), reversed(false), count(100) {
00589 }
00590
00591 virtual ~SliceRange() throw() {}
00592
00593 std::string start;
00594 std::string finish;
00595 bool reversed;
00596 int32_t count;
00597
00598 bool operator == (const SliceRange & rhs) const
00599 {
00600 if (!(start == rhs.start))
00601 return false;
00602 if (!(finish == rhs.finish))
00603 return false;
00604 if (!(reversed == rhs.reversed))
00605 return false;
00606 if (!(count == rhs.count))
00607 return false;
00608 return true;
00609 }
00610 bool operator != (const SliceRange &rhs) const {
00611 return !(*this == rhs);
00612 }
00613
00614 bool operator < (const SliceRange & ) const;
00615
00616 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00617 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00618
00619 };
00620
00621 typedef struct _SlicePredicate__isset {
00622 _SlicePredicate__isset() : column_names(false), slice_range(false) {}
00623 bool column_names;
00624 bool slice_range;
00625 } _SlicePredicate__isset;
00626
00627 class SlicePredicate {
00628 public:
00629
00630 static const char* ascii_fingerprint;
00631 static const uint8_t binary_fingerprint[16];
00632
00633 SlicePredicate() {
00634 }
00635
00636 virtual ~SlicePredicate() throw() {}
00637
00638 std::vector<std::string> column_names;
00639 SliceRange slice_range;
00640
00641 _SlicePredicate__isset __isset;
00642
00643 bool operator == (const SlicePredicate & rhs) const
00644 {
00645 if (__isset.column_names != rhs.__isset.column_names)
00646 return false;
00647 else if (__isset.column_names && !(column_names == rhs.column_names))
00648 return false;
00649 if (__isset.slice_range != rhs.__isset.slice_range)
00650 return false;
00651 else if (__isset.slice_range && !(slice_range == rhs.slice_range))
00652 return false;
00653 return true;
00654 }
00655 bool operator != (const SlicePredicate &rhs) const {
00656 return !(*this == rhs);
00657 }
00658
00659 bool operator < (const SlicePredicate & ) const;
00660
00661 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00662 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00663
00664 };
00665
00666
00667 class IndexExpression {
00668 public:
00669
00670 static const char* ascii_fingerprint;
00671 static const uint8_t binary_fingerprint[16];
00672
00673 IndexExpression() : column_name(""), value("") {
00674 }
00675
00676 virtual ~IndexExpression() throw() {}
00677
00678 std::string column_name;
00679 IndexOperator::type op;
00680 std::string value;
00681
00682 bool operator == (const IndexExpression & rhs) const
00683 {
00684 if (!(column_name == rhs.column_name))
00685 return false;
00686 if (!(op == rhs.op))
00687 return false;
00688 if (!(value == rhs.value))
00689 return false;
00690 return true;
00691 }
00692 bool operator != (const IndexExpression &rhs) const {
00693 return !(*this == rhs);
00694 }
00695
00696 bool operator < (const IndexExpression & ) const;
00697
00698 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00699 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00700
00701 };
00702
00703
00704 class IndexClause {
00705 public:
00706
00707 static const char* ascii_fingerprint;
00708 static const uint8_t binary_fingerprint[16];
00709
00710 IndexClause() : start_key(""), count(100) {
00711 }
00712
00713 virtual ~IndexClause() throw() {}
00714
00715 std::vector<IndexExpression> expressions;
00716 std::string start_key;
00717 int32_t count;
00718
00719 bool operator == (const IndexClause & rhs) const
00720 {
00721 if (!(expressions == rhs.expressions))
00722 return false;
00723 if (!(start_key == rhs.start_key))
00724 return false;
00725 if (!(count == rhs.count))
00726 return false;
00727 return true;
00728 }
00729 bool operator != (const IndexClause &rhs) const {
00730 return !(*this == rhs);
00731 }
00732
00733 bool operator < (const IndexClause & ) const;
00734
00735 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00736 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00737
00738 };
00739
00740 typedef struct _KeyRange__isset {
00741 _KeyRange__isset() : start_key(false), end_key(false), start_token(false), end_token(false) {}
00742 bool start_key;
00743 bool end_key;
00744 bool start_token;
00745 bool end_token;
00746 } _KeyRange__isset;
00747
00748 class KeyRange {
00749 public:
00750
00751 static const char* ascii_fingerprint;
00752 static const uint8_t binary_fingerprint[16];
00753
00754 KeyRange() : start_key(""), end_key(""), start_token(""), end_token(""), count(100) {
00755 }
00756
00757 virtual ~KeyRange() throw() {}
00758
00759 std::string start_key;
00760 std::string end_key;
00761 std::string start_token;
00762 std::string end_token;
00763 int32_t count;
00764
00765 _KeyRange__isset __isset;
00766
00767 bool operator == (const KeyRange & rhs) const
00768 {
00769 if (__isset.start_key != rhs.__isset.start_key)
00770 return false;
00771 else if (__isset.start_key && !(start_key == rhs.start_key))
00772 return false;
00773 if (__isset.end_key != rhs.__isset.end_key)
00774 return false;
00775 else if (__isset.end_key && !(end_key == rhs.end_key))
00776 return false;
00777 if (__isset.start_token != rhs.__isset.start_token)
00778 return false;
00779 else if (__isset.start_token && !(start_token == rhs.start_token))
00780 return false;
00781 if (__isset.end_token != rhs.__isset.end_token)
00782 return false;
00783 else if (__isset.end_token && !(end_token == rhs.end_token))
00784 return false;
00785 if (!(count == rhs.count))
00786 return false;
00787 return true;
00788 }
00789 bool operator != (const KeyRange &rhs) const {
00790 return !(*this == rhs);
00791 }
00792
00793 bool operator < (const KeyRange & ) const;
00794
00795 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00796 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00797
00798 };
00799
00800
00801 class KeySlice {
00802 public:
00803
00804 static const char* ascii_fingerprint;
00805 static const uint8_t binary_fingerprint[16];
00806
00807 KeySlice() : key("") {
00808 }
00809
00810 virtual ~KeySlice() throw() {}
00811
00812 std::string key;
00813 std::vector<ColumnOrSuperColumn> columns;
00814
00815 bool operator == (const KeySlice & rhs) const
00816 {
00817 if (!(key == rhs.key))
00818 return false;
00819 if (!(columns == rhs.columns))
00820 return false;
00821 return true;
00822 }
00823 bool operator != (const KeySlice &rhs) const {
00824 return !(*this == rhs);
00825 }
00826
00827 bool operator < (const KeySlice & ) const;
00828
00829 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00830 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00831
00832 };
00833
00834
00835 class KeyCount {
00836 public:
00837
00838 static const char* ascii_fingerprint;
00839 static const uint8_t binary_fingerprint[16];
00840
00841 KeyCount() : key(""), count(0) {
00842 }
00843
00844 virtual ~KeyCount() throw() {}
00845
00846 std::string key;
00847 int32_t count;
00848
00849 bool operator == (const KeyCount & rhs) const
00850 {
00851 if (!(key == rhs.key))
00852 return false;
00853 if (!(count == rhs.count))
00854 return false;
00855 return true;
00856 }
00857 bool operator != (const KeyCount &rhs) const {
00858 return !(*this == rhs);
00859 }
00860
00861 bool operator < (const KeyCount & ) const;
00862
00863 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00864 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00865
00866 };
00867
00868 typedef struct _Deletion__isset {
00869 _Deletion__isset() : timestamp(false), super_column(false), predicate(false) {}
00870 bool timestamp;
00871 bool super_column;
00872 bool predicate;
00873 } _Deletion__isset;
00874
00875 class Deletion {
00876 public:
00877
00878 static const char* ascii_fingerprint;
00879 static const uint8_t binary_fingerprint[16];
00880
00881 Deletion() : timestamp(0), super_column("") {
00882 }
00883
00884 virtual ~Deletion() throw() {}
00885
00886 int64_t timestamp;
00887 std::string super_column;
00888 SlicePredicate predicate;
00889
00890 _Deletion__isset __isset;
00891
00892 bool operator == (const Deletion & rhs) const
00893 {
00894 if (__isset.timestamp != rhs.__isset.timestamp)
00895 return false;
00896 else if (__isset.timestamp && !(timestamp == rhs.timestamp))
00897 return false;
00898 if (__isset.super_column != rhs.__isset.super_column)
00899 return false;
00900 else if (__isset.super_column && !(super_column == rhs.super_column))
00901 return false;
00902 if (__isset.predicate != rhs.__isset.predicate)
00903 return false;
00904 else if (__isset.predicate && !(predicate == rhs.predicate))
00905 return false;
00906 return true;
00907 }
00908 bool operator != (const Deletion &rhs) const {
00909 return !(*this == rhs);
00910 }
00911
00912 bool operator < (const Deletion & ) const;
00913
00914 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00915 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00916
00917 };
00918
00919 typedef struct _Mutation__isset {
00920 _Mutation__isset() : column_or_supercolumn(false), deletion(false) {}
00921 bool column_or_supercolumn;
00922 bool deletion;
00923 } _Mutation__isset;
00924
00925 class Mutation {
00926 public:
00927
00928 static const char* ascii_fingerprint;
00929 static const uint8_t binary_fingerprint[16];
00930
00931 Mutation() {
00932 }
00933
00934 virtual ~Mutation() throw() {}
00935
00936 ColumnOrSuperColumn column_or_supercolumn;
00937 Deletion deletion;
00938
00939 _Mutation__isset __isset;
00940
00941 bool operator == (const Mutation & rhs) const
00942 {
00943 if (__isset.column_or_supercolumn != rhs.__isset.column_or_supercolumn)
00944 return false;
00945 else if (__isset.column_or_supercolumn && !(column_or_supercolumn == rhs.column_or_supercolumn))
00946 return false;
00947 if (__isset.deletion != rhs.__isset.deletion)
00948 return false;
00949 else if (__isset.deletion && !(deletion == rhs.deletion))
00950 return false;
00951 return true;
00952 }
00953 bool operator != (const Mutation &rhs) const {
00954 return !(*this == rhs);
00955 }
00956
00957 bool operator < (const Mutation & ) const;
00958
00959 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00960 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00961
00962 };
00963
00964 typedef struct _EndpointDetails__isset {
00965 _EndpointDetails__isset() : host(false), datacenter(false) {}
00966 bool host;
00967 bool datacenter;
00968 } _EndpointDetails__isset;
00969
00970 class EndpointDetails {
00971 public:
00972
00973 static const char* ascii_fingerprint;
00974 static const uint8_t binary_fingerprint[16];
00975
00976 EndpointDetails() : host(""), datacenter("") {
00977 }
00978
00979 virtual ~EndpointDetails() throw() {}
00980
00981 std::string host;
00982 std::string datacenter;
00983
00984 _EndpointDetails__isset __isset;
00985
00986 bool operator == (const EndpointDetails & rhs) const
00987 {
00988 if (!(host == rhs.host))
00989 return false;
00990 if (!(datacenter == rhs.datacenter))
00991 return false;
00992 return true;
00993 }
00994 bool operator != (const EndpointDetails &rhs) const {
00995 return !(*this == rhs);
00996 }
00997
00998 bool operator < (const EndpointDetails & ) const;
00999
01000 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01001 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01002
01003 };
01004
01005 typedef struct _TokenRange__isset {
01006 _TokenRange__isset() : rpc_endpoints(false), endpoint_details(false) {}
01007 bool rpc_endpoints;
01008 bool endpoint_details;
01009 } _TokenRange__isset;
01010
01011 class TokenRange {
01012 public:
01013
01014 static const char* ascii_fingerprint;
01015 static const uint8_t binary_fingerprint[16];
01016
01017 TokenRange() : start_token(""), end_token("") {
01018 }
01019
01020 virtual ~TokenRange() throw() {}
01021
01022 std::string start_token;
01023 std::string end_token;
01024 std::vector<std::string> endpoints;
01025 std::vector<std::string> rpc_endpoints;
01026 std::vector<EndpointDetails> endpoint_details;
01027
01028 _TokenRange__isset __isset;
01029
01030 bool operator == (const TokenRange & rhs) const
01031 {
01032 if (!(start_token == rhs.start_token))
01033 return false;
01034 if (!(end_token == rhs.end_token))
01035 return false;
01036 if (!(endpoints == rhs.endpoints))
01037 return false;
01038 if (__isset.rpc_endpoints != rhs.__isset.rpc_endpoints)
01039 return false;
01040 else if (__isset.rpc_endpoints && !(rpc_endpoints == rhs.rpc_endpoints))
01041 return false;
01042 if (__isset.endpoint_details != rhs.__isset.endpoint_details)
01043 return false;
01044 else if (__isset.endpoint_details && !(endpoint_details == rhs.endpoint_details))
01045 return false;
01046 return true;
01047 }
01048 bool operator != (const TokenRange &rhs) const {
01049 return !(*this == rhs);
01050 }
01051
01052 bool operator < (const TokenRange & ) const;
01053
01054 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01055 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01056
01057 };
01058
01059
01060 class AuthenticationRequest {
01061 public:
01062
01063 static const char* ascii_fingerprint;
01064 static const uint8_t binary_fingerprint[16];
01065
01066 AuthenticationRequest() {
01067 }
01068
01069 virtual ~AuthenticationRequest() throw() {}
01070
01071 std::map<std::string, std::string> credentials;
01072
01073 bool operator == (const AuthenticationRequest & rhs) const
01074 {
01075 if (!(credentials == rhs.credentials))
01076 return false;
01077 return true;
01078 }
01079 bool operator != (const AuthenticationRequest &rhs) const {
01080 return !(*this == rhs);
01081 }
01082
01083 bool operator < (const AuthenticationRequest & ) const;
01084
01085 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01086 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01087
01088 };
01089
01090 typedef struct _ColumnDef__isset {
01091 _ColumnDef__isset() : index_type(false), index_name(false), index_options(false) {}
01092 bool index_type;
01093 bool index_name;
01094 bool index_options;
01095 } _ColumnDef__isset;
01096
01097 class ColumnDef {
01098 public:
01099
01100 static const char* ascii_fingerprint;
01101 static const uint8_t binary_fingerprint[16];
01102
01103 ColumnDef() : name(""), validation_class(""), index_name("") {
01104 }
01105
01106 virtual ~ColumnDef() throw() {}
01107
01108 std::string name;
01109 std::string validation_class;
01110 IndexType::type index_type;
01111 std::string index_name;
01112 std::map<std::string, std::string> index_options;
01113
01114 _ColumnDef__isset __isset;
01115
01116 bool operator == (const ColumnDef & rhs) const
01117 {
01118 if (!(name == rhs.name))
01119 return false;
01120 if (!(validation_class == rhs.validation_class))
01121 return false;
01122 if (__isset.index_type != rhs.__isset.index_type)
01123 return false;
01124 else if (__isset.index_type && !(index_type == rhs.index_type))
01125 return false;
01126 if (__isset.index_name != rhs.__isset.index_name)
01127 return false;
01128 else if (__isset.index_name && !(index_name == rhs.index_name))
01129 return false;
01130 if (__isset.index_options != rhs.__isset.index_options)
01131 return false;
01132 else if (__isset.index_options && !(index_options == rhs.index_options))
01133 return false;
01134 return true;
01135 }
01136 bool operator != (const ColumnDef &rhs) const {
01137 return !(*this == rhs);
01138 }
01139
01140 bool operator < (const ColumnDef & ) const;
01141
01142 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01143 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01144
01145 };
01146
01147 typedef struct _CfDef__isset {
01148 _CfDef__isset() : column_type(false), comparator_type(false), subcomparator_type(false), comment(false), row_cache_size(false), key_cache_size(false), read_repair_chance(false), column_metadata(false), gc_grace_seconds(false), default_validation_class(false), id(false), min_compaction_threshold(false), max_compaction_threshold(false), row_cache_save_period_in_seconds(false), key_cache_save_period_in_seconds(false), replicate_on_write(false), merge_shards_chance(false), key_validation_class(false), row_cache_provider(false), key_alias(false), compaction_strategy(false), compaction_strategy_options(false), row_cache_keys_to_save(false), compression_options(false) {}
01149 bool column_type;
01150 bool comparator_type;
01151 bool subcomparator_type;
01152 bool comment;
01153 bool row_cache_size;
01154 bool key_cache_size;
01155 bool read_repair_chance;
01156 bool column_metadata;
01157 bool gc_grace_seconds;
01158 bool default_validation_class;
01159 bool id;
01160 bool min_compaction_threshold;
01161 bool max_compaction_threshold;
01162 bool row_cache_save_period_in_seconds;
01163 bool key_cache_save_period_in_seconds;
01164 bool replicate_on_write;
01165 bool merge_shards_chance;
01166 bool key_validation_class;
01167 bool row_cache_provider;
01168 bool key_alias;
01169 bool compaction_strategy;
01170 bool compaction_strategy_options;
01171 bool row_cache_keys_to_save;
01172 bool compression_options;
01173 } _CfDef__isset;
01174
01175 class CfDef {
01176 public:
01177
01178 static const char* ascii_fingerprint;
01179 static const uint8_t binary_fingerprint[16];
01180
01181 CfDef() : keyspace(""), name(""), column_type("Standard"), comparator_type("BytesType"), subcomparator_type(""), comment(""), row_cache_size(0), key_cache_size(200000), read_repair_chance(1), gc_grace_seconds(0), default_validation_class(""), id(0), min_compaction_threshold(0), max_compaction_threshold(0), row_cache_save_period_in_seconds(0), key_cache_save_period_in_seconds(0), replicate_on_write(0), merge_shards_chance(0), key_validation_class(""), row_cache_provider(""), key_alias(""), compaction_strategy(""), row_cache_keys_to_save(0) {
01182 }
01183
01184 virtual ~CfDef() throw() {}
01185
01186 std::string keyspace;
01187 std::string name;
01188 std::string column_type;
01189 std::string comparator_type;
01190 std::string subcomparator_type;
01191 std::string comment;
01192 double row_cache_size;
01193 double key_cache_size;
01194 double read_repair_chance;
01195 std::vector<ColumnDef> column_metadata;
01196 int32_t gc_grace_seconds;
01197 std::string default_validation_class;
01198 int32_t id;
01199 int32_t min_compaction_threshold;
01200 int32_t max_compaction_threshold;
01201 int32_t row_cache_save_period_in_seconds;
01202 int32_t key_cache_save_period_in_seconds;
01203 bool replicate_on_write;
01204 double merge_shards_chance;
01205 std::string key_validation_class;
01206 std::string row_cache_provider;
01207 std::string key_alias;
01208 std::string compaction_strategy;
01209 std::map<std::string, std::string> compaction_strategy_options;
01210 int32_t row_cache_keys_to_save;
01211 std::map<std::string, std::string> compression_options;
01212
01213 _CfDef__isset __isset;
01214
01215 bool operator == (const CfDef & rhs) const
01216 {
01217 if (!(keyspace == rhs.keyspace))
01218 return false;
01219 if (!(name == rhs.name))
01220 return false;
01221 if (__isset.column_type != rhs.__isset.column_type)
01222 return false;
01223 else if (__isset.column_type && !(column_type == rhs.column_type))
01224 return false;
01225 if (__isset.comparator_type != rhs.__isset.comparator_type)
01226 return false;
01227 else if (__isset.comparator_type && !(comparator_type == rhs.comparator_type))
01228 return false;
01229 if (__isset.subcomparator_type != rhs.__isset.subcomparator_type)
01230 return false;
01231 else if (__isset.subcomparator_type && !(subcomparator_type == rhs.subcomparator_type))
01232 return false;
01233 if (__isset.comment != rhs.__isset.comment)
01234 return false;
01235 else if (__isset.comment && !(comment == rhs.comment))
01236 return false;
01237 if (__isset.row_cache_size != rhs.__isset.row_cache_size)
01238 return false;
01239 else if (__isset.row_cache_size && !(row_cache_size == rhs.row_cache_size))
01240 return false;
01241 if (__isset.key_cache_size != rhs.__isset.key_cache_size)
01242 return false;
01243 else if (__isset.key_cache_size && !(key_cache_size == rhs.key_cache_size))
01244 return false;
01245 if (__isset.read_repair_chance != rhs.__isset.read_repair_chance)
01246 return false;
01247 else if (__isset.read_repair_chance && !(read_repair_chance == rhs.read_repair_chance))
01248 return false;
01249 if (__isset.column_metadata != rhs.__isset.column_metadata)
01250 return false;
01251 else if (__isset.column_metadata && !(column_metadata == rhs.column_metadata))
01252 return false;
01253 if (__isset.gc_grace_seconds != rhs.__isset.gc_grace_seconds)
01254 return false;
01255 else if (__isset.gc_grace_seconds && !(gc_grace_seconds == rhs.gc_grace_seconds))
01256 return false;
01257 if (__isset.default_validation_class != rhs.__isset.default_validation_class)
01258 return false;
01259 else if (__isset.default_validation_class && !(default_validation_class == rhs.default_validation_class))
01260 return false;
01261 if (__isset.id != rhs.__isset.id)
01262 return false;
01263 else if (__isset.id && !(id == rhs.id))
01264 return false;
01265 if (__isset.min_compaction_threshold != rhs.__isset.min_compaction_threshold)
01266 return false;
01267 else if (__isset.min_compaction_threshold && !(min_compaction_threshold == rhs.min_compaction_threshold))
01268 return false;
01269 if (__isset.max_compaction_threshold != rhs.__isset.max_compaction_threshold)
01270 return false;
01271 else if (__isset.max_compaction_threshold && !(max_compaction_threshold == rhs.max_compaction_threshold))
01272 return false;
01273 if (__isset.row_cache_save_period_in_seconds != rhs.__isset.row_cache_save_period_in_seconds)
01274 return false;
01275 else if (__isset.row_cache_save_period_in_seconds && !(row_cache_save_period_in_seconds == rhs.row_cache_save_period_in_seconds))
01276 return false;
01277 if (__isset.key_cache_save_period_in_seconds != rhs.__isset.key_cache_save_period_in_seconds)
01278 return false;
01279 else if (__isset.key_cache_save_period_in_seconds && !(key_cache_save_period_in_seconds == rhs.key_cache_save_period_in_seconds))
01280 return false;
01281 if (__isset.replicate_on_write != rhs.__isset.replicate_on_write)
01282 return false;
01283 else if (__isset.replicate_on_write && !(replicate_on_write == rhs.replicate_on_write))
01284 return false;
01285 if (__isset.merge_shards_chance != rhs.__isset.merge_shards_chance)
01286 return false;
01287 else if (__isset.merge_shards_chance && !(merge_shards_chance == rhs.merge_shards_chance))
01288 return false;
01289 if (__isset.key_validation_class != rhs.__isset.key_validation_class)
01290 return false;
01291 else if (__isset.key_validation_class && !(key_validation_class == rhs.key_validation_class))
01292 return false;
01293 if (__isset.row_cache_provider != rhs.__isset.row_cache_provider)
01294 return false;
01295 else if (__isset.row_cache_provider && !(row_cache_provider == rhs.row_cache_provider))
01296 return false;
01297 if (__isset.key_alias != rhs.__isset.key_alias)
01298 return false;
01299 else if (__isset.key_alias && !(key_alias == rhs.key_alias))
01300 return false;
01301 if (__isset.compaction_strategy != rhs.__isset.compaction_strategy)
01302 return false;
01303 else if (__isset.compaction_strategy && !(compaction_strategy == rhs.compaction_strategy))
01304 return false;
01305 if (__isset.compaction_strategy_options != rhs.__isset.compaction_strategy_options)
01306 return false;
01307 else if (__isset.compaction_strategy_options && !(compaction_strategy_options == rhs.compaction_strategy_options))
01308 return false;
01309 if (__isset.row_cache_keys_to_save != rhs.__isset.row_cache_keys_to_save)
01310 return false;
01311 else if (__isset.row_cache_keys_to_save && !(row_cache_keys_to_save == rhs.row_cache_keys_to_save))
01312 return false;
01313 if (__isset.compression_options != rhs.__isset.compression_options)
01314 return false;
01315 else if (__isset.compression_options && !(compression_options == rhs.compression_options))
01316 return false;
01317 return true;
01318 }
01319 bool operator != (const CfDef &rhs) const {
01320 return !(*this == rhs);
01321 }
01322
01323 bool operator < (const CfDef & ) const;
01324
01325 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01326 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01327
01328 };
01329
01330 typedef struct _KsDef__isset {
01331 _KsDef__isset() : strategy_options(false), replication_factor(false), durable_writes(false) {}
01332 bool strategy_options;
01333 bool replication_factor;
01334 bool durable_writes;
01335 } _KsDef__isset;
01336
01337 class KsDef {
01338 public:
01339
01340 static const char* ascii_fingerprint;
01341 static const uint8_t binary_fingerprint[16];
01342
01343 KsDef() : name(""), strategy_class(""), replication_factor(0), durable_writes(true) {
01344 }
01345
01346 virtual ~KsDef() throw() {}
01347
01348 std::string name;
01349 std::string strategy_class;
01350 std::map<std::string, std::string> strategy_options;
01351 int32_t replication_factor;
01352 std::vector<CfDef> cf_defs;
01353 bool durable_writes;
01354
01355 _KsDef__isset __isset;
01356
01357 bool operator == (const KsDef & rhs) const
01358 {
01359 if (!(name == rhs.name))
01360 return false;
01361 if (!(strategy_class == rhs.strategy_class))
01362 return false;
01363 if (__isset.strategy_options != rhs.__isset.strategy_options)
01364 return false;
01365 else if (__isset.strategy_options && !(strategy_options == rhs.strategy_options))
01366 return false;
01367 if (__isset.replication_factor != rhs.__isset.replication_factor)
01368 return false;
01369 else if (__isset.replication_factor && !(replication_factor == rhs.replication_factor))
01370 return false;
01371 if (!(cf_defs == rhs.cf_defs))
01372 return false;
01373 if (__isset.durable_writes != rhs.__isset.durable_writes)
01374 return false;
01375 else if (__isset.durable_writes && !(durable_writes == rhs.durable_writes))
01376 return false;
01377 return true;
01378 }
01379 bool operator != (const KsDef &rhs) const {
01380 return !(*this == rhs);
01381 }
01382
01383 bool operator < (const KsDef & ) const;
01384
01385 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01386 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01387
01388 };
01389
01390
01391 class CqlRow {
01392 public:
01393
01394 static const char* ascii_fingerprint;
01395 static const uint8_t binary_fingerprint[16];
01396
01397 CqlRow() : key("") {
01398 }
01399
01400 virtual ~CqlRow() throw() {}
01401
01402 std::string key;
01403 std::vector<Column> columns;
01404
01405 bool operator == (const CqlRow & rhs) const
01406 {
01407 if (!(key == rhs.key))
01408 return false;
01409 if (!(columns == rhs.columns))
01410 return false;
01411 return true;
01412 }
01413 bool operator != (const CqlRow &rhs) const {
01414 return !(*this == rhs);
01415 }
01416
01417 bool operator < (const CqlRow & ) const;
01418
01419 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01420 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01421
01422 };
01423
01424
01425 class CqlMetadata {
01426 public:
01427
01428 static const char* ascii_fingerprint;
01429 static const uint8_t binary_fingerprint[16];
01430
01431 CqlMetadata() : default_name_type(""), default_value_type("") {
01432 }
01433
01434 virtual ~CqlMetadata() throw() {}
01435
01436 std::map<std::string, std::string> name_types;
01437 std::map<std::string, std::string> value_types;
01438 std::string default_name_type;
01439 std::string default_value_type;
01440
01441 bool operator == (const CqlMetadata & rhs) const
01442 {
01443 if (!(name_types == rhs.name_types))
01444 return false;
01445 if (!(value_types == rhs.value_types))
01446 return false;
01447 if (!(default_name_type == rhs.default_name_type))
01448 return false;
01449 if (!(default_value_type == rhs.default_value_type))
01450 return false;
01451 return true;
01452 }
01453 bool operator != (const CqlMetadata &rhs) const {
01454 return !(*this == rhs);
01455 }
01456
01457 bool operator < (const CqlMetadata & ) const;
01458
01459 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01460 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01461
01462 };
01463
01464 typedef struct _CqlResult__isset {
01465 _CqlResult__isset() : rows(false), num(false), schema(false) {}
01466 bool rows;
01467 bool num;
01468 bool schema;
01469 } _CqlResult__isset;
01470
01471 class CqlResult {
01472 public:
01473
01474 static const char* ascii_fingerprint;
01475 static const uint8_t binary_fingerprint[16];
01476
01477 CqlResult() : num(0) {
01478 }
01479
01480 virtual ~CqlResult() throw() {}
01481
01482 CqlResultType::type type;
01483 std::vector<CqlRow> rows;
01484 int32_t num;
01485 CqlMetadata schema;
01486
01487 _CqlResult__isset __isset;
01488
01489 bool operator == (const CqlResult & rhs) const
01490 {
01491 if (!(type == rhs.type))
01492 return false;
01493 if (__isset.rows != rhs.__isset.rows)
01494 return false;
01495 else if (__isset.rows && !(rows == rhs.rows))
01496 return false;
01497 if (__isset.num != rhs.__isset.num)
01498 return false;
01499 else if (__isset.num && !(num == rhs.num))
01500 return false;
01501 if (__isset.schema != rhs.__isset.schema)
01502 return false;
01503 else if (__isset.schema && !(schema == rhs.schema))
01504 return false;
01505 return true;
01506 }
01507 bool operator != (const CqlResult &rhs) const {
01508 return !(*this == rhs);
01509 }
01510
01511 bool operator < (const CqlResult & ) const;
01512
01513 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
01514 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
01515
01516 };
01517
01518 }}}
01519
01520 #endif