Explorar o código

modules/db_cassandra Added new module DB interface for Cassandra backend

	The module implements a database driver and can be used by other
	modules to perform database operations instead of db_mysql, for
	example. It has some limitations in the conditions on which the
	queries are performed, so it does not suite every application. The
	module has been tested with auth_db and usrloc modules and it is
	very suited for implementing a distributed location service. Read
	more about it in the README file.
Anca Vamanu %!s(int64=13) %!d(string=hai) anos
pai
achega
c0a922014e

+ 11061 - 0
modules/db_cassandra/Cassandra.cpp

@@ -0,0 +1,11061 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "Cassandra.h"
+
+namespace org { namespace apache { namespace cassandra {
+
+uint32_t Cassandra_login_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_auth_request = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->auth_request.read(iprot);
+          isset_auth_request = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_auth_request)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_login_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_login_args");
+  xfer += oprot->writeFieldBegin("auth_request", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->auth_request.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_login_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_login_pargs");
+  xfer += oprot->writeFieldBegin("auth_request", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->auth_request)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_login_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->authnx.read(iprot);
+          this->__isset.authnx = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->authzx.read(iprot);
+          this->__isset.authzx = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_login_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_login_result");
+
+  if (this->__isset.authnx) {
+    xfer += oprot->writeFieldBegin("authnx", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->authnx.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.authzx) {
+    xfer += oprot->writeFieldBegin("authzx", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->authzx.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_login_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->authnx.read(iprot);
+          this->__isset.authnx = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->authzx.read(iprot);
+          this->__isset.authzx = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keyspace = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->keyspace);
+          isset_keyspace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keyspace)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_set_keyspace_args");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->keyspace);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_set_keyspace_pargs");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->keyspace)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_set_keyspace_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_set_keyspace_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_path = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_path.read(iprot);
+          isset_column_path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast131;
+          xfer += iprot->readI32(ecast131);
+          this->consistency_level = (ConsistencyLevel::type)ecast131;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_path)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_get_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->nfe.read(iprot);
+          this->__isset.nfe = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_get_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.nfe) {
+    xfer += oprot->writeFieldBegin("nfe", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->nfe.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 4);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->nfe.read(iprot);
+          this->__isset.nfe = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_parent = false;
+  bool isset_predicate = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          isset_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast132;
+          xfer += iprot->readI32(ecast132);
+          this->consistency_level = (ConsistencyLevel::type)ecast132;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_slice_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_slice_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size133;
+            ::apache::thrift::protocol::TType _etype136;
+            iprot->readListBegin(_etype136, _size133);
+            this->success.resize(_size133);
+            uint32_t _i137;
+            for (_i137 = 0; _i137 < _size133; ++_i137)
+            {
+              xfer += this->success[_i137].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_get_slice_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<ColumnOrSuperColumn> ::const_iterator _iter138;
+      for (_iter138 = this->success.begin(); _iter138 != this->success.end(); ++_iter138)
+      {
+        xfer += (*_iter138).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_slice_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size139;
+            ::apache::thrift::protocol::TType _etype142;
+            iprot->readListBegin(_etype142, _size139);
+            (*(this->success)).resize(_size139);
+            uint32_t _i143;
+            for (_i143 = 0; _i143 < _size139; ++_i143)
+            {
+              xfer += (*(this->success))[_i143].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_parent = false;
+  bool isset_predicate = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          isset_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast144;
+          xfer += iprot->readI32(ecast144);
+          this->consistency_level = (ConsistencyLevel::type)ecast144;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_count_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_count_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_get_count_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0);
+    xfer += oprot->writeI32(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_count_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keys = false;
+  bool isset_column_parent = false;
+  bool isset_predicate = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->keys.clear();
+            uint32_t _size145;
+            ::apache::thrift::protocol::TType _etype148;
+            iprot->readListBegin(_etype148, _size145);
+            this->keys.resize(_size145);
+            uint32_t _i149;
+            for (_i149 = 0; _i149 < _size145; ++_i149)
+            {
+              xfer += iprot->readBinary(this->keys[_i149]);
+            }
+            iprot->readListEnd();
+          }
+          isset_keys = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          isset_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast150;
+          xfer += iprot->readI32(ecast150);
+          this->consistency_level = (ConsistencyLevel::type)ecast150;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keys)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_multiget_slice_args");
+  xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->keys.size());
+    std::vector<std::string> ::const_iterator _iter151;
+    for (_iter151 = this->keys.begin(); _iter151 != this->keys.end(); ++_iter151)
+    {
+      xfer += oprot->writeBinary((*_iter151));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_multiget_slice_pargs");
+  xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->keys)).size());
+    std::vector<std::string> ::const_iterator _iter152;
+    for (_iter152 = (*(this->keys)).begin(); _iter152 != (*(this->keys)).end(); ++_iter152)
+    {
+      xfer += oprot->writeBinary((*_iter152));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->success.clear();
+            uint32_t _size153;
+            ::apache::thrift::protocol::TType _ktype154;
+            ::apache::thrift::protocol::TType _vtype155;
+            iprot->readMapBegin(_ktype154, _vtype155, _size153);
+            uint32_t _i157;
+            for (_i157 = 0; _i157 < _size153; ++_i157)
+            {
+              std::string _key158;
+              xfer += iprot->readBinary(_key158);
+              std::vector<ColumnOrSuperColumn> & _val159 = this->success[_key158];
+              {
+                _val159.clear();
+                uint32_t _size160;
+                ::apache::thrift::protocol::TType _etype163;
+                iprot->readListBegin(_etype163, _size160);
+                _val159.resize(_size160);
+                uint32_t _i164;
+                for (_i164 = 0; _i164 < _size160; ++_i164)
+                {
+                  xfer += _val159[_i164].read(iprot);
+                }
+                iprot->readListEnd();
+              }
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_multiget_slice_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, this->success.size());
+      std::map<std::string, std::vector<ColumnOrSuperColumn> > ::const_iterator _iter165;
+      for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165)
+      {
+        xfer += oprot->writeBinary(_iter165->first);
+        {
+          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter165->second.size());
+          std::vector<ColumnOrSuperColumn> ::const_iterator _iter166;
+          for (_iter166 = _iter165->second.begin(); _iter166 != _iter165->second.end(); ++_iter166)
+          {
+            xfer += (*_iter166).write(oprot);
+          }
+          xfer += oprot->writeListEnd();
+        }
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_slice_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size167;
+            ::apache::thrift::protocol::TType _ktype168;
+            ::apache::thrift::protocol::TType _vtype169;
+            iprot->readMapBegin(_ktype168, _vtype169, _size167);
+            uint32_t _i171;
+            for (_i171 = 0; _i171 < _size167; ++_i171)
+            {
+              std::string _key172;
+              xfer += iprot->readBinary(_key172);
+              std::vector<ColumnOrSuperColumn> & _val173 = (*(this->success))[_key172];
+              {
+                _val173.clear();
+                uint32_t _size174;
+                ::apache::thrift::protocol::TType _etype177;
+                iprot->readListBegin(_etype177, _size174);
+                _val173.resize(_size174);
+                uint32_t _i178;
+                for (_i178 = 0; _i178 < _size174; ++_i178)
+                {
+                  xfer += _val173[_i178].read(iprot);
+                }
+                iprot->readListEnd();
+              }
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keys = false;
+  bool isset_column_parent = false;
+  bool isset_predicate = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->keys.clear();
+            uint32_t _size179;
+            ::apache::thrift::protocol::TType _etype182;
+            iprot->readListBegin(_etype182, _size179);
+            this->keys.resize(_size179);
+            uint32_t _i183;
+            for (_i183 = 0; _i183 < _size179; ++_i183)
+            {
+              xfer += iprot->readBinary(this->keys[_i183]);
+            }
+            iprot->readListEnd();
+          }
+          isset_keys = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          isset_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast184;
+          xfer += iprot->readI32(ecast184);
+          this->consistency_level = (ConsistencyLevel::type)ecast184;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keys)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_multiget_count_args");
+  xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->keys.size());
+    std::vector<std::string> ::const_iterator _iter185;
+    for (_iter185 = this->keys.begin(); _iter185 != this->keys.end(); ++_iter185)
+    {
+      xfer += oprot->writeBinary((*_iter185));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_multiget_count_pargs");
+  xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->keys)).size());
+    std::vector<std::string> ::const_iterator _iter186;
+    for (_iter186 = (*(this->keys)).begin(); _iter186 != (*(this->keys)).end(); ++_iter186)
+    {
+      xfer += oprot->writeBinary((*_iter186));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->success.clear();
+            uint32_t _size187;
+            ::apache::thrift::protocol::TType _ktype188;
+            ::apache::thrift::protocol::TType _vtype189;
+            iprot->readMapBegin(_ktype188, _vtype189, _size187);
+            uint32_t _i191;
+            for (_i191 = 0; _i191 < _size187; ++_i191)
+            {
+              std::string _key192;
+              xfer += iprot->readBinary(_key192);
+              int32_t& _val193 = this->success[_key192];
+              xfer += iprot->readI32(_val193);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_multiget_count_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, this->success.size());
+      std::map<std::string, int32_t> ::const_iterator _iter194;
+      for (_iter194 = this->success.begin(); _iter194 != this->success.end(); ++_iter194)
+      {
+        xfer += oprot->writeBinary(_iter194->first);
+        xfer += oprot->writeI32(_iter194->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_multiget_count_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size195;
+            ::apache::thrift::protocol::TType _ktype196;
+            ::apache::thrift::protocol::TType _vtype197;
+            iprot->readMapBegin(_ktype196, _vtype197, _size195);
+            uint32_t _i199;
+            for (_i199 = 0; _i199 < _size195; ++_i199)
+            {
+              std::string _key200;
+              xfer += iprot->readBinary(_key200);
+              int32_t& _val201 = (*(this->success))[_key200];
+              xfer += iprot->readI32(_val201);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_parent = false;
+  bool isset_predicate = false;
+  bool isset_range = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          isset_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->range.read(iprot);
+          isset_range = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast202;
+          xfer += iprot->readI32(ecast202);
+          this->consistency_level = (ConsistencyLevel::type)ecast202;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_range)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_range_slices_args");
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("range", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->range.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_range_slices_pargs");
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("range", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->range)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size203;
+            ::apache::thrift::protocol::TType _etype206;
+            iprot->readListBegin(_etype206, _size203);
+            this->success.resize(_size203);
+            uint32_t _i207;
+            for (_i207 = 0; _i207 < _size203; ++_i207)
+            {
+              xfer += this->success[_i207].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_get_range_slices_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<KeySlice> ::const_iterator _iter208;
+      for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208)
+      {
+        xfer += (*_iter208).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_range_slices_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size209;
+            ::apache::thrift::protocol::TType _etype212;
+            iprot->readListBegin(_etype212, _size209);
+            (*(this->success)).resize(_size209);
+            uint32_t _i213;
+            for (_i213 = 0; _i213 < _size209; ++_i213)
+            {
+              xfer += (*(this->success))[_i213].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_parent = false;
+  bool isset_index_clause = false;
+  bool isset_column_predicate = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->index_clause.read(iprot);
+          isset_index_clause = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_predicate.read(iprot);
+          isset_column_predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast214;
+          xfer += iprot->readI32(ecast214);
+          this->consistency_level = (ConsistencyLevel::type)ecast214;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_index_clause)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_predicate)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_indexed_slices_args");
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("index_clause", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->index_clause.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->column_predicate.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_get_indexed_slices_pargs");
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("index_clause", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->index_clause)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->column_predicate)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size215;
+            ::apache::thrift::protocol::TType _etype218;
+            iprot->readListBegin(_etype218, _size215);
+            this->success.resize(_size215);
+            uint32_t _i219;
+            for (_i219 = 0; _i219 < _size215; ++_i219)
+            {
+              xfer += this->success[_i219].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_get_indexed_slices_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<KeySlice> ::const_iterator _iter220;
+      for (_iter220 = this->success.begin(); _iter220 != this->success.end(); ++_iter220)
+      {
+        xfer += (*_iter220).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_get_indexed_slices_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size221;
+            ::apache::thrift::protocol::TType _etype224;
+            iprot->readListBegin(_etype224, _size221);
+            (*(this->success)).resize(_size221);
+            uint32_t _i225;
+            for (_i225 = 0; _i225 < _size221; ++_i225)
+            {
+              xfer += (*(this->success))[_i225].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_insert_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_parent = false;
+  bool isset_column = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column.read(iprot);
+          isset_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast226;
+          xfer += iprot->readI32(ecast226);
+          this->consistency_level = (ConsistencyLevel::type)ecast226;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_insert_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_insert_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->column.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_insert_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_insert_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->column)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_insert_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_insert_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_insert_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_insert_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_add_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_parent = false;
+  bool isset_column = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_parent.read(iprot);
+          isset_column_parent = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column.read(iprot);
+          isset_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast227;
+          xfer += iprot->readI32(ecast227);
+          this->consistency_level = (ConsistencyLevel::type)ecast227;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_parent)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_add_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_add_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_parent.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += this->column.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_add_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_add_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_parent", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_parent)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRUCT, 3);
+  xfer += (*(this->column)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_add_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_add_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_add_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_add_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_remove_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_column_path = false;
+  bool isset_timestamp = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_path.read(iprot);
+          isset_column_path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->timestamp);
+          isset_timestamp = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast228;
+          xfer += iprot->readI32(ecast228);
+          this->consistency_level = (ConsistencyLevel::type)ecast228;
+          this->__isset.consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_column_path)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_timestamp)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_remove_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_remove_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->column_path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->timestamp);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_remove_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("column_path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->column_path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64((*(this->timestamp)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_remove_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_remove_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_path = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          isset_path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast229;
+          xfer += iprot->readI32(ecast229);
+          this->consistency_level = (ConsistencyLevel::type)ecast229;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_path)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_remove_counter_args");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_remove_counter_pargs");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->key)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("path", ::apache::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_remove_counter_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_remove_counter_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_mutation_map = false;
+  bool isset_consistency_level = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->mutation_map.clear();
+            uint32_t _size230;
+            ::apache::thrift::protocol::TType _ktype231;
+            ::apache::thrift::protocol::TType _vtype232;
+            iprot->readMapBegin(_ktype231, _vtype232, _size230);
+            uint32_t _i234;
+            for (_i234 = 0; _i234 < _size230; ++_i234)
+            {
+              std::string _key235;
+              xfer += iprot->readBinary(_key235);
+              std::map<std::string, std::vector<Mutation> > & _val236 = this->mutation_map[_key235];
+              {
+                _val236.clear();
+                uint32_t _size237;
+                ::apache::thrift::protocol::TType _ktype238;
+                ::apache::thrift::protocol::TType _vtype239;
+                iprot->readMapBegin(_ktype238, _vtype239, _size237);
+                uint32_t _i241;
+                for (_i241 = 0; _i241 < _size237; ++_i241)
+                {
+                  std::string _key242;
+                  xfer += iprot->readString(_key242);
+                  std::vector<Mutation> & _val243 = _val236[_key242];
+                  {
+                    _val243.clear();
+                    uint32_t _size244;
+                    ::apache::thrift::protocol::TType _etype247;
+                    iprot->readListBegin(_etype247, _size244);
+                    _val243.resize(_size244);
+                    uint32_t _i248;
+                    for (_i248 = 0; _i248 < _size244; ++_i248)
+                    {
+                      xfer += _val243[_i248].read(iprot);
+                    }
+                    iprot->readListEnd();
+                  }
+                }
+                iprot->readMapEnd();
+              }
+            }
+            iprot->readMapEnd();
+          }
+          isset_mutation_map = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast249;
+          xfer += iprot->readI32(ecast249);
+          this->consistency_level = (ConsistencyLevel::type)ecast249;
+          isset_consistency_level = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_mutation_map)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_consistency_level)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_batch_mutate_args");
+  xfer += oprot->writeFieldBegin("mutation_map", ::apache::thrift::protocol::T_MAP, 1);
+  {
+    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, this->mutation_map.size());
+    std::map<std::string, std::map<std::string, std::vector<Mutation> > > ::const_iterator _iter250;
+    for (_iter250 = this->mutation_map.begin(); _iter250 != this->mutation_map.end(); ++_iter250)
+    {
+      xfer += oprot->writeBinary(_iter250->first);
+      {
+        xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, _iter250->second.size());
+        std::map<std::string, std::vector<Mutation> > ::const_iterator _iter251;
+        for (_iter251 = _iter250->second.begin(); _iter251 != _iter250->second.end(); ++_iter251)
+        {
+          xfer += oprot->writeString(_iter251->first);
+          {
+            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter251->second.size());
+            std::vector<Mutation> ::const_iterator _iter252;
+            for (_iter252 = _iter251->second.begin(); _iter252 != _iter251->second.end(); ++_iter252)
+            {
+              xfer += (*_iter252).write(oprot);
+            }
+            xfer += oprot->writeListEnd();
+          }
+        }
+        xfer += oprot->writeMapEnd();
+      }
+    }
+    xfer += oprot->writeMapEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((int32_t)this->consistency_level);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_batch_mutate_pargs");
+  xfer += oprot->writeFieldBegin("mutation_map", ::apache::thrift::protocol::T_MAP, 1);
+  {
+    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, (*(this->mutation_map)).size());
+    std::map<std::string, std::map<std::string, std::vector<Mutation> > > ::const_iterator _iter253;
+    for (_iter253 = (*(this->mutation_map)).begin(); _iter253 != (*(this->mutation_map)).end(); ++_iter253)
+    {
+      xfer += oprot->writeBinary(_iter253->first);
+      {
+        xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, _iter253->second.size());
+        std::map<std::string, std::vector<Mutation> > ::const_iterator _iter254;
+        for (_iter254 = _iter253->second.begin(); _iter254 != _iter253->second.end(); ++_iter254)
+        {
+          xfer += oprot->writeString(_iter254->first);
+          {
+            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter254->second.size());
+            std::vector<Mutation> ::const_iterator _iter255;
+            for (_iter255 = _iter254->second.begin(); _iter255 != _iter254->second.end(); ++_iter255)
+            {
+              xfer += (*_iter255).write(oprot);
+            }
+            xfer += oprot->writeListEnd();
+          }
+        }
+        xfer += oprot->writeMapEnd();
+      }
+    }
+    xfer += oprot->writeMapEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("consistency_level", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((int32_t)(*(this->consistency_level)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_batch_mutate_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_batch_mutate_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_cfname = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->cfname);
+          isset_cfname = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_cfname)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_truncate_args");
+  xfer += oprot->writeFieldBegin("cfname", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->cfname);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_truncate_pargs");
+  xfer += oprot->writeFieldBegin("cfname", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->cfname)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_truncate_result");
+
+  if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_truncate_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_schema_versions_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_schema_versions_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->success.clear();
+            uint32_t _size256;
+            ::apache::thrift::protocol::TType _ktype257;
+            ::apache::thrift::protocol::TType _vtype258;
+            iprot->readMapBegin(_ktype257, _vtype258, _size256);
+            uint32_t _i260;
+            for (_i260 = 0; _i260 < _size256; ++_i260)
+            {
+              std::string _key261;
+              xfer += iprot->readString(_key261);
+              std::vector<std::string> & _val262 = this->success[_key261];
+              {
+                _val262.clear();
+                uint32_t _size263;
+                ::apache::thrift::protocol::TType _etype266;
+                iprot->readListBegin(_etype266, _size263);
+                _val262.resize(_size263);
+                uint32_t _i267;
+                for (_i267 = 0; _i267 < _size263; ++_i267)
+                {
+                  xfer += iprot->readString(_val262[_i267]);
+                }
+                iprot->readListEnd();
+              }
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_schema_versions_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, this->success.size());
+      std::map<std::string, std::vector<std::string> > ::const_iterator _iter268;
+      for (_iter268 = this->success.begin(); _iter268 != this->success.end(); ++_iter268)
+      {
+        xfer += oprot->writeString(_iter268->first);
+        {
+          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, _iter268->second.size());
+          std::vector<std::string> ::const_iterator _iter269;
+          for (_iter269 = _iter268->second.begin(); _iter269 != _iter268->second.end(); ++_iter269)
+          {
+            xfer += oprot->writeString((*_iter269));
+          }
+          xfer += oprot->writeListEnd();
+        }
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_schema_versions_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size270;
+            ::apache::thrift::protocol::TType _ktype271;
+            ::apache::thrift::protocol::TType _vtype272;
+            iprot->readMapBegin(_ktype271, _vtype272, _size270);
+            uint32_t _i274;
+            for (_i274 = 0; _i274 < _size270; ++_i274)
+            {
+              std::string _key275;
+              xfer += iprot->readString(_key275);
+              std::vector<std::string> & _val276 = (*(this->success))[_key275];
+              {
+                _val276.clear();
+                uint32_t _size277;
+                ::apache::thrift::protocol::TType _etype280;
+                iprot->readListBegin(_etype280, _size277);
+                _val276.resize(_size277);
+                uint32_t _i281;
+                for (_i281 = 0; _i281 < _size277; ++_i281)
+                {
+                  xfer += iprot->readString(_val276[_i281]);
+                }
+                iprot->readListEnd();
+              }
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspaces_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspaces_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size282;
+            ::apache::thrift::protocol::TType _etype285;
+            iprot->readListBegin(_etype285, _size282);
+            this->success.resize(_size282);
+            uint32_t _i286;
+            for (_i286 = 0; _i286 < _size282; ++_i286)
+            {
+              xfer += this->success[_i286].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspaces_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<KsDef> ::const_iterator _iter287;
+      for (_iter287 = this->success.begin(); _iter287 != this->success.end(); ++_iter287)
+      {
+        xfer += (*_iter287).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspaces_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size288;
+            ::apache::thrift::protocol::TType _etype291;
+            iprot->readListBegin(_etype291, _size288);
+            (*(this->success)).resize(_size288);
+            uint32_t _i292;
+            for (_i292 = 0; _i292 < _size288; ++_i292)
+            {
+              xfer += (*(this->success))[_i292].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_cluster_name_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_cluster_name_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_cluster_name_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_cluster_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_version_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_version_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_version_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_version_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keyspace = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->keyspace);
+          isset_keyspace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keyspace)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_ring_args");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->keyspace);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_ring_pargs");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->keyspace)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size293;
+            ::apache::thrift::protocol::TType _etype296;
+            iprot->readListBegin(_etype296, _size293);
+            this->success.resize(_size293);
+            uint32_t _i297;
+            for (_i297 = 0; _i297 < _size293; ++_i297)
+            {
+              xfer += this->success[_i297].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_ring_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<TokenRange> ::const_iterator _iter298;
+      for (_iter298 = this->success.begin(); _iter298 != this->success.end(); ++_iter298)
+      {
+        xfer += (*_iter298).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_ring_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size299;
+            ::apache::thrift::protocol::TType _etype302;
+            iprot->readListBegin(_etype302, _size299);
+            (*(this->success)).resize(_size299);
+            uint32_t _i303;
+            for (_i303 = 0; _i303 < _size299; ++_i303)
+            {
+              xfer += (*(this->success))[_i303].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_partitioner_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_partitioner_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_partitioner_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_partitioner_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_snitch_args");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_snitch_pargs");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_snitch_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_snitch_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keyspace = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->keyspace);
+          isset_keyspace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keyspace)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspace_args");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->keyspace);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspace_pargs");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->keyspace)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->nfe.read(iprot);
+          this->__isset.nfe = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_keyspace_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.nfe) {
+    xfer += oprot->writeFieldBegin("nfe", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->nfe.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_keyspace_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->nfe.read(iprot);
+          this->__isset.nfe = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_cfName = false;
+  bool isset_start_token = false;
+  bool isset_end_token = false;
+  bool isset_keys_per_split = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->cfName);
+          isset_cfName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->start_token);
+          isset_start_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->end_token);
+          isset_end_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->keys_per_split);
+          isset_keys_per_split = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_cfName)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_start_token)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_end_token)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_keys_per_split)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_splits_args");
+  xfer += oprot->writeFieldBegin("cfName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->cfName);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("start_token", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->start_token);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("end_token", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->end_token);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("keys_per_split", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32(this->keys_per_split);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_describe_splits_pargs");
+  xfer += oprot->writeFieldBegin("cfName", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->cfName)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("start_token", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->start_token)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("end_token", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString((*(this->end_token)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("keys_per_split", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((*(this->keys_per_split)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size304;
+            ::apache::thrift::protocol::TType _etype307;
+            iprot->readListBegin(_etype307, _size304);
+            this->success.resize(_size304);
+            uint32_t _i308;
+            for (_i308 = 0; _i308 < _size304; ++_i308)
+            {
+              xfer += iprot->readString(this->success[_i308]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_describe_splits_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size());
+      std::vector<std::string> ::const_iterator _iter309;
+      for (_iter309 = this->success.begin(); _iter309 != this->success.end(); ++_iter309)
+      {
+        xfer += oprot->writeString((*_iter309));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_describe_splits_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size310;
+            ::apache::thrift::protocol::TType _etype313;
+            iprot->readListBegin(_etype313, _size310);
+            (*(this->success)).resize(_size310);
+            uint32_t _i314;
+            for (_i314 = 0; _i314 < _size310; ++_i314)
+            {
+              xfer += iprot->readString((*(this->success))[_i314]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_cf_def = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->cf_def.read(iprot);
+          isset_cf_def = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_cf_def)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_add_column_family_args");
+  xfer += oprot->writeFieldBegin("cf_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->cf_def.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_add_column_family_pargs");
+  xfer += oprot->writeFieldBegin("cf_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->cf_def)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_add_column_family_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_column_family_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_family = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->column_family);
+          isset_column_family = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_family)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_column_family_args");
+  xfer += oprot->writeFieldBegin("column_family", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->column_family);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_column_family_pargs");
+  xfer += oprot->writeFieldBegin("column_family", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->column_family)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_column_family_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_column_family_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_ks_def = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ks_def.read(iprot);
+          isset_ks_def = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_ks_def)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_add_keyspace_args");
+  xfer += oprot->writeFieldBegin("ks_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->ks_def.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_add_keyspace_pargs");
+  xfer += oprot->writeFieldBegin("ks_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->ks_def)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_add_keyspace_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_add_keyspace_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keyspace = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->keyspace);
+          isset_keyspace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keyspace)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_keyspace_args");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->keyspace);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_keyspace_pargs");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->keyspace)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_drop_keyspace_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_drop_keyspace_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_ks_def = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ks_def.read(iprot);
+          isset_ks_def = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_ks_def)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_update_keyspace_args");
+  xfer += oprot->writeFieldBegin("ks_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->ks_def.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_update_keyspace_pargs");
+  xfer += oprot->writeFieldBegin("ks_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->ks_def)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_update_keyspace_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_keyspace_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_cf_def = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->cf_def.read(iprot);
+          isset_cf_def = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_cf_def)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_update_column_family_args");
+  xfer += oprot->writeFieldBegin("cf_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->cf_def.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_system_update_column_family_pargs");
+  xfer += oprot->writeFieldBegin("cf_def", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->cf_def)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_system_update_column_family_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_system_update_column_family_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_query = false;
+  bool isset_compression = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->query);
+          isset_query = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast315;
+          xfer += iprot->readI32(ecast315);
+          this->compression = (Compression::type)ecast315;
+          isset_compression = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_query)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_compression)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_execute_cql_query_args");
+  xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->query);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("compression", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((int32_t)this->compression);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Cassandra_execute_cql_query_pargs");
+  xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary((*(this->query)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("compression", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((int32_t)(*(this->compression)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("Cassandra_execute_cql_query_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ire) {
+    xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ire.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ue) {
+    xfer += oprot->writeFieldBegin("ue", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->ue.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.te) {
+    xfer += oprot->writeFieldBegin("te", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->te.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.sde) {
+    xfer += oprot->writeFieldBegin("sde", ::apache::thrift::protocol::T_STRUCT, 4);
+    xfer += this->sde.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t Cassandra_execute_cql_query_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ire.read(iprot);
+          this->__isset.ire = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->ue.read(iprot);
+          this->__isset.ue = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->te.read(iprot);
+          this->__isset.te = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->sde.read(iprot);
+          this->__isset.sde = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+void CassandraClient::login(const AuthenticationRequest& auth_request)
+{
+  send_login(auth_request);
+  recv_login();
+}
+
+void CassandraClient::send_login(const AuthenticationRequest& auth_request)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("login", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_login_pargs args;
+  args.auth_request = &auth_request;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_login()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("login") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_login_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.authnx) {
+    throw result.authnx;
+  }
+  if (result.__isset.authzx) {
+    throw result.authzx;
+  }
+  return;
+}
+
+void CassandraClient::set_keyspace(const std::string& keyspace)
+{
+  send_set_keyspace(keyspace);
+  recv_set_keyspace();
+}
+
+void CassandraClient::send_set_keyspace(const std::string& keyspace)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("set_keyspace", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_set_keyspace_pargs args;
+  args.keyspace = &keyspace;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_set_keyspace()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("set_keyspace") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_set_keyspace_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  return;
+}
+
+void CassandraClient::get(ColumnOrSuperColumn& _return, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level)
+{
+  send_get(key, column_path, consistency_level);
+  recv_get(_return);
+}
+
+void CassandraClient::send_get(const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("get", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_get_pargs args;
+  args.key = &key;
+  args.column_path = &column_path;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_get(ColumnOrSuperColumn& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("get") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_get_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.nfe) {
+    throw result.nfe;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get failed: unknown result");
+}
+
+void CassandraClient::get_slice(std::vector<ColumnOrSuperColumn> & _return, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  send_get_slice(key, column_parent, predicate, consistency_level);
+  recv_get_slice(_return);
+}
+
+void CassandraClient::send_get_slice(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("get_slice", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_get_slice_pargs args;
+  args.key = &key;
+  args.column_parent = &column_parent;
+  args.predicate = &predicate;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_get_slice(std::vector<ColumnOrSuperColumn> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("get_slice") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_get_slice_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_slice failed: unknown result");
+}
+
+int32_t CassandraClient::get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  send_get_count(key, column_parent, predicate, consistency_level);
+  return recv_get_count();
+}
+
+void CassandraClient::send_get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("get_count", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_get_count_pargs args;
+  args.key = &key;
+  args.column_parent = &column_parent;
+  args.predicate = &predicate;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+int32_t CassandraClient::recv_get_count()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("get_count") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  int32_t _return;
+  Cassandra_get_count_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_count failed: unknown result");
+}
+
+void CassandraClient::multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  send_multiget_slice(keys, column_parent, predicate, consistency_level);
+  recv_multiget_slice(_return);
+}
+
+void CassandraClient::send_multiget_slice(const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("multiget_slice", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_multiget_slice_pargs args;
+  args.keys = &keys;
+  args.column_parent = &column_parent;
+  args.predicate = &predicate;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("multiget_slice") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_multiget_slice_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "multiget_slice failed: unknown result");
+}
+
+void CassandraClient::multiget_count(std::map<std::string, int32_t> & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  send_multiget_count(keys, column_parent, predicate, consistency_level);
+  recv_multiget_count(_return);
+}
+
+void CassandraClient::send_multiget_count(const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("multiget_count", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_multiget_count_pargs args;
+  args.keys = &keys;
+  args.column_parent = &column_parent;
+  args.predicate = &predicate;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_multiget_count(std::map<std::string, int32_t> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("multiget_count") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_multiget_count_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "multiget_count failed: unknown result");
+}
+
+void CassandraClient::get_range_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level)
+{
+  send_get_range_slices(column_parent, predicate, range, consistency_level);
+  recv_get_range_slices(_return);
+}
+
+void CassandraClient::send_get_range_slices(const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("get_range_slices", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_get_range_slices_pargs args;
+  args.column_parent = &column_parent;
+  args.predicate = &predicate;
+  args.range = &range;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_get_range_slices(std::vector<KeySlice> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("get_range_slices") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_get_range_slices_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_range_slices failed: unknown result");
+}
+
+void CassandraClient::get_indexed_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level)
+{
+  send_get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level);
+  recv_get_indexed_slices(_return);
+}
+
+void CassandraClient::send_get_indexed_slices(const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("get_indexed_slices", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_get_indexed_slices_pargs args;
+  args.column_parent = &column_parent;
+  args.index_clause = &index_clause;
+  args.column_predicate = &column_predicate;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_get_indexed_slices(std::vector<KeySlice> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("get_indexed_slices") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_get_indexed_slices_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexed_slices failed: unknown result");
+}
+
+void CassandraClient::insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level)
+{
+  send_insert(key, column_parent, column, consistency_level);
+  recv_insert();
+}
+
+void CassandraClient::send_insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("insert", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_insert_pargs args;
+  args.key = &key;
+  args.column_parent = &column_parent;
+  args.column = &column;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_insert()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("insert") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_insert_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  return;
+}
+
+void CassandraClient::add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level)
+{
+  send_add(key, column_parent, column, consistency_level);
+  recv_add();
+}
+
+void CassandraClient::send_add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("add", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_add_pargs args;
+  args.key = &key;
+  args.column_parent = &column_parent;
+  args.column = &column;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_add()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("add") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_add_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  return;
+}
+
+void CassandraClient::remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level)
+{
+  send_remove(key, column_path, timestamp, consistency_level);
+  recv_remove();
+}
+
+void CassandraClient::send_remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("remove", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_remove_pargs args;
+  args.key = &key;
+  args.column_path = &column_path;
+  args.timestamp = &timestamp;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_remove()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("remove") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_remove_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  return;
+}
+
+void CassandraClient::remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level)
+{
+  send_remove_counter(key, path, consistency_level);
+  recv_remove_counter();
+}
+
+void CassandraClient::send_remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("remove_counter", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_remove_counter_pargs args;
+  args.key = &key;
+  args.path = &path;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_remove_counter()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("remove_counter") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_remove_counter_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  return;
+}
+
+void CassandraClient::batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level)
+{
+  send_batch_mutate(mutation_map, consistency_level);
+  recv_batch_mutate();
+}
+
+void CassandraClient::send_batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("batch_mutate", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_batch_mutate_pargs args;
+  args.mutation_map = &mutation_map;
+  args.consistency_level = &consistency_level;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_batch_mutate()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("batch_mutate") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_batch_mutate_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  return;
+}
+
+void CassandraClient::truncate(const std::string& cfname)
+{
+  send_truncate(cfname);
+  recv_truncate();
+}
+
+void CassandraClient::send_truncate(const std::string& cfname)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("truncate", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_truncate_pargs args;
+  args.cfname = &cfname;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_truncate()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("truncate") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_truncate_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  return;
+}
+
+void CassandraClient::describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return)
+{
+  send_describe_schema_versions();
+  recv_describe_schema_versions(_return);
+}
+
+void CassandraClient::send_describe_schema_versions()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_schema_versions", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_schema_versions_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_schema_versions") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_schema_versions_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_schema_versions failed: unknown result");
+}
+
+void CassandraClient::describe_keyspaces(std::vector<KsDef> & _return)
+{
+  send_describe_keyspaces();
+  recv_describe_keyspaces(_return);
+}
+
+void CassandraClient::send_describe_keyspaces()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_keyspaces", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_keyspaces_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_keyspaces(std::vector<KsDef> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_keyspaces") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_keyspaces_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_keyspaces failed: unknown result");
+}
+
+void CassandraClient::describe_cluster_name(std::string& _return)
+{
+  send_describe_cluster_name();
+  recv_describe_cluster_name(_return);
+}
+
+void CassandraClient::send_describe_cluster_name()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_cluster_name", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_cluster_name_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_cluster_name(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_cluster_name") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_cluster_name_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_cluster_name failed: unknown result");
+}
+
+void CassandraClient::describe_version(std::string& _return)
+{
+  send_describe_version();
+  recv_describe_version(_return);
+}
+
+void CassandraClient::send_describe_version()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_version", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_version_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_version(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_version") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_version_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_version failed: unknown result");
+}
+
+void CassandraClient::describe_ring(std::vector<TokenRange> & _return, const std::string& keyspace)
+{
+  send_describe_ring(keyspace);
+  recv_describe_ring(_return);
+}
+
+void CassandraClient::send_describe_ring(const std::string& keyspace)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_ring", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_ring_pargs args;
+  args.keyspace = &keyspace;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_ring(std::vector<TokenRange> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_ring") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_ring_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_ring failed: unknown result");
+}
+
+void CassandraClient::describe_partitioner(std::string& _return)
+{
+  send_describe_partitioner();
+  recv_describe_partitioner(_return);
+}
+
+void CassandraClient::send_describe_partitioner()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_partitioner", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_partitioner_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_partitioner(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_partitioner") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_partitioner_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_partitioner failed: unknown result");
+}
+
+void CassandraClient::describe_snitch(std::string& _return)
+{
+  send_describe_snitch();
+  recv_describe_snitch(_return);
+}
+
+void CassandraClient::send_describe_snitch()
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_snitch", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_snitch_pargs args;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_snitch(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_snitch") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_snitch_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_snitch failed: unknown result");
+}
+
+void CassandraClient::describe_keyspace(KsDef& _return, const std::string& keyspace)
+{
+  send_describe_keyspace(keyspace);
+  recv_describe_keyspace(_return);
+}
+
+void CassandraClient::send_describe_keyspace(const std::string& keyspace)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_keyspace", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_keyspace_pargs args;
+  args.keyspace = &keyspace;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_keyspace(KsDef& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_keyspace") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_keyspace_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.nfe) {
+    throw result.nfe;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_keyspace failed: unknown result");
+}
+
+void CassandraClient::describe_splits(std::vector<std::string> & _return, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split)
+{
+  send_describe_splits(cfName, start_token, end_token, keys_per_split);
+  recv_describe_splits(_return);
+}
+
+void CassandraClient::send_describe_splits(const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("describe_splits", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_describe_splits_pargs args;
+  args.cfName = &cfName;
+  args.start_token = &start_token;
+  args.end_token = &end_token;
+  args.keys_per_split = &keys_per_split;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_describe_splits(std::vector<std::string> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("describe_splits") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_describe_splits_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_splits failed: unknown result");
+}
+
+void CassandraClient::system_add_column_family(std::string& _return, const CfDef& cf_def)
+{
+  send_system_add_column_family(cf_def);
+  recv_system_add_column_family(_return);
+}
+
+void CassandraClient::send_system_add_column_family(const CfDef& cf_def)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_add_column_family", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_add_column_family_pargs args;
+  args.cf_def = &cf_def;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_add_column_family(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_add_column_family") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_add_column_family_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_add_column_family failed: unknown result");
+}
+
+void CassandraClient::system_drop_column_family(std::string& _return, const std::string& column_family)
+{
+  send_system_drop_column_family(column_family);
+  recv_system_drop_column_family(_return);
+}
+
+void CassandraClient::send_system_drop_column_family(const std::string& column_family)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_drop_column_family", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_drop_column_family_pargs args;
+  args.column_family = &column_family;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_drop_column_family(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_drop_column_family") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_drop_column_family_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_drop_column_family failed: unknown result");
+}
+
+void CassandraClient::system_add_keyspace(std::string& _return, const KsDef& ks_def)
+{
+  send_system_add_keyspace(ks_def);
+  recv_system_add_keyspace(_return);
+}
+
+void CassandraClient::send_system_add_keyspace(const KsDef& ks_def)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_add_keyspace", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_add_keyspace_pargs args;
+  args.ks_def = &ks_def;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_add_keyspace(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_add_keyspace") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_add_keyspace_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_add_keyspace failed: unknown result");
+}
+
+void CassandraClient::system_drop_keyspace(std::string& _return, const std::string& keyspace)
+{
+  send_system_drop_keyspace(keyspace);
+  recv_system_drop_keyspace(_return);
+}
+
+void CassandraClient::send_system_drop_keyspace(const std::string& keyspace)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_drop_keyspace", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_drop_keyspace_pargs args;
+  args.keyspace = &keyspace;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_drop_keyspace(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_drop_keyspace") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_drop_keyspace_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_drop_keyspace failed: unknown result");
+}
+
+void CassandraClient::system_update_keyspace(std::string& _return, const KsDef& ks_def)
+{
+  send_system_update_keyspace(ks_def);
+  recv_system_update_keyspace(_return);
+}
+
+void CassandraClient::send_system_update_keyspace(const KsDef& ks_def)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_update_keyspace", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_update_keyspace_pargs args;
+  args.ks_def = &ks_def;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_update_keyspace(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_update_keyspace") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_update_keyspace_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_update_keyspace failed: unknown result");
+}
+
+void CassandraClient::system_update_column_family(std::string& _return, const CfDef& cf_def)
+{
+  send_system_update_column_family(cf_def);
+  recv_system_update_column_family(_return);
+}
+
+void CassandraClient::send_system_update_column_family(const CfDef& cf_def)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("system_update_column_family", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_system_update_column_family_pargs args;
+  args.cf_def = &cf_def;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_system_update_column_family(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("system_update_column_family") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_system_update_column_family_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "system_update_column_family failed: unknown result");
+}
+
+void CassandraClient::execute_cql_query(CqlResult& _return, const std::string& query, const Compression::type compression)
+{
+  send_execute_cql_query(query, compression);
+  recv_execute_cql_query(_return);
+}
+
+void CassandraClient::send_execute_cql_query(const std::string& query, const Compression::type compression)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("execute_cql_query", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  Cassandra_execute_cql_query_pargs args;
+  args.query = &query;
+  args.compression = &compression;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void CassandraClient::recv_execute_cql_query(CqlResult& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("execute_cql_query") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  Cassandra_execute_cql_query_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ire) {
+    throw result.ire;
+  }
+  if (result.__isset.ue) {
+    throw result.ue;
+  }
+  if (result.__isset.te) {
+    throw result.te;
+  }
+  if (result.__isset.sde) {
+    throw result.sde;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "execute_cql_query failed: unknown result");
+}
+
+bool CassandraProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) {
+
+  ::apache::thrift::protocol::TProtocol* iprot = piprot.get();
+  ::apache::thrift::protocol::TProtocol* oprot = poprot.get();
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+  int32_t seqid;
+
+  iprot->readMessageBegin(fname, mtype, seqid);
+
+  if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) {
+    iprot->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+    oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return true;
+  }
+
+  return process_fn(iprot, oprot, fname, seqid, callContext);
+}
+
+bool CassandraProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) {
+  std::map<std::string, void (CassandraProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)>::iterator pfn;
+  pfn = processMap_.find(fname);
+  if (pfn == processMap_.end()) {
+    iprot->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'");
+    oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return true;
+  }
+  (this->*(pfn->second))(seqid, iprot, oprot, callContext);
+  return true;
+}
+
+void CassandraProcessor::process_login(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.login", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.login");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.login");
+  }
+
+  Cassandra_login_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.login", bytes);
+  }
+
+  Cassandra_login_result result;
+  try {
+    iface_->login(args.auth_request);
+  } catch (AuthenticationException &authnx) {
+    result.authnx = authnx;
+    result.__isset.authnx = true;
+  } catch (AuthorizationException &authzx) {
+    result.authzx = authzx;
+    result.__isset.authzx = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.login");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("login", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.login");
+  }
+
+  oprot->writeMessageBegin("login", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.login", bytes);
+  }
+}
+
+void CassandraProcessor::process_set_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.set_keyspace", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.set_keyspace");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.set_keyspace");
+  }
+
+  Cassandra_set_keyspace_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.set_keyspace", bytes);
+  }
+
+  Cassandra_set_keyspace_result result;
+  try {
+    iface_->set_keyspace(args.keyspace);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.set_keyspace");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("set_keyspace", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.set_keyspace");
+  }
+
+  oprot->writeMessageBegin("set_keyspace", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.set_keyspace", bytes);
+  }
+}
+
+void CassandraProcessor::process_get(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.get", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.get");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.get");
+  }
+
+  Cassandra_get_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.get", bytes);
+  }
+
+  Cassandra_get_result result;
+  try {
+    iface_->get(result.success, args.key, args.column_path, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (NotFoundException &nfe) {
+    result.nfe = nfe;
+    result.__isset.nfe = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.get");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("get", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.get");
+  }
+
+  oprot->writeMessageBegin("get", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.get", bytes);
+  }
+}
+
+void CassandraProcessor::process_get_slice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.get_slice", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.get_slice");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.get_slice");
+  }
+
+  Cassandra_get_slice_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.get_slice", bytes);
+  }
+
+  Cassandra_get_slice_result result;
+  try {
+    iface_->get_slice(result.success, args.key, args.column_parent, args.predicate, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.get_slice");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("get_slice", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.get_slice");
+  }
+
+  oprot->writeMessageBegin("get_slice", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.get_slice", bytes);
+  }
+}
+
+void CassandraProcessor::process_get_count(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.get_count", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.get_count");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.get_count");
+  }
+
+  Cassandra_get_count_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.get_count", bytes);
+  }
+
+  Cassandra_get_count_result result;
+  try {
+    result.success = iface_->get_count(args.key, args.column_parent, args.predicate, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.get_count");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("get_count", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.get_count");
+  }
+
+  oprot->writeMessageBegin("get_count", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.get_count", bytes);
+  }
+}
+
+void CassandraProcessor::process_multiget_slice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.multiget_slice", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.multiget_slice");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.multiget_slice");
+  }
+
+  Cassandra_multiget_slice_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.multiget_slice", bytes);
+  }
+
+  Cassandra_multiget_slice_result result;
+  try {
+    iface_->multiget_slice(result.success, args.keys, args.column_parent, args.predicate, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.multiget_slice");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("multiget_slice", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.multiget_slice");
+  }
+
+  oprot->writeMessageBegin("multiget_slice", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.multiget_slice", bytes);
+  }
+}
+
+void CassandraProcessor::process_multiget_count(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.multiget_count", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.multiget_count");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.multiget_count");
+  }
+
+  Cassandra_multiget_count_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.multiget_count", bytes);
+  }
+
+  Cassandra_multiget_count_result result;
+  try {
+    iface_->multiget_count(result.success, args.keys, args.column_parent, args.predicate, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.multiget_count");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("multiget_count", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.multiget_count");
+  }
+
+  oprot->writeMessageBegin("multiget_count", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.multiget_count", bytes);
+  }
+}
+
+void CassandraProcessor::process_get_range_slices(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.get_range_slices", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.get_range_slices");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.get_range_slices");
+  }
+
+  Cassandra_get_range_slices_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.get_range_slices", bytes);
+  }
+
+  Cassandra_get_range_slices_result result;
+  try {
+    iface_->get_range_slices(result.success, args.column_parent, args.predicate, args.range, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.get_range_slices");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("get_range_slices", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.get_range_slices");
+  }
+
+  oprot->writeMessageBegin("get_range_slices", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.get_range_slices", bytes);
+  }
+}
+
+void CassandraProcessor::process_get_indexed_slices(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.get_indexed_slices", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.get_indexed_slices");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.get_indexed_slices");
+  }
+
+  Cassandra_get_indexed_slices_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.get_indexed_slices", bytes);
+  }
+
+  Cassandra_get_indexed_slices_result result;
+  try {
+    iface_->get_indexed_slices(result.success, args.column_parent, args.index_clause, args.column_predicate, args.consistency_level);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.get_indexed_slices");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("get_indexed_slices", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.get_indexed_slices");
+  }
+
+  oprot->writeMessageBegin("get_indexed_slices", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.get_indexed_slices", bytes);
+  }
+}
+
+void CassandraProcessor::process_insert(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.insert", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.insert");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.insert");
+  }
+
+  Cassandra_insert_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.insert", bytes);
+  }
+
+  Cassandra_insert_result result;
+  try {
+    iface_->insert(args.key, args.column_parent, args.column, args.consistency_level);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.insert");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("insert", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.insert");
+  }
+
+  oprot->writeMessageBegin("insert", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.insert", bytes);
+  }
+}
+
+void CassandraProcessor::process_add(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.add", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.add");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.add");
+  }
+
+  Cassandra_add_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.add", bytes);
+  }
+
+  Cassandra_add_result result;
+  try {
+    iface_->add(args.key, args.column_parent, args.column, args.consistency_level);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.add");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("add", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.add");
+  }
+
+  oprot->writeMessageBegin("add", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.add", bytes);
+  }
+}
+
+void CassandraProcessor::process_remove(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.remove", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.remove");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.remove");
+  }
+
+  Cassandra_remove_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.remove", bytes);
+  }
+
+  Cassandra_remove_result result;
+  try {
+    iface_->remove(args.key, args.column_path, args.timestamp, args.consistency_level);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.remove");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("remove", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.remove");
+  }
+
+  oprot->writeMessageBegin("remove", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.remove", bytes);
+  }
+}
+
+void CassandraProcessor::process_remove_counter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.remove_counter", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.remove_counter");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.remove_counter");
+  }
+
+  Cassandra_remove_counter_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.remove_counter", bytes);
+  }
+
+  Cassandra_remove_counter_result result;
+  try {
+    iface_->remove_counter(args.key, args.path, args.consistency_level);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.remove_counter");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("remove_counter", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.remove_counter");
+  }
+
+  oprot->writeMessageBegin("remove_counter", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.remove_counter", bytes);
+  }
+}
+
+void CassandraProcessor::process_batch_mutate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.batch_mutate", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.batch_mutate");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.batch_mutate");
+  }
+
+  Cassandra_batch_mutate_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.batch_mutate", bytes);
+  }
+
+  Cassandra_batch_mutate_result result;
+  try {
+    iface_->batch_mutate(args.mutation_map, args.consistency_level);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.batch_mutate");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("batch_mutate", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.batch_mutate");
+  }
+
+  oprot->writeMessageBegin("batch_mutate", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.batch_mutate", bytes);
+  }
+}
+
+void CassandraProcessor::process_truncate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.truncate", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.truncate");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.truncate");
+  }
+
+  Cassandra_truncate_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.truncate", bytes);
+  }
+
+  Cassandra_truncate_result result;
+  try {
+    iface_->truncate(args.cfname);
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.truncate");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("truncate", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.truncate");
+  }
+
+  oprot->writeMessageBegin("truncate", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.truncate", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_schema_versions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_schema_versions", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_schema_versions");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_schema_versions");
+  }
+
+  Cassandra_describe_schema_versions_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_schema_versions", bytes);
+  }
+
+  Cassandra_describe_schema_versions_result result;
+  try {
+    iface_->describe_schema_versions(result.success);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_schema_versions");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_schema_versions", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_schema_versions");
+  }
+
+  oprot->writeMessageBegin("describe_schema_versions", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_schema_versions", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_keyspaces(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_keyspaces", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_keyspaces");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_keyspaces");
+  }
+
+  Cassandra_describe_keyspaces_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_keyspaces", bytes);
+  }
+
+  Cassandra_describe_keyspaces_result result;
+  try {
+    iface_->describe_keyspaces(result.success);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_keyspaces");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_keyspaces", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_keyspaces");
+  }
+
+  oprot->writeMessageBegin("describe_keyspaces", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_keyspaces", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_cluster_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_cluster_name", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_cluster_name");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_cluster_name");
+  }
+
+  Cassandra_describe_cluster_name_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_cluster_name", bytes);
+  }
+
+  Cassandra_describe_cluster_name_result result;
+  try {
+    iface_->describe_cluster_name(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_cluster_name");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_cluster_name", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_cluster_name");
+  }
+
+  oprot->writeMessageBegin("describe_cluster_name", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_cluster_name", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_version(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_version", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_version");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_version");
+  }
+
+  Cassandra_describe_version_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_version", bytes);
+  }
+
+  Cassandra_describe_version_result result;
+  try {
+    iface_->describe_version(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_version");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_version", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_version");
+  }
+
+  oprot->writeMessageBegin("describe_version", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_version", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_ring(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_ring", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_ring");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_ring");
+  }
+
+  Cassandra_describe_ring_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_ring", bytes);
+  }
+
+  Cassandra_describe_ring_result result;
+  try {
+    iface_->describe_ring(result.success, args.keyspace);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_ring");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_ring", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_ring");
+  }
+
+  oprot->writeMessageBegin("describe_ring", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_ring", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_partitioner(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_partitioner", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_partitioner");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_partitioner");
+  }
+
+  Cassandra_describe_partitioner_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_partitioner", bytes);
+  }
+
+  Cassandra_describe_partitioner_result result;
+  try {
+    iface_->describe_partitioner(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_partitioner");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_partitioner", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_partitioner");
+  }
+
+  oprot->writeMessageBegin("describe_partitioner", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_partitioner", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_snitch(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_snitch", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_snitch");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_snitch");
+  }
+
+  Cassandra_describe_snitch_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_snitch", bytes);
+  }
+
+  Cassandra_describe_snitch_result result;
+  try {
+    iface_->describe_snitch(result.success);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_snitch");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_snitch", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_snitch");
+  }
+
+  oprot->writeMessageBegin("describe_snitch", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_snitch", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_keyspace", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_keyspace");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_keyspace");
+  }
+
+  Cassandra_describe_keyspace_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_keyspace", bytes);
+  }
+
+  Cassandra_describe_keyspace_result result;
+  try {
+    iface_->describe_keyspace(result.success, args.keyspace);
+    result.__isset.success = true;
+  } catch (NotFoundException &nfe) {
+    result.nfe = nfe;
+    result.__isset.nfe = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_keyspace");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_keyspace", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_keyspace");
+  }
+
+  oprot->writeMessageBegin("describe_keyspace", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_keyspace", bytes);
+  }
+}
+
+void CassandraProcessor::process_describe_splits(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.describe_splits", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.describe_splits");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.describe_splits");
+  }
+
+  Cassandra_describe_splits_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.describe_splits", bytes);
+  }
+
+  Cassandra_describe_splits_result result;
+  try {
+    iface_->describe_splits(result.success, args.cfName, args.start_token, args.end_token, args.keys_per_split);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.describe_splits");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("describe_splits", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.describe_splits");
+  }
+
+  oprot->writeMessageBegin("describe_splits", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.describe_splits", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_add_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_add_column_family", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_add_column_family");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_add_column_family");
+  }
+
+  Cassandra_system_add_column_family_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_add_column_family", bytes);
+  }
+
+  Cassandra_system_add_column_family_result result;
+  try {
+    iface_->system_add_column_family(result.success, args.cf_def);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_add_column_family");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_add_column_family", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_add_column_family");
+  }
+
+  oprot->writeMessageBegin("system_add_column_family", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_add_column_family", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_drop_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_drop_column_family", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_drop_column_family");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_drop_column_family");
+  }
+
+  Cassandra_system_drop_column_family_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_drop_column_family", bytes);
+  }
+
+  Cassandra_system_drop_column_family_result result;
+  try {
+    iface_->system_drop_column_family(result.success, args.column_family);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_drop_column_family");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_drop_column_family", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_drop_column_family");
+  }
+
+  oprot->writeMessageBegin("system_drop_column_family", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_drop_column_family", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_add_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_add_keyspace", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_add_keyspace");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_add_keyspace");
+  }
+
+  Cassandra_system_add_keyspace_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_add_keyspace", bytes);
+  }
+
+  Cassandra_system_add_keyspace_result result;
+  try {
+    iface_->system_add_keyspace(result.success, args.ks_def);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_add_keyspace");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_add_keyspace", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_add_keyspace");
+  }
+
+  oprot->writeMessageBegin("system_add_keyspace", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_add_keyspace", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_drop_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_drop_keyspace", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_drop_keyspace");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_drop_keyspace");
+  }
+
+  Cassandra_system_drop_keyspace_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_drop_keyspace", bytes);
+  }
+
+  Cassandra_system_drop_keyspace_result result;
+  try {
+    iface_->system_drop_keyspace(result.success, args.keyspace);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_drop_keyspace");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_drop_keyspace", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_drop_keyspace");
+  }
+
+  oprot->writeMessageBegin("system_drop_keyspace", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_drop_keyspace", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_update_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_update_keyspace", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_update_keyspace");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_update_keyspace");
+  }
+
+  Cassandra_system_update_keyspace_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_update_keyspace", bytes);
+  }
+
+  Cassandra_system_update_keyspace_result result;
+  try {
+    iface_->system_update_keyspace(result.success, args.ks_def);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_update_keyspace");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_update_keyspace", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_update_keyspace");
+  }
+
+  oprot->writeMessageBegin("system_update_keyspace", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_update_keyspace", bytes);
+  }
+}
+
+void CassandraProcessor::process_system_update_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.system_update_column_family", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.system_update_column_family");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.system_update_column_family");
+  }
+
+  Cassandra_system_update_column_family_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.system_update_column_family", bytes);
+  }
+
+  Cassandra_system_update_column_family_result result;
+  try {
+    iface_->system_update_column_family(result.success, args.cf_def);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.system_update_column_family");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("system_update_column_family", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.system_update_column_family");
+  }
+
+  oprot->writeMessageBegin("system_update_column_family", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.system_update_column_family", bytes);
+  }
+}
+
+void CassandraProcessor::process_execute_cql_query(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (eventHandler_.get() != NULL) {
+    ctx = eventHandler_->getContext("Cassandra.execute_cql_query", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Cassandra.execute_cql_query");
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preRead(ctx, "Cassandra.execute_cql_query");
+  }
+
+  Cassandra_execute_cql_query_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postRead(ctx, "Cassandra.execute_cql_query", bytes);
+  }
+
+  Cassandra_execute_cql_query_result result;
+  try {
+    iface_->execute_cql_query(result.success, args.query, args.compression);
+    result.__isset.success = true;
+  } catch (InvalidRequestException &ire) {
+    result.ire = ire;
+    result.__isset.ire = true;
+  } catch (UnavailableException &ue) {
+    result.ue = ue;
+    result.__isset.ue = true;
+  } catch (TimedOutException &te) {
+    result.te = te;
+    result.__isset.te = true;
+  } catch (SchemaDisagreementException &sde) {
+    result.sde = sde;
+    result.__isset.sde = true;
+  } catch (const std::exception& e) {
+    if (eventHandler_.get() != NULL) {
+      eventHandler_->handlerError(ctx, "Cassandra.execute_cql_query");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("execute_cql_query", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->preWrite(ctx, "Cassandra.execute_cql_query");
+  }
+
+  oprot->writeMessageBegin("execute_cql_query", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (eventHandler_.get() != NULL) {
+    eventHandler_->postWrite(ctx, "Cassandra.execute_cql_query", bytes);
+  }
+}
+
+}}} // namespace
+

+ 4093 - 0
modules/db_cassandra/Cassandra.h

@@ -0,0 +1,4093 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef Cassandra_H
+#define Cassandra_H
+
+#include <TProcessor.h>
+#include "cassandra_types.h"
+
+namespace org { namespace apache { namespace cassandra {
+
+class CassandraIf {
+ public:
+  virtual ~CassandraIf() {}
+  virtual void login(const AuthenticationRequest& auth_request) = 0;
+  virtual void set_keyspace(const std::string& keyspace) = 0;
+  virtual void get(ColumnOrSuperColumn& _return, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void get_slice(std::vector<ColumnOrSuperColumn> & _return, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) = 0;
+  virtual int32_t get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void multiget_count(std::map<std::string, int32_t> & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void get_range_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void get_indexed_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) = 0;
+  virtual void truncate(const std::string& cfname) = 0;
+  virtual void describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return) = 0;
+  virtual void describe_keyspaces(std::vector<KsDef> & _return) = 0;
+  virtual void describe_cluster_name(std::string& _return) = 0;
+  virtual void describe_version(std::string& _return) = 0;
+  virtual void describe_ring(std::vector<TokenRange> & _return, const std::string& keyspace) = 0;
+  virtual void describe_partitioner(std::string& _return) = 0;
+  virtual void describe_snitch(std::string& _return) = 0;
+  virtual void describe_keyspace(KsDef& _return, const std::string& keyspace) = 0;
+  virtual void describe_splits(std::vector<std::string> & _return, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) = 0;
+  virtual void system_add_column_family(std::string& _return, const CfDef& cf_def) = 0;
+  virtual void system_drop_column_family(std::string& _return, const std::string& column_family) = 0;
+  virtual void system_add_keyspace(std::string& _return, const KsDef& ks_def) = 0;
+  virtual void system_drop_keyspace(std::string& _return, const std::string& keyspace) = 0;
+  virtual void system_update_keyspace(std::string& _return, const KsDef& ks_def) = 0;
+  virtual void system_update_column_family(std::string& _return, const CfDef& cf_def) = 0;
+  virtual void execute_cql_query(CqlResult& _return, const std::string& query, const Compression::type compression) = 0;
+};
+
+class CassandraNull : virtual public CassandraIf {
+ public:
+  virtual ~CassandraNull() {}
+  void login(const AuthenticationRequest& /* auth_request */) {
+    return;
+  }
+  void set_keyspace(const std::string& /* keyspace */) {
+    return;
+  }
+  void get(ColumnOrSuperColumn& /* _return */, const std::string& /* key */, const ColumnPath& /* column_path */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void get_slice(std::vector<ColumnOrSuperColumn> & /* _return */, const std::string& /* key */, const ColumnParent& /* column_parent */, const SlicePredicate& /* predicate */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  int32_t get_count(const std::string& /* key */, const ColumnParent& /* column_parent */, const SlicePredicate& /* predicate */, const ConsistencyLevel::type /* consistency_level */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  void multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & /* _return */, const std::vector<std::string> & /* keys */, const ColumnParent& /* column_parent */, const SlicePredicate& /* predicate */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void multiget_count(std::map<std::string, int32_t> & /* _return */, const std::vector<std::string> & /* keys */, const ColumnParent& /* column_parent */, const SlicePredicate& /* predicate */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void get_range_slices(std::vector<KeySlice> & /* _return */, const ColumnParent& /* column_parent */, const SlicePredicate& /* predicate */, const KeyRange& /* range */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void get_indexed_slices(std::vector<KeySlice> & /* _return */, const ColumnParent& /* column_parent */, const IndexClause& /* index_clause */, const SlicePredicate& /* column_predicate */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void insert(const std::string& /* key */, const ColumnParent& /* column_parent */, const Column& /* column */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void add(const std::string& /* key */, const ColumnParent& /* column_parent */, const CounterColumn& /* column */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void remove(const std::string& /* key */, const ColumnPath& /* column_path */, const int64_t /* timestamp */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void remove_counter(const std::string& /* key */, const ColumnPath& /* path */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & /* mutation_map */, const ConsistencyLevel::type /* consistency_level */) {
+    return;
+  }
+  void truncate(const std::string& /* cfname */) {
+    return;
+  }
+  void describe_schema_versions(std::map<std::string, std::vector<std::string> > & /* _return */) {
+    return;
+  }
+  void describe_keyspaces(std::vector<KsDef> & /* _return */) {
+    return;
+  }
+  void describe_cluster_name(std::string& /* _return */) {
+    return;
+  }
+  void describe_version(std::string& /* _return */) {
+    return;
+  }
+  void describe_ring(std::vector<TokenRange> & /* _return */, const std::string& /* keyspace */) {
+    return;
+  }
+  void describe_partitioner(std::string& /* _return */) {
+    return;
+  }
+  void describe_snitch(std::string& /* _return */) {
+    return;
+  }
+  void describe_keyspace(KsDef& /* _return */, const std::string& /* keyspace */) {
+    return;
+  }
+  void describe_splits(std::vector<std::string> & /* _return */, const std::string& /* cfName */, const std::string& /* start_token */, const std::string& /* end_token */, const int32_t /* keys_per_split */) {
+    return;
+  }
+  void system_add_column_family(std::string& /* _return */, const CfDef& /* cf_def */) {
+    return;
+  }
+  void system_drop_column_family(std::string& /* _return */, const std::string& /* column_family */) {
+    return;
+  }
+  void system_add_keyspace(std::string& /* _return */, const KsDef& /* ks_def */) {
+    return;
+  }
+  void system_drop_keyspace(std::string& /* _return */, const std::string& /* keyspace */) {
+    return;
+  }
+  void system_update_keyspace(std::string& /* _return */, const KsDef& /* ks_def */) {
+    return;
+  }
+  void system_update_column_family(std::string& /* _return */, const CfDef& /* cf_def */) {
+    return;
+  }
+  void execute_cql_query(CqlResult& /* _return */, const std::string& /* query */, const Compression::type /* compression */) {
+    return;
+  }
+};
+
+
+class Cassandra_login_args {
+ public:
+
+  Cassandra_login_args() {
+  }
+
+  virtual ~Cassandra_login_args() throw() {}
+
+  AuthenticationRequest auth_request;
+
+  bool operator == (const Cassandra_login_args & rhs) const
+  {
+    if (!(auth_request == rhs.auth_request))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_login_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_login_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_login_pargs {
+ public:
+
+
+  virtual ~Cassandra_login_pargs() throw() {}
+
+  const AuthenticationRequest* auth_request;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_login_result__isset {
+  _Cassandra_login_result__isset() : authnx(false), authzx(false) {}
+  bool authnx;
+  bool authzx;
+} _Cassandra_login_result__isset;
+
+class Cassandra_login_result {
+ public:
+
+  Cassandra_login_result() {
+  }
+
+  virtual ~Cassandra_login_result() throw() {}
+
+  AuthenticationException authnx;
+  AuthorizationException authzx;
+
+  _Cassandra_login_result__isset __isset;
+
+  bool operator == (const Cassandra_login_result & rhs) const
+  {
+    if (!(authnx == rhs.authnx))
+      return false;
+    if (!(authzx == rhs.authzx))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_login_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_login_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_login_presult__isset {
+  _Cassandra_login_presult__isset() : authnx(false), authzx(false) {}
+  bool authnx;
+  bool authzx;
+} _Cassandra_login_presult__isset;
+
+class Cassandra_login_presult {
+ public:
+
+
+  virtual ~Cassandra_login_presult() throw() {}
+
+  AuthenticationException authnx;
+  AuthorizationException authzx;
+
+  _Cassandra_login_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_set_keyspace_args {
+ public:
+
+  Cassandra_set_keyspace_args() : keyspace("") {
+  }
+
+  virtual ~Cassandra_set_keyspace_args() throw() {}
+
+  std::string keyspace;
+
+  bool operator == (const Cassandra_set_keyspace_args & rhs) const
+  {
+    if (!(keyspace == rhs.keyspace))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_set_keyspace_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_set_keyspace_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_set_keyspace_pargs {
+ public:
+
+
+  virtual ~Cassandra_set_keyspace_pargs() throw() {}
+
+  const std::string* keyspace;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_set_keyspace_result__isset {
+  _Cassandra_set_keyspace_result__isset() : ire(false) {}
+  bool ire;
+} _Cassandra_set_keyspace_result__isset;
+
+class Cassandra_set_keyspace_result {
+ public:
+
+  Cassandra_set_keyspace_result() {
+  }
+
+  virtual ~Cassandra_set_keyspace_result() throw() {}
+
+  InvalidRequestException ire;
+
+  _Cassandra_set_keyspace_result__isset __isset;
+
+  bool operator == (const Cassandra_set_keyspace_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_set_keyspace_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_set_keyspace_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_set_keyspace_presult__isset {
+  _Cassandra_set_keyspace_presult__isset() : ire(false) {}
+  bool ire;
+} _Cassandra_set_keyspace_presult__isset;
+
+class Cassandra_set_keyspace_presult {
+ public:
+
+
+  virtual ~Cassandra_set_keyspace_presult() throw() {}
+
+  InvalidRequestException ire;
+
+  _Cassandra_set_keyspace_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_get_args {
+ public:
+
+  Cassandra_get_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_get_args() throw() {}
+
+  std::string key;
+  ColumnPath column_path;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_get_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_path == rhs.column_path))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_get_pargs {
+ public:
+
+
+  virtual ~Cassandra_get_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnPath* column_path;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_result__isset {
+  _Cassandra_get_result__isset() : success(false), ire(false), nfe(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool nfe;
+  bool ue;
+  bool te;
+} _Cassandra_get_result__isset;
+
+class Cassandra_get_result {
+ public:
+
+  Cassandra_get_result() {
+  }
+
+  virtual ~Cassandra_get_result() throw() {}
+
+  ColumnOrSuperColumn success;
+  InvalidRequestException ire;
+  NotFoundException nfe;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_result__isset __isset;
+
+  bool operator == (const Cassandra_get_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(nfe == rhs.nfe))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_presult__isset {
+  _Cassandra_get_presult__isset() : success(false), ire(false), nfe(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool nfe;
+  bool ue;
+  bool te;
+} _Cassandra_get_presult__isset;
+
+class Cassandra_get_presult {
+ public:
+
+
+  virtual ~Cassandra_get_presult() throw() {}
+
+  ColumnOrSuperColumn* success;
+  InvalidRequestException ire;
+  NotFoundException nfe;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_get_slice_args {
+ public:
+
+  Cassandra_get_slice_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_get_slice_args() throw() {}
+
+  std::string key;
+  ColumnParent column_parent;
+  SlicePredicate predicate;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_get_slice_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(predicate == rhs.predicate))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_slice_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_slice_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_get_slice_pargs {
+ public:
+
+
+  virtual ~Cassandra_get_slice_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnParent* column_parent;
+  const SlicePredicate* predicate;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_slice_result__isset {
+  _Cassandra_get_slice_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_slice_result__isset;
+
+class Cassandra_get_slice_result {
+ public:
+
+  Cassandra_get_slice_result() {
+  }
+
+  virtual ~Cassandra_get_slice_result() throw() {}
+
+  std::vector<ColumnOrSuperColumn>  success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_slice_result__isset __isset;
+
+  bool operator == (const Cassandra_get_slice_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_slice_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_slice_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_slice_presult__isset {
+  _Cassandra_get_slice_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_slice_presult__isset;
+
+class Cassandra_get_slice_presult {
+ public:
+
+
+  virtual ~Cassandra_get_slice_presult() throw() {}
+
+  std::vector<ColumnOrSuperColumn> * success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_slice_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_get_count_args {
+ public:
+
+  Cassandra_get_count_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_get_count_args() throw() {}
+
+  std::string key;
+  ColumnParent column_parent;
+  SlicePredicate predicate;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_get_count_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(predicate == rhs.predicate))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_count_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_count_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_get_count_pargs {
+ public:
+
+
+  virtual ~Cassandra_get_count_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnParent* column_parent;
+  const SlicePredicate* predicate;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_count_result__isset {
+  _Cassandra_get_count_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_count_result__isset;
+
+class Cassandra_get_count_result {
+ public:
+
+  Cassandra_get_count_result() : success(0) {
+  }
+
+  virtual ~Cassandra_get_count_result() throw() {}
+
+  int32_t success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_count_result__isset __isset;
+
+  bool operator == (const Cassandra_get_count_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_count_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_count_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_count_presult__isset {
+  _Cassandra_get_count_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_count_presult__isset;
+
+class Cassandra_get_count_presult {
+ public:
+
+
+  virtual ~Cassandra_get_count_presult() throw() {}
+
+  int32_t* success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_count_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_multiget_slice_args {
+ public:
+
+  Cassandra_multiget_slice_args() {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_multiget_slice_args() throw() {}
+
+  std::vector<std::string>  keys;
+  ColumnParent column_parent;
+  SlicePredicate predicate;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_multiget_slice_args & rhs) const
+  {
+    if (!(keys == rhs.keys))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(predicate == rhs.predicate))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_multiget_slice_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_multiget_slice_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_multiget_slice_pargs {
+ public:
+
+
+  virtual ~Cassandra_multiget_slice_pargs() throw() {}
+
+  const std::vector<std::string> * keys;
+  const ColumnParent* column_parent;
+  const SlicePredicate* predicate;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_multiget_slice_result__isset {
+  _Cassandra_multiget_slice_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_multiget_slice_result__isset;
+
+class Cassandra_multiget_slice_result {
+ public:
+
+  Cassandra_multiget_slice_result() {
+  }
+
+  virtual ~Cassandra_multiget_slice_result() throw() {}
+
+  std::map<std::string, std::vector<ColumnOrSuperColumn> >  success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_multiget_slice_result__isset __isset;
+
+  bool operator == (const Cassandra_multiget_slice_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_multiget_slice_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_multiget_slice_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_multiget_slice_presult__isset {
+  _Cassandra_multiget_slice_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_multiget_slice_presult__isset;
+
+class Cassandra_multiget_slice_presult {
+ public:
+
+
+  virtual ~Cassandra_multiget_slice_presult() throw() {}
+
+  std::map<std::string, std::vector<ColumnOrSuperColumn> > * success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_multiget_slice_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_multiget_count_args {
+ public:
+
+  Cassandra_multiget_count_args() {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_multiget_count_args() throw() {}
+
+  std::vector<std::string>  keys;
+  ColumnParent column_parent;
+  SlicePredicate predicate;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_multiget_count_args & rhs) const
+  {
+    if (!(keys == rhs.keys))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(predicate == rhs.predicate))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_multiget_count_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_multiget_count_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_multiget_count_pargs {
+ public:
+
+
+  virtual ~Cassandra_multiget_count_pargs() throw() {}
+
+  const std::vector<std::string> * keys;
+  const ColumnParent* column_parent;
+  const SlicePredicate* predicate;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_multiget_count_result__isset {
+  _Cassandra_multiget_count_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_multiget_count_result__isset;
+
+class Cassandra_multiget_count_result {
+ public:
+
+  Cassandra_multiget_count_result() {
+  }
+
+  virtual ~Cassandra_multiget_count_result() throw() {}
+
+  std::map<std::string, int32_t>  success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_multiget_count_result__isset __isset;
+
+  bool operator == (const Cassandra_multiget_count_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_multiget_count_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_multiget_count_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_multiget_count_presult__isset {
+  _Cassandra_multiget_count_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_multiget_count_presult__isset;
+
+class Cassandra_multiget_count_presult {
+ public:
+
+
+  virtual ~Cassandra_multiget_count_presult() throw() {}
+
+  std::map<std::string, int32_t> * success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_multiget_count_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_get_range_slices_args {
+ public:
+
+  Cassandra_get_range_slices_args() {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_get_range_slices_args() throw() {}
+
+  ColumnParent column_parent;
+  SlicePredicate predicate;
+  KeyRange range;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_get_range_slices_args & rhs) const
+  {
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(predicate == rhs.predicate))
+      return false;
+    if (!(range == rhs.range))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_range_slices_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_range_slices_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_get_range_slices_pargs {
+ public:
+
+
+  virtual ~Cassandra_get_range_slices_pargs() throw() {}
+
+  const ColumnParent* column_parent;
+  const SlicePredicate* predicate;
+  const KeyRange* range;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_range_slices_result__isset {
+  _Cassandra_get_range_slices_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_range_slices_result__isset;
+
+class Cassandra_get_range_slices_result {
+ public:
+
+  Cassandra_get_range_slices_result() {
+  }
+
+  virtual ~Cassandra_get_range_slices_result() throw() {}
+
+  std::vector<KeySlice>  success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_range_slices_result__isset __isset;
+
+  bool operator == (const Cassandra_get_range_slices_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_range_slices_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_range_slices_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_range_slices_presult__isset {
+  _Cassandra_get_range_slices_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_range_slices_presult__isset;
+
+class Cassandra_get_range_slices_presult {
+ public:
+
+
+  virtual ~Cassandra_get_range_slices_presult() throw() {}
+
+  std::vector<KeySlice> * success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_range_slices_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_get_indexed_slices_args {
+ public:
+
+  Cassandra_get_indexed_slices_args() {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_get_indexed_slices_args() throw() {}
+
+  ColumnParent column_parent;
+  IndexClause index_clause;
+  SlicePredicate column_predicate;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_get_indexed_slices_args & rhs) const
+  {
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(index_clause == rhs.index_clause))
+      return false;
+    if (!(column_predicate == rhs.column_predicate))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_indexed_slices_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_indexed_slices_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_get_indexed_slices_pargs {
+ public:
+
+
+  virtual ~Cassandra_get_indexed_slices_pargs() throw() {}
+
+  const ColumnParent* column_parent;
+  const IndexClause* index_clause;
+  const SlicePredicate* column_predicate;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_indexed_slices_result__isset {
+  _Cassandra_get_indexed_slices_result__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_indexed_slices_result__isset;
+
+class Cassandra_get_indexed_slices_result {
+ public:
+
+  Cassandra_get_indexed_slices_result() {
+  }
+
+  virtual ~Cassandra_get_indexed_slices_result() throw() {}
+
+  std::vector<KeySlice>  success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_indexed_slices_result__isset __isset;
+
+  bool operator == (const Cassandra_get_indexed_slices_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_get_indexed_slices_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_get_indexed_slices_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_get_indexed_slices_presult__isset {
+  _Cassandra_get_indexed_slices_presult__isset() : success(false), ire(false), ue(false), te(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_get_indexed_slices_presult__isset;
+
+class Cassandra_get_indexed_slices_presult {
+ public:
+
+
+  virtual ~Cassandra_get_indexed_slices_presult() throw() {}
+
+  std::vector<KeySlice> * success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_get_indexed_slices_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_insert_args {
+ public:
+
+  Cassandra_insert_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_insert_args() throw() {}
+
+  std::string key;
+  ColumnParent column_parent;
+  Column column;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_insert_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(column == rhs.column))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_insert_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_insert_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_insert_pargs {
+ public:
+
+
+  virtual ~Cassandra_insert_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnParent* column_parent;
+  const Column* column;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_insert_result__isset {
+  _Cassandra_insert_result__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_insert_result__isset;
+
+class Cassandra_insert_result {
+ public:
+
+  Cassandra_insert_result() {
+  }
+
+  virtual ~Cassandra_insert_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_insert_result__isset __isset;
+
+  bool operator == (const Cassandra_insert_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_insert_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_insert_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_insert_presult__isset {
+  _Cassandra_insert_presult__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_insert_presult__isset;
+
+class Cassandra_insert_presult {
+ public:
+
+
+  virtual ~Cassandra_insert_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_insert_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_add_args {
+ public:
+
+  Cassandra_add_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_add_args() throw() {}
+
+  std::string key;
+  ColumnParent column_parent;
+  CounterColumn column;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_add_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_parent == rhs.column_parent))
+      return false;
+    if (!(column == rhs.column))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_add_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_add_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_add_pargs {
+ public:
+
+
+  virtual ~Cassandra_add_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnParent* column_parent;
+  const CounterColumn* column;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_add_result__isset {
+  _Cassandra_add_result__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_add_result__isset;
+
+class Cassandra_add_result {
+ public:
+
+  Cassandra_add_result() {
+  }
+
+  virtual ~Cassandra_add_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_add_result__isset __isset;
+
+  bool operator == (const Cassandra_add_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_add_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_add_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_add_presult__isset {
+  _Cassandra_add_presult__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_add_presult__isset;
+
+class Cassandra_add_presult {
+ public:
+
+
+  virtual ~Cassandra_add_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_add_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _Cassandra_remove_args__isset {
+  _Cassandra_remove_args__isset() : consistency_level(false) {}
+  bool consistency_level;
+} _Cassandra_remove_args__isset;
+
+class Cassandra_remove_args {
+ public:
+
+  Cassandra_remove_args() : key(""), timestamp(0) {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_remove_args() throw() {}
+
+  std::string key;
+  ColumnPath column_path;
+  int64_t timestamp;
+  ConsistencyLevel::type consistency_level;
+
+  _Cassandra_remove_args__isset __isset;
+
+  bool operator == (const Cassandra_remove_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(column_path == rhs.column_path))
+      return false;
+    if (!(timestamp == rhs.timestamp))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_remove_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_remove_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_remove_pargs {
+ public:
+
+
+  virtual ~Cassandra_remove_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnPath* column_path;
+  const int64_t* timestamp;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_remove_result__isset {
+  _Cassandra_remove_result__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_remove_result__isset;
+
+class Cassandra_remove_result {
+ public:
+
+  Cassandra_remove_result() {
+  }
+
+  virtual ~Cassandra_remove_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_remove_result__isset __isset;
+
+  bool operator == (const Cassandra_remove_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_remove_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_remove_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_remove_presult__isset {
+  _Cassandra_remove_presult__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_remove_presult__isset;
+
+class Cassandra_remove_presult {
+ public:
+
+
+  virtual ~Cassandra_remove_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_remove_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_remove_counter_args {
+ public:
+
+  Cassandra_remove_counter_args() : key("") {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_remove_counter_args() throw() {}
+
+  std::string key;
+  ColumnPath path;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_remove_counter_args & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(path == rhs.path))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_remove_counter_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_remove_counter_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_remove_counter_pargs {
+ public:
+
+
+  virtual ~Cassandra_remove_counter_pargs() throw() {}
+
+  const std::string* key;
+  const ColumnPath* path;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_remove_counter_result__isset {
+  _Cassandra_remove_counter_result__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_remove_counter_result__isset;
+
+class Cassandra_remove_counter_result {
+ public:
+
+  Cassandra_remove_counter_result() {
+  }
+
+  virtual ~Cassandra_remove_counter_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_remove_counter_result__isset __isset;
+
+  bool operator == (const Cassandra_remove_counter_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_remove_counter_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_remove_counter_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_remove_counter_presult__isset {
+  _Cassandra_remove_counter_presult__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_remove_counter_presult__isset;
+
+class Cassandra_remove_counter_presult {
+ public:
+
+
+  virtual ~Cassandra_remove_counter_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_remove_counter_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_batch_mutate_args {
+ public:
+
+  Cassandra_batch_mutate_args() {
+    consistency_level = (ConsistencyLevel::type)1;
+
+  }
+
+  virtual ~Cassandra_batch_mutate_args() throw() {}
+
+  std::map<std::string, std::map<std::string, std::vector<Mutation> > >  mutation_map;
+  ConsistencyLevel::type consistency_level;
+
+  bool operator == (const Cassandra_batch_mutate_args & rhs) const
+  {
+    if (!(mutation_map == rhs.mutation_map))
+      return false;
+    if (!(consistency_level == rhs.consistency_level))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_batch_mutate_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_batch_mutate_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_batch_mutate_pargs {
+ public:
+
+
+  virtual ~Cassandra_batch_mutate_pargs() throw() {}
+
+  const std::map<std::string, std::map<std::string, std::vector<Mutation> > > * mutation_map;
+  const ConsistencyLevel::type* consistency_level;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_batch_mutate_result__isset {
+  _Cassandra_batch_mutate_result__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_batch_mutate_result__isset;
+
+class Cassandra_batch_mutate_result {
+ public:
+
+  Cassandra_batch_mutate_result() {
+  }
+
+  virtual ~Cassandra_batch_mutate_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_batch_mutate_result__isset __isset;
+
+  bool operator == (const Cassandra_batch_mutate_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_batch_mutate_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_batch_mutate_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_batch_mutate_presult__isset {
+  _Cassandra_batch_mutate_presult__isset() : ire(false), ue(false), te(false) {}
+  bool ire;
+  bool ue;
+  bool te;
+} _Cassandra_batch_mutate_presult__isset;
+
+class Cassandra_batch_mutate_presult {
+ public:
+
+
+  virtual ~Cassandra_batch_mutate_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+
+  _Cassandra_batch_mutate_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_truncate_args {
+ public:
+
+  Cassandra_truncate_args() : cfname("") {
+  }
+
+  virtual ~Cassandra_truncate_args() throw() {}
+
+  std::string cfname;
+
+  bool operator == (const Cassandra_truncate_args & rhs) const
+  {
+    if (!(cfname == rhs.cfname))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_truncate_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_truncate_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_truncate_pargs {
+ public:
+
+
+  virtual ~Cassandra_truncate_pargs() throw() {}
+
+  const std::string* cfname;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_truncate_result__isset {
+  _Cassandra_truncate_result__isset() : ire(false), ue(false) {}
+  bool ire;
+  bool ue;
+} _Cassandra_truncate_result__isset;
+
+class Cassandra_truncate_result {
+ public:
+
+  Cassandra_truncate_result() {
+  }
+
+  virtual ~Cassandra_truncate_result() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+
+  _Cassandra_truncate_result__isset __isset;
+
+  bool operator == (const Cassandra_truncate_result & rhs) const
+  {
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_truncate_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_truncate_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_truncate_presult__isset {
+  _Cassandra_truncate_presult__isset() : ire(false), ue(false) {}
+  bool ire;
+  bool ue;
+} _Cassandra_truncate_presult__isset;
+
+class Cassandra_truncate_presult {
+ public:
+
+
+  virtual ~Cassandra_truncate_presult() throw() {}
+
+  InvalidRequestException ire;
+  UnavailableException ue;
+
+  _Cassandra_truncate_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_schema_versions_args {
+ public:
+
+  Cassandra_describe_schema_versions_args() {
+  }
+
+  virtual ~Cassandra_describe_schema_versions_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_schema_versions_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_schema_versions_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_schema_versions_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_schema_versions_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_schema_versions_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_schema_versions_result__isset {
+  _Cassandra_describe_schema_versions_result__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_schema_versions_result__isset;
+
+class Cassandra_describe_schema_versions_result {
+ public:
+
+  Cassandra_describe_schema_versions_result() {
+  }
+
+  virtual ~Cassandra_describe_schema_versions_result() throw() {}
+
+  std::map<std::string, std::vector<std::string> >  success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_schema_versions_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_schema_versions_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_schema_versions_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_schema_versions_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_schema_versions_presult__isset {
+  _Cassandra_describe_schema_versions_presult__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_schema_versions_presult__isset;
+
+class Cassandra_describe_schema_versions_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_schema_versions_presult() throw() {}
+
+  std::map<std::string, std::vector<std::string> > * success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_schema_versions_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_keyspaces_args {
+ public:
+
+  Cassandra_describe_keyspaces_args() {
+  }
+
+  virtual ~Cassandra_describe_keyspaces_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_keyspaces_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_keyspaces_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_keyspaces_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_keyspaces_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_keyspaces_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_keyspaces_result__isset {
+  _Cassandra_describe_keyspaces_result__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_keyspaces_result__isset;
+
+class Cassandra_describe_keyspaces_result {
+ public:
+
+  Cassandra_describe_keyspaces_result() {
+  }
+
+  virtual ~Cassandra_describe_keyspaces_result() throw() {}
+
+  std::vector<KsDef>  success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_keyspaces_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_keyspaces_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_keyspaces_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_keyspaces_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_keyspaces_presult__isset {
+  _Cassandra_describe_keyspaces_presult__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_keyspaces_presult__isset;
+
+class Cassandra_describe_keyspaces_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_keyspaces_presult() throw() {}
+
+  std::vector<KsDef> * success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_keyspaces_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_cluster_name_args {
+ public:
+
+  Cassandra_describe_cluster_name_args() {
+  }
+
+  virtual ~Cassandra_describe_cluster_name_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_cluster_name_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_cluster_name_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_cluster_name_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_cluster_name_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_cluster_name_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_cluster_name_result__isset {
+  _Cassandra_describe_cluster_name_result__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_cluster_name_result__isset;
+
+class Cassandra_describe_cluster_name_result {
+ public:
+
+  Cassandra_describe_cluster_name_result() : success("") {
+  }
+
+  virtual ~Cassandra_describe_cluster_name_result() throw() {}
+
+  std::string success;
+
+  _Cassandra_describe_cluster_name_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_cluster_name_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_cluster_name_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_cluster_name_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_cluster_name_presult__isset {
+  _Cassandra_describe_cluster_name_presult__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_cluster_name_presult__isset;
+
+class Cassandra_describe_cluster_name_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_cluster_name_presult() throw() {}
+
+  std::string* success;
+
+  _Cassandra_describe_cluster_name_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_version_args {
+ public:
+
+  Cassandra_describe_version_args() {
+  }
+
+  virtual ~Cassandra_describe_version_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_version_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_version_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_version_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_version_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_version_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_version_result__isset {
+  _Cassandra_describe_version_result__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_version_result__isset;
+
+class Cassandra_describe_version_result {
+ public:
+
+  Cassandra_describe_version_result() : success("") {
+  }
+
+  virtual ~Cassandra_describe_version_result() throw() {}
+
+  std::string success;
+
+  _Cassandra_describe_version_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_version_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_version_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_version_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_version_presult__isset {
+  _Cassandra_describe_version_presult__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_version_presult__isset;
+
+class Cassandra_describe_version_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_version_presult() throw() {}
+
+  std::string* success;
+
+  _Cassandra_describe_version_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_ring_args {
+ public:
+
+  Cassandra_describe_ring_args() : keyspace("") {
+  }
+
+  virtual ~Cassandra_describe_ring_args() throw() {}
+
+  std::string keyspace;
+
+  bool operator == (const Cassandra_describe_ring_args & rhs) const
+  {
+    if (!(keyspace == rhs.keyspace))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_ring_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_ring_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_ring_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_ring_pargs() throw() {}
+
+  const std::string* keyspace;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_ring_result__isset {
+  _Cassandra_describe_ring_result__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_ring_result__isset;
+
+class Cassandra_describe_ring_result {
+ public:
+
+  Cassandra_describe_ring_result() {
+  }
+
+  virtual ~Cassandra_describe_ring_result() throw() {}
+
+  std::vector<TokenRange>  success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_ring_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_ring_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_ring_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_ring_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_ring_presult__isset {
+  _Cassandra_describe_ring_presult__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_ring_presult__isset;
+
+class Cassandra_describe_ring_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_ring_presult() throw() {}
+
+  std::vector<TokenRange> * success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_ring_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_partitioner_args {
+ public:
+
+  Cassandra_describe_partitioner_args() {
+  }
+
+  virtual ~Cassandra_describe_partitioner_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_partitioner_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_partitioner_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_partitioner_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_partitioner_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_partitioner_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_partitioner_result__isset {
+  _Cassandra_describe_partitioner_result__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_partitioner_result__isset;
+
+class Cassandra_describe_partitioner_result {
+ public:
+
+  Cassandra_describe_partitioner_result() : success("") {
+  }
+
+  virtual ~Cassandra_describe_partitioner_result() throw() {}
+
+  std::string success;
+
+  _Cassandra_describe_partitioner_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_partitioner_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_partitioner_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_partitioner_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_partitioner_presult__isset {
+  _Cassandra_describe_partitioner_presult__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_partitioner_presult__isset;
+
+class Cassandra_describe_partitioner_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_partitioner_presult() throw() {}
+
+  std::string* success;
+
+  _Cassandra_describe_partitioner_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_snitch_args {
+ public:
+
+  Cassandra_describe_snitch_args() {
+  }
+
+  virtual ~Cassandra_describe_snitch_args() throw() {}
+
+
+  bool operator == (const Cassandra_describe_snitch_args & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const Cassandra_describe_snitch_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_snitch_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_snitch_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_snitch_pargs() throw() {}
+
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_snitch_result__isset {
+  _Cassandra_describe_snitch_result__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_snitch_result__isset;
+
+class Cassandra_describe_snitch_result {
+ public:
+
+  Cassandra_describe_snitch_result() : success("") {
+  }
+
+  virtual ~Cassandra_describe_snitch_result() throw() {}
+
+  std::string success;
+
+  _Cassandra_describe_snitch_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_snitch_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_snitch_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_snitch_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_snitch_presult__isset {
+  _Cassandra_describe_snitch_presult__isset() : success(false) {}
+  bool success;
+} _Cassandra_describe_snitch_presult__isset;
+
+class Cassandra_describe_snitch_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_snitch_presult() throw() {}
+
+  std::string* success;
+
+  _Cassandra_describe_snitch_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_keyspace_args {
+ public:
+
+  Cassandra_describe_keyspace_args() : keyspace("") {
+  }
+
+  virtual ~Cassandra_describe_keyspace_args() throw() {}
+
+  std::string keyspace;
+
+  bool operator == (const Cassandra_describe_keyspace_args & rhs) const
+  {
+    if (!(keyspace == rhs.keyspace))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_keyspace_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_keyspace_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_keyspace_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_keyspace_pargs() throw() {}
+
+  const std::string* keyspace;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_keyspace_result__isset {
+  _Cassandra_describe_keyspace_result__isset() : success(false), nfe(false), ire(false) {}
+  bool success;
+  bool nfe;
+  bool ire;
+} _Cassandra_describe_keyspace_result__isset;
+
+class Cassandra_describe_keyspace_result {
+ public:
+
+  Cassandra_describe_keyspace_result() {
+  }
+
+  virtual ~Cassandra_describe_keyspace_result() throw() {}
+
+  KsDef success;
+  NotFoundException nfe;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_keyspace_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_keyspace_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(nfe == rhs.nfe))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_keyspace_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_keyspace_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_keyspace_presult__isset {
+  _Cassandra_describe_keyspace_presult__isset() : success(false), nfe(false), ire(false) {}
+  bool success;
+  bool nfe;
+  bool ire;
+} _Cassandra_describe_keyspace_presult__isset;
+
+class Cassandra_describe_keyspace_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_keyspace_presult() throw() {}
+
+  KsDef* success;
+  NotFoundException nfe;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_keyspace_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_describe_splits_args {
+ public:
+
+  Cassandra_describe_splits_args() : cfName(""), start_token(""), end_token(""), keys_per_split(0) {
+  }
+
+  virtual ~Cassandra_describe_splits_args() throw() {}
+
+  std::string cfName;
+  std::string start_token;
+  std::string end_token;
+  int32_t keys_per_split;
+
+  bool operator == (const Cassandra_describe_splits_args & rhs) const
+  {
+    if (!(cfName == rhs.cfName))
+      return false;
+    if (!(start_token == rhs.start_token))
+      return false;
+    if (!(end_token == rhs.end_token))
+      return false;
+    if (!(keys_per_split == rhs.keys_per_split))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_splits_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_splits_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_describe_splits_pargs {
+ public:
+
+
+  virtual ~Cassandra_describe_splits_pargs() throw() {}
+
+  const std::string* cfName;
+  const std::string* start_token;
+  const std::string* end_token;
+  const int32_t* keys_per_split;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_splits_result__isset {
+  _Cassandra_describe_splits_result__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_splits_result__isset;
+
+class Cassandra_describe_splits_result {
+ public:
+
+  Cassandra_describe_splits_result() {
+  }
+
+  virtual ~Cassandra_describe_splits_result() throw() {}
+
+  std::vector<std::string>  success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_splits_result__isset __isset;
+
+  bool operator == (const Cassandra_describe_splits_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_describe_splits_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_describe_splits_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_describe_splits_presult__isset {
+  _Cassandra_describe_splits_presult__isset() : success(false), ire(false) {}
+  bool success;
+  bool ire;
+} _Cassandra_describe_splits_presult__isset;
+
+class Cassandra_describe_splits_presult {
+ public:
+
+
+  virtual ~Cassandra_describe_splits_presult() throw() {}
+
+  std::vector<std::string> * success;
+  InvalidRequestException ire;
+
+  _Cassandra_describe_splits_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_add_column_family_args {
+ public:
+
+  Cassandra_system_add_column_family_args() {
+  }
+
+  virtual ~Cassandra_system_add_column_family_args() throw() {}
+
+  CfDef cf_def;
+
+  bool operator == (const Cassandra_system_add_column_family_args & rhs) const
+  {
+    if (!(cf_def == rhs.cf_def))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_add_column_family_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_add_column_family_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_add_column_family_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_add_column_family_pargs() throw() {}
+
+  const CfDef* cf_def;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_add_column_family_result__isset {
+  _Cassandra_system_add_column_family_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_add_column_family_result__isset;
+
+class Cassandra_system_add_column_family_result {
+ public:
+
+  Cassandra_system_add_column_family_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_add_column_family_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_add_column_family_result__isset __isset;
+
+  bool operator == (const Cassandra_system_add_column_family_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_add_column_family_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_add_column_family_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_add_column_family_presult__isset {
+  _Cassandra_system_add_column_family_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_add_column_family_presult__isset;
+
+class Cassandra_system_add_column_family_presult {
+ public:
+
+
+  virtual ~Cassandra_system_add_column_family_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_add_column_family_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_drop_column_family_args {
+ public:
+
+  Cassandra_system_drop_column_family_args() : column_family("") {
+  }
+
+  virtual ~Cassandra_system_drop_column_family_args() throw() {}
+
+  std::string column_family;
+
+  bool operator == (const Cassandra_system_drop_column_family_args & rhs) const
+  {
+    if (!(column_family == rhs.column_family))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_drop_column_family_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_drop_column_family_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_drop_column_family_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_drop_column_family_pargs() throw() {}
+
+  const std::string* column_family;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_drop_column_family_result__isset {
+  _Cassandra_system_drop_column_family_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_drop_column_family_result__isset;
+
+class Cassandra_system_drop_column_family_result {
+ public:
+
+  Cassandra_system_drop_column_family_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_drop_column_family_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_drop_column_family_result__isset __isset;
+
+  bool operator == (const Cassandra_system_drop_column_family_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_drop_column_family_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_drop_column_family_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_drop_column_family_presult__isset {
+  _Cassandra_system_drop_column_family_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_drop_column_family_presult__isset;
+
+class Cassandra_system_drop_column_family_presult {
+ public:
+
+
+  virtual ~Cassandra_system_drop_column_family_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_drop_column_family_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_add_keyspace_args {
+ public:
+
+  Cassandra_system_add_keyspace_args() {
+  }
+
+  virtual ~Cassandra_system_add_keyspace_args() throw() {}
+
+  KsDef ks_def;
+
+  bool operator == (const Cassandra_system_add_keyspace_args & rhs) const
+  {
+    if (!(ks_def == rhs.ks_def))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_add_keyspace_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_add_keyspace_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_add_keyspace_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_add_keyspace_pargs() throw() {}
+
+  const KsDef* ks_def;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_add_keyspace_result__isset {
+  _Cassandra_system_add_keyspace_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_add_keyspace_result__isset;
+
+class Cassandra_system_add_keyspace_result {
+ public:
+
+  Cassandra_system_add_keyspace_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_add_keyspace_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_add_keyspace_result__isset __isset;
+
+  bool operator == (const Cassandra_system_add_keyspace_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_add_keyspace_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_add_keyspace_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_add_keyspace_presult__isset {
+  _Cassandra_system_add_keyspace_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_add_keyspace_presult__isset;
+
+class Cassandra_system_add_keyspace_presult {
+ public:
+
+
+  virtual ~Cassandra_system_add_keyspace_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_add_keyspace_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_drop_keyspace_args {
+ public:
+
+  Cassandra_system_drop_keyspace_args() : keyspace("") {
+  }
+
+  virtual ~Cassandra_system_drop_keyspace_args() throw() {}
+
+  std::string keyspace;
+
+  bool operator == (const Cassandra_system_drop_keyspace_args & rhs) const
+  {
+    if (!(keyspace == rhs.keyspace))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_drop_keyspace_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_drop_keyspace_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_drop_keyspace_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_drop_keyspace_pargs() throw() {}
+
+  const std::string* keyspace;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_drop_keyspace_result__isset {
+  _Cassandra_system_drop_keyspace_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_drop_keyspace_result__isset;
+
+class Cassandra_system_drop_keyspace_result {
+ public:
+
+  Cassandra_system_drop_keyspace_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_drop_keyspace_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_drop_keyspace_result__isset __isset;
+
+  bool operator == (const Cassandra_system_drop_keyspace_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_drop_keyspace_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_drop_keyspace_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_drop_keyspace_presult__isset {
+  _Cassandra_system_drop_keyspace_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_drop_keyspace_presult__isset;
+
+class Cassandra_system_drop_keyspace_presult {
+ public:
+
+
+  virtual ~Cassandra_system_drop_keyspace_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_drop_keyspace_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_update_keyspace_args {
+ public:
+
+  Cassandra_system_update_keyspace_args() {
+  }
+
+  virtual ~Cassandra_system_update_keyspace_args() throw() {}
+
+  KsDef ks_def;
+
+  bool operator == (const Cassandra_system_update_keyspace_args & rhs) const
+  {
+    if (!(ks_def == rhs.ks_def))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_update_keyspace_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_update_keyspace_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_update_keyspace_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_update_keyspace_pargs() throw() {}
+
+  const KsDef* ks_def;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_update_keyspace_result__isset {
+  _Cassandra_system_update_keyspace_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_update_keyspace_result__isset;
+
+class Cassandra_system_update_keyspace_result {
+ public:
+
+  Cassandra_system_update_keyspace_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_update_keyspace_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_update_keyspace_result__isset __isset;
+
+  bool operator == (const Cassandra_system_update_keyspace_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_update_keyspace_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_update_keyspace_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_update_keyspace_presult__isset {
+  _Cassandra_system_update_keyspace_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_update_keyspace_presult__isset;
+
+class Cassandra_system_update_keyspace_presult {
+ public:
+
+
+  virtual ~Cassandra_system_update_keyspace_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_update_keyspace_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_system_update_column_family_args {
+ public:
+
+  Cassandra_system_update_column_family_args() {
+  }
+
+  virtual ~Cassandra_system_update_column_family_args() throw() {}
+
+  CfDef cf_def;
+
+  bool operator == (const Cassandra_system_update_column_family_args & rhs) const
+  {
+    if (!(cf_def == rhs.cf_def))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_update_column_family_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_update_column_family_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_system_update_column_family_pargs {
+ public:
+
+
+  virtual ~Cassandra_system_update_column_family_pargs() throw() {}
+
+  const CfDef* cf_def;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_update_column_family_result__isset {
+  _Cassandra_system_update_column_family_result__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_update_column_family_result__isset;
+
+class Cassandra_system_update_column_family_result {
+ public:
+
+  Cassandra_system_update_column_family_result() : success("") {
+  }
+
+  virtual ~Cassandra_system_update_column_family_result() throw() {}
+
+  std::string success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_update_column_family_result__isset __isset;
+
+  bool operator == (const Cassandra_system_update_column_family_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_system_update_column_family_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_system_update_column_family_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_system_update_column_family_presult__isset {
+  _Cassandra_system_update_column_family_presult__isset() : success(false), ire(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool sde;
+} _Cassandra_system_update_column_family_presult__isset;
+
+class Cassandra_system_update_column_family_presult {
+ public:
+
+
+  virtual ~Cassandra_system_update_column_family_presult() throw() {}
+
+  std::string* success;
+  InvalidRequestException ire;
+  SchemaDisagreementException sde;
+
+  _Cassandra_system_update_column_family_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class Cassandra_execute_cql_query_args {
+ public:
+
+  Cassandra_execute_cql_query_args() : query("") {
+  }
+
+  virtual ~Cassandra_execute_cql_query_args() throw() {}
+
+  std::string query;
+  Compression::type compression;
+
+  bool operator == (const Cassandra_execute_cql_query_args & rhs) const
+  {
+    if (!(query == rhs.query))
+      return false;
+    if (!(compression == rhs.compression))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_execute_cql_query_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_execute_cql_query_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Cassandra_execute_cql_query_pargs {
+ public:
+
+
+  virtual ~Cassandra_execute_cql_query_pargs() throw() {}
+
+  const std::string* query;
+  const Compression::type* compression;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_execute_cql_query_result__isset {
+  _Cassandra_execute_cql_query_result__isset() : success(false), ire(false), ue(false), te(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+  bool sde;
+} _Cassandra_execute_cql_query_result__isset;
+
+class Cassandra_execute_cql_query_result {
+ public:
+
+  Cassandra_execute_cql_query_result() {
+  }
+
+  virtual ~Cassandra_execute_cql_query_result() throw() {}
+
+  CqlResult success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+  SchemaDisagreementException sde;
+
+  _Cassandra_execute_cql_query_result__isset __isset;
+
+  bool operator == (const Cassandra_execute_cql_query_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ire == rhs.ire))
+      return false;
+    if (!(ue == rhs.ue))
+      return false;
+    if (!(te == rhs.te))
+      return false;
+    if (!(sde == rhs.sde))
+      return false;
+    return true;
+  }
+  bool operator != (const Cassandra_execute_cql_query_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Cassandra_execute_cql_query_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Cassandra_execute_cql_query_presult__isset {
+  _Cassandra_execute_cql_query_presult__isset() : success(false), ire(false), ue(false), te(false), sde(false) {}
+  bool success;
+  bool ire;
+  bool ue;
+  bool te;
+  bool sde;
+} _Cassandra_execute_cql_query_presult__isset;
+
+class Cassandra_execute_cql_query_presult {
+ public:
+
+
+  virtual ~Cassandra_execute_cql_query_presult() throw() {}
+
+  CqlResult* success;
+  InvalidRequestException ire;
+  UnavailableException ue;
+  TimedOutException te;
+  SchemaDisagreementException sde;
+
+  _Cassandra_execute_cql_query_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+class CassandraClient : virtual public CassandraIf {
+ public:
+  CassandraClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
+    piprot_(prot),
+    poprot_(prot) {
+    iprot_ = prot.get();
+    oprot_ = prot.get();
+  }
+  CassandraClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
+    piprot_(iprot),
+    poprot_(oprot) {
+    iprot_ = iprot.get();
+    oprot_ = oprot.get();
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
+    return piprot_;
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
+    return poprot_;
+  }
+  void login(const AuthenticationRequest& auth_request);
+  void send_login(const AuthenticationRequest& auth_request);
+  void recv_login();
+  void set_keyspace(const std::string& keyspace);
+  void send_set_keyspace(const std::string& keyspace);
+  void recv_set_keyspace();
+  void get(ColumnOrSuperColumn& _return, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level);
+  void send_get(const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level);
+  void recv_get(ColumnOrSuperColumn& _return);
+  void get_slice(std::vector<ColumnOrSuperColumn> & _return, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void send_get_slice(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void recv_get_slice(std::vector<ColumnOrSuperColumn> & _return);
+  int32_t get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void send_get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  int32_t recv_get_count();
+  void multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void send_multiget_slice(const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void recv_multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return);
+  void multiget_count(std::map<std::string, int32_t> & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void send_multiget_count(const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level);
+  void recv_multiget_count(std::map<std::string, int32_t> & _return);
+  void get_range_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level);
+  void send_get_range_slices(const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level);
+  void recv_get_range_slices(std::vector<KeySlice> & _return);
+  void get_indexed_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level);
+  void send_get_indexed_slices(const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level);
+  void recv_get_indexed_slices(std::vector<KeySlice> & _return);
+  void insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level);
+  void send_insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level);
+  void recv_insert();
+  void add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level);
+  void send_add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level);
+  void recv_add();
+  void remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level);
+  void send_remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level);
+  void recv_remove();
+  void remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level);
+  void send_remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level);
+  void recv_remove_counter();
+  void batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level);
+  void send_batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level);
+  void recv_batch_mutate();
+  void truncate(const std::string& cfname);
+  void send_truncate(const std::string& cfname);
+  void recv_truncate();
+  void describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return);
+  void send_describe_schema_versions();
+  void recv_describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return);
+  void describe_keyspaces(std::vector<KsDef> & _return);
+  void send_describe_keyspaces();
+  void recv_describe_keyspaces(std::vector<KsDef> & _return);
+  void describe_cluster_name(std::string& _return);
+  void send_describe_cluster_name();
+  void recv_describe_cluster_name(std::string& _return);
+  void describe_version(std::string& _return);
+  void send_describe_version();
+  void recv_describe_version(std::string& _return);
+  void describe_ring(std::vector<TokenRange> & _return, const std::string& keyspace);
+  void send_describe_ring(const std::string& keyspace);
+  void recv_describe_ring(std::vector<TokenRange> & _return);
+  void describe_partitioner(std::string& _return);
+  void send_describe_partitioner();
+  void recv_describe_partitioner(std::string& _return);
+  void describe_snitch(std::string& _return);
+  void send_describe_snitch();
+  void recv_describe_snitch(std::string& _return);
+  void describe_keyspace(KsDef& _return, const std::string& keyspace);
+  void send_describe_keyspace(const std::string& keyspace);
+  void recv_describe_keyspace(KsDef& _return);
+  void describe_splits(std::vector<std::string> & _return, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split);
+  void send_describe_splits(const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split);
+  void recv_describe_splits(std::vector<std::string> & _return);
+  void system_add_column_family(std::string& _return, const CfDef& cf_def);
+  void send_system_add_column_family(const CfDef& cf_def);
+  void recv_system_add_column_family(std::string& _return);
+  void system_drop_column_family(std::string& _return, const std::string& column_family);
+  void send_system_drop_column_family(const std::string& column_family);
+  void recv_system_drop_column_family(std::string& _return);
+  void system_add_keyspace(std::string& _return, const KsDef& ks_def);
+  void send_system_add_keyspace(const KsDef& ks_def);
+  void recv_system_add_keyspace(std::string& _return);
+  void system_drop_keyspace(std::string& _return, const std::string& keyspace);
+  void send_system_drop_keyspace(const std::string& keyspace);
+  void recv_system_drop_keyspace(std::string& _return);
+  void system_update_keyspace(std::string& _return, const KsDef& ks_def);
+  void send_system_update_keyspace(const KsDef& ks_def);
+  void recv_system_update_keyspace(std::string& _return);
+  void system_update_column_family(std::string& _return, const CfDef& cf_def);
+  void send_system_update_column_family(const CfDef& cf_def);
+  void recv_system_update_column_family(std::string& _return);
+  void execute_cql_query(CqlResult& _return, const std::string& query, const Compression::type compression);
+  void send_execute_cql_query(const std::string& query, const Compression::type compression);
+  void recv_execute_cql_query(CqlResult& _return);
+ protected:
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
+  ::apache::thrift::protocol::TProtocol* iprot_;
+  ::apache::thrift::protocol::TProtocol* oprot_;
+};
+
+class CassandraProcessor : virtual public ::apache::thrift::TProcessor {
+ protected:
+  boost::shared_ptr<CassandraIf> iface_;
+  virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext);
+ private:
+  std::map<std::string, void (CassandraProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)> processMap_;
+  void process_login(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_set_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_get(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_get_slice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_get_count(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_multiget_slice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_multiget_count(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_get_range_slices(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_get_indexed_slices(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_insert(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_add(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_remove(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_remove_counter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_batch_mutate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_truncate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_schema_versions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_keyspaces(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_cluster_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_version(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_ring(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_partitioner(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_snitch(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_describe_splits(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_add_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_drop_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_add_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_drop_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_update_keyspace(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_system_update_column_family(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_execute_cql_query(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ public:
+  CassandraProcessor(boost::shared_ptr<CassandraIf> iface) :
+    iface_(iface) {
+    processMap_["login"] = &CassandraProcessor::process_login;
+    processMap_["set_keyspace"] = &CassandraProcessor::process_set_keyspace;
+    processMap_["get"] = &CassandraProcessor::process_get;
+    processMap_["get_slice"] = &CassandraProcessor::process_get_slice;
+    processMap_["get_count"] = &CassandraProcessor::process_get_count;
+    processMap_["multiget_slice"] = &CassandraProcessor::process_multiget_slice;
+    processMap_["multiget_count"] = &CassandraProcessor::process_multiget_count;
+    processMap_["get_range_slices"] = &CassandraProcessor::process_get_range_slices;
+    processMap_["get_indexed_slices"] = &CassandraProcessor::process_get_indexed_slices;
+    processMap_["insert"] = &CassandraProcessor::process_insert;
+    processMap_["add"] = &CassandraProcessor::process_add;
+    processMap_["remove"] = &CassandraProcessor::process_remove;
+    processMap_["remove_counter"] = &CassandraProcessor::process_remove_counter;
+    processMap_["batch_mutate"] = &CassandraProcessor::process_batch_mutate;
+    processMap_["truncate"] = &CassandraProcessor::process_truncate;
+    processMap_["describe_schema_versions"] = &CassandraProcessor::process_describe_schema_versions;
+    processMap_["describe_keyspaces"] = &CassandraProcessor::process_describe_keyspaces;
+    processMap_["describe_cluster_name"] = &CassandraProcessor::process_describe_cluster_name;
+    processMap_["describe_version"] = &CassandraProcessor::process_describe_version;
+    processMap_["describe_ring"] = &CassandraProcessor::process_describe_ring;
+    processMap_["describe_partitioner"] = &CassandraProcessor::process_describe_partitioner;
+    processMap_["describe_snitch"] = &CassandraProcessor::process_describe_snitch;
+    processMap_["describe_keyspace"] = &CassandraProcessor::process_describe_keyspace;
+    processMap_["describe_splits"] = &CassandraProcessor::process_describe_splits;
+    processMap_["system_add_column_family"] = &CassandraProcessor::process_system_add_column_family;
+    processMap_["system_drop_column_family"] = &CassandraProcessor::process_system_drop_column_family;
+    processMap_["system_add_keyspace"] = &CassandraProcessor::process_system_add_keyspace;
+    processMap_["system_drop_keyspace"] = &CassandraProcessor::process_system_drop_keyspace;
+    processMap_["system_update_keyspace"] = &CassandraProcessor::process_system_update_keyspace;
+    processMap_["system_update_column_family"] = &CassandraProcessor::process_system_update_column_family;
+    processMap_["execute_cql_query"] = &CassandraProcessor::process_execute_cql_query;
+  }
+
+  virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext);
+  virtual ~CassandraProcessor() {}
+};
+
+class CassandraMultiface : virtual public CassandraIf {
+ public:
+  CassandraMultiface(std::vector<boost::shared_ptr<CassandraIf> >& ifaces) : ifaces_(ifaces) {
+  }
+  virtual ~CassandraMultiface() {}
+ protected:
+  std::vector<boost::shared_ptr<CassandraIf> > ifaces_;
+  CassandraMultiface() {}
+  void add(boost::shared_ptr<CassandraIf> iface) {
+    ifaces_.push_back(iface);
+  }
+ public:
+  void login(const AuthenticationRequest& auth_request) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->login(auth_request);
+    }
+  }
+
+  void set_keyspace(const std::string& keyspace) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->set_keyspace(keyspace);
+    }
+  }
+
+  void get(ColumnOrSuperColumn& _return, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->get(_return, key, column_path, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->get(_return, key, column_path, consistency_level);
+      }
+    }
+  }
+
+  void get_slice(std::vector<ColumnOrSuperColumn> & _return, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->get_slice(_return, key, column_parent, predicate, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->get_slice(_return, key, column_parent, predicate, consistency_level);
+      }
+    }
+  }
+
+  int32_t get_count(const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->get_count(key, column_parent, predicate, consistency_level);
+      } else {
+        ifaces_[i]->get_count(key, column_parent, predicate, consistency_level);
+      }
+    }
+  }
+
+  void multiget_slice(std::map<std::string, std::vector<ColumnOrSuperColumn> > & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->multiget_slice(_return, keys, column_parent, predicate, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->multiget_slice(_return, keys, column_parent, predicate, consistency_level);
+      }
+    }
+  }
+
+  void multiget_count(std::map<std::string, int32_t> & _return, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->multiget_count(_return, keys, column_parent, predicate, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->multiget_count(_return, keys, column_parent, predicate, consistency_level);
+      }
+    }
+  }
+
+  void get_range_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->get_range_slices(_return, column_parent, predicate, range, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->get_range_slices(_return, column_parent, predicate, range, consistency_level);
+      }
+    }
+  }
+
+  void get_indexed_slices(std::vector<KeySlice> & _return, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->get_indexed_slices(_return, column_parent, index_clause, column_predicate, consistency_level);
+        return;
+      } else {
+        ifaces_[i]->get_indexed_slices(_return, column_parent, index_clause, column_predicate, consistency_level);
+      }
+    }
+  }
+
+  void insert(const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->insert(key, column_parent, column, consistency_level);
+    }
+  }
+
+  void add(const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->add(key, column_parent, column, consistency_level);
+    }
+  }
+
+  void remove(const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->remove(key, column_path, timestamp, consistency_level);
+    }
+  }
+
+  void remove_counter(const std::string& key, const ColumnPath& path, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->remove_counter(key, path, consistency_level);
+    }
+  }
+
+  void batch_mutate(const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->batch_mutate(mutation_map, consistency_level);
+    }
+  }
+
+  void truncate(const std::string& cfname) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->truncate(cfname);
+    }
+  }
+
+  void describe_schema_versions(std::map<std::string, std::vector<std::string> > & _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_schema_versions(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_schema_versions(_return);
+      }
+    }
+  }
+
+  void describe_keyspaces(std::vector<KsDef> & _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_keyspaces(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_keyspaces(_return);
+      }
+    }
+  }
+
+  void describe_cluster_name(std::string& _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_cluster_name(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_cluster_name(_return);
+      }
+    }
+  }
+
+  void describe_version(std::string& _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_version(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_version(_return);
+      }
+    }
+  }
+
+  void describe_ring(std::vector<TokenRange> & _return, const std::string& keyspace) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_ring(_return, keyspace);
+        return;
+      } else {
+        ifaces_[i]->describe_ring(_return, keyspace);
+      }
+    }
+  }
+
+  void describe_partitioner(std::string& _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_partitioner(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_partitioner(_return);
+      }
+    }
+  }
+
+  void describe_snitch(std::string& _return) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_snitch(_return);
+        return;
+      } else {
+        ifaces_[i]->describe_snitch(_return);
+      }
+    }
+  }
+
+  void describe_keyspace(KsDef& _return, const std::string& keyspace) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_keyspace(_return, keyspace);
+        return;
+      } else {
+        ifaces_[i]->describe_keyspace(_return, keyspace);
+      }
+    }
+  }
+
+  void describe_splits(std::vector<std::string> & _return, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->describe_splits(_return, cfName, start_token, end_token, keys_per_split);
+        return;
+      } else {
+        ifaces_[i]->describe_splits(_return, cfName, start_token, end_token, keys_per_split);
+      }
+    }
+  }
+
+  void system_add_column_family(std::string& _return, const CfDef& cf_def) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_add_column_family(_return, cf_def);
+        return;
+      } else {
+        ifaces_[i]->system_add_column_family(_return, cf_def);
+      }
+    }
+  }
+
+  void system_drop_column_family(std::string& _return, const std::string& column_family) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_drop_column_family(_return, column_family);
+        return;
+      } else {
+        ifaces_[i]->system_drop_column_family(_return, column_family);
+      }
+    }
+  }
+
+  void system_add_keyspace(std::string& _return, const KsDef& ks_def) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_add_keyspace(_return, ks_def);
+        return;
+      } else {
+        ifaces_[i]->system_add_keyspace(_return, ks_def);
+      }
+    }
+  }
+
+  void system_drop_keyspace(std::string& _return, const std::string& keyspace) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_drop_keyspace(_return, keyspace);
+        return;
+      } else {
+        ifaces_[i]->system_drop_keyspace(_return, keyspace);
+      }
+    }
+  }
+
+  void system_update_keyspace(std::string& _return, const KsDef& ks_def) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_update_keyspace(_return, ks_def);
+        return;
+      } else {
+        ifaces_[i]->system_update_keyspace(_return, ks_def);
+      }
+    }
+  }
+
+  void system_update_column_family(std::string& _return, const CfDef& cf_def) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->system_update_column_family(_return, cf_def);
+        return;
+      } else {
+        ifaces_[i]->system_update_column_family(_return, cf_def);
+      }
+    }
+  }
+
+  void execute_cql_query(CqlResult& _return, const std::string& query, const Compression::type compression) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->execute_cql_query(_return, query, compression);
+        return;
+      } else {
+        ifaces_[i]->execute_cql_query(_return, query, compression);
+      }
+    }
+  }
+
+};
+
+}}} // namespace
+
+#endif

+ 44 - 0
modules/db_cassandra/Makefile

@@ -0,0 +1,44 @@
+# $Id$
+#
+# db_cassandra module makefile
+#
+# 
+# WARNING: do not run this directly, it should be run by the master Makefile
+
+include ../../Makefile.defs
+
+CXX=g++
+LD=g++
+auto_gen=
+NAME=db_cassandra.so
+
+THRIFT_DIR = /usr/local/include/thrift
+LIB_DIR = /usr/local/lib
+DEFS += -I${THRIFT_DIR} -DOPENSER_MOD_INTERFACE
+LIBS += -L${LIB_DIR} dbcassa_base.o cassandra_constants.o cassandra_types.o Cassandra.o -lthrift
+
+CXXFLAGS=$(CFLAGS:-Wno-deprecated option=)
+CXXFLAGS+= -Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare -Wno-strict-aliasing
+
+SERLIBPATH=../../lib
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kmi/kmi
+
+include ../../Makefile.modules
+
+cassandra_constants.o: cassandra_constants.cpp cassandra_constants.h
+	@echo "Compiling $<"
+	$(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+
+cassandra_types.o: cassandra_types.cpp cassandra_types.h
+	@echo "Compiling $<"
+	$(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+
+Cassandra.o: Cassandra.cpp Cassandra.h
+	@echo "Compiling $<"
+	$(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+
+dbcassa_base.o: dbcassa_base.cpp dbcassa_base.h dbcassa_table.h
+	@echo "Compiling $<"
+	$(CXX) $(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@
+
+db_cassandra.so: dbcassa_base.o cassandra_constants.o cassandra_types.o Cassandra.o

+ 227 - 0
modules/db_cassandra/README

@@ -0,0 +1,227 @@
+DB Cassandra Module
+
+Anca Vamanu
+
+   <[email protected]>
+
+Edited by
+
+Anca Vamanu
+
+   <[email protected]>
+
+   Copyright © 2012 1&1 Internet AG
+     __________________________________________________________________
+
+   Table of Contents
+
+   1. Admin Guide
+
+        1. Overview
+        2. Dependencies
+
+              2.1. SIP Router Modules
+              2.2. External Libraries or Applications
+
+        3. Parameters
+
+              3.1. schema_path (string)
+
+        4. Functions
+        5. Installation
+        6. Table schema
+        7. Limitations
+
+   List of Examples
+
+   1.1. Set schema_path parameter
+
+Chapter 1. Admin Guide
+
+   Table of Contents
+
+   1. Overview
+   2. Dependencies
+
+        2.1. SIP Router Modules
+        2.2. External Libraries or Applications
+
+   3. Parameters
+
+        3.1. schema_path (string)
+
+   4. Functions
+   5. Installation
+   6. Table schema
+   7. Limitations
+
+1. Overview
+
+   Db_cassandra is one of the SIP Router database modules. It does not
+   export any functions executable from the configuration scripts, but it
+   exports a subset of functions from the database API and thus other
+   modules can use it as a database driver, instead of, for example, the
+   Mysql module.
+
+   The storage backend is a Cassandra cluster and this module provides an
+   SQL interface to be used by other modules for storing and retrieving
+   data. Because Cassandra is a NoSQL distributed system, there are
+   limitations on the operations that can be performed. The limitations
+   concern the indexes on which queries are performed as it is only
+   possible to have simple conditions(equal only) and only two indexation
+   levels that will be explain in an example bellow.
+
+   Cassandra DB is especially suited for storing large data or data that
+   requires distribution, redundancy or replication. One usage example is
+   a distributed location system in a platform that has a cluster of SIP
+   Router servers, with more proxies and registration servers accesing the
+   same location database. This was actually the main usage we had in mind
+   when implementing this module. Please NOTE that it has only been tested
+   with usrloc and auth_db modules.
+
+   You can find a configuration file example for this usage in the module
+   - kamailio_cassa.cfg.
+
+   Because the module has to do the translation from SQL to Cassandra
+   NoSQL queries, the schemes for the tables must be known by the module.
+   You will find the schemas for location, subscriber and version tables
+   in utils/kamctl/dbcassandra directory. You have to provide the path to
+   the directory containing the table definitions by setting the module
+   parameter schema_path. NOTE that there is no need to configure a table
+   metadata in Cassandra cluster.
+
+   Special attention was given to the performance in Cassandra. Therefore,
+   the implementation uses only the native row indexation in Cassandra and
+   no secondary indexes that are costly. Instead, we simualte a secondary
+   index by using the column names and putting information in them, which
+   is very efficient. Also for deleting expired records, we let Cassandra
+   take care of this with its own mechanism (by setting ttl for columns).
+
+2. Dependencies
+
+   2.1. SIP Router Modules
+   2.2. External Libraries or Applications
+
+2.1. SIP Router Modules
+
+   The following modules must be loaded before this module:
+     * No dependencies on other SIP Router modules.
+
+2.2. External Libraries or Applications
+
+   The following libraries or applications must be installed before
+   running SIP Router with this module loaded:
+     * Thrift library version 0.6.1 .
+
+   The implementation was tested with Cassandra version 1.0.1 .
+
+3. Parameters
+
+   3.1. schema_path (string)
+
+3.1. schema_path (string)
+
+   The directory where the files with the table schemas are located. This
+   directory has to contains the directories corresponding to the
+   databases names(name of the directory = name of the database). And
+   these directories contain the files with the table schema. See the
+   schemas in utils/kamctl/dbcassandra directory.
+
+   Example 1.1. Set schema_path parameter
+   ...
+   modparam("db_cassandra", "schema_path",
+               "/usr/local/sip-router/etc/kamctl/dbcassandra")
+   ...
+
+4. Functions
+
+   NONE
+
+5. Installation
+
+   Because it dependes on an external library, the db_cassandra module is
+   not compiled and installed by default. You can use one of these
+   options.
+     * - edit the "Makefile" and remove "db_cassandra" from
+       "excluded_modules" list. Then follow the standard procedure to
+       install SIP Router: "make all; make install".
+     * - from command line use: 'make all include_modules="db_cassandra";
+       make install include_modules="db_cassandra"'.
+
+6. Table schema
+
+   The module must know the table schema for the tables that will be used.
+   You must configure the path to the schema directory by setting the
+   schema_path parameter.
+
+   A table schema document has the following structure:
+     * First row: the name and type of the columns in the form name(type)
+       separated by spaces. The possible types are: string, int, double
+       and timestamp.
+       Thetimestamp type has a special meaning. Only one column of this
+       type can be defined for a table, and it should contain the expiry
+       time for that record. If defined this value will be used to compute
+       the ttl for the columns and Cassandra will automatically delete the
+       columns when they expire. Because we want the ttl to have meaning
+       for the entire record, we must ensure that when the ttl is updated,
+       it is updated for all columns for that record. In other words, to
+       update the expiration time of a record, an insert operation must be
+       performed from the point of view of db_cassandra module (insert in
+       Cassandra means replace if exists or insert new record otherwise).
+       So, if you define a table with a timestamp column, the update
+       operations on that table that also update the timestamp must update
+       all columns. So these update operations must in fact be insert
+       operations.
+     * Second row: the columns that form the row key separated by space.
+     * Third row: the columns that form the secondary key separated by
+       space.
+
+   Bellow you can see the schema for the location table:
+
+   ...
+   callid(string) cflags(int) contact(string) cseq(int) expires(timestamp) flags
+(int) last_modified(int) methods(int) path(string) q(double) received(string) so
+cket(string) user_agent(string) username(string)
+   username
+   contact
+   ...
+
+   Observe first that the row key is the username and the secondary index
+   is the contact. And that we have also defined a timestamp column -
+   expires. In this example, both the row key and the secondary index are
+   defined by only one column, but they can be formed out of more columns,
+   list them separated by space.
+
+   To understand why the schema looks like this we must first see which
+   are the queries performed on the location table. (The 'callid'
+   condition was ignored as it doesn't really have a well defined role in
+   the SIP RFC).
+     * When Invite received, lookup location: select where username='..'.
+     * When Register received, update registration: update where
+       username='..' and contact='..'.
+
+   So the relation between these keys is the following:
+     * The unique key for a table is actually the combination of row key +
+       secondary key.
+     * A row defined by a row key will contain more records with different
+       secondary keys.
+
+   The timestamp column that leaves the Cassandra cluster deal with
+   deleting expired record can be used only with a modification in usrloc
+   module that replaces the update performed at re-registration with an
+   insert operation (so that all columns are updated). This behavior can
+   be enabled by setting a parameter in usrloc module db_update_as_insert:
+
+   ...
+   modparam("usrloc", "db_update_as_insert", 1)
+   ...
+
+   The alternative would have been to define an index on the expire column
+   and run a external job to delete periodically the expired records. But
+   this obviously is more costly.
+
+7. Limitations
+
+   The module can be used used only when the queries use only one index
+   which is also the unique key, or have two indexes that form the unique
+   key like in the usrloc usage.

+ 18 - 0
modules/db_cassandra/cassandra_constants.cpp

@@ -0,0 +1,18 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "cassandra_constants.h"
+
+namespace org { namespace apache { namespace cassandra {
+
+const cassandraConstants g_cassandra_constants;
+
+cassandraConstants::cassandraConstants() {
+  CASS_VERSION = "19.18.0";
+
+}
+
+}}} // namespace
+

+ 24 - 0
modules/db_cassandra/cassandra_constants.h

@@ -0,0 +1,24 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef cassandra_CONSTANTS_H
+#define cassandra_CONSTANTS_H
+
+#include "cassandra_types.h"
+
+namespace org { namespace apache { namespace cassandra {
+
+class cassandraConstants {
+ public:
+  cassandraConstants();
+
+  std::string CASS_VERSION;
+};
+
+extern const cassandraConstants g_cassandra_constants;
+
+}}} // namespace
+
+#endif

+ 3250 - 0
modules/db_cassandra/cassandra_types.cpp

@@ -0,0 +1,3250 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "cassandra_types.h"
+
+namespace org { namespace apache { namespace cassandra {
+
+int _kConsistencyLevelValues[] = {
+  ConsistencyLevel::ONE,
+  ConsistencyLevel::QUORUM,
+  ConsistencyLevel::LOCAL_QUORUM,
+  ConsistencyLevel::EACH_QUORUM,
+  ConsistencyLevel::ALL,
+  ConsistencyLevel::ANY,
+  ConsistencyLevel::TWO,
+  ConsistencyLevel::THREE
+};
+const char* _kConsistencyLevelNames[] = {
+  "ONE",
+  "QUORUM",
+  "LOCAL_QUORUM",
+  "EACH_QUORUM",
+  "ALL",
+  "ANY",
+  "TWO",
+  "THREE"
+};
+const std::map<int, const char*> _ConsistencyLevel_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kConsistencyLevelValues, _kConsistencyLevelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kIndexOperatorValues[] = {
+  IndexOperator::EQ,
+  IndexOperator::GTE,
+  IndexOperator::GT,
+  IndexOperator::LTE,
+  IndexOperator::LT
+};
+const char* _kIndexOperatorNames[] = {
+  "EQ",
+  "GTE",
+  "GT",
+  "LTE",
+  "LT"
+};
+const std::map<int, const char*> _IndexOperator_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kIndexOperatorValues, _kIndexOperatorNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kIndexTypeValues[] = {
+  IndexType::KEYS,
+  IndexType::CUSTOM
+};
+const char* _kIndexTypeNames[] = {
+  "KEYS",
+  "CUSTOM"
+};
+const std::map<int, const char*> _IndexType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kIndexTypeValues, _kIndexTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kCompressionValues[] = {
+  Compression::GZIP,
+  Compression::NONE
+};
+const char* _kCompressionNames[] = {
+  "GZIP",
+  "NONE"
+};
+const std::map<int, const char*> _Compression_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kCompressionValues, _kCompressionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kCqlResultTypeValues[] = {
+  CqlResultType::ROWS,
+  CqlResultType::VOID,
+  CqlResultType::INT
+};
+const char* _kCqlResultTypeNames[] = {
+  "ROWS",
+  "VOID",
+  "INT"
+};
+const std::map<int, const char*> _CqlResultType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kCqlResultTypeValues, _kCqlResultTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+const char* Column::ascii_fingerprint = "3EE0E1C5C844001B62F08125068292CC";
+const uint8_t Column::binary_fingerprint[16] = {0x3E,0xE0,0xE1,0xC5,0xC8,0x44,0x00,0x1B,0x62,0xF0,0x81,0x25,0x06,0x82,0x92,0xCC};
+
+uint32_t Column::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->value);
+          this->__isset.value = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->timestamp);
+          this->__isset.timestamp = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->ttl);
+          this->__isset.ttl = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t Column::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Column");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->name);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.value) {
+    xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2);
+    xfer += oprot->writeBinary(this->value);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.timestamp) {
+    xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3);
+    xfer += oprot->writeI64(this->timestamp);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.ttl) {
+    xfer += oprot->writeFieldBegin("ttl", ::apache::thrift::protocol::T_I32, 4);
+    xfer += oprot->writeI32(this->ttl);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* SuperColumn::ascii_fingerprint = "470EFC558004E98D92D604898305C04E";
+const uint8_t SuperColumn::binary_fingerprint[16] = {0x47,0x0E,0xFC,0x55,0x80,0x04,0xE9,0x8D,0x92,0xD6,0x04,0x89,0x83,0x05,0xC0,0x4E};
+
+uint32_t SuperColumn::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+  bool isset_columns = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->columns.clear();
+            uint32_t _size0;
+            ::apache::thrift::protocol::TType _etype3;
+            iprot->readListBegin(_etype3, _size0);
+            this->columns.resize(_size0);
+            uint32_t _i4;
+            for (_i4 = 0; _i4 < _size0; ++_i4)
+            {
+              xfer += this->columns[_i4].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_columns = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_columns)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t SuperColumn::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("SuperColumn");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 2);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->columns.size());
+    std::vector<Column> ::const_iterator _iter5;
+    for (_iter5 = this->columns.begin(); _iter5 != this->columns.end(); ++_iter5)
+    {
+      xfer += (*_iter5).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CounterColumn::ascii_fingerprint = "1CCCF6FC31CFD1D61BBBB1BAF3590620";
+const uint8_t CounterColumn::binary_fingerprint[16] = {0x1C,0xCC,0xF6,0xFC,0x31,0xCF,0xD1,0xD6,0x1B,0xBB,0xB1,0xBA,0xF3,0x59,0x06,0x20};
+
+uint32_t CounterColumn::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+  bool isset_value = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->value);
+          isset_value = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_value)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CounterColumn::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CounterColumn");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->value);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CounterSuperColumn::ascii_fingerprint = "CD4C8C4BF7753E46DE417CDE369343A4";
+const uint8_t CounterSuperColumn::binary_fingerprint[16] = {0xCD,0x4C,0x8C,0x4B,0xF7,0x75,0x3E,0x46,0xDE,0x41,0x7C,0xDE,0x36,0x93,0x43,0xA4};
+
+uint32_t CounterSuperColumn::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+  bool isset_columns = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->columns.clear();
+            uint32_t _size6;
+            ::apache::thrift::protocol::TType _etype9;
+            iprot->readListBegin(_etype9, _size6);
+            this->columns.resize(_size6);
+            uint32_t _i10;
+            for (_i10 = 0; _i10 < _size6; ++_i10)
+            {
+              xfer += this->columns[_i10].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_columns = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_columns)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CounterSuperColumn::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CounterSuperColumn");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 2);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->columns.size());
+    std::vector<CounterColumn> ::const_iterator _iter11;
+    for (_iter11 = this->columns.begin(); _iter11 != this->columns.end(); ++_iter11)
+    {
+      xfer += (*_iter11).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* ColumnOrSuperColumn::ascii_fingerprint = "2B34AC9E80F1DAA3A2A63B1AB1841E61";
+const uint8_t ColumnOrSuperColumn::binary_fingerprint[16] = {0x2B,0x34,0xAC,0x9E,0x80,0xF1,0xDA,0xA3,0xA2,0xA6,0x3B,0x1A,0xB1,0x84,0x1E,0x61};
+
+uint32_t ColumnOrSuperColumn::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column.read(iprot);
+          this->__isset.column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->super_column.read(iprot);
+          this->__isset.super_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->counter_column.read(iprot);
+          this->__isset.counter_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->counter_super_column.read(iprot);
+          this->__isset.counter_super_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ColumnOrSuperColumn::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ColumnOrSuperColumn");
+  if (this->__isset.column) {
+    xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->column.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.super_column) {
+    xfer += oprot->writeFieldBegin("super_column", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->super_column.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.counter_column) {
+    xfer += oprot->writeFieldBegin("counter_column", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->counter_column.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.counter_super_column) {
+    xfer += oprot->writeFieldBegin("counter_super_column", ::apache::thrift::protocol::T_STRUCT, 4);
+    xfer += this->counter_super_column.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* NotFoundException::ascii_fingerprint = "99914B932BD37A50B983C5E7C90AE93B";
+const uint8_t NotFoundException::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+uint32_t NotFoundException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t NotFoundException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("NotFoundException");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* InvalidRequestException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
+const uint8_t InvalidRequestException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+uint32_t InvalidRequestException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_why = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->why);
+          isset_why = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_why)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t InvalidRequestException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("InvalidRequestException");
+  xfer += oprot->writeFieldBegin("why", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->why);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* UnavailableException::ascii_fingerprint = "99914B932BD37A50B983C5E7C90AE93B";
+const uint8_t UnavailableException::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+uint32_t UnavailableException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t UnavailableException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("UnavailableException");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* TimedOutException::ascii_fingerprint = "99914B932BD37A50B983C5E7C90AE93B";
+const uint8_t TimedOutException::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+uint32_t TimedOutException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t TimedOutException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("TimedOutException");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* AuthenticationException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
+const uint8_t AuthenticationException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+uint32_t AuthenticationException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_why = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->why);
+          isset_why = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_why)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t AuthenticationException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("AuthenticationException");
+  xfer += oprot->writeFieldBegin("why", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->why);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* AuthorizationException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
+const uint8_t AuthorizationException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+uint32_t AuthorizationException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_why = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->why);
+          isset_why = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_why)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t AuthorizationException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("AuthorizationException");
+  xfer += oprot->writeFieldBegin("why", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->why);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* SchemaDisagreementException::ascii_fingerprint = "99914B932BD37A50B983C5E7C90AE93B";
+const uint8_t SchemaDisagreementException::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+uint32_t SchemaDisagreementException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t SchemaDisagreementException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("SchemaDisagreementException");
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* ColumnParent::ascii_fingerprint = "0A13AE61181713A4100DFFB3EC293822";
+const uint8_t ColumnParent::binary_fingerprint[16] = {0x0A,0x13,0xAE,0x61,0x18,0x17,0x13,0xA4,0x10,0x0D,0xFF,0xB3,0xEC,0x29,0x38,0x22};
+
+uint32_t ColumnParent::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_family = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->column_family);
+          isset_column_family = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->super_column);
+          this->__isset.super_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_family)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t ColumnParent::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ColumnParent");
+  xfer += oprot->writeFieldBegin("column_family", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->column_family);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.super_column) {
+    xfer += oprot->writeFieldBegin("super_column", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeBinary(this->super_column);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* ColumnPath::ascii_fingerprint = "606212895BCF63C757913CF35AEB3462";
+const uint8_t ColumnPath::binary_fingerprint[16] = {0x60,0x62,0x12,0x89,0x5B,0xCF,0x63,0xC7,0x57,0x91,0x3C,0xF3,0x5A,0xEB,0x34,0x62};
+
+uint32_t ColumnPath::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_family = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->column_family);
+          isset_column_family = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->super_column);
+          this->__isset.super_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->column);
+          this->__isset.column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_family)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t ColumnPath::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ColumnPath");
+  xfer += oprot->writeFieldBegin("column_family", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->column_family);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.super_column) {
+    xfer += oprot->writeFieldBegin("super_column", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeBinary(this->super_column);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.column) {
+    xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 5);
+    xfer += oprot->writeBinary(this->column);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* SliceRange::ascii_fingerprint = "184D24C9A0B8D4415E234DB649CAE740";
+const uint8_t SliceRange::binary_fingerprint[16] = {0x18,0x4D,0x24,0xC9,0xA0,0xB8,0xD4,0x41,0x5E,0x23,0x4D,0xB6,0x49,0xCA,0xE7,0x40};
+
+uint32_t SliceRange::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_start = false;
+  bool isset_finish = false;
+  bool isset_reversed = false;
+  bool isset_count = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->start);
+          isset_start = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->finish);
+          isset_finish = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->reversed);
+          isset_reversed = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->count);
+          isset_count = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_start)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_finish)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_reversed)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_count)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t SliceRange::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("SliceRange");
+  xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->start);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("finish", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeBinary(this->finish);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("reversed", ::apache::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool(this->reversed);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32(this->count);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* SlicePredicate::ascii_fingerprint = "F59D1D81C17DFFAF09988BF1C9CE5E27";
+const uint8_t SlicePredicate::binary_fingerprint[16] = {0xF5,0x9D,0x1D,0x81,0xC1,0x7D,0xFF,0xAF,0x09,0x98,0x8B,0xF1,0xC9,0xCE,0x5E,0x27};
+
+uint32_t SlicePredicate::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->column_names.clear();
+            uint32_t _size12;
+            ::apache::thrift::protocol::TType _etype15;
+            iprot->readListBegin(_etype15, _size12);
+            this->column_names.resize(_size12);
+            uint32_t _i16;
+            for (_i16 = 0; _i16 < _size12; ++_i16)
+            {
+              xfer += iprot->readBinary(this->column_names[_i16]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.column_names = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->slice_range.read(iprot);
+          this->__isset.slice_range = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t SlicePredicate::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("SlicePredicate");
+  if (this->__isset.column_names) {
+    xfer += oprot->writeFieldBegin("column_names", ::apache::thrift::protocol::T_LIST, 1);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->column_names.size());
+      std::vector<std::string> ::const_iterator _iter17;
+      for (_iter17 = this->column_names.begin(); _iter17 != this->column_names.end(); ++_iter17)
+      {
+        xfer += oprot->writeBinary((*_iter17));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.slice_range) {
+    xfer += oprot->writeFieldBegin("slice_range", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->slice_range.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* IndexExpression::ascii_fingerprint = "D9F4CFE2F293A8B1052FD3031DD2C847";
+const uint8_t IndexExpression::binary_fingerprint[16] = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+
+uint32_t IndexExpression::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_column_name = false;
+  bool isset_op = false;
+  bool isset_value = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->column_name);
+          isset_column_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast18;
+          xfer += iprot->readI32(ecast18);
+          this->op = (IndexOperator::type)ecast18;
+          isset_op = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->value);
+          isset_value = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_column_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_op)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_value)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t IndexExpression::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("IndexExpression");
+  xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->column_name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32((int32_t)this->op);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeBinary(this->value);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* IndexClause::ascii_fingerprint = "9B551B9AB86120B0EEA9005C77FD3C1F";
+const uint8_t IndexClause::binary_fingerprint[16] = {0x9B,0x55,0x1B,0x9A,0xB8,0x61,0x20,0xB0,0xEE,0xA9,0x00,0x5C,0x77,0xFD,0x3C,0x1F};
+
+uint32_t IndexClause::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_expressions = false;
+  bool isset_start_key = false;
+  bool isset_count = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->expressions.clear();
+            uint32_t _size19;
+            ::apache::thrift::protocol::TType _etype22;
+            iprot->readListBegin(_etype22, _size19);
+            this->expressions.resize(_size19);
+            uint32_t _i23;
+            for (_i23 = 0; _i23 < _size19; ++_i23)
+            {
+              xfer += this->expressions[_i23].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_expressions = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->start_key);
+          isset_start_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->count);
+          isset_count = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_expressions)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_start_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_count)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t IndexClause::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("IndexClause");
+  xfer += oprot->writeFieldBegin("expressions", ::apache::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->expressions.size());
+    std::vector<IndexExpression> ::const_iterator _iter24;
+    for (_iter24 = this->expressions.begin(); _iter24 != this->expressions.end(); ++_iter24)
+    {
+      xfer += (*_iter24).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("start_key", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeBinary(this->start_key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32(this->count);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* KeyRange::ascii_fingerprint = "8F248C09AF1EC3656ABD8565EA1F59C1";
+const uint8_t KeyRange::binary_fingerprint[16] = {0x8F,0x24,0x8C,0x09,0xAF,0x1E,0xC3,0x65,0x6A,0xBD,0x85,0x65,0xEA,0x1F,0x59,0xC1};
+
+uint32_t KeyRange::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_count = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->start_key);
+          this->__isset.start_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->end_key);
+          this->__isset.end_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->start_token);
+          this->__isset.start_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->end_token);
+          this->__isset.end_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->count);
+          isset_count = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_count)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t KeyRange::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("KeyRange");
+  if (this->__isset.start_key) {
+    xfer += oprot->writeFieldBegin("start_key", ::apache::thrift::protocol::T_STRING, 1);
+    xfer += oprot->writeBinary(this->start_key);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.end_key) {
+    xfer += oprot->writeFieldBegin("end_key", ::apache::thrift::protocol::T_STRING, 2);
+    xfer += oprot->writeBinary(this->end_key);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.start_token) {
+    xfer += oprot->writeFieldBegin("start_token", ::apache::thrift::protocol::T_STRING, 3);
+    xfer += oprot->writeString(this->start_token);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.end_token) {
+    xfer += oprot->writeFieldBegin("end_token", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeString(this->end_token);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 5);
+  xfer += oprot->writeI32(this->count);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* KeySlice::ascii_fingerprint = "D1568675B0C135C909E3169B72A4DA3D";
+const uint8_t KeySlice::binary_fingerprint[16] = {0xD1,0x56,0x86,0x75,0xB0,0xC1,0x35,0xC9,0x09,0xE3,0x16,0x9B,0x72,0xA4,0xDA,0x3D};
+
+uint32_t KeySlice::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_columns = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->columns.clear();
+            uint32_t _size25;
+            ::apache::thrift::protocol::TType _etype28;
+            iprot->readListBegin(_etype28, _size25);
+            this->columns.resize(_size25);
+            uint32_t _i29;
+            for (_i29 = 0; _i29 < _size25; ++_i29)
+            {
+              xfer += this->columns[_i29].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_columns = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_columns)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t KeySlice::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("KeySlice");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 2);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->columns.size());
+    std::vector<ColumnOrSuperColumn> ::const_iterator _iter30;
+    for (_iter30 = this->columns.begin(); _iter30 != this->columns.end(); ++_iter30)
+    {
+      xfer += (*_iter30).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* KeyCount::ascii_fingerprint = "EEBC915CE44901401D881E6091423036";
+const uint8_t KeyCount::binary_fingerprint[16] = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36};
+
+uint32_t KeyCount::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_count = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->count);
+          isset_count = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_count)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t KeyCount::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("KeyCount");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeI32(this->count);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* Deletion::ascii_fingerprint = "40F33ECF1C932CA77C2414C4E6C60CBE";
+const uint8_t Deletion::binary_fingerprint[16] = {0x40,0xF3,0x3E,0xCF,0x1C,0x93,0x2C,0xA7,0x7C,0x24,0x14,0xC4,0xE6,0xC6,0x0C,0xBE};
+
+uint32_t Deletion::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->timestamp);
+          this->__isset.timestamp = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->super_column);
+          this->__isset.super_column = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->predicate.read(iprot);
+          this->__isset.predicate = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Deletion::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Deletion");
+  if (this->__isset.timestamp) {
+    xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 1);
+    xfer += oprot->writeI64(this->timestamp);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.super_column) {
+    xfer += oprot->writeFieldBegin("super_column", ::apache::thrift::protocol::T_STRING, 2);
+    xfer += oprot->writeBinary(this->super_column);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.predicate) {
+    xfer += oprot->writeFieldBegin("predicate", ::apache::thrift::protocol::T_STRUCT, 3);
+    xfer += this->predicate.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* Mutation::ascii_fingerprint = "E8B65DF3979C6868F80DF81F8E769E63";
+const uint8_t Mutation::binary_fingerprint[16] = {0xE8,0xB6,0x5D,0xF3,0x97,0x9C,0x68,0x68,0xF8,0x0D,0xF8,0x1F,0x8E,0x76,0x9E,0x63};
+
+uint32_t Mutation::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->column_or_supercolumn.read(iprot);
+          this->__isset.column_or_supercolumn = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->deletion.read(iprot);
+          this->__isset.deletion = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Mutation::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Mutation");
+  if (this->__isset.column_or_supercolumn) {
+    xfer += oprot->writeFieldBegin("column_or_supercolumn", ::apache::thrift::protocol::T_STRUCT, 1);
+    xfer += this->column_or_supercolumn.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.deletion) {
+    xfer += oprot->writeFieldBegin("deletion", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->deletion.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* EndpointDetails::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
+const uint8_t EndpointDetails::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+
+uint32_t EndpointDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->host);
+          this->__isset.host = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->datacenter);
+          this->__isset.datacenter = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t EndpointDetails::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("EndpointDetails");
+  xfer += oprot->writeFieldBegin("host", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->host);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("datacenter", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->datacenter);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* TokenRange::ascii_fingerprint = "B84955E63D0C14788839563285CBBDCF";
+const uint8_t TokenRange::binary_fingerprint[16] = {0xB8,0x49,0x55,0xE6,0x3D,0x0C,0x14,0x78,0x88,0x39,0x56,0x32,0x85,0xCB,0xBD,0xCF};
+
+uint32_t TokenRange::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_start_token = false;
+  bool isset_end_token = false;
+  bool isset_endpoints = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->start_token);
+          isset_start_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->end_token);
+          isset_end_token = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->endpoints.clear();
+            uint32_t _size31;
+            ::apache::thrift::protocol::TType _etype34;
+            iprot->readListBegin(_etype34, _size31);
+            this->endpoints.resize(_size31);
+            uint32_t _i35;
+            for (_i35 = 0; _i35 < _size31; ++_i35)
+            {
+              xfer += iprot->readString(this->endpoints[_i35]);
+            }
+            iprot->readListEnd();
+          }
+          isset_endpoints = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->rpc_endpoints.clear();
+            uint32_t _size36;
+            ::apache::thrift::protocol::TType _etype39;
+            iprot->readListBegin(_etype39, _size36);
+            this->rpc_endpoints.resize(_size36);
+            uint32_t _i40;
+            for (_i40 = 0; _i40 < _size36; ++_i40)
+            {
+              xfer += iprot->readString(this->rpc_endpoints[_i40]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.rpc_endpoints = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->endpoint_details.clear();
+            uint32_t _size41;
+            ::apache::thrift::protocol::TType _etype44;
+            iprot->readListBegin(_etype44, _size41);
+            this->endpoint_details.resize(_size41);
+            uint32_t _i45;
+            for (_i45 = 0; _i45 < _size41; ++_i45)
+            {
+              xfer += this->endpoint_details[_i45].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.endpoint_details = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_start_token)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_end_token)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_endpoints)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t TokenRange::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("TokenRange");
+  xfer += oprot->writeFieldBegin("start_token", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->start_token);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("end_token", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->end_token);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("endpoints", ::apache::thrift::protocol::T_LIST, 3);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->endpoints.size());
+    std::vector<std::string> ::const_iterator _iter46;
+    for (_iter46 = this->endpoints.begin(); _iter46 != this->endpoints.end(); ++_iter46)
+    {
+      xfer += oprot->writeString((*_iter46));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.rpc_endpoints) {
+    xfer += oprot->writeFieldBegin("rpc_endpoints", ::apache::thrift::protocol::T_LIST, 4);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->rpc_endpoints.size());
+      std::vector<std::string> ::const_iterator _iter47;
+      for (_iter47 = this->rpc_endpoints.begin(); _iter47 != this->rpc_endpoints.end(); ++_iter47)
+      {
+        xfer += oprot->writeString((*_iter47));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.endpoint_details) {
+    xfer += oprot->writeFieldBegin("endpoint_details", ::apache::thrift::protocol::T_LIST, 5);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->endpoint_details.size());
+      std::vector<EndpointDetails> ::const_iterator _iter48;
+      for (_iter48 = this->endpoint_details.begin(); _iter48 != this->endpoint_details.end(); ++_iter48)
+      {
+        xfer += (*_iter48).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* AuthenticationRequest::ascii_fingerprint = "5EA2D527ECA3BA20C77AFC023EE8C05F";
+const uint8_t AuthenticationRequest::binary_fingerprint[16] = {0x5E,0xA2,0xD5,0x27,0xEC,0xA3,0xBA,0x20,0xC7,0x7A,0xFC,0x02,0x3E,0xE8,0xC0,0x5F};
+
+uint32_t AuthenticationRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_credentials = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->credentials.clear();
+            uint32_t _size49;
+            ::apache::thrift::protocol::TType _ktype50;
+            ::apache::thrift::protocol::TType _vtype51;
+            iprot->readMapBegin(_ktype50, _vtype51, _size49);
+            uint32_t _i53;
+            for (_i53 = 0; _i53 < _size49; ++_i53)
+            {
+              std::string _key54;
+              xfer += iprot->readString(_key54);
+              std::string& _val55 = this->credentials[_key54];
+              xfer += iprot->readString(_val55);
+            }
+            iprot->readMapEnd();
+          }
+          isset_credentials = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_credentials)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t AuthenticationRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("AuthenticationRequest");
+  xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_MAP, 1);
+  {
+    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->credentials.size());
+    std::map<std::string, std::string> ::const_iterator _iter56;
+    for (_iter56 = this->credentials.begin(); _iter56 != this->credentials.end(); ++_iter56)
+    {
+      xfer += oprot->writeString(_iter56->first);
+      xfer += oprot->writeString(_iter56->second);
+    }
+    xfer += oprot->writeMapEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* ColumnDef::ascii_fingerprint = "0D89CE83D7EDAD079AC3213ED1DCAA58";
+const uint8_t ColumnDef::binary_fingerprint[16] = {0x0D,0x89,0xCE,0x83,0xD7,0xED,0xAD,0x07,0x9A,0xC3,0x21,0x3E,0xD1,0xDC,0xAA,0x58};
+
+uint32_t ColumnDef::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+  bool isset_validation_class = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->validation_class);
+          isset_validation_class = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast57;
+          xfer += iprot->readI32(ecast57);
+          this->index_type = (IndexType::type)ecast57;
+          this->__isset.index_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->index_name);
+          this->__isset.index_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->index_options.clear();
+            uint32_t _size58;
+            ::apache::thrift::protocol::TType _ktype59;
+            ::apache::thrift::protocol::TType _vtype60;
+            iprot->readMapBegin(_ktype59, _vtype60, _size58);
+            uint32_t _i62;
+            for (_i62 = 0; _i62 < _size58; ++_i62)
+            {
+              std::string _key63;
+              xfer += iprot->readString(_key63);
+              std::string& _val64 = this->index_options[_key63];
+              xfer += iprot->readString(_val64);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.index_options = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_validation_class)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t ColumnDef::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ColumnDef");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("validation_class", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->validation_class);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.index_type) {
+    xfer += oprot->writeFieldBegin("index_type", ::apache::thrift::protocol::T_I32, 3);
+    xfer += oprot->writeI32((int32_t)this->index_type);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.index_name) {
+    xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeString(this->index_name);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.index_options) {
+    xfer += oprot->writeFieldBegin("index_options", ::apache::thrift::protocol::T_MAP, 5);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->index_options.size());
+      std::map<std::string, std::string> ::const_iterator _iter65;
+      for (_iter65 = this->index_options.begin(); _iter65 != this->index_options.end(); ++_iter65)
+      {
+        xfer += oprot->writeString(_iter65->first);
+        xfer += oprot->writeString(_iter65->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CfDef::ascii_fingerprint = "0FA1E255DEA2A1E59044B44DA8536D18";
+const uint8_t CfDef::binary_fingerprint[16] = {0x0F,0xA1,0xE2,0x55,0xDE,0xA2,0xA1,0xE5,0x90,0x44,0xB4,0x4D,0xA8,0x53,0x6D,0x18};
+
+uint32_t CfDef::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_keyspace = false;
+  bool isset_name = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->keyspace);
+          isset_keyspace = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->column_type);
+          this->__isset.column_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->comparator_type);
+          this->__isset.comparator_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->subcomparator_type);
+          this->__isset.subcomparator_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 8:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->comment);
+          this->__isset.comment = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 9:
+        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
+          xfer += iprot->readDouble(this->row_cache_size);
+          this->__isset.row_cache_size = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 11:
+        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
+          xfer += iprot->readDouble(this->key_cache_size);
+          this->__isset.key_cache_size = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 12:
+        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
+          xfer += iprot->readDouble(this->read_repair_chance);
+          this->__isset.read_repair_chance = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 13:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->column_metadata.clear();
+            uint32_t _size66;
+            ::apache::thrift::protocol::TType _etype69;
+            iprot->readListBegin(_etype69, _size66);
+            this->column_metadata.resize(_size66);
+            uint32_t _i70;
+            for (_i70 = 0; _i70 < _size66; ++_i70)
+            {
+              xfer += this->column_metadata[_i70].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.column_metadata = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 14:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->gc_grace_seconds);
+          this->__isset.gc_grace_seconds = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 15:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->default_validation_class);
+          this->__isset.default_validation_class = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 16:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->id);
+          this->__isset.id = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 17:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->min_compaction_threshold);
+          this->__isset.min_compaction_threshold = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 18:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->max_compaction_threshold);
+          this->__isset.max_compaction_threshold = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 19:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->row_cache_save_period_in_seconds);
+          this->__isset.row_cache_save_period_in_seconds = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 20:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->key_cache_save_period_in_seconds);
+          this->__isset.key_cache_save_period_in_seconds = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 24:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->replicate_on_write);
+          this->__isset.replicate_on_write = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 25:
+        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
+          xfer += iprot->readDouble(this->merge_shards_chance);
+          this->__isset.merge_shards_chance = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 26:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->key_validation_class);
+          this->__isset.key_validation_class = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 27:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->row_cache_provider);
+          this->__isset.row_cache_provider = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 28:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key_alias);
+          this->__isset.key_alias = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 29:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->compaction_strategy);
+          this->__isset.compaction_strategy = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 30:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->compaction_strategy_options.clear();
+            uint32_t _size71;
+            ::apache::thrift::protocol::TType _ktype72;
+            ::apache::thrift::protocol::TType _vtype73;
+            iprot->readMapBegin(_ktype72, _vtype73, _size71);
+            uint32_t _i75;
+            for (_i75 = 0; _i75 < _size71; ++_i75)
+            {
+              std::string _key76;
+              xfer += iprot->readString(_key76);
+              std::string& _val77 = this->compaction_strategy_options[_key76];
+              xfer += iprot->readString(_val77);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.compaction_strategy_options = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 31:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->row_cache_keys_to_save);
+          this->__isset.row_cache_keys_to_save = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 32:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->compression_options.clear();
+            uint32_t _size78;
+            ::apache::thrift::protocol::TType _ktype79;
+            ::apache::thrift::protocol::TType _vtype80;
+            iprot->readMapBegin(_ktype79, _vtype80, _size78);
+            uint32_t _i82;
+            for (_i82 = 0; _i82 < _size78; ++_i82)
+            {
+              std::string _key83;
+              xfer += iprot->readString(_key83);
+              std::string& _val84 = this->compression_options[_key83];
+              xfer += iprot->readString(_val84);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.compression_options = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_keyspace)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CfDef::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CfDef");
+  xfer += oprot->writeFieldBegin("keyspace", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->keyspace);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->name);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.column_type) {
+    xfer += oprot->writeFieldBegin("column_type", ::apache::thrift::protocol::T_STRING, 3);
+    xfer += oprot->writeString(this->column_type);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.comparator_type) {
+    xfer += oprot->writeFieldBegin("comparator_type", ::apache::thrift::protocol::T_STRING, 5);
+    xfer += oprot->writeString(this->comparator_type);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.subcomparator_type) {
+    xfer += oprot->writeFieldBegin("subcomparator_type", ::apache::thrift::protocol::T_STRING, 6);
+    xfer += oprot->writeString(this->subcomparator_type);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.comment) {
+    xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 8);
+    xfer += oprot->writeString(this->comment);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.row_cache_size) {
+    xfer += oprot->writeFieldBegin("row_cache_size", ::apache::thrift::protocol::T_DOUBLE, 9);
+    xfer += oprot->writeDouble(this->row_cache_size);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.key_cache_size) {
+    xfer += oprot->writeFieldBegin("key_cache_size", ::apache::thrift::protocol::T_DOUBLE, 11);
+    xfer += oprot->writeDouble(this->key_cache_size);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.read_repair_chance) {
+    xfer += oprot->writeFieldBegin("read_repair_chance", ::apache::thrift::protocol::T_DOUBLE, 12);
+    xfer += oprot->writeDouble(this->read_repair_chance);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.column_metadata) {
+    xfer += oprot->writeFieldBegin("column_metadata", ::apache::thrift::protocol::T_LIST, 13);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->column_metadata.size());
+      std::vector<ColumnDef> ::const_iterator _iter85;
+      for (_iter85 = this->column_metadata.begin(); _iter85 != this->column_metadata.end(); ++_iter85)
+      {
+        xfer += (*_iter85).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.gc_grace_seconds) {
+    xfer += oprot->writeFieldBegin("gc_grace_seconds", ::apache::thrift::protocol::T_I32, 14);
+    xfer += oprot->writeI32(this->gc_grace_seconds);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.default_validation_class) {
+    xfer += oprot->writeFieldBegin("default_validation_class", ::apache::thrift::protocol::T_STRING, 15);
+    xfer += oprot->writeString(this->default_validation_class);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.id) {
+    xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 16);
+    xfer += oprot->writeI32(this->id);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.min_compaction_threshold) {
+    xfer += oprot->writeFieldBegin("min_compaction_threshold", ::apache::thrift::protocol::T_I32, 17);
+    xfer += oprot->writeI32(this->min_compaction_threshold);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.max_compaction_threshold) {
+    xfer += oprot->writeFieldBegin("max_compaction_threshold", ::apache::thrift::protocol::T_I32, 18);
+    xfer += oprot->writeI32(this->max_compaction_threshold);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.row_cache_save_period_in_seconds) {
+    xfer += oprot->writeFieldBegin("row_cache_save_period_in_seconds", ::apache::thrift::protocol::T_I32, 19);
+    xfer += oprot->writeI32(this->row_cache_save_period_in_seconds);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.key_cache_save_period_in_seconds) {
+    xfer += oprot->writeFieldBegin("key_cache_save_period_in_seconds", ::apache::thrift::protocol::T_I32, 20);
+    xfer += oprot->writeI32(this->key_cache_save_period_in_seconds);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicate_on_write) {
+    xfer += oprot->writeFieldBegin("replicate_on_write", ::apache::thrift::protocol::T_BOOL, 24);
+    xfer += oprot->writeBool(this->replicate_on_write);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.merge_shards_chance) {
+    xfer += oprot->writeFieldBegin("merge_shards_chance", ::apache::thrift::protocol::T_DOUBLE, 25);
+    xfer += oprot->writeDouble(this->merge_shards_chance);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.key_validation_class) {
+    xfer += oprot->writeFieldBegin("key_validation_class", ::apache::thrift::protocol::T_STRING, 26);
+    xfer += oprot->writeString(this->key_validation_class);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.row_cache_provider) {
+    xfer += oprot->writeFieldBegin("row_cache_provider", ::apache::thrift::protocol::T_STRING, 27);
+    xfer += oprot->writeString(this->row_cache_provider);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.key_alias) {
+    xfer += oprot->writeFieldBegin("key_alias", ::apache::thrift::protocol::T_STRING, 28);
+    xfer += oprot->writeBinary(this->key_alias);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.compaction_strategy) {
+    xfer += oprot->writeFieldBegin("compaction_strategy", ::apache::thrift::protocol::T_STRING, 29);
+    xfer += oprot->writeString(this->compaction_strategy);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.compaction_strategy_options) {
+    xfer += oprot->writeFieldBegin("compaction_strategy_options", ::apache::thrift::protocol::T_MAP, 30);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->compaction_strategy_options.size());
+      std::map<std::string, std::string> ::const_iterator _iter86;
+      for (_iter86 = this->compaction_strategy_options.begin(); _iter86 != this->compaction_strategy_options.end(); ++_iter86)
+      {
+        xfer += oprot->writeString(_iter86->first);
+        xfer += oprot->writeString(_iter86->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.row_cache_keys_to_save) {
+    xfer += oprot->writeFieldBegin("row_cache_keys_to_save", ::apache::thrift::protocol::T_I32, 31);
+    xfer += oprot->writeI32(this->row_cache_keys_to_save);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.compression_options) {
+    xfer += oprot->writeFieldBegin("compression_options", ::apache::thrift::protocol::T_MAP, 32);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->compression_options.size());
+      std::map<std::string, std::string> ::const_iterator _iter87;
+      for (_iter87 = this->compression_options.begin(); _iter87 != this->compression_options.end(); ++_iter87)
+      {
+        xfer += oprot->writeString(_iter87->first);
+        xfer += oprot->writeString(_iter87->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* KsDef::ascii_fingerprint = "28433565DB1070CD6C4372A762397EFE";
+const uint8_t KsDef::binary_fingerprint[16] = {0x28,0x43,0x35,0x65,0xDB,0x10,0x70,0xCD,0x6C,0x43,0x72,0xA7,0x62,0x39,0x7E,0xFE};
+
+uint32_t KsDef::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name = false;
+  bool isset_strategy_class = false;
+  bool isset_cf_defs = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->name);
+          isset_name = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->strategy_class);
+          isset_strategy_class = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->strategy_options.clear();
+            uint32_t _size88;
+            ::apache::thrift::protocol::TType _ktype89;
+            ::apache::thrift::protocol::TType _vtype90;
+            iprot->readMapBegin(_ktype89, _vtype90, _size88);
+            uint32_t _i92;
+            for (_i92 = 0; _i92 < _size88; ++_i92)
+            {
+              std::string _key93;
+              xfer += iprot->readString(_key93);
+              std::string& _val94 = this->strategy_options[_key93];
+              xfer += iprot->readString(_val94);
+            }
+            iprot->readMapEnd();
+          }
+          this->__isset.strategy_options = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->replication_factor);
+          this->__isset.replication_factor = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->cf_defs.clear();
+            uint32_t _size95;
+            ::apache::thrift::protocol::TType _etype98;
+            iprot->readListBegin(_etype98, _size95);
+            this->cf_defs.resize(_size95);
+            uint32_t _i99;
+            for (_i99 = 0; _i99 < _size95; ++_i99)
+            {
+              xfer += this->cf_defs[_i99].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_cf_defs = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->durable_writes);
+          this->__isset.durable_writes = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_strategy_class)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_cf_defs)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t KsDef::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("KsDef");
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->name);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("strategy_class", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->strategy_class);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.strategy_options) {
+    xfer += oprot->writeFieldBegin("strategy_options", ::apache::thrift::protocol::T_MAP, 3);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->strategy_options.size());
+      std::map<std::string, std::string> ::const_iterator _iter100;
+      for (_iter100 = this->strategy_options.begin(); _iter100 != this->strategy_options.end(); ++_iter100)
+      {
+        xfer += oprot->writeString(_iter100->first);
+        xfer += oprot->writeString(_iter100->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replication_factor) {
+    xfer += oprot->writeFieldBegin("replication_factor", ::apache::thrift::protocol::T_I32, 4);
+    xfer += oprot->writeI32(this->replication_factor);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldBegin("cf_defs", ::apache::thrift::protocol::T_LIST, 5);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->cf_defs.size());
+    std::vector<CfDef> ::const_iterator _iter101;
+    for (_iter101 = this->cf_defs.begin(); _iter101 != this->cf_defs.end(); ++_iter101)
+    {
+      xfer += (*_iter101).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.durable_writes) {
+    xfer += oprot->writeFieldBegin("durable_writes", ::apache::thrift::protocol::T_BOOL, 6);
+    xfer += oprot->writeBool(this->durable_writes);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CqlRow::ascii_fingerprint = "470EFC558004E98D92D604898305C04E";
+const uint8_t CqlRow::binary_fingerprint[16] = {0x47,0x0E,0xFC,0x55,0x80,0x04,0xE9,0x8D,0x92,0xD6,0x04,0x89,0x83,0x05,0xC0,0x4E};
+
+uint32_t CqlRow::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_key = false;
+  bool isset_columns = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readBinary(this->key);
+          isset_key = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->columns.clear();
+            uint32_t _size102;
+            ::apache::thrift::protocol::TType _etype105;
+            iprot->readListBegin(_etype105, _size102);
+            this->columns.resize(_size102);
+            uint32_t _i106;
+            for (_i106 = 0; _i106 < _size102; ++_i106)
+            {
+              xfer += this->columns[_i106].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          isset_columns = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_key)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_columns)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CqlRow::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CqlRow");
+  xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeBinary(this->key);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 2);
+  {
+    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->columns.size());
+    std::vector<Column> ::const_iterator _iter107;
+    for (_iter107 = this->columns.begin(); _iter107 != this->columns.end(); ++_iter107)
+    {
+      xfer += (*_iter107).write(oprot);
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CqlMetadata::ascii_fingerprint = "B7C5A4AA9652C744A48EBC1C12D531E7";
+const uint8_t CqlMetadata::binary_fingerprint[16] = {0xB7,0xC5,0xA4,0xAA,0x96,0x52,0xC7,0x44,0xA4,0x8E,0xBC,0x1C,0x12,0xD5,0x31,0xE7};
+
+uint32_t CqlMetadata::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_name_types = false;
+  bool isset_value_types = false;
+  bool isset_default_name_type = false;
+  bool isset_default_value_type = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->name_types.clear();
+            uint32_t _size108;
+            ::apache::thrift::protocol::TType _ktype109;
+            ::apache::thrift::protocol::TType _vtype110;
+            iprot->readMapBegin(_ktype109, _vtype110, _size108);
+            uint32_t _i112;
+            for (_i112 = 0; _i112 < _size108; ++_i112)
+            {
+              std::string _key113;
+              xfer += iprot->readBinary(_key113);
+              std::string& _val114 = this->name_types[_key113];
+              xfer += iprot->readString(_val114);
+            }
+            iprot->readMapEnd();
+          }
+          isset_name_types = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->value_types.clear();
+            uint32_t _size115;
+            ::apache::thrift::protocol::TType _ktype116;
+            ::apache::thrift::protocol::TType _vtype117;
+            iprot->readMapBegin(_ktype116, _vtype117, _size115);
+            uint32_t _i119;
+            for (_i119 = 0; _i119 < _size115; ++_i119)
+            {
+              std::string _key120;
+              xfer += iprot->readBinary(_key120);
+              std::string& _val121 = this->value_types[_key120];
+              xfer += iprot->readString(_val121);
+            }
+            iprot->readMapEnd();
+          }
+          isset_value_types = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->default_name_type);
+          isset_default_name_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->default_value_type);
+          isset_default_value_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_name_types)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_value_types)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_default_name_type)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_default_value_type)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CqlMetadata::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CqlMetadata");
+  xfer += oprot->writeFieldBegin("name_types", ::apache::thrift::protocol::T_MAP, 1);
+  {
+    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->name_types.size());
+    std::map<std::string, std::string> ::const_iterator _iter122;
+    for (_iter122 = this->name_types.begin(); _iter122 != this->name_types.end(); ++_iter122)
+    {
+      xfer += oprot->writeBinary(_iter122->first);
+      xfer += oprot->writeString(_iter122->second);
+    }
+    xfer += oprot->writeMapEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("value_types", ::apache::thrift::protocol::T_MAP, 2);
+  {
+    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->value_types.size());
+    std::map<std::string, std::string> ::const_iterator _iter123;
+    for (_iter123 = this->value_types.begin(); _iter123 != this->value_types.end(); ++_iter123)
+    {
+      xfer += oprot->writeBinary(_iter123->first);
+      xfer += oprot->writeString(_iter123->second);
+    }
+    xfer += oprot->writeMapEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("default_name_type", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->default_name_type);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("default_value_type", ::apache::thrift::protocol::T_STRING, 4);
+  xfer += oprot->writeString(this->default_value_type);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* CqlResult::ascii_fingerprint = "521B9CE5AF77539F7267F6952B609E81";
+const uint8_t CqlResult::binary_fingerprint[16] = {0x52,0x1B,0x9C,0xE5,0xAF,0x77,0x53,0x9F,0x72,0x67,0xF6,0x95,0x2B,0x60,0x9E,0x81};
+
+uint32_t CqlResult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+  bool isset_type = false;
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast124;
+          xfer += iprot->readI32(ecast124);
+          this->type = (CqlResultType::type)ecast124;
+          isset_type = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->rows.clear();
+            uint32_t _size125;
+            ::apache::thrift::protocol::TType _etype128;
+            iprot->readListBegin(_etype128, _size125);
+            this->rows.resize(_size125);
+            uint32_t _i129;
+            for (_i129 = 0; _i129 < _size125; ++_i129)
+            {
+              xfer += this->rows[_i129].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.rows = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->num);
+          this->__isset.num = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->schema.read(iprot);
+          this->__isset.schema = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  if (!isset_type)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  return xfer;
+}
+
+uint32_t CqlResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("CqlResult");
+  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32((int32_t)this->type);
+  xfer += oprot->writeFieldEnd();
+  if (this->__isset.rows) {
+    xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->rows.size());
+      std::vector<CqlRow> ::const_iterator _iter130;
+      for (_iter130 = this->rows.begin(); _iter130 != this->rows.end(); ++_iter130)
+      {
+        xfer += (*_iter130).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.num) {
+    xfer += oprot->writeFieldBegin("num", ::apache::thrift::protocol::T_I32, 3);
+    xfer += oprot->writeI32(this->num);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.schema) {
+    xfer += oprot->writeFieldBegin("schema", ::apache::thrift::protocol::T_STRUCT, 4);
+    xfer += this->schema.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+}}} // namespace

+ 1520 - 0
modules/db_cassandra/cassandra_types.h

@@ -0,0 +1,1520 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef cassandra_TYPES_H
+#define cassandra_TYPES_H
+
+#include <Thrift.h>
+#include <TApplicationException.h>
+#include <protocol/TProtocol.h>
+#include <transport/TTransport.h>
+
+
+
+namespace org { namespace apache { namespace cassandra {
+
+struct ConsistencyLevel {
+  enum type {
+    ONE = 1,
+    QUORUM = 2,
+    LOCAL_QUORUM = 3,
+    EACH_QUORUM = 4,
+    ALL = 5,
+    ANY = 6,
+    TWO = 7,
+    THREE = 8
+  };
+};
+
+extern const std::map<int, const char*> _ConsistencyLevel_VALUES_TO_NAMES;
+
+struct IndexOperator {
+  enum type {
+    EQ = 0,
+    GTE = 1,
+    GT = 2,
+    LTE = 3,
+    LT = 4
+  };
+};
+
+extern const std::map<int, const char*> _IndexOperator_VALUES_TO_NAMES;
+
+struct IndexType {
+  enum type {
+    KEYS = 0,
+    CUSTOM = 1
+  };
+};
+
+extern const std::map<int, const char*> _IndexType_VALUES_TO_NAMES;
+
+struct Compression {
+  enum type {
+    GZIP = 1,
+    NONE = 2
+  };
+};
+
+extern const std::map<int, const char*> _Compression_VALUES_TO_NAMES;
+
+struct CqlResultType {
+  enum type {
+    ROWS = 1,
+    VOID = 2,
+    INT = 3
+  };
+};
+
+extern const std::map<int, const char*> _CqlResultType_VALUES_TO_NAMES;
+
+typedef struct _Column__isset {
+  _Column__isset() : value(false), timestamp(false), ttl(false) {}
+  bool value;
+  bool timestamp;
+  bool ttl;
+} _Column__isset;
+
+class Column {
+ public:
+
+  static const char* ascii_fingerprint; // = "3EE0E1C5C844001B62F08125068292CC";
+  static const uint8_t binary_fingerprint[16]; // = {0x3E,0xE0,0xE1,0xC5,0xC8,0x44,0x00,0x1B,0x62,0xF0,0x81,0x25,0x06,0x82,0x92,0xCC};
+
+  Column() : name(""), value(""), timestamp(0), ttl(0) {
+  }
+
+  virtual ~Column() throw() {}
+
+  std::string name;
+  std::string value;
+  int64_t timestamp;
+  int32_t ttl;
+
+  _Column__isset __isset;
+
+  bool operator == (const Column & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (__isset.value != rhs.__isset.value)
+      return false;
+    else if (__isset.value && !(value == rhs.value))
+      return false;
+    if (__isset.timestamp != rhs.__isset.timestamp)
+      return false;
+    else if (__isset.timestamp && !(timestamp == rhs.timestamp))
+      return false;
+    if (__isset.ttl != rhs.__isset.ttl)
+      return false;
+    else if (__isset.ttl && !(ttl == rhs.ttl))
+      return false;
+    return true;
+  }
+  bool operator != (const Column &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Column & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class SuperColumn {
+ public:
+
+  static const char* ascii_fingerprint; // = "470EFC558004E98D92D604898305C04E";
+  static const uint8_t binary_fingerprint[16]; // = {0x47,0x0E,0xFC,0x55,0x80,0x04,0xE9,0x8D,0x92,0xD6,0x04,0x89,0x83,0x05,0xC0,0x4E};
+
+  SuperColumn() : name("") {
+  }
+
+  virtual ~SuperColumn() throw() {}
+
+  std::string name;
+  std::vector<Column>  columns;
+
+  bool operator == (const SuperColumn & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (!(columns == rhs.columns))
+      return false;
+    return true;
+  }
+  bool operator != (const SuperColumn &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const SuperColumn & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class CounterColumn {
+ public:
+
+  static const char* ascii_fingerprint; // = "1CCCF6FC31CFD1D61BBBB1BAF3590620";
+  static const uint8_t binary_fingerprint[16]; // = {0x1C,0xCC,0xF6,0xFC,0x31,0xCF,0xD1,0xD6,0x1B,0xBB,0xB1,0xBA,0xF3,0x59,0x06,0x20};
+
+  CounterColumn() : name(""), value(0) {
+  }
+
+  virtual ~CounterColumn() throw() {}
+
+  std::string name;
+  int64_t value;
+
+  bool operator == (const CounterColumn & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (!(value == rhs.value))
+      return false;
+    return true;
+  }
+  bool operator != (const CounterColumn &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CounterColumn & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class CounterSuperColumn {
+ public:
+
+  static const char* ascii_fingerprint; // = "CD4C8C4BF7753E46DE417CDE369343A4";
+  static const uint8_t binary_fingerprint[16]; // = {0xCD,0x4C,0x8C,0x4B,0xF7,0x75,0x3E,0x46,0xDE,0x41,0x7C,0xDE,0x36,0x93,0x43,0xA4};
+
+  CounterSuperColumn() : name("") {
+  }
+
+  virtual ~CounterSuperColumn() throw() {}
+
+  std::string name;
+  std::vector<CounterColumn>  columns;
+
+  bool operator == (const CounterSuperColumn & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (!(columns == rhs.columns))
+      return false;
+    return true;
+  }
+  bool operator != (const CounterSuperColumn &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CounterSuperColumn & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ColumnOrSuperColumn__isset {
+  _ColumnOrSuperColumn__isset() : column(false), super_column(false), counter_column(false), counter_super_column(false) {}
+  bool column;
+  bool super_column;
+  bool counter_column;
+  bool counter_super_column;
+} _ColumnOrSuperColumn__isset;
+
+class ColumnOrSuperColumn {
+ public:
+
+  static const char* ascii_fingerprint; // = "2B34AC9E80F1DAA3A2A63B1AB1841E61";
+  static const uint8_t binary_fingerprint[16]; // = {0x2B,0x34,0xAC,0x9E,0x80,0xF1,0xDA,0xA3,0xA2,0xA6,0x3B,0x1A,0xB1,0x84,0x1E,0x61};
+
+  ColumnOrSuperColumn() {
+  }
+
+  virtual ~ColumnOrSuperColumn() throw() {}
+
+  Column column;
+  SuperColumn super_column;
+  CounterColumn counter_column;
+  CounterSuperColumn counter_super_column;
+
+  _ColumnOrSuperColumn__isset __isset;
+
+  bool operator == (const ColumnOrSuperColumn & rhs) const
+  {
+    if (__isset.column != rhs.__isset.column)
+      return false;
+    else if (__isset.column && !(column == rhs.column))
+      return false;
+    if (__isset.super_column != rhs.__isset.super_column)
+      return false;
+    else if (__isset.super_column && !(super_column == rhs.super_column))
+      return false;
+    if (__isset.counter_column != rhs.__isset.counter_column)
+      return false;
+    else if (__isset.counter_column && !(counter_column == rhs.counter_column))
+      return false;
+    if (__isset.counter_super_column != rhs.__isset.counter_super_column)
+      return false;
+    else if (__isset.counter_super_column && !(counter_super_column == rhs.counter_super_column))
+      return false;
+    return true;
+  }
+  bool operator != (const ColumnOrSuperColumn &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ColumnOrSuperColumn & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class NotFoundException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "99914B932BD37A50B983C5E7C90AE93B";
+  static const uint8_t binary_fingerprint[16]; // = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+  NotFoundException() {
+  }
+
+  virtual ~NotFoundException() throw() {}
+
+
+  bool operator == (const NotFoundException & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const NotFoundException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const NotFoundException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class InvalidRequestException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1";
+  static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+  InvalidRequestException() : why("") {
+  }
+
+  virtual ~InvalidRequestException() throw() {}
+
+  std::string why;
+
+  bool operator == (const InvalidRequestException & rhs) const
+  {
+    if (!(why == rhs.why))
+      return false;
+    return true;
+  }
+  bool operator != (const InvalidRequestException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const InvalidRequestException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class UnavailableException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "99914B932BD37A50B983C5E7C90AE93B";
+  static const uint8_t binary_fingerprint[16]; // = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+  UnavailableException() {
+  }
+
+  virtual ~UnavailableException() throw() {}
+
+
+  bool operator == (const UnavailableException & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const UnavailableException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const UnavailableException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class TimedOutException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "99914B932BD37A50B983C5E7C90AE93B";
+  static const uint8_t binary_fingerprint[16]; // = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+  TimedOutException() {
+  }
+
+  virtual ~TimedOutException() throw() {}
+
+
+  bool operator == (const TimedOutException & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const TimedOutException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TimedOutException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class AuthenticationException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1";
+  static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+  AuthenticationException() : why("") {
+  }
+
+  virtual ~AuthenticationException() throw() {}
+
+  std::string why;
+
+  bool operator == (const AuthenticationException & rhs) const
+  {
+    if (!(why == rhs.why))
+      return false;
+    return true;
+  }
+  bool operator != (const AuthenticationException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const AuthenticationException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class AuthorizationException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1";
+  static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+  AuthorizationException() : why("") {
+  }
+
+  virtual ~AuthorizationException() throw() {}
+
+  std::string why;
+
+  bool operator == (const AuthorizationException & rhs) const
+  {
+    if (!(why == rhs.why))
+      return false;
+    return true;
+  }
+  bool operator != (const AuthorizationException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const AuthorizationException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class SchemaDisagreementException : public ::apache::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "99914B932BD37A50B983C5E7C90AE93B";
+  static const uint8_t binary_fingerprint[16]; // = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
+
+  SchemaDisagreementException() {
+  }
+
+  virtual ~SchemaDisagreementException() throw() {}
+
+
+  bool operator == (const SchemaDisagreementException & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const SchemaDisagreementException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const SchemaDisagreementException & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ColumnParent__isset {
+  _ColumnParent__isset() : super_column(false) {}
+  bool super_column;
+} _ColumnParent__isset;
+
+class ColumnParent {
+ public:
+
+  static const char* ascii_fingerprint; // = "0A13AE61181713A4100DFFB3EC293822";
+  static const uint8_t binary_fingerprint[16]; // = {0x0A,0x13,0xAE,0x61,0x18,0x17,0x13,0xA4,0x10,0x0D,0xFF,0xB3,0xEC,0x29,0x38,0x22};
+
+  ColumnParent() : column_family(""), super_column("") {
+  }
+
+  virtual ~ColumnParent() throw() {}
+
+  std::string column_family;
+  std::string super_column;
+
+  _ColumnParent__isset __isset;
+
+  bool operator == (const ColumnParent & rhs) const
+  {
+    if (!(column_family == rhs.column_family))
+      return false;
+    if (__isset.super_column != rhs.__isset.super_column)
+      return false;
+    else if (__isset.super_column && !(super_column == rhs.super_column))
+      return false;
+    return true;
+  }
+  bool operator != (const ColumnParent &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ColumnParent & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ColumnPath__isset {
+  _ColumnPath__isset() : super_column(false), column(false) {}
+  bool super_column;
+  bool column;
+} _ColumnPath__isset;
+
+class ColumnPath {
+ public:
+
+  static const char* ascii_fingerprint; // = "606212895BCF63C757913CF35AEB3462";
+  static const uint8_t binary_fingerprint[16]; // = {0x60,0x62,0x12,0x89,0x5B,0xCF,0x63,0xC7,0x57,0x91,0x3C,0xF3,0x5A,0xEB,0x34,0x62};
+
+  ColumnPath() : column_family(""), super_column(""), column("") {
+  }
+
+  virtual ~ColumnPath() throw() {}
+
+  std::string column_family;
+  std::string super_column;
+  std::string column;
+
+  _ColumnPath__isset __isset;
+
+  bool operator == (const ColumnPath & rhs) const
+  {
+    if (!(column_family == rhs.column_family))
+      return false;
+    if (__isset.super_column != rhs.__isset.super_column)
+      return false;
+    else if (__isset.super_column && !(super_column == rhs.super_column))
+      return false;
+    if (__isset.column != rhs.__isset.column)
+      return false;
+    else if (__isset.column && !(column == rhs.column))
+      return false;
+    return true;
+  }
+  bool operator != (const ColumnPath &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ColumnPath & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class SliceRange {
+ public:
+
+  static const char* ascii_fingerprint; // = "184D24C9A0B8D4415E234DB649CAE740";
+  static const uint8_t binary_fingerprint[16]; // = {0x18,0x4D,0x24,0xC9,0xA0,0xB8,0xD4,0x41,0x5E,0x23,0x4D,0xB6,0x49,0xCA,0xE7,0x40};
+
+  SliceRange() : start(""), finish(""), reversed(false), count(100) {
+  }
+
+  virtual ~SliceRange() throw() {}
+
+  std::string start;
+  std::string finish;
+  bool reversed;
+  int32_t count;
+
+  bool operator == (const SliceRange & rhs) const
+  {
+    if (!(start == rhs.start))
+      return false;
+    if (!(finish == rhs.finish))
+      return false;
+    if (!(reversed == rhs.reversed))
+      return false;
+    if (!(count == rhs.count))
+      return false;
+    return true;
+  }
+  bool operator != (const SliceRange &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const SliceRange & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _SlicePredicate__isset {
+  _SlicePredicate__isset() : column_names(false), slice_range(false) {}
+  bool column_names;
+  bool slice_range;
+} _SlicePredicate__isset;
+
+class SlicePredicate {
+ public:
+
+  static const char* ascii_fingerprint; // = "F59D1D81C17DFFAF09988BF1C9CE5E27";
+  static const uint8_t binary_fingerprint[16]; // = {0xF5,0x9D,0x1D,0x81,0xC1,0x7D,0xFF,0xAF,0x09,0x98,0x8B,0xF1,0xC9,0xCE,0x5E,0x27};
+
+  SlicePredicate() {
+  }
+
+  virtual ~SlicePredicate() throw() {}
+
+  std::vector<std::string>  column_names;
+  SliceRange slice_range;
+
+  _SlicePredicate__isset __isset;
+
+  bool operator == (const SlicePredicate & rhs) const
+  {
+    if (__isset.column_names != rhs.__isset.column_names)
+      return false;
+    else if (__isset.column_names && !(column_names == rhs.column_names))
+      return false;
+    if (__isset.slice_range != rhs.__isset.slice_range)
+      return false;
+    else if (__isset.slice_range && !(slice_range == rhs.slice_range))
+      return false;
+    return true;
+  }
+  bool operator != (const SlicePredicate &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const SlicePredicate & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class IndexExpression {
+ public:
+
+  static const char* ascii_fingerprint; // = "D9F4CFE2F293A8B1052FD3031DD2C847";
+  static const uint8_t binary_fingerprint[16]; // = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+
+  IndexExpression() : column_name(""), value("") {
+  }
+
+  virtual ~IndexExpression() throw() {}
+
+  std::string column_name;
+  IndexOperator::type op;
+  std::string value;
+
+  bool operator == (const IndexExpression & rhs) const
+  {
+    if (!(column_name == rhs.column_name))
+      return false;
+    if (!(op == rhs.op))
+      return false;
+    if (!(value == rhs.value))
+      return false;
+    return true;
+  }
+  bool operator != (const IndexExpression &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const IndexExpression & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class IndexClause {
+ public:
+
+  static const char* ascii_fingerprint; // = "9B551B9AB86120B0EEA9005C77FD3C1F";
+  static const uint8_t binary_fingerprint[16]; // = {0x9B,0x55,0x1B,0x9A,0xB8,0x61,0x20,0xB0,0xEE,0xA9,0x00,0x5C,0x77,0xFD,0x3C,0x1F};
+
+  IndexClause() : start_key(""), count(100) {
+  }
+
+  virtual ~IndexClause() throw() {}
+
+  std::vector<IndexExpression>  expressions;
+  std::string start_key;
+  int32_t count;
+
+  bool operator == (const IndexClause & rhs) const
+  {
+    if (!(expressions == rhs.expressions))
+      return false;
+    if (!(start_key == rhs.start_key))
+      return false;
+    if (!(count == rhs.count))
+      return false;
+    return true;
+  }
+  bool operator != (const IndexClause &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const IndexClause & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _KeyRange__isset {
+  _KeyRange__isset() : start_key(false), end_key(false), start_token(false), end_token(false) {}
+  bool start_key;
+  bool end_key;
+  bool start_token;
+  bool end_token;
+} _KeyRange__isset;
+
+class KeyRange {
+ public:
+
+  static const char* ascii_fingerprint; // = "8F248C09AF1EC3656ABD8565EA1F59C1";
+  static const uint8_t binary_fingerprint[16]; // = {0x8F,0x24,0x8C,0x09,0xAF,0x1E,0xC3,0x65,0x6A,0xBD,0x85,0x65,0xEA,0x1F,0x59,0xC1};
+
+  KeyRange() : start_key(""), end_key(""), start_token(""), end_token(""), count(100) {
+  }
+
+  virtual ~KeyRange() throw() {}
+
+  std::string start_key;
+  std::string end_key;
+  std::string start_token;
+  std::string end_token;
+  int32_t count;
+
+  _KeyRange__isset __isset;
+
+  bool operator == (const KeyRange & rhs) const
+  {
+    if (__isset.start_key != rhs.__isset.start_key)
+      return false;
+    else if (__isset.start_key && !(start_key == rhs.start_key))
+      return false;
+    if (__isset.end_key != rhs.__isset.end_key)
+      return false;
+    else if (__isset.end_key && !(end_key == rhs.end_key))
+      return false;
+    if (__isset.start_token != rhs.__isset.start_token)
+      return false;
+    else if (__isset.start_token && !(start_token == rhs.start_token))
+      return false;
+    if (__isset.end_token != rhs.__isset.end_token)
+      return false;
+    else if (__isset.end_token && !(end_token == rhs.end_token))
+      return false;
+    if (!(count == rhs.count))
+      return false;
+    return true;
+  }
+  bool operator != (const KeyRange &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const KeyRange & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class KeySlice {
+ public:
+
+  static const char* ascii_fingerprint; // = "D1568675B0C135C909E3169B72A4DA3D";
+  static const uint8_t binary_fingerprint[16]; // = {0xD1,0x56,0x86,0x75,0xB0,0xC1,0x35,0xC9,0x09,0xE3,0x16,0x9B,0x72,0xA4,0xDA,0x3D};
+
+  KeySlice() : key("") {
+  }
+
+  virtual ~KeySlice() throw() {}
+
+  std::string key;
+  std::vector<ColumnOrSuperColumn>  columns;
+
+  bool operator == (const KeySlice & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(columns == rhs.columns))
+      return false;
+    return true;
+  }
+  bool operator != (const KeySlice &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const KeySlice & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class KeyCount {
+ public:
+
+  static const char* ascii_fingerprint; // = "EEBC915CE44901401D881E6091423036";
+  static const uint8_t binary_fingerprint[16]; // = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36};
+
+  KeyCount() : key(""), count(0) {
+  }
+
+  virtual ~KeyCount() throw() {}
+
+  std::string key;
+  int32_t count;
+
+  bool operator == (const KeyCount & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(count == rhs.count))
+      return false;
+    return true;
+  }
+  bool operator != (const KeyCount &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const KeyCount & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Deletion__isset {
+  _Deletion__isset() : timestamp(false), super_column(false), predicate(false) {}
+  bool timestamp;
+  bool super_column;
+  bool predicate;
+} _Deletion__isset;
+
+class Deletion {
+ public:
+
+  static const char* ascii_fingerprint; // = "40F33ECF1C932CA77C2414C4E6C60CBE";
+  static const uint8_t binary_fingerprint[16]; // = {0x40,0xF3,0x3E,0xCF,0x1C,0x93,0x2C,0xA7,0x7C,0x24,0x14,0xC4,0xE6,0xC6,0x0C,0xBE};
+
+  Deletion() : timestamp(0), super_column("") {
+  }
+
+  virtual ~Deletion() throw() {}
+
+  int64_t timestamp;
+  std::string super_column;
+  SlicePredicate predicate;
+
+  _Deletion__isset __isset;
+
+  bool operator == (const Deletion & rhs) const
+  {
+    if (__isset.timestamp != rhs.__isset.timestamp)
+      return false;
+    else if (__isset.timestamp && !(timestamp == rhs.timestamp))
+      return false;
+    if (__isset.super_column != rhs.__isset.super_column)
+      return false;
+    else if (__isset.super_column && !(super_column == rhs.super_column))
+      return false;
+    if (__isset.predicate != rhs.__isset.predicate)
+      return false;
+    else if (__isset.predicate && !(predicate == rhs.predicate))
+      return false;
+    return true;
+  }
+  bool operator != (const Deletion &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Deletion & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Mutation__isset {
+  _Mutation__isset() : column_or_supercolumn(false), deletion(false) {}
+  bool column_or_supercolumn;
+  bool deletion;
+} _Mutation__isset;
+
+class Mutation {
+ public:
+
+  static const char* ascii_fingerprint; // = "E8B65DF3979C6868F80DF81F8E769E63";
+  static const uint8_t binary_fingerprint[16]; // = {0xE8,0xB6,0x5D,0xF3,0x97,0x9C,0x68,0x68,0xF8,0x0D,0xF8,0x1F,0x8E,0x76,0x9E,0x63};
+
+  Mutation() {
+  }
+
+  virtual ~Mutation() throw() {}
+
+  ColumnOrSuperColumn column_or_supercolumn;
+  Deletion deletion;
+
+  _Mutation__isset __isset;
+
+  bool operator == (const Mutation & rhs) const
+  {
+    if (__isset.column_or_supercolumn != rhs.__isset.column_or_supercolumn)
+      return false;
+    else if (__isset.column_or_supercolumn && !(column_or_supercolumn == rhs.column_or_supercolumn))
+      return false;
+    if (__isset.deletion != rhs.__isset.deletion)
+      return false;
+    else if (__isset.deletion && !(deletion == rhs.deletion))
+      return false;
+    return true;
+  }
+  bool operator != (const Mutation &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Mutation & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _EndpointDetails__isset {
+  _EndpointDetails__isset() : host(false), datacenter(false) {}
+  bool host;
+  bool datacenter;
+} _EndpointDetails__isset;
+
+class EndpointDetails {
+ public:
+
+  static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972";
+  static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+
+  EndpointDetails() : host(""), datacenter("") {
+  }
+
+  virtual ~EndpointDetails() throw() {}
+
+  std::string host;
+  std::string datacenter;
+
+  _EndpointDetails__isset __isset;
+
+  bool operator == (const EndpointDetails & rhs) const
+  {
+    if (!(host == rhs.host))
+      return false;
+    if (!(datacenter == rhs.datacenter))
+      return false;
+    return true;
+  }
+  bool operator != (const EndpointDetails &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const EndpointDetails & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _TokenRange__isset {
+  _TokenRange__isset() : rpc_endpoints(false), endpoint_details(false) {}
+  bool rpc_endpoints;
+  bool endpoint_details;
+} _TokenRange__isset;
+
+class TokenRange {
+ public:
+
+  static const char* ascii_fingerprint; // = "B84955E63D0C14788839563285CBBDCF";
+  static const uint8_t binary_fingerprint[16]; // = {0xB8,0x49,0x55,0xE6,0x3D,0x0C,0x14,0x78,0x88,0x39,0x56,0x32,0x85,0xCB,0xBD,0xCF};
+
+  TokenRange() : start_token(""), end_token("") {
+  }
+
+  virtual ~TokenRange() throw() {}
+
+  std::string start_token;
+  std::string end_token;
+  std::vector<std::string>  endpoints;
+  std::vector<std::string>  rpc_endpoints;
+  std::vector<EndpointDetails>  endpoint_details;
+
+  _TokenRange__isset __isset;
+
+  bool operator == (const TokenRange & rhs) const
+  {
+    if (!(start_token == rhs.start_token))
+      return false;
+    if (!(end_token == rhs.end_token))
+      return false;
+    if (!(endpoints == rhs.endpoints))
+      return false;
+    if (__isset.rpc_endpoints != rhs.__isset.rpc_endpoints)
+      return false;
+    else if (__isset.rpc_endpoints && !(rpc_endpoints == rhs.rpc_endpoints))
+      return false;
+    if (__isset.endpoint_details != rhs.__isset.endpoint_details)
+      return false;
+    else if (__isset.endpoint_details && !(endpoint_details == rhs.endpoint_details))
+      return false;
+    return true;
+  }
+  bool operator != (const TokenRange &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TokenRange & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class AuthenticationRequest {
+ public:
+
+  static const char* ascii_fingerprint; // = "5EA2D527ECA3BA20C77AFC023EE8C05F";
+  static const uint8_t binary_fingerprint[16]; // = {0x5E,0xA2,0xD5,0x27,0xEC,0xA3,0xBA,0x20,0xC7,0x7A,0xFC,0x02,0x3E,0xE8,0xC0,0x5F};
+
+  AuthenticationRequest() {
+  }
+
+  virtual ~AuthenticationRequest() throw() {}
+
+  std::map<std::string, std::string>  credentials;
+
+  bool operator == (const AuthenticationRequest & rhs) const
+  {
+    if (!(credentials == rhs.credentials))
+      return false;
+    return true;
+  }
+  bool operator != (const AuthenticationRequest &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const AuthenticationRequest & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ColumnDef__isset {
+  _ColumnDef__isset() : index_type(false), index_name(false), index_options(false) {}
+  bool index_type;
+  bool index_name;
+  bool index_options;
+} _ColumnDef__isset;
+
+class ColumnDef {
+ public:
+
+  static const char* ascii_fingerprint; // = "0D89CE83D7EDAD079AC3213ED1DCAA58";
+  static const uint8_t binary_fingerprint[16]; // = {0x0D,0x89,0xCE,0x83,0xD7,0xED,0xAD,0x07,0x9A,0xC3,0x21,0x3E,0xD1,0xDC,0xAA,0x58};
+
+  ColumnDef() : name(""), validation_class(""), index_name("") {
+  }
+
+  virtual ~ColumnDef() throw() {}
+
+  std::string name;
+  std::string validation_class;
+  IndexType::type index_type;
+  std::string index_name;
+  std::map<std::string, std::string>  index_options;
+
+  _ColumnDef__isset __isset;
+
+  bool operator == (const ColumnDef & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (!(validation_class == rhs.validation_class))
+      return false;
+    if (__isset.index_type != rhs.__isset.index_type)
+      return false;
+    else if (__isset.index_type && !(index_type == rhs.index_type))
+      return false;
+    if (__isset.index_name != rhs.__isset.index_name)
+      return false;
+    else if (__isset.index_name && !(index_name == rhs.index_name))
+      return false;
+    if (__isset.index_options != rhs.__isset.index_options)
+      return false;
+    else if (__isset.index_options && !(index_options == rhs.index_options))
+      return false;
+    return true;
+  }
+  bool operator != (const ColumnDef &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ColumnDef & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _CfDef__isset {
+  _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) {}
+  bool column_type;
+  bool comparator_type;
+  bool subcomparator_type;
+  bool comment;
+  bool row_cache_size;
+  bool key_cache_size;
+  bool read_repair_chance;
+  bool column_metadata;
+  bool gc_grace_seconds;
+  bool default_validation_class;
+  bool id;
+  bool min_compaction_threshold;
+  bool max_compaction_threshold;
+  bool row_cache_save_period_in_seconds;
+  bool key_cache_save_period_in_seconds;
+  bool replicate_on_write;
+  bool merge_shards_chance;
+  bool key_validation_class;
+  bool row_cache_provider;
+  bool key_alias;
+  bool compaction_strategy;
+  bool compaction_strategy_options;
+  bool row_cache_keys_to_save;
+  bool compression_options;
+} _CfDef__isset;
+
+class CfDef {
+ public:
+
+  static const char* ascii_fingerprint; // = "0FA1E255DEA2A1E59044B44DA8536D18";
+  static const uint8_t binary_fingerprint[16]; // = {0x0F,0xA1,0xE2,0x55,0xDE,0xA2,0xA1,0xE5,0x90,0x44,0xB4,0x4D,0xA8,0x53,0x6D,0x18};
+
+  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) {
+  }
+
+  virtual ~CfDef() throw() {}
+
+  std::string keyspace;
+  std::string name;
+  std::string column_type;
+  std::string comparator_type;
+  std::string subcomparator_type;
+  std::string comment;
+  double row_cache_size;
+  double key_cache_size;
+  double read_repair_chance;
+  std::vector<ColumnDef>  column_metadata;
+  int32_t gc_grace_seconds;
+  std::string default_validation_class;
+  int32_t id;
+  int32_t min_compaction_threshold;
+  int32_t max_compaction_threshold;
+  int32_t row_cache_save_period_in_seconds;
+  int32_t key_cache_save_period_in_seconds;
+  bool replicate_on_write;
+  double merge_shards_chance;
+  std::string key_validation_class;
+  std::string row_cache_provider;
+  std::string key_alias;
+  std::string compaction_strategy;
+  std::map<std::string, std::string>  compaction_strategy_options;
+  int32_t row_cache_keys_to_save;
+  std::map<std::string, std::string>  compression_options;
+
+  _CfDef__isset __isset;
+
+  bool operator == (const CfDef & rhs) const
+  {
+    if (!(keyspace == rhs.keyspace))
+      return false;
+    if (!(name == rhs.name))
+      return false;
+    if (__isset.column_type != rhs.__isset.column_type)
+      return false;
+    else if (__isset.column_type && !(column_type == rhs.column_type))
+      return false;
+    if (__isset.comparator_type != rhs.__isset.comparator_type)
+      return false;
+    else if (__isset.comparator_type && !(comparator_type == rhs.comparator_type))
+      return false;
+    if (__isset.subcomparator_type != rhs.__isset.subcomparator_type)
+      return false;
+    else if (__isset.subcomparator_type && !(subcomparator_type == rhs.subcomparator_type))
+      return false;
+    if (__isset.comment != rhs.__isset.comment)
+      return false;
+    else if (__isset.comment && !(comment == rhs.comment))
+      return false;
+    if (__isset.row_cache_size != rhs.__isset.row_cache_size)
+      return false;
+    else if (__isset.row_cache_size && !(row_cache_size == rhs.row_cache_size))
+      return false;
+    if (__isset.key_cache_size != rhs.__isset.key_cache_size)
+      return false;
+    else if (__isset.key_cache_size && !(key_cache_size == rhs.key_cache_size))
+      return false;
+    if (__isset.read_repair_chance != rhs.__isset.read_repair_chance)
+      return false;
+    else if (__isset.read_repair_chance && !(read_repair_chance == rhs.read_repair_chance))
+      return false;
+    if (__isset.column_metadata != rhs.__isset.column_metadata)
+      return false;
+    else if (__isset.column_metadata && !(column_metadata == rhs.column_metadata))
+      return false;
+    if (__isset.gc_grace_seconds != rhs.__isset.gc_grace_seconds)
+      return false;
+    else if (__isset.gc_grace_seconds && !(gc_grace_seconds == rhs.gc_grace_seconds))
+      return false;
+    if (__isset.default_validation_class != rhs.__isset.default_validation_class)
+      return false;
+    else if (__isset.default_validation_class && !(default_validation_class == rhs.default_validation_class))
+      return false;
+    if (__isset.id != rhs.__isset.id)
+      return false;
+    else if (__isset.id && !(id == rhs.id))
+      return false;
+    if (__isset.min_compaction_threshold != rhs.__isset.min_compaction_threshold)
+      return false;
+    else if (__isset.min_compaction_threshold && !(min_compaction_threshold == rhs.min_compaction_threshold))
+      return false;
+    if (__isset.max_compaction_threshold != rhs.__isset.max_compaction_threshold)
+      return false;
+    else if (__isset.max_compaction_threshold && !(max_compaction_threshold == rhs.max_compaction_threshold))
+      return false;
+    if (__isset.row_cache_save_period_in_seconds != rhs.__isset.row_cache_save_period_in_seconds)
+      return false;
+    else if (__isset.row_cache_save_period_in_seconds && !(row_cache_save_period_in_seconds == rhs.row_cache_save_period_in_seconds))
+      return false;
+    if (__isset.key_cache_save_period_in_seconds != rhs.__isset.key_cache_save_period_in_seconds)
+      return false;
+    else if (__isset.key_cache_save_period_in_seconds && !(key_cache_save_period_in_seconds == rhs.key_cache_save_period_in_seconds))
+      return false;
+    if (__isset.replicate_on_write != rhs.__isset.replicate_on_write)
+      return false;
+    else if (__isset.replicate_on_write && !(replicate_on_write == rhs.replicate_on_write))
+      return false;
+    if (__isset.merge_shards_chance != rhs.__isset.merge_shards_chance)
+      return false;
+    else if (__isset.merge_shards_chance && !(merge_shards_chance == rhs.merge_shards_chance))
+      return false;
+    if (__isset.key_validation_class != rhs.__isset.key_validation_class)
+      return false;
+    else if (__isset.key_validation_class && !(key_validation_class == rhs.key_validation_class))
+      return false;
+    if (__isset.row_cache_provider != rhs.__isset.row_cache_provider)
+      return false;
+    else if (__isset.row_cache_provider && !(row_cache_provider == rhs.row_cache_provider))
+      return false;
+    if (__isset.key_alias != rhs.__isset.key_alias)
+      return false;
+    else if (__isset.key_alias && !(key_alias == rhs.key_alias))
+      return false;
+    if (__isset.compaction_strategy != rhs.__isset.compaction_strategy)
+      return false;
+    else if (__isset.compaction_strategy && !(compaction_strategy == rhs.compaction_strategy))
+      return false;
+    if (__isset.compaction_strategy_options != rhs.__isset.compaction_strategy_options)
+      return false;
+    else if (__isset.compaction_strategy_options && !(compaction_strategy_options == rhs.compaction_strategy_options))
+      return false;
+    if (__isset.row_cache_keys_to_save != rhs.__isset.row_cache_keys_to_save)
+      return false;
+    else if (__isset.row_cache_keys_to_save && !(row_cache_keys_to_save == rhs.row_cache_keys_to_save))
+      return false;
+    if (__isset.compression_options != rhs.__isset.compression_options)
+      return false;
+    else if (__isset.compression_options && !(compression_options == rhs.compression_options))
+      return false;
+    return true;
+  }
+  bool operator != (const CfDef &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CfDef & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _KsDef__isset {
+  _KsDef__isset() : strategy_options(false), replication_factor(false), durable_writes(false) {}
+  bool strategy_options;
+  bool replication_factor;
+  bool durable_writes;
+} _KsDef__isset;
+
+class KsDef {
+ public:
+
+  static const char* ascii_fingerprint; // = "28433565DB1070CD6C4372A762397EFE";
+  static const uint8_t binary_fingerprint[16]; // = {0x28,0x43,0x35,0x65,0xDB,0x10,0x70,0xCD,0x6C,0x43,0x72,0xA7,0x62,0x39,0x7E,0xFE};
+
+  KsDef() : name(""), strategy_class(""), replication_factor(0), durable_writes(true) {
+  }
+
+  virtual ~KsDef() throw() {}
+
+  std::string name;
+  std::string strategy_class;
+  std::map<std::string, std::string>  strategy_options;
+  int32_t replication_factor;
+  std::vector<CfDef>  cf_defs;
+  bool durable_writes;
+
+  _KsDef__isset __isset;
+
+  bool operator == (const KsDef & rhs) const
+  {
+    if (!(name == rhs.name))
+      return false;
+    if (!(strategy_class == rhs.strategy_class))
+      return false;
+    if (__isset.strategy_options != rhs.__isset.strategy_options)
+      return false;
+    else if (__isset.strategy_options && !(strategy_options == rhs.strategy_options))
+      return false;
+    if (__isset.replication_factor != rhs.__isset.replication_factor)
+      return false;
+    else if (__isset.replication_factor && !(replication_factor == rhs.replication_factor))
+      return false;
+    if (!(cf_defs == rhs.cf_defs))
+      return false;
+    if (__isset.durable_writes != rhs.__isset.durable_writes)
+      return false;
+    else if (__isset.durable_writes && !(durable_writes == rhs.durable_writes))
+      return false;
+    return true;
+  }
+  bool operator != (const KsDef &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const KsDef & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class CqlRow {
+ public:
+
+  static const char* ascii_fingerprint; // = "470EFC558004E98D92D604898305C04E";
+  static const uint8_t binary_fingerprint[16]; // = {0x47,0x0E,0xFC,0x55,0x80,0x04,0xE9,0x8D,0x92,0xD6,0x04,0x89,0x83,0x05,0xC0,0x4E};
+
+  CqlRow() : key("") {
+  }
+
+  virtual ~CqlRow() throw() {}
+
+  std::string key;
+  std::vector<Column>  columns;
+
+  bool operator == (const CqlRow & rhs) const
+  {
+    if (!(key == rhs.key))
+      return false;
+    if (!(columns == rhs.columns))
+      return false;
+    return true;
+  }
+  bool operator != (const CqlRow &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CqlRow & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class CqlMetadata {
+ public:
+
+  static const char* ascii_fingerprint; // = "B7C5A4AA9652C744A48EBC1C12D531E7";
+  static const uint8_t binary_fingerprint[16]; // = {0xB7,0xC5,0xA4,0xAA,0x96,0x52,0xC7,0x44,0xA4,0x8E,0xBC,0x1C,0x12,0xD5,0x31,0xE7};
+
+  CqlMetadata() : default_name_type(""), default_value_type("") {
+  }
+
+  virtual ~CqlMetadata() throw() {}
+
+  std::map<std::string, std::string>  name_types;
+  std::map<std::string, std::string>  value_types;
+  std::string default_name_type;
+  std::string default_value_type;
+
+  bool operator == (const CqlMetadata & rhs) const
+  {
+    if (!(name_types == rhs.name_types))
+      return false;
+    if (!(value_types == rhs.value_types))
+      return false;
+    if (!(default_name_type == rhs.default_name_type))
+      return false;
+    if (!(default_value_type == rhs.default_value_type))
+      return false;
+    return true;
+  }
+  bool operator != (const CqlMetadata &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CqlMetadata & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _CqlResult__isset {
+  _CqlResult__isset() : rows(false), num(false), schema(false) {}
+  bool rows;
+  bool num;
+  bool schema;
+} _CqlResult__isset;
+
+class CqlResult {
+ public:
+
+  static const char* ascii_fingerprint; // = "521B9CE5AF77539F7267F6952B609E81";
+  static const uint8_t binary_fingerprint[16]; // = {0x52,0x1B,0x9C,0xE5,0xAF,0x77,0x53,0x9F,0x72,0x67,0xF6,0x95,0x2B,0x60,0x9E,0x81};
+
+  CqlResult() : num(0) {
+  }
+
+  virtual ~CqlResult() throw() {}
+
+  CqlResultType::type type;
+  std::vector<CqlRow>  rows;
+  int32_t num;
+  CqlMetadata schema;
+
+  _CqlResult__isset __isset;
+
+  bool operator == (const CqlResult & rhs) const
+  {
+    if (!(type == rhs.type))
+      return false;
+    if (__isset.rows != rhs.__isset.rows)
+      return false;
+    else if (__isset.rows && !(rows == rhs.rows))
+      return false;
+    if (__isset.num != rhs.__isset.num)
+      return false;
+    else if (__isset.num && !(num == rhs.num))
+      return false;
+    if (__isset.schema != rhs.__isset.schema)
+      return false;
+    else if (__isset.schema && !(schema == rhs.schema))
+      return false;
+    return true;
+  }
+  bool operator != (const CqlResult &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const CqlResult & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+}}} // namespace
+
+#endif

+ 150 - 0
modules/db_cassandra/db_cassandra.c

@@ -0,0 +1,150 @@
+/*
+ * $Id$
+ *
+ * CASSANDRA module interface
+ *
+ * Copyright (C) 2012 1&1 Internet AG
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * History:
+ * --------
+ * 2012-01  first version (Anca Vamanu)
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../../sr_module.h"
+#include "../../lib/srdb1/db.h"
+#include "../../dprint.h"
+
+#include "dbcassa_base.h"
+#include "dbcassa_table.h"
+
+unsigned int cassa_conn_timeout= 1000;
+unsigned int cassa_send_timeout= 2000;
+unsigned int cassa_recv_timeout= 4000;
+unsigned int cassa_retries= 1;
+unsigned int cassa_auto_reconnect = 1;
+
+static int cassa_mod_init(void);
+static void mod_destroy(void);
+int db_cassa_bind_api(db_func_t *dbb);
+str dbcassa_schema_path={0, 0};
+
+MODULE_VERSION
+
+/*
+ *  database module interface
+ */
+static cmd_export_t cmds[] = {
+	{"db_bind_api",  (cmd_function)db_cassa_bind_api, 0, 0, 0},
+	{0, 0, 0, 0, 0}
+};
+
+
+static param_export_t params[] = {
+	{"schema_path",      PARAM_STR,  &dbcassa_schema_path.s},
+	{"connect_timeout",  PARAM_INT,  &cassa_conn_timeout},
+	{"send_timeout",     PARAM_INT,  &cassa_send_timeout},
+	{"receive_timeout",  PARAM_INT,  &cassa_recv_timeout},
+	{"retries",          PARAM_INT,  &cassa_retries},
+	{"auto_reconnect",   INT_PARAM,  &cassa_auto_reconnect},
+	{0, 0, 0}
+};
+
+
+struct module_exports exports = {
+	"db_cassandra",
+	DEFAULT_DLFLAGS, /* dlopen flags */
+	cmds,
+	params,          /* module parameters */
+	0,               /* exported statistics */
+	0,               /* exported MI functions */
+	0,               /* exported pseudo-variables */
+	0,               /* extra processes */
+	cassa_mod_init,  /* module initialization function */
+	0,               /* response function*/
+	mod_destroy,     /* destroy function */
+	0                /* per-child init function */
+};
+
+static int cassa_mod_init(void)
+{
+	if(!dbcassa_schema_path.s) {
+		LM_ERR("Set the schema_path parameter to the path of the directory"
+				" where the table schemas are found (they must be described in cassa special format)\n");
+		return -1;
+	}
+	dbcassa_schema_path.len = strlen(dbcassa_schema_path.s);
+
+	return dbcassa_read_table_schemas();
+}
+
+db1_con_t *db_cassa_init(const str* _url)
+{
+	return db_do_init(_url,  (void* (*)()) db_cassa_new_connection);
+}
+
+
+/*!
+ * \brief Close database when the database is no longer needed
+ * \param _h closed connection, as returned from db_cassa_init
+ * \note free all memory and resources
+ */
+void db_cassa_close(db1_con_t* _h)
+{
+	db_do_close(_h, (void (*)()) db_cassa_free_connection);
+}
+
+/*
+ * Store name of table that will be used by
+ * subsequent database functions
+ */
+int db_cassa_use_table(db1_con_t* _h, const str* _t)
+{
+	return db_use_table(_h, _t);
+}
+
+
+
+int db_cassa_bind_api(db_func_t *dbb)
+{
+	if(dbb==NULL)
+		return -1;
+
+	memset(dbb, 0, sizeof(db_func_t));
+
+	dbb->use_table        = db_cassa_use_table;
+	dbb->init             = db_cassa_init;
+	dbb->close            = db_cassa_close;
+	dbb->query            = db_cassa_query;
+	dbb->free_result      = db_cassa_free_result;
+	dbb->insert           = db_cassa_insert;
+	dbb->replace          = db_cassa_insert;
+	dbb->insert_update    = db_cassa_insert;
+	dbb->delete           = db_cassa_delete;
+	dbb->update           = db_cassa_update;
+
+	return 0;
+}
+
+static void mod_destroy(void)
+{
+	dbcassa_destroy_htable();
+}

+ 1032 - 0
modules/db_cassandra/dbcassa_base.cpp

@@ -0,0 +1,1032 @@
+/*
+ * $Id$
+ *
+ * CASSANDRA module interface
+ *
+ * Copyright (C) 2012 1&1 Internet AG
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * History:
+ * --------
+ * 2012-01  first version (Anca Vamanu)
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <poll.h>
+#include <iostream>
+#include <boost/lexical_cast.hpp>
+#include <protocol/TBinaryProtocol.h>
+#include <transport/TSocket.h>
+#include <transport/TTransportUtils.h>
+
+extern "C" {
+#include "../../timer.h"
+#include "../../mem/mem.h"
+#include "dbcassa_table.h"
+}
+
+#include "Cassandra.h"
+#include "dbcassa_base.h"
+
+namespace at  = apache::thrift;
+namespace att = apache::thrift::transport;
+namespace atp = apache::thrift::protocol;
+namespace oac = org::apache::cassandra;
+
+static const char cassa_key_delim  = ' ';
+static const int  cassa_max_key_len= 512;
+
+#define MAX_ROWS_NO        128     /* TODO: make this configurable or dynamic */
+int row_slices[MAX_ROWS_NO][2];
+
+/*
+ * ----         Cassandra Connection Section               ----
+ *  */
+
+struct cassa_con {
+	struct db_id* id;           /*!< Connection identifier       */
+	unsigned int ref;           /*!< Reference count             */
+	struct pool_con* next;      /*!< Next connection in the pool */
+
+	str db_name;                /*!< Database name as str        */
+	oac::CassandraClient* con;  /*!< Cassandra connection        */
+};
+
+#define CON_CASSA(db_con)    ((struct cassa_con*)db_con->tail)
+
+/*!
+ * \brief Open connection to Cassandra cluster
+ * \param db_id
+ */
+oac::CassandraClient* dbcassa_open(struct db_id* id)
+{
+	try {
+		boost::shared_ptr<att::TSocket> socket(new att::TSocket(id->host, id->port));
+		boost::shared_ptr<att::TTransport> transport(new att::TFramedTransport (socket));
+		boost::shared_ptr<atp::TProtocol> protocol(new atp::TBinaryProtocol(transport));
+
+		socket->setConnTimeout(cassa_conn_timeout);
+		socket->setSendTimeout(cassa_send_timeout);
+		socket->setRecvTimeout(cassa_recv_timeout);
+
+		std::auto_ptr<oac::CassandraClient> cassa_client(new oac::CassandraClient(protocol));
+
+		transport->open();
+		if (!transport->isOpen()) {
+			LM_ERR("Failed to open transport to Cassandra\n");
+			return 0;
+		}
+
+		/* database name ->  keyspace */
+
+		cassa_client->set_keyspace(id->database);
+		if(id->username && id->password) {
+			oac::AuthenticationRequest au_req;
+			std::map<std::string, std::string>  cred;
+			cred.insert(std::pair<std::string, std::string>("username", id->username));
+			cred.insert(std::pair<std::string, std::string>("password", id->password));
+			au_req.credentials = cred;
+			try {
+				cassa_client->login(au_req);
+			} catch (const oac::AuthenticationException& autx) {
+				LM_ERR("Authentication failure: Credentials not valid, %s\n", autx.why.c_str());
+			} catch (const oac::AuthorizationException & auzx) {
+				LM_ERR("Authentication failure: Credentials not valid for the selected database, %s\n", auzx.why.c_str());
+			}
+		}
+
+		LM_DBG("Opened connection to Cassandra cluster  %s:%d\n", id->host, id->port);
+		return cassa_client.release();
+
+	} catch (const oac::InvalidRequestException &irx) {
+		LM_ERR("Database does not exist %s, %s\n", id->database, irx.why.c_str());
+	} catch (const at::TException &tx) {
+		LM_ERR("Failed to open connection to Cassandra cluster %s:%d, %s\n",
+				id->database, id->port, tx.what());
+	} catch (const std::exception &ex) {
+		LM_ERR("Failed: %s\n", ex.what());
+	} catch (...) {
+		LM_ERR("Failed to open connection to Cassandra cluster\n");
+	}
+
+	return 0;
+}
+
+/*!
+ * \brief Create new DB connection structure
+ * \param db_id
+ */
+void* db_cassa_new_connection(struct db_id* id)
+{
+	struct cassa_con* ptr;
+
+	if (!id) {
+		LM_ERR("invalid db_id parameter value\n");
+		return 0;
+	}
+
+	if (id->port) {
+		LM_DBG("opening connection: cassa://xxxx:xxxx@%s:%d/%s\n", ZSW(id->host),
+			id->port, ZSW(id->database));
+	} else {
+		LM_DBG("opening connection: cassa://xxxx:xxxx@%s/%s\n", ZSW(id->host),
+			ZSW(id->database));
+	}
+
+	ptr = (struct cassa_con*)pkg_malloc(sizeof(struct cassa_con));
+	if (!ptr) {
+		LM_ERR("failed trying to allocated %lu bytes for connection structure."
+				"\n", (unsigned long)sizeof(struct cassa_con));
+		return 0;
+	}
+	LM_DBG("%p=pkg_malloc(%lu)\n", ptr, (unsigned long)sizeof(struct cassa_con));
+
+	memset(ptr, 0, sizeof(struct cassa_con));
+
+	ptr->db_name.s = id->database;
+	ptr->db_name.len = strlen(id->database);
+	ptr->id = id;
+	ptr->ref = 1;
+
+	ptr->con = dbcassa_open(id);
+	if(!ptr->con) {
+		LM_ERR("Failed to open connection to Cassandra cluster\n");
+		pkg_free(ptr);
+		return 0;
+	}
+	return ptr;
+}
+
+
+/*!
+ * \brief Close Cassandra connection
+ * \param CassandraConnection
+ */
+void dbcassa_close(oac::CassandraClient* con)
+{
+	if(! con) return;
+
+	delete con;
+}
+
+/*!
+ * \brief Close the connection and release memory
+ * \param connection
+ */
+void db_cassa_free_connection(struct pool_con* con)
+{
+	struct cassa_con * _c;
+
+	if (!con) return;
+
+	_c = (struct cassa_con*) con;
+	dbcassa_close(_c->con);
+	pkg_free(_c);
+}
+
+/*!
+ * \brief Reconnect to Cassandra cluster
+ * \param connection
+ */
+void dbcassa_reconnect(struct cassa_con* con)
+{
+	dbcassa_close(con->con);
+	con->con = dbcassa_open(con->id);
+}
+
+
+/*
+ * ----              DB Operations Section                          ----
+ * */
+
+/*
+ *	Util functions
+ * */
+static int cassa_get_res_col(std::vector<oac::ColumnOrSuperColumn> result, int r_si, int r_fi, int prefix_len, db_key_t qcol)
+{
+	str res_col_name;
+
+	for (int i = r_si; i< r_fi; i++) {
+		res_col_name.s = (char*)result[i].column.name.c_str()+prefix_len;
+		res_col_name.len = (int)result[i].column.name.size() - prefix_len;
+
+		if(res_col_name.len == qcol->len &&
+				strncmp(res_col_name.s, qcol->s, qcol->len )==0)
+			return i;
+	}
+	return -1;
+}
+
+static int cassa_convert_result(db_key_t qcol, std::vector<oac::ColumnOrSuperColumn> result,
+		int r_si, int r_fi, int prefix_len, db_val_t* sr_cell)
+{
+	str col_val;
+	int idx_rescol;
+	oac::Column res_col;
+
+	idx_rescol = cassa_get_res_col(result, r_si, r_fi, prefix_len, qcol);
+	if(idx_rescol< 0) {
+		LM_DBG("Column not found in result %.*s\n", qcol->len, qcol->s);
+		sr_cell->nul  = 1;
+		return 0;
+	}
+	res_col = result[idx_rescol].column;
+
+	col_val.s = (char*)res_col.value.c_str();
+	if(!col_val.s) {
+		LM_DBG("Column not found in result %.*s- NULL\n", qcol->len, qcol->s);
+		sr_cell->nul  = 1;
+		return 0;
+	}
+	col_val.len = strlen(col_val.s);
+
+	sr_cell->nul  = 0;
+	sr_cell->free  = 0;
+
+	switch (sr_cell->type) {
+		case DB1_INT:
+			if(str2int(&col_val, (unsigned int*)&sr_cell->val.int_val) < 0) {
+				LM_ERR("Wrong value [%s] - len=%d, expected integer\n", col_val.s, col_val.len);
+				return -1;
+			}
+			break;
+		case DB1_BIGINT:
+			if(sscanf(col_val.s, "%lld", &sr_cell->val.ll_val) < 0) {
+				LM_ERR("Wrong value [%s], expected integer\n", col_val.s);
+				return -1;
+			}
+			break;
+		case DB1_DOUBLE:
+			if(sscanf(col_val.s, "%lf", &sr_cell->val.double_val) < 0) {
+				LM_ERR("Wrong value [%s], expected integer\n", col_val.s);
+				return -1;
+			}
+			break;
+		case DB1_STR:
+			pkg_str_dup(&sr_cell->val.str_val, &col_val);
+			sr_cell->free  = 1;
+			break;
+		case DB1_STRING:
+			col_val.len++;
+			pkg_str_dup(&sr_cell->val.str_val, &col_val);
+			sr_cell->val.str_val.len--;
+			sr_cell->val.str_val.s[col_val.len-1]='\0';
+			sr_cell->free  = 1;
+			break;
+		case DB1_BLOB:
+			pkg_str_dup(&sr_cell->val.blob_val, &col_val);
+			sr_cell->free  = 1;
+			break;
+		case DB1_BITMAP:
+			if(str2int(&col_val, &sr_cell->val.bitmap_val) < 0) {
+				LM_ERR("Wrong value [%s], expected integer\n", col_val.s);
+				return -1;
+			}
+			break;
+		case DB1_DATETIME:
+			if(sscanf(col_val.s, "%ld", (long int*)&sr_cell->val.time_val) < 0) {
+				LM_ERR("Wrong value [%s], expected integer\n", col_val.s);
+				return -1;
+			}
+			break;
+	}
+	return 0;
+}
+
+static char* dbval_to_string(db_val_t dbval, char* pk)
+{
+	switch(dbval.type) {
+		case DB1_STRING: strcpy(pk, dbval.val.string_val);
+						   pk+= strlen(dbval.val.string_val);
+						   break;
+		case DB1_STR:    memcpy(pk, dbval.val.str_val.s, dbval.val.str_val.len);
+						   pk+= dbval.val.str_val.len;
+						   break;
+		case DB1_INT:    pk+= sprintf(pk, "%d", dbval.val.int_val);
+						   break;
+		case DB1_BIGINT: pk+= sprintf(pk, "%lld", dbval.val.ll_val);
+						   break;
+		case DB1_DOUBLE: pk+= sprintf(pk, "%lf", dbval.val.double_val);
+						   break;
+		case DB1_BLOB:   pk+= sprintf(pk, "%.*s", dbval.val.blob_val.len, dbval.val.blob_val.s);
+						   break;
+		case DB1_BITMAP: pk+= sprintf(pk, "%u", dbval.val.bitmap_val);
+						   break;
+		case DB1_DATETIME:pk+= sprintf(pk, "%ld", (long int)dbval.val.time_val);
+						  break;
+	}
+	return pk;
+}
+
+
+int cassa_constr_key( const db_key_t* _k, const db_val_t* _v,
+		int _n, int key_len, dbcassa_column_p* key_array, int *no_kc, char* key)
+{
+	int i, j;
+	char* pk = key;
+
+	if(!key_array)
+		return 0;
+
+	for(j = 0; j< _n; j++) {
+		LM_DBG("query col = %.*s\n",  _k[j]->len,  _k[j]->s);
+	}
+
+	for(i = 0; i< key_len; i++) {
+		/* look in the received columns to search the key column */
+		for(j = 0; j< _n; j++) {
+			if(_k[j]->len == key_array[i]->name.len &&
+					!strncmp(_k[j]->s, key_array[i]->name.s, _k[j]->len))
+				break;
+		}
+		if(j == _n) {
+			LM_ERR("The key column with name [%.*s] not found in values\n", key_array[i]->name.len, key_array[i]->name.s);
+			break;
+		}
+		pk= dbval_to_string(_v[j], pk);
+		*(pk++) = cassa_key_delim;
+	}
+	if(pk > key)
+		*(--pk) = '\0';
+	else
+		*key = '\0';
+
+	if(no_kc)
+		*no_kc = i;
+
+	LM_DBG("key = %s\n", key);
+
+	return pk - key;
+}
+
+
+int cassa_result_separate_rows(std::vector<oac::ColumnOrSuperColumn> result) {
+	int rows_no =0, i = 0;
+	int res_size = result.size();
+
+	while(i< res_size) {
+		size_t found;
+		std::string curr_seckey;
+
+		found = result[i].column.name.find(cassa_key_delim);
+		if(found< 0) {
+			LM_ERR("Wrong formated column name - secondary key part not found [%s]\n",
+					result[i].column.name.c_str());
+			return -1;
+		}
+		curr_seckey = result[i].column.name.substr(0, found);
+
+		while(++i < res_size) {
+			if(result[i].column.name.compare(0, found, curr_seckey)) {
+				LM_DBG("Encountered a new secondary key %s - %s\n", result[i].column.name.c_str(), curr_seckey.c_str());
+				break;
+			}
+		}
+		/* the current row stretches until index 'i' and the corresponding key prefix has length 'found' */
+		row_slices[rows_no][0] = i;
+		row_slices[rows_no][1] = found +1;
+		rows_no++;
+	}
+
+	/* debug messages */
+	for(int i = 0; i< rows_no; i++) {
+		LM_DBG("Row %d until index %d with prefix len %d\n", i, row_slices[i][0], row_slices[i][1]);
+	}
+
+	return rows_no;
+}
+
+dbcassa_column_p cassa_search_col(dbcassa_table_p tbc, db_key_t col_name)
+{
+	dbcassa_column_p colp;
+
+	colp = tbc->cols;
+	while(colp) {
+		if(colp->name.len == col_name->len && !strncmp(colp->name.s, col_name->s, col_name->len))
+			return colp;
+		colp = colp->next;
+	}
+	return 0;
+}
+
+typedef std::auto_ptr<std::vector<oac::ColumnOrSuperColumn> >  ColumnVecPtr;
+
+ColumnVecPtr cassa_translate_query(const db1_con_t* _h, const db_key_t* _k,
+		const db_val_t* _v, const db_key_t* _c, int _n, int _nc)
+{
+	char row_key[cassa_max_key_len];
+	char sec_key[cassa_max_key_len];
+	int key_len, seckey_len = 0;
+	int no_kc, no_sec_kc;
+	dbcassa_table_p tbc;
+
+	/** Lock table schema and construct primary and secondary key **/
+	tbc = dbcassa_db_get_table(&CON_CASSA(_h)->db_name, CON_TABLE(_h));
+	if(!tbc) {
+		LM_ERR("table %.*s does not exist!\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s);
+		return ColumnVecPtr(NULL);
+	}
+	cassa_constr_key(_k, _v, _n, tbc->key_len, tbc->key, &no_kc, row_key);
+
+	if(no_kc != tbc->key_len) {/* was not able to construct the whole key */
+		LM_ERR("Query not supported - key not provided\n");
+		dbcassa_lock_release(tbc);
+		return ColumnVecPtr(NULL);
+	}
+	key_len = tbc->key_len;
+
+	cassa_constr_key(_k, _v, _n, tbc->seckey_len, tbc->sec_key, &no_sec_kc, sec_key);
+	seckey_len = tbc->seckey_len;
+
+	dbcassa_lock_release(tbc);
+
+	try {
+		oac::SlicePredicate sp;
+		if(seckey_len) { // seckey defined for this table
+			if(no_sec_kc == seckey_len) { // was able to build the complete secondary key
+				if(_c) { /* if queried for specific columns */
+					/* query for the specific columns */
+					for(int i=0; i< _nc; i++) {
+						std::string col_name = sec_key;
+						col_name.push_back(cassa_key_delim);
+						col_name.append(_c[i]->s);
+						sp.column_names.push_back(col_name);
+						LM_DBG("Query col: %s\n", col_name.c_str());
+					}
+					sp.__isset.column_names = true; // set
+				} else { /* query for columns starting with this secondary key */
+					oac::SliceRange sr;
+					sr.start = sec_key;
+					sr.start.push_back(cassa_key_delim);
+					sr.finish = sec_key;
+					sr.finish.push_back(cassa_key_delim +1);
+					sp.slice_range = sr;
+					sp.__isset.slice_range = true; // set
+				}
+			} else {  /* query all columns */
+				oac::SliceRange sr;
+				sr.start = "";
+				sr.finish = "";
+				sp.slice_range = sr;
+				sp.__isset.slice_range = true; // set
+			}
+		} else { /* the table doesn't have any secondary key defined */
+			if(_c) {
+				for(int i=0; i< _nc; i++) {
+					sp.column_names.push_back(_c[i]->s);
+					LM_DBG("Query col: %s\n", _c[i]->s);
+				}
+				LM_DBG("get %d columns\n", _nc);
+				sp.__isset.column_names = true; // set
+			} else {
+				/* return all columns */
+				oac::SliceRange sr;
+				sr.start = "";
+				sr.finish = "";
+				sp.slice_range = sr;
+				sp.__isset.slice_range = true; // set
+				LM_DBG("get all columns\n");
+			}
+		}
+
+		unsigned int retr = 0;
+		oac::ColumnParent cparent;
+		cparent.column_family = _h->table->s;
+		ColumnVecPtr cassa_result(new std::vector<oac::ColumnOrSuperColumn>);
+		do {
+			if(CON_CASSA(_h)->con) {
+				try {
+					CON_CASSA(_h)->con->get_slice(*cassa_result, row_key, cparent, sp, oac::ConsistencyLevel::ONE);
+					return cassa_result;
+				} catch (const att::TTransportException &tx) {
+					LM_ERR("Failed to query: %s\n", tx.what());
+				}
+			}
+			dbcassa_reconnect(CON_CASSA(_h));
+		} while(cassa_auto_reconnect && retr++ < cassa_retries);
+
+	} catch (const oac::InvalidRequestException ir) {
+		LM_ERR("Failed Invalid query request: %s\n", ir.why.c_str());
+	} catch (const at::TException &tx) {
+		LM_ERR("Failed generic Thrift error: %s\n", tx.what());
+	} catch (const std::exception &ex) {
+		LM_ERR("Failed std error: %s\n", ex.what());
+	} catch (...) {
+		LM_ERR("Failed generic error\n");
+	}
+
+	LM_DBG("Query with get slice no_kc=%d tbc->key_len=%d  _n=%d\n", no_kc, key_len,_n);
+	return ColumnVecPtr(NULL);
+}
+
+
+/*
+ *	The functions for the DB Operations: query, delete, update.
+ * */
+
+/*
+ * Query table for specified rows
+ * _h: structure representing database connection
+ * _k: key names
+ * _op: operators
+ * _v: values of the keys that must match
+ * _c: column names to return
+ * _n: number of key=values pairs to compare
+ * _nc: number of columns to return
+ * _o: order by the specified column
+ */
+int db_cassa_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
+		const db_val_t* _v, const db_key_t* _c, int _n, int _nc,
+		const db_key_t _o, db1_res_t** _r)
+{
+	db1_res_t* db_res = 0;
+	int rows_no;
+	ColumnVecPtr cassa_result;
+	dbcassa_table_p tbc;
+	int seckey_len;
+
+	if (!_h || !CON_TABLE(_h) || !_r) {
+		LM_ERR("invalid parameter value\n");
+		return -1;
+	}
+	LM_DBG("query table=%s\n", _h->table->s);
+
+	/** Construct and send the query to Cassandra Cluster **/
+
+	cassa_result = cassa_translate_query(_h, _k, _v, _c, _n, _nc);
+
+	if(cassa_result.get() == NULL) {
+		LM_ERR("Failed to query Cassandra cluster\n");
+		return -1;
+	}
+
+	/* compare the number of queried cols with the key cols*/
+//	if(no_kc + no_sec_kc < _n) { /* TODO */
+		/* filter manually for the rest of the values */
+//	}
+
+	db_res = db_new_result();
+	if (!db_res) {
+		LM_ERR("no memory left\n");
+		goto error;
+	}
+	RES_COL_N(db_res)= _nc;
+	if(!db_allocate_columns(db_res, _nc) < 0) {
+		LM_ERR("no more memory\n");
+		goto error;
+	}
+
+	tbc = dbcassa_db_get_table(&CON_CASSA(_h)->db_name, CON_TABLE(_h));
+	if(!tbc) {
+		LM_ERR("table %.*s does not exist!\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s);
+		return -1;
+	}
+
+	/** Convert the result from Cassandra **/
+	/* fill in the columns name and type */
+	for(int col = 0; col < _nc; col++) {
+		RES_NAMES(db_res)[col] = (str*)pkg_malloc(sizeof(str));
+		if (! RES_NAMES(db_res)[col]) {
+			LM_ERR("no private memory left\n");
+			dbcassa_lock_release(tbc);
+			db_free_columns(db_res);
+			goto error;
+		}
+
+		*RES_NAMES(db_res)[col]   = *_c[col];
+
+		/* search the column in table schema to get the type */
+		dbcassa_column_p colp = cassa_search_col(tbc, _c[col]);
+		if(!colp) {
+			LM_ERR("No column with name [%.*s] found\n", _c[col]->len, _c[col]->s);
+			dbcassa_lock_release(tbc);
+			db_free_columns(db_res);
+			goto error;
+		}
+		RES_TYPES(db_res)[col] = colp->type;
+
+		LM_DBG("RES_NAMES(%p)[%d]=[%.*s]\n", RES_NAMES(db_res)[col], col,
+				RES_NAMES(db_res)[col]->len, RES_NAMES(db_res)[col]->s);
+	}
+	seckey_len = tbc->seckey_len;
+	dbcassa_lock_release(tbc);
+
+	if(!cassa_result->size()) {
+		LM_DBG("The query returned no result\n");
+		RES_ROW_N(db_res) = 0;
+		goto done;
+	}
+
+	/* Initialize the row_slices vector for the case with one column and no secondary key */
+	row_slices[0][0]= cassa_result->size();
+	row_slices[0][1]= 0;
+
+	if(seckey_len) { /* if the table has a secondary key defined */
+/* if the secondary key was computed */
+/*		if (no_sec_kc == seckey_len) { 
+			rows_no = 1;
+			row_slices[0][1] = strlen(sec_key) + 1;
+		}
+		else */ {
+			/* pass through the result once to see how many rows there are */
+			rows_no = cassa_result_separate_rows(*cassa_result);
+			if(rows_no < 0) {
+				LM_ERR("Wrong formated column names\n");
+				goto error;
+			}
+		}
+	}
+	else
+		rows_no = 1;
+
+	RES_ROW_N(db_res) = rows_no;
+
+	if (db_allocate_rows(db_res) < 0) {
+		LM_ERR("could not allocate rows");
+		goto error;
+	}
+
+	for(int ri=0; ri < rows_no; ri++) {
+		if (db_allocate_row(db_res, &(RES_ROWS(db_res)[ri])) != 0) {
+			LM_ERR("could not allocate row");
+			goto error;
+		}
+
+		/* complete the row with the columns */
+		for(int col = 0; col< _nc; col++) {
+			RES_ROWS(db_res)[ri].values[col].type = RES_TYPES(db_res)[col];
+			cassa_convert_result(_c[col], *cassa_result, (ri>0?row_slices[ri-1][0]:0),  row_slices[ri][0],
+					row_slices[ri][1], &RES_ROWS(db_res)[ri].values[col]);
+		}
+	}
+
+done:
+	*_r = db_res;
+	LM_DBG("Exited with success\n");
+	return 1;
+
+error:
+	if(db_res)
+		db_free_result(db_res);
+	return -1;
+}
+
+/*
+ * Insert or update the table for specified row key
+ * _h: structure representing database connection
+ * _k: key names
+ * _op: operators
+ * _v: values of the keys that must match
+ * _uk: column names to update
+ * _uv: values for the columns to update
+ * _n: number of key=values pairs to compare
+ * _un: number of columns to update
+ */
+int db_cassa_modify(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+		const db_key_t* _uk, const db_val_t* _uv, int _n, int _un)
+{
+	dbcassa_table_p tbc;
+	char row_key[cassa_max_key_len];
+	char sec_key[cassa_max_key_len];
+	int64_t ts = 0;
+	str ts_col_name={0, 0};
+	int seckey_len;
+	unsigned int curr_time = time(NULL);
+
+	if (!_h || !CON_TABLE(_h) || !_k || !_v) {
+		LM_ERR("invalid parameter value\n");
+		return -1;
+	}
+
+	LM_DBG("modify table=%s\n", _h->table->s);
+
+	/** Lock table schema and construct primary and secondary key **/
+	tbc = dbcassa_db_get_table(&CON_CASSA(_h)->db_name, CON_TABLE(_h));
+	if(!tbc) {
+		LM_ERR("table %.*s does not exist!\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s);
+		return -1;
+	}
+	if(tbc->ts_col)
+		pkg_str_dup(&ts_col_name, (const str*)&tbc->ts_col->name);
+
+	cassa_constr_key(_k, _v, _n, tbc->key_len, tbc->key, 0, row_key);
+	cassa_constr_key(_k, _v, _n, tbc->seckey_len, tbc->sec_key, 0, sec_key);
+	seckey_len = tbc->seckey_len;
+
+	dbcassa_lock_release(tbc);
+
+	/** Construct and send the query to Cassandra Cluster **/
+	try {
+		/* Set the columns */
+		std::vector<oac::Mutation> mutations;
+		for(int i=0; i< _un; i++) {
+			if(_uv[i].nul)
+				continue;
+
+			std::stringstream out;
+			std::string value;
+			int cont = 0;
+
+			switch(_uv[i].type) {
+				case DB1_INT:	out << _uv[i].val.int_val;
+								value = out.str();
+								break;
+				case DB1_BIGINT:out << _uv[i].val.ll_val;
+								value = out.str();
+								break;
+				case DB1_DOUBLE:out << _uv[i].val.double_val;
+								value = out.str();
+								break;
+				case DB1_BITMAP:out << _uv[i].val.bitmap_val;
+								value = out.str();
+								break;
+				case DB1_STRING:value = _uv[i].val.string_val;
+								break;
+				case DB1_STR:	if(!_uv[i].val.str_val.s) {
+									cont = 1;
+									break;
+								}
+								value = std::string(_uv[i].val.str_val.s, _uv[i].val.str_val.len);
+								break;
+				case DB1_BLOB:	value = std::string(_uv[i].val.blob_val.s, _uv[i].val.blob_val.len);
+								break;
+				case DB1_DATETIME:	unsigned int exp_time = (unsigned int)_uv[i].val.time_val;
+									out << exp_time;
+									value = out.str();
+									if(ts_col_name.s && ts_col_name.len==_uk[i]->len &&
+											strncmp(ts_col_name.s, _uk[i]->s, ts_col_name.len)==0) {
+										ts = exp_time;
+										LM_DBG("Found timestamp col [%.*s]\n", ts_col_name.len, ts_col_name.s);
+									}
+									break;
+			}
+			if (cont)
+				continue;
+
+			LM_DBG("ADDED column [%.*s] type [%d], value [%s]\n", _uk[i]->len, _uk[i]->s,
+				_uv[i].type, value.c_str());
+
+			oac::Mutation mut;
+			oac::ColumnOrSuperColumn col;
+			if(seckey_len) {
+				col.column.name = sec_key;
+				col.column.name.push_back(cassa_key_delim);
+				col.column.name.append(_uk[i]->s);
+			}
+			else
+				col.column.name = _uk[i]->s;
+			col.column.value = value;
+			col.column.__isset.value = true;
+			col.__isset.column = true;
+			col.column.timestamp = curr_time;
+			col.column.__isset.timestamp = true;
+			mut.column_or_supercolumn = col;
+			mut.__isset.column_or_supercolumn = true;
+			mutations.push_back(mut);
+		}
+		if(ts_col_name.s)
+			pkg_free(ts_col_name.s);
+		ts_col_name.s = 0;
+
+		if(ts) {
+			int32_t ttl = ts - curr_time;
+			LM_DBG("Set expires to %d seconds\n", ttl);
+			for(size_t mi=0; mi< mutations.size(); mi++) {
+				mutations[mi].column_or_supercolumn.column.ttl = ttl;
+				mutations[mi].column_or_supercolumn.column.__isset.ttl = true;
+			}
+		}
+
+		LM_DBG("Perform the mutation, add [%d] columns\n", (int)mutations.size());
+
+		std::map<std::string, std::vector<oac::Mutation> > innerMap;
+		innerMap.insert(std::pair<std::string, std::vector<oac::Mutation> > (_h->table->s, mutations));
+		std::map <std::string, std::map<std::string, std::vector<oac::Mutation> > > CFMap;
+		CFMap.insert(std::pair<std::string, std::map<std::string, std::vector<oac::Mutation> > >(row_key, innerMap));
+		unsigned int retr = 0;
+
+		do {
+			if(CON_CASSA(_h)->con) {
+				try{
+					CON_CASSA(_h)->con->batch_mutate(CFMap, oac::ConsistencyLevel::ONE);
+					return 1;
+				}  catch (const att::TTransportException &tx) {
+					LM_ERR("Failed to query: %s\n", tx.what());
+				}
+			}
+			dbcassa_reconnect(CON_CASSA(_h));
+		} while (cassa_auto_reconnect && retr++ < cassa_retries);
+
+	} catch (const oac::InvalidRequestException ir) {
+		LM_ERR("Failed Invalid query request: %s\n", ir.why.c_str());
+	} catch (const at::TException &tx) {
+		LM_ERR("Failed generic Thrift error: %s\n", tx.what());
+	} catch (const std::exception &ex) {
+		LM_ERR("Failed std error: %s\n", ex.what());
+	} catch (...) {
+		LM_ERR("Failed generic error\n");
+	}
+
+	LM_ERR("Insert/Update query failed\n");
+	return -1;
+}
+
+
+int db_cassa_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+		int _n)
+{
+	LM_DBG("db_cassa_insert:\n");
+	return db_cassa_modify(_h, _k, _v, _k, _v, _n, _n);
+}
+
+
+int db_cassa_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+		const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
+		int _n, int _un)
+{
+	LM_DBG("db_cassa_update:\n");
+	return db_cassa_modify(_h, _k, _v, _uk, _uv, _n, _un);
+}
+
+
+int db_cassa_free_result(db1_con_t* _h, db1_res_t* _r)
+{
+	return db_free_result(_r);
+}
+
+/*
+ * Delete after primary or primary and secondary key
+ * _h: structure representing database connection
+ * _k: key names
+ * _op: operators
+ * _v: values of the keys that must match
+ * _n: number of key=values pairs to compare
+ */
+int db_cassa_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+		const db_val_t* _v, int _n)
+{
+	oac::CassandraClient* cassa_client = CON_CASSA(_h)->con;
+	char row_key[cassa_max_key_len];
+	char sec_key[cassa_max_key_len];
+	dbcassa_table_p tbc;
+	int no_kc, no_sec_kc;
+	unsigned int retr = 0;
+	int seckey_len;
+	oac::Mutation m;
+
+	if (!_h || !CON_TABLE(_h) || !_k || !_v) {
+		LM_ERR("invalid parameter value\n");
+		return -1;
+	}
+
+	LM_DBG("query table=%s\n", _h->table->s);
+
+	/* get the table schema and construct primary and secondary key */
+	tbc = dbcassa_db_get_table(&CON_CASSA(_h)->db_name, CON_TABLE(_h));
+	if(!tbc)
+	{
+		LM_ERR("table %.*s does not exist!\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s);
+		return -1;
+	}
+
+	cassa_constr_key(_k, _v, _n, tbc->key_len, tbc->key, &no_kc,   row_key);
+	cassa_constr_key(_k, _v, _n, tbc->seckey_len, tbc->sec_key, &no_sec_kc, sec_key);
+	seckey_len = tbc->seckey_len;
+
+	if (_n != no_kc && no_sec_kc == seckey_len) {
+		/* if the conditions are also for secondary key */
+		LM_DBG("Delete after primary and secondary key %s %s\n", row_key, sec_key);
+		dbcassa_column_p colp = tbc->cols;
+		try {
+			while(colp) {
+				std::string col_name = sec_key;
+				col_name.push_back(cassa_key_delim);
+				col_name.append(colp->name.s);
+				m.deletion.predicate.column_names.push_back(col_name);
+				colp = colp->next;
+			}
+		} catch (...) {
+			LM_ERR("Failed to construct the list of column names\n");
+			dbcassa_lock_release(tbc);
+			return -1;
+		}
+	}
+
+	dbcassa_lock_release(tbc);
+
+	for(int i=0; i < _n; i++)
+		LM_DBG("delete query col = %.*s\n", _k[i]->len, _k[i]->s);
+
+	if(no_kc == 0 ) {
+		LM_DBG("Delete operation not supported\n");
+		return -1;
+	}
+
+	try {
+		if (_n == no_kc) {
+			LM_DBG("Delete after row key %s\n", row_key);
+			oac::ColumnPath cp;
+			cp.column_family = _h->table->s;
+			do {
+				if(CON_CASSA(_h)->con) {
+					try {
+						cassa_client->remove(row_key, cp, (int64_t)time(0), oac::ConsistencyLevel::ONE);
+						return 1;
+					} catch  (const att::TTransportException &tx) {
+							LM_ERR("Failed to query: %s\n", tx.what());
+					}
+				}
+				dbcassa_reconnect(CON_CASSA(_h));
+			} while(cassa_auto_reconnect && retr++ < cassa_retries);
+		} else {
+
+			if(!seckey_len) {
+				LM_ERR("Delete operation not supported\n");
+				return -1;
+			}
+
+//			oac::Mutation m;
+			m.deletion.timestamp = (int64_t)time(0);
+			m.deletion.__isset.timestamp = true;
+			m.__isset.deletion = true;
+
+#if 0
+			/* push all columns for the corresponding secondary key */
+			tbc = dbcassa_db_get_table(&CON_CASSA(_h)->db_name, CON_TABLE(_h));
+			if(!tbc)
+			{
+				LM_ERR("table %.*s does not exist!\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s);
+				return -1;
+			}
+			dbcassa_column_p colp = tbc->cols;
+			try {
+				while(colp) {
+					std::string col_name = sec_key;
+					col_name.push_back(cassa_key_delim);
+					col_name.append(colp->name.s);
+					m.deletion.predicate.column_names.push_back(col_name);
+					colp = colp->next;
+				}
+			} catch (...) {
+				LM_ERR("Failed to construct the list of column names\n");
+				dbcassa_lock_release(tbc);
+				return -1;
+			}
+			dbcassa_lock_release(tbc);
+#endif
+			m.deletion.__isset.predicate = true;
+			m.deletion.predicate.__isset.column_names = true; // set
+
+			std::vector<oac::Mutation> mutations;
+			mutations.push_back(m);
+
+			/* innerMap - column_family + mutations vector */
+			std::map<std::string, std::vector<oac::Mutation> > innerMap;
+			innerMap.insert(std::pair<std::string, std::vector<oac::Mutation> > (_h->table->s, mutations));
+			std::map <std::string, std::map<std::string, std::vector<oac::Mutation> > > CFMap;
+			CFMap.insert(std::pair<std::string, std::map<std::string, std::vector<oac::Mutation> > >(row_key, innerMap));
+
+			do {
+				if(CON_CASSA(_h)->con) {
+					try {
+						cassa_client->batch_mutate(CFMap, oac::ConsistencyLevel::ONE);
+						return 1;
+					} catch  (const att::TTransportException &tx) {
+							LM_ERR("Failed to query: %s\n", tx.what());
+					}
+				}
+				dbcassa_reconnect(CON_CASSA(_h));
+			} while(cassa_auto_reconnect && retr++ < cassa_retries);
+		}
+		return 1;
+	} catch (const oac::InvalidRequestException ir) {
+		LM_ERR("Invalid query: %s\n", ir.why.c_str());
+	} catch (const at::TException &tx) {
+		LM_ERR("Failed TException: %s\n", tx.what());
+	} catch (std::exception &e) {
+		LM_ERR("Failed: %s\n", e.what());
+	} catch (...) {
+		LM_ERR("Failed generic error\n");
+	}
+
+	return -1;
+}
+

+ 95 - 0
modules/db_cassandra/dbcassa_base.h

@@ -0,0 +1,95 @@
+/*
+ * $Id$
+ *
+ * CASSANDRA module interface
+ *
+ * Copyright (C) 2012 1&1 Internet AG
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * History:
+ * --------
+ * 2012-01  first version (Anca Vamanu)
+ */
+
+#ifndef _CASSA_DBASE_H
+#define _CASSA_DBASE_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "../../lib/srdb1/db_pool.h"
+#include "../../lib/srdb1/db_row.h"
+#include "../../lib/srdb1/db_res.h"
+#include "../../lib/srdb1/db_op.h"
+
+extern unsigned int cassa_auto_reconnect;
+extern unsigned int cassa_retries;
+extern unsigned int cassa_conn_timeout;
+extern unsigned int cassa_send_timeout;
+extern unsigned int cassa_recv_timeout;
+
+/*
+ * Open connection
+ */
+void* db_cassa_new_connection(struct db_id* id);
+
+/*
+ * Free connection
+ */
+void db_cassa_free_connection(struct pool_con* con);
+
+
+/*
+ * Do a query
+ */
+int db_cassa_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
+		const db_val_t* _v, const db_key_t* _c, int _n, int _nc,
+		const db_key_t _o, db1_res_t** _r);
+
+/*
+ * Insert a row into table
+ */
+int db_cassa_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
+		int _n);
+
+
+/*
+ * Delete a row from table
+ */
+int db_cassa_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+		const db_val_t* _v, int _n);
+
+
+/*
+ * Update a row in table
+ */
+int db_cassa_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
+		const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
+		int _n, int _un);
+
+int db_cassa_free_result(db1_con_t* _h, db1_res_t* _r);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif

+ 677 - 0
modules/db_cassandra/dbcassa_table.c

@@ -0,0 +1,677 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2012 1&1 Internet Development
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ * History:
+ * --------
+ * 2012-01 initial version (Anca Vamanu)
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+
+#include "../../mem/shm_mem.h"
+#include "../../mem/mem.h"
+#include "../../dprint.h"
+#include "../../lib/kcore/hash_func.h"
+#include "../../lock_ops.h"
+
+#include "dbcassa_table.h"
+
+#define DBCASSA_TABLE_SIZE 16
+
+typedef struct  rw_lock {
+	gen_lock_t lock;
+	int reload_flag;
+	int data_refcnt;
+} rw_lock_t;
+
+typedef struct _dbcassa_tbl_htable
+{
+	rw_lock_t lock;
+	dbcassa_table_p dtp;
+} dbcassa_tbl_htable_t, *dbcassa_tbl_htable_p;
+
+static dbcassa_tbl_htable_p dbcassa_tbl_htable = NULL;
+extern str dbcassa_schema_path;
+static char full_path_buf[_POSIX_PATH_MAX + 1];
+
+/**
+ * Check if file modified from last read
+ * -1 - error
+ *  0 - no change
+ *  1 - changed
+ */
+int dbcassa_check_mtime(time_t *mt)
+{
+	struct stat s;
+
+	if(stat(full_path_buf, &s) == 0)
+	{
+		if((int)s.st_mtime > (int)*mt)
+		{
+			*mt = s.st_mtime;
+			LM_DBG("[%s] was updated\n", full_path_buf);
+			return 1;
+		}
+	} else {
+		LM_DBG("stat failed on [%s]\n", full_path_buf);
+		return -1;
+	}
+	return 0;
+}
+
+/*
+ *	Create new table structure
+ *
+ * */
+
+dbcassa_table_p dbcassa_table_new(const str *_tbname, const str *_dbname)
+{
+	struct stat s;
+	dbcassa_table_p dtp = NULL;
+	int size;
+
+	if(!_tbname || !_dbname) {
+		LM_ERR("Invalid parameters\n");
+		return 0;
+	}
+
+	size = sizeof(dbcassa_table_t)+_tbname->len+_dbname->len;
+	dtp = (dbcassa_table_p)shm_malloc(size);
+	if(!dtp) {
+		LM_ERR("No more shared memory\n");
+		return 0;
+	}
+
+	memset(dtp, 0, size);
+	size = sizeof(dbcassa_table_t);
+	dtp->name.s = (char*)dtp + size;
+	memcpy(dtp->name.s, _tbname->s, _tbname->len);
+	dtp->name.len = _tbname->len;
+	size+= _tbname->len;
+
+	dtp->dbname.s = (char*)dtp + size;
+	memcpy(dtp->dbname.s, _dbname->s, _dbname->len);
+	dtp->dbname.len = _dbname->len;
+
+	if(stat(full_path_buf, &s) == 0) {
+		dtp->mt = s.st_mtime;
+		LM_DBG("mtime is %d\n", (int)s.st_mtime);
+	}
+
+	return dtp;
+}
+
+dbcassa_column_p dbcassa_column_new(char *_s, int _l)
+{
+	dbcassa_column_p dcp;
+	int size;
+
+	size = sizeof(dbcassa_column_t) + _l+ 1;
+	dcp = (dbcassa_column_p)shm_malloc(size);
+	if(!dcp) {
+		LM_ERR("No more shared memory\n");
+		return 0;
+	}
+	memset(dcp, 0, size);
+	dcp->name.s = (char*)dcp + sizeof(dbcassa_column_t);
+	memcpy(dcp->name.s, _s, _l);
+	dcp->name.len = _l;
+	dcp->name.s[_l] = '\0';
+
+	return dcp;
+}
+
+int dbcassa_column_free(dbcassa_column_p dcp)
+{
+	if(!dcp)
+		return -1;
+	shm_free(dcp);
+	return 0;
+}
+
+int dbcassa_table_free(dbcassa_table_p _dtp)
+{
+	dbcassa_column_p _cp, _cp0;
+	
+	if(!_dtp)
+		return -1;
+
+	/* cols*/
+	_cp = _dtp->cols;
+	while(_cp) {
+		_cp0=_cp;
+		_cp=_cp->next;
+		dbcassa_column_free(_cp0);
+	}
+	/* key */
+	if(_dtp->key)
+		shm_free(_dtp->key);
+	if(_dtp->sec_key)
+		shm_free(_dtp->sec_key);
+
+	shm_free(_dtp);
+
+	return 0;
+}
+
+/**
+ * Load the table schema from file
+ */
+dbcassa_table_p dbcassa_load_file(str* dbn, str* tbn)
+{
+#define KEY_MAX_LEN 10
+	FILE *fin=NULL;
+	char buf[4096];
+	int c, crow, ccol, bp, max_auto;
+	dbcassa_table_p dtp = 0;
+	dbcassa_column_p colp= 0;
+	dbcassa_column_p key[KEY_MAX_LEN];
+	dbcassa_column_p sec_key[KEY_MAX_LEN];
+
+	enum {DBCASSA_FLINE_ST, DBCASSA_NLINE_ST, DBCASSA_NLINE2_ST} state;
+
+	memset(key, 0, KEY_MAX_LEN*sizeof(dbcassa_column_p));
+	memset(sec_key, 0, KEY_MAX_LEN*sizeof(dbcassa_column_p));
+
+	LM_DBG("loading file [%s]\n", full_path_buf);
+	fin = fopen(full_path_buf, "rt");
+	if(!fin) {
+		LM_ERR("Failed to open file\n");
+		return 0;
+	}
+
+	dtp = dbcassa_table_new(tbn, dbn);
+	if(!dtp)
+		goto done;
+
+	state = DBCASSA_FLINE_ST;
+	crow = ccol = -1;
+	c = fgetc(fin);
+	max_auto = 0;
+	while(c!=EOF) {
+		switch(state) {
+			case DBCASSA_FLINE_ST:
+				bp = 0;
+				while(c==DBCASSA_DELIM_C)
+					c = fgetc(fin);
+				if(c==DBCASSA_DELIM_R && !dtp->cols)
+					goto clean;
+				if(c==DBCASSA_DELIM_R) {
+					if(dtp->nrcols <= 0)
+						goto clean;
+					
+					state = DBCASSA_NLINE_ST;
+					c = fgetc(fin);
+					break;
+				}
+				while(c!=DBCASSA_DELIM_C && c!='(' && c!=DBCASSA_DELIM_R) {
+					if(c==EOF)
+						goto clean;
+					buf[bp++] = c;
+					c = fgetc(fin);
+				}
+				colp = dbcassa_column_new(buf, bp);
+				if(!colp)
+					goto clean;
+				LM_DBG("new col [%.*s]\n", bp, buf);
+				while(c==DBCASSA_DELIM_C)
+					c = fgetc(fin);
+				if(c!='(')
+					goto clean;
+				c = fgetc(fin);
+				while(c==DBCASSA_DELIM_C)
+					c = fgetc(fin);
+
+				switch(c) {
+					case 's':
+					case 'S':
+						colp->type = DB1_STR;
+						LM_DBG("column[%d] is STR!\n", ccol+1);
+					break;
+					case 'i':
+					case 'I':
+						colp->type = DB1_INT;
+						LM_DBG("column[%d] is INT!\n", ccol+1);
+					break;
+					case 'd':
+					case 'D':
+						colp->type = DB1_DOUBLE;
+						LM_DBG("column[%d] is DOUBLE!\n", ccol+1);
+					break;
+					case 't':
+					case 'T':
+						colp->type = DB1_DATETIME;
+						LM_DBG("column[%d] is TIME! Timestamp col has name [%s]\n", ccol+1, colp->name.s);
+						if(dtp->ts_col) {
+							LM_ERR("You can have only one column with type timestamp\n");
+							goto clean;
+						}
+						dtp->ts_col = colp;
+					break;
+					default:
+						LM_DBG("wrong column type!\n");
+						goto clean;
+				}
+
+				while(c!='\n' && c!=EOF && c!=')' && c!= ',') {
+					if(colp->type == DB1_STR && (c=='i'|| c=='I')) {
+						colp->type = DB1_STRING;
+						LM_DBG("column[%d] is actually STRING!\n", ccol+1);
+					}
+					c = fgetc(fin);
+				}
+
+				if(c == ')') {
+					//LM_DBG("c=%c!\n", c);
+					colp->next = dtp->cols;
+					dtp->cols = colp;
+					dtp->nrcols++;
+					c = fgetc(fin);
+				}
+				else
+					goto clean;
+				ccol++;
+			break;
+
+			case DBCASSA_NLINE_ST:
+			case DBCASSA_NLINE2_ST:
+				// unique key
+				while(c==DBCASSA_DELIM_C)
+					c = fgetc(fin);
+				if(c == DBCASSA_DELIM_R) {
+					state = DBCASSA_NLINE2_ST;
+					c = fgetc(fin);
+					break;
+				}
+
+				if(c == EOF)
+					break;
+				bp= 0;
+				while(c!=DBCASSA_DELIM_C && c!=DBCASSA_DELIM_R)
+				{
+					if(c==EOF)
+						break;
+					buf[bp++] = c;
+					c = fgetc(fin);
+				}
+				colp = dtp->cols;
+				while(colp) {
+					if(bp==colp->name.len && strncmp(colp->name.s, buf, bp)==0) {
+						if(state == DBCASSA_NLINE_ST)
+							key[dtp->key_len++] = colp;
+						else
+							sec_key[dtp->seckey_len++] = colp;
+						break;
+					}
+					colp = colp->next;
+				}
+				if(!colp) {
+					LM_ERR("Undefined column in key [%.*s]\n", bp, buf);
+					goto clean;
+				}
+				break;
+		}
+	}
+
+	/* copy the keys into the table */
+	if(dtp->key_len) {
+		dtp->key = (dbcassa_column_p*)
+				shm_malloc(dtp->key_len*sizeof(dbcassa_column_p));
+		if(!dtp->key) {
+			LM_ERR("No more share memory\n");
+			goto clean;
+		}
+		for(ccol = 0; ccol< dtp->key_len; ccol++) {
+			dtp->key[ccol] = key[ccol];
+			LM_DBG("col [%.*s] in primary key\n", key[ccol]->name.len, key[ccol]->name.s);
+		}
+	}
+	if(dtp->seckey_len) {
+		dtp->sec_key = (dbcassa_column_p*)
+				shm_malloc(dtp->seckey_len*sizeof(dbcassa_column_p));
+		if(!dtp->sec_key) {
+			LM_ERR("No more share memory\n");
+			goto clean;
+		}
+		for(ccol = 0; ccol< dtp->seckey_len; ccol++) {
+			dtp->sec_key[ccol] = sec_key[ccol];
+			LM_DBG("col [%.*s] in secondary key\n", sec_key[ccol]->name.len, sec_key[ccol]->name.s);
+		}
+	}
+
+done:
+	if(fin)
+		fclose(fin);
+	return dtp;
+clean:
+	if(fin)
+		fclose(fin);
+	if(dtp)
+		dbcassa_table_free(dtp);
+	return NULL;
+}
+
+
+#define ref_read_data(rw_lock) \
+do {\
+	again:\
+	lock_get( &rw_lock.lock ); \
+	if (rw_lock.reload_flag) { \
+		lock_release( &rw_lock.lock ); \
+		usleep(5); \
+		goto again; \
+	} \
+	rw_lock.data_refcnt++; \
+	lock_release( &rw_lock.lock ); \
+} while(0)
+
+
+#define unref_read_data(rw_lock) \
+do {\
+	lock_get( &rw_lock.lock ); \
+	rw_lock.data_refcnt--; \
+	lock_release( &rw_lock.lock ); \
+} while(0)
+
+
+#define ref_write_data(rw_lock)\
+do {\
+	lock_get( &rw_lock.lock ); \
+	rw_lock.reload_flag = 1; \
+	lock_release( &rw_lock.lock ); \
+	while (rw_lock.data_refcnt) \
+		usleep(10); \
+} while(0)
+
+
+#define unref_write_data(rw_lock)\
+	rw_lock.reload_flag = 0;
+
+/*
+ *	Search the table schema
+ * */
+dbcassa_table_p dbcassa_db_search_table(int hashidx, int hash,
+		const str* dbn, const str *tbn)
+{
+	dbcassa_table_p tbc = NULL;
+	ref_read_data(dbcassa_tbl_htable[hashidx].lock);
+
+	tbc = dbcassa_tbl_htable[hashidx].dtp;
+	while(tbc) {
+		LM_DBG("found dbname=%.*s, table=%.*s\n", tbc->dbname.len, tbc->dbname.s, tbc->name.len, tbc->name.s);
+		if(tbc->hash==hash && tbc->dbname.len == dbn->len
+			&& tbc->name.len == tbn->len
+			&& !strncasecmp(tbc->dbname.s, dbn->s, dbn->len)
+			&& !strncasecmp(tbc->name.s, tbn->s, tbn->len))
+			return tbc;
+		tbc = tbc->next;
+	}
+	unref_read_data(dbcassa_tbl_htable[hashidx].lock);
+	return NULL;
+}
+
+
+/**
+ * Get the table schema. If the file was updated, update the table schema.
+ */
+dbcassa_table_p dbcassa_db_get_table(const str* dbn, const str *tbn)
+{
+	dbcassa_table_p tbc = NULL, old_tbc= NULL, new_tbc= NULL, prev_tbc= NULL;
+	int hash;
+	int hashidx;
+	int len;
+
+	if(!dbn || !tbn ) {
+		LM_ERR("invalid parameter");
+		return NULL;
+	}
+
+	hash = core_hash(dbn, tbn, DBCASSA_TABLE_SIZE);
+	hashidx = hash % DBCASSA_TABLE_SIZE;
+
+	ref_read_data(dbcassa_tbl_htable[hashidx].lock);
+
+	tbc = dbcassa_tbl_htable[hashidx].dtp;
+
+	while(tbc) {
+		LM_DBG("found dbname=%.*s, table=%.*s\n", tbc->dbname.len, tbc->dbname.s, tbc->name.len, tbc->name.s);
+		if(tbc->hash==hash && tbc->dbname.len == dbn->len
+				&& tbc->name.len == tbn->len
+				&& !strncasecmp(tbc->dbname.s, dbn->s, dbn->len)
+				&& !strncasecmp(tbc->name.s, tbn->s, tbn->len)) {
+
+			memcpy(full_path_buf + dbcassa_schema_path.len, dbn->s, dbn->len);
+			len = dbcassa_schema_path.len + dbn->len;
+			full_path_buf[len++] = '/';
+			memcpy(full_path_buf + len, tbn->s, tbn->len);
+			full_path_buf[len + tbn->len] = '\0';
+
+			if(dbcassa_check_mtime(&tbc->mt) == 0)
+				return tbc;
+			old_tbc = tbc;
+			break;
+		}
+		tbc = tbc->next;
+	}
+	unref_read_data(dbcassa_tbl_htable[hashidx].lock);
+	if(!old_tbc)
+		return NULL;
+
+	/* the file has changed - load again the schema */
+	new_tbc = dbcassa_load_file((str*)dbn, (str*)tbn);
+	if(!new_tbc)
+	{
+		LM_ERR("could not load database from file [%.*s]\n", tbn->len, tbn->s);
+		return NULL;
+	}
+	new_tbc->hash = hashidx;
+
+	/* lock for write */
+	ref_write_data(dbcassa_tbl_htable[hashidx].lock);
+	tbc = dbcassa_tbl_htable[hashidx].dtp;
+
+	while(tbc) {
+		if(tbc == old_tbc)
+			break;
+		prev_tbc = tbc;
+		tbc = tbc->next;
+	}
+
+	/* somebody else might have rewritten it in the mean time? just return the existing one */
+	if(!tbc) {
+		unref_write_data(dbcassa_tbl_htable[hashidx].lock);
+		return dbcassa_db_search_table(hashidx, hash, dbn, tbn);
+	}
+
+	/* replace the table */
+	new_tbc->next = old_tbc->next;
+	if(prev_tbc)
+		prev_tbc->next = new_tbc;
+	else
+		dbcassa_tbl_htable[hashidx].dtp = new_tbc;
+	dbcassa_table_free(old_tbc);
+	unref_write_data(dbcassa_tbl_htable[hashidx].lock);
+
+	/* lock for read, search the table and return */
+	return dbcassa_db_search_table(hashidx, hash, dbn, tbn);
+}
+
+/*
+ *	Read all table schemas at startup
+ * */
+int dbcassa_read_table_schemas(void)
+{
+	int i, j;
+	str db_name, tb_name;
+	DIR* srcdir = opendir(dbcassa_schema_path.s);
+	DIR* db_dir;
+	struct dirent* dent;
+	int fn_len = dbcassa_schema_path.len;
+	struct stat fstat;
+	int dir_len;
+	dbcassa_table_p tbc;
+	unsigned int hashidx;
+
+	/* init tables' hash table */
+	if (!dbcassa_tbl_htable) {
+		dbcassa_tbl_htable = (dbcassa_tbl_htable_p)shm_malloc(DBCASSA_TABLE_SIZE*
+					sizeof(dbcassa_tbl_htable_t));
+		if(dbcassa_tbl_htable==NULL)
+		{
+			LM_CRIT("no enough shm mem\n");
+			return -1;
+		}
+		memset(dbcassa_tbl_htable, 0, DBCASSA_TABLE_SIZE*sizeof(dbcassa_tbl_htable_t));
+		for(i=0; i<DBCASSA_TABLE_SIZE; i++)
+		{
+			if (lock_init(&dbcassa_tbl_htable[i].lock.lock)==0)
+			{
+				LM_CRIT("cannot init tables' sem's\n");
+				for(j=i-1; j>=0; j--)
+					lock_destroy(&dbcassa_tbl_htable[j].rw_lock.lock);
+				return -1;
+			}
+		}
+	}
+
+	memset(full_path_buf, 0, _POSIX_PATH_MAX);
+	strcpy(full_path_buf, dbcassa_schema_path.s);
+	if (full_path_buf[dbcassa_schema_path.len - 1] != '/') {
+		full_path_buf[fn_len++]= '/';
+		dbcassa_schema_path.len++;
+	}
+
+	if (srcdir == NULL) {
+		perror("opendir");
+		return -1;
+	}
+	LM_DBG("Full name= %.*s\n", fn_len, full_path_buf);
+
+	while((dent = readdir(srcdir)) != NULL)
+	{
+		if(strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
+			continue;
+
+		/* Calculate full name, check we are in file length limits */
+		if ((fn_len + strlen(dent->d_name) + 1) > _POSIX_PATH_MAX)
+			continue;
+
+		db_name.s = dent->d_name;
+		db_name.len = strlen(dent->d_name);
+		
+		strcpy(full_path_buf+fn_len, dent->d_name);
+		dir_len = fn_len + db_name.len;
+
+		LM_DBG("Full dir name= %.*s\n", dir_len, full_path_buf);
+
+		if (stat(full_path_buf, &fstat) < 0) {
+			LM_ERR("stat failed %s\n", strerror(errno));
+			continue;
+		}
+
+		if (!S_ISDIR(fstat.st_mode))  {
+			LM_ERR("not a directory\n");
+			continue;
+		}
+
+		/*
+		if (fstatat(dirfd(srcdir), dent->d_name, &st) < 0)
+		{
+			perror(dent->d_name);
+			continue;
+		}
+		*/
+
+		LM_DBG("Found database %s\n", dent->d_name);
+		db_dir = opendir(full_path_buf);
+		if(!db_dir) {
+			LM_ERR("Failed to open dictory %s\n", full_path_buf);
+			continue;
+		}
+		full_path_buf[dir_len++]= '/';
+		while((dent = readdir(db_dir)) != NULL)
+		{
+			if(strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
+				continue;
+			LM_DBG("database table %s\n", dent->d_name);
+			if(dir_len + strlen(dent->d_name)+1 > _POSIX_PATH_MAX) {
+				LM_ERR("File len too large\n");
+				continue;
+			}
+			strcpy(full_path_buf+dir_len, dent->d_name);
+
+			tb_name.s = dent->d_name;
+			tb_name.len = strlen(dent->d_name);
+
+			LM_DBG("File path= %s\n", full_path_buf);
+			tbc = dbcassa_load_file(&db_name, &tb_name);
+			if(!tbc)
+			{
+				LM_ERR("could not load database from file [%s]\n", tb_name.s);
+				return -1;
+			}
+			hashidx = core_hash(&db_name, &tb_name, DBCASSA_TABLE_SIZE);
+			tbc->hash = hashidx;
+			tbc->next = dbcassa_tbl_htable[hashidx].dtp;
+			dbcassa_tbl_htable[hashidx].dtp = tbc;
+		}
+		closedir(db_dir);
+	}
+	closedir(srcdir);
+
+
+	return 0;
+}
+
+/*
+ *	Destroy table schema table at shutdown
+ * */
+void dbcassa_destroy_htable(void)
+{
+	int i;
+	dbcassa_table_p tbc, tbc0;
+
+	/* destroy tables' hash table*/
+	if(dbcassa_tbl_htable==0)
+		return;
+
+	for(i=0; i<DBCASSA_TABLE_SIZE; i++) {
+		lock_destroy(&dbcassa_tbl_htable[i].rw_lock.lock);
+		tbc = dbcassa_tbl_htable[i].dtp;
+		while(tbc) {
+			tbc0 = tbc;
+			tbc = tbc->next;
+			dbcassa_table_free(tbc0);
+		}
+	}
+	shm_free(dbcassa_tbl_htable);
+}
+
+void dbcassa_lock_release(dbcassa_table_p tbc)
+{
+	unref_read_data(dbcassa_tbl_htable[tbc->hash].lock);
+}

+ 68 - 0
modules/db_cassandra/dbcassa_table.h

@@ -0,0 +1,68 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2012 1&1 Internet Development
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ * History:
+ * --------
+ * 2012-01 initial version (Anca Vamanu)
+ * 
+ */
+
+
+#ifndef _DBCASSA_LIB_H_
+#define _DBCASSA_LIB_H_
+
+#include "../../str.h"
+#include "../../lib/srdb1/db_val.h"
+
+#define DBCASSA_DELIM     ':'
+#define DBCASSA_DELIM_C   ' '
+#define DBCASSA_DELIM_R   '\n'
+
+typedef struct _dbcassa_column
+{
+	str name;
+	db_type_t type;
+	int flag;
+	struct _dbcassa_column *next;
+} dbcassa_column_t, *dbcassa_column_p;
+
+typedef struct _dbcassa_table
+{
+	str dbname;
+	str name;
+	int hash;
+	time_t mt;
+	int nrcols;
+	int key_len;
+	int seckey_len;
+	dbcassa_column_p cols;
+	dbcassa_column_p *key;
+	dbcassa_column_p *sec_key;
+	dbcassa_column_p ts_col; /* timestamp col- special col used as the timestamp for the row */
+	struct _dbcassa_table *next;
+} dbcassa_table_t, *dbcassa_table_p;
+
+void dbcassa_lock_release(dbcassa_table_p tbc);
+dbcassa_table_p dbcassa_db_get_table(const str* dbn, const str* tbn);
+int dbcassa_read_table_schemas(void);
+void dbcassa_destroy_htable(void);
+
+#endif

+ 4 - 0
modules/db_cassandra/doc/Makefile

@@ -0,0 +1,4 @@
+docs = db_cassandra.xml
+
+docbook_dir = ../../../docbook
+include $(docbook_dir)/Makefile.module

+ 34 - 0
modules/db_cassandra/doc/db_cassandra.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+	<bookinfo>
+		<title>DB Cassandra Module</title>
+		<productname class="trade">&kamailioname;</productname>
+		<authorgroup>
+			<author>
+				<firstname>Anca</firstname>
+				<surname>Vamanu</surname>
+				<email>[email protected]</email>
+			</author>
+			<editor>
+				<firstname>Anca</firstname>
+				<surname>Vamanu</surname>
+				<email>[email protected]</email>
+			</editor>
+		</authorgroup>
+		<copyright>
+			<year>2012</year>
+			<holder>1&amp;1 Internet AG</holder>
+		</copyright>
+	</bookinfo>
+	<xi:include href="db_cassandra_admin.xml"/>
+</book>
+

+ 279 - 0
modules/db_cassandra/doc/db_cassandra_admin.xml

@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<!-- Module User's Guide -->
+
+<chapter>
+
+	<title>&adminguide;</title>
+
+	<section>
+	<title>Overview</title>
+	<para>
+		Db_cassandra is one of the &siprouter; database modules. It does
+		not export any functions executable from the configuration scripts,
+		but it exports a subset of functions from the database API and thus
+		other modules can use it as a database driver, instead of, for
+		example, the Mysql module.
+	</para>
+	<para>
+		The storage backend is a <emphasis>Cassandra</emphasis> cluster and
+		this module provides an SQL interface to be used by other modules for
+		storing and retrieving data. Because Cassandra is a NoSQL distributed
+		system, there are limitations on the operations that can be performed.
+		The limitations concern the indexes on which queries are performed as
+		it is only possible to have simple conditions(equal only) and only two
+		indexation levels that will be explain in an example bellow.
+	</para>
+	<para>
+		Cassandra DB is especially suited for storing large data or data that requires
+		distribution, redundancy or replication. One usage example is
+		a distributed location system in a platform that has a cluster of &siprouter;
+		servers, with more proxies and registration servers accesing the same location
+		database. This was actually the main usage we had in mind when implementing
+		this module. Please NOTE that it has only been tested with
+		<emphasis>usrloc</emphasis> and <emphasis>auth_db</emphasis> modules.
+	</para>
+	<para>
+		You can find a configuration file example for this usage in the module - kamailio_cassa.cfg.
+	</para>
+	<para>
+		Because the module has to do the translation from SQL to Cassandra NoSQL
+		queries, the schemes for the tables must be known by the module.
+		You will find the schemas for location, subscriber and version tables in
+		utils/kamctl/dbcassandra directory. You have to provide the path to the 
+		directory containing the table definitions by setting the module parameter
+		schema_path.
+		NOTE that there is no need to configure a table metadata in Cassandra cluster.
+	</para>
+	<para>
+		Special attention was given to the performance in Cassandra. Therefore, the
+		implementation uses only the native row indexation in Cassandra and no secondary
+		indexes that are costly. Instead, we simualte a secondary index by using the column
+		names and putting information in them, which is very efficient.
+		Also for deleting expired records, we let Cassandra take care of this with
+		its own mechanism (by setting ttl for columns).
+	</para>
+	</section>
+
+	<section>
+	<title>Dependencies</title>
+	<section>
+		<title>&siprouter; Modules</title>
+		<para>
+		The following modules must be loaded before this module:
+			<itemizedlist>
+			<listitem>
+			<para>
+				<emphasis>No dependencies on other &siprouter; modules</emphasis>.
+			</para>
+			</listitem>
+			</itemizedlist>
+		</para>
+	</section>
+	<section>
+		<title>External Libraries or Applications</title>
+		<para>
+		The following libraries or applications must be installed before running
+		&siprouter; with this module loaded:
+			<itemizedlist>
+			<listitem>
+			<para>
+				<emphasis>Thrift library</emphasis> version 0.6.1 .
+			</para>
+			</listitem>
+			</itemizedlist>
+		</para>
+		<para> The implementation was tested with Cassandra version 1.0.1 .</para>
+	</section>
+	</section>
+
+	<section>
+	<title>Parameters</title>
+	<section>
+		<title><varname>schema_path</varname> (string)</title>
+		<para>
+			The directory where the files with the table schemas are located.
+			This directory has to contains the directories corresponding to the
+			databases names(name of the directory = name of the database). And
+			these directories contain the files with the table schema. See the
+			schemas in utils/kamctl/dbcassandra directory.
+		</para>
+		<example>
+		<title>Set <varname>schema_path</varname> parameter</title>
+<programlisting format="linespecific">
+   ...
+   modparam("db_cassandra", "schema_path",
+               "/usr/local/sip-router/etc/kamctl/dbcassandra")
+   ...
+</programlisting>
+		</example>
+	</section>
+	</section>
+
+	<section>
+	<title>Functions</title>
+		<para>
+		NONE
+		</para>
+	</section>
+
+	<section>
+	<title>Installation</title>
+		<para>
+		Because it dependes on an external library, the db_cassandra module is not
+		compiled and installed by default. You can use one of these options.
+		</para>
+		<itemizedlist>
+			<listitem>
+			<para>
+			- edit the "Makefile" and remove "db_cassandra" from "excluded_modules"
+			list. Then follow the standard procedure to install &siprouter;:
+			"make all; make install".
+			</para>
+			</listitem>
+			<listitem>
+			<para>
+			- from command line use: 'make all include_modules="db_cassandra";
+			make install include_modules="db_cassandra"'.
+			</para>
+			</listitem>
+		</itemizedlist>
+	</section>
+
+
+	<section>
+		<title>Table schema</title>
+		<para>
+		The module must know the table schema for the tables that will be used.
+		You must configure the path to the schema directory by setting the 
+		<emphasis>schema_path</emphasis> parameter. 
+		</para>
+		<para>
+		A table schema document has the following structure:
+		<itemizedlist>
+			<listitem>
+			<para>
+			First row: <emphasis>the name and type of the columns</emphasis> in the form name(type)
+			separated by spaces. The possible types are: string, int, double and timestamp.
+			</para>
+			<para>
+			The<emphasis>timestamp</emphasis> type has a special meaning. Only one column of this type can
+			be defined for a table, and it should contain the expiry time for that record.
+			If defined this value will be used to compute the <emphasis>ttl</emphasis> for the columns
+			and Cassandra will automatically delete the columns when they expire. Because we want the 
+			ttl to have meaning for the entire record, we must ensure that when the ttl is updated, it 
+			is updated for all columns for that record. In other words, to update the expiration time 
+			of a record, an insert operation must be performed from the point of view of db_cassandra 
+			module (insert in Cassandra means replace if exists or insert new record otherwise). So, if 
+			you define a table with a timestamp column, the update operations on that table that also 
+			update the timestamp must update all columns. So these update operations must in fact be insert
+			operations.
+			</para>
+			</listitem>
+			<listitem>
+			<para>
+			Second row: <emphasis>the columns that form the row key</emphasis> separated by space.
+			</para>
+			</listitem>
+			<listitem>
+			<para>
+			Third row: <emphasis>the columns that form the secondary key</emphasis> separated by space.
+			</para>
+			</listitem>
+		</itemizedlist>
+		</para>
+		<para>
+		Bellow you can see the schema for the <emphasis>location</emphasis> table:
+		</para>
+	<para>
+	</para>
+
+<programlisting format="linespecific">
+   ...
+   callid(string) cflags(int) contact(string) cseq(int) <emphasis>expires(timestamp)</emphasis> flags(int) last_modified(int) methods(int) path(string) q(double) received(string) socket(string) user_agent(string) username(string)
+   <emphasis>username</emphasis>
+   <emphasis>contact</emphasis>
+   ...
+</programlisting>
+
+	<para>
+		Observe first that the <emphasis>row key is the username</emphasis> and the <emphasis>secondary index is the contact</emphasis>.
+		And that we have also defined a timestamp column - <emphasis>expires</emphasis>.
+		In this example, both the row key and the secondary index are defined by only one column,
+		but they can be formed out of more columns, list them separated by space.
+	</para>
+
+	<para>
+		To understand why the schema looks like this we must first see which
+		are the queries performed on the location table. 
+		(The 'callid' condition was ignored as it doesn't really have a well defined role in the SIP RFC).
+	</para>
+	<itemizedlist>
+		<listitem>
+			<para>
+				When Invite received, lookup location: select where <emphasis>username='..'</emphasis>.
+			</para>
+		</listitem>
+		<listitem>
+			<para>
+				When Register received, update registration:
+				update where <emphasis>username='..'</emphasis> and <emphasis>contact='..'</emphasis>.
+			</para>
+		</listitem>
+	</itemizedlist>
+	<para>
+		So the relation between these keys is the following:
+	</para>
+	<itemizedlist>
+		<listitem>
+		<para>
+		The unique key for a table is actually the combination of row key + secondary key.
+		</para>
+		</listitem>
+		<listitem>
+		<para>
+		A row defined by a row key will contain more records with different secondary keys.
+		</para>
+		</listitem>
+	</itemizedlist>
+	<para>
+		The timestamp column that leaves the Cassandra cluster deal with deleting expired
+		record can be used only with a modification in usrloc module that replaces the update
+		performed at re-registration with an insert operation (so that all columns are updated).
+		This behavior can be enabled by setting a parameter in usrloc module 
+		<emphasis>db_update_as_insert</emphasis>:
+	</para>
+	<para>
+	</para>
+
+<programlisting format="linespecific">
+   ...
+   modparam("usrloc", "db_update_as_insert", 1)
+   ...
+</programlisting>
+
+	<para>
+		The alternative would have been to define an index on the expire column and 
+		run a external job to delete periodically the expired records. But this obviously
+		is more costly.
+	</para>
+
+	</section>
+
+	<section>
+	<title>Limitations</title>
+		<para>
+			The module can be used used only when the queries use only one index which is also the
+			unique key, or have two indexes that form the unique key like in the usrloc usage.
+		</para>
+	</section>
+
+</chapter>

+ 847 - 0
modules/db_cassandra/kamailio_cassa.cfg

@@ -0,0 +1,847 @@
+#!KAMAILIO
+#
+# Kamailio (OpenSER) SIP Server v3.1 - default configuration script
+#     - web: http://www.kamailio.org
+#     - git: http://sip-router.org
+#
+# Direct your questions about this file to: <[email protected]>
+#
+# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
+# for an explanation of possible statements, functions and parameters.
+#
+# Several features can be enabled using '#!define WITH_FEATURE' directives:
+#
+# *** To run in debug mode: 
+#     - define WITH_DEBUG
+#
+# *** To enable mysql: 
+#     - define WITH_MYSQL
+#
+# *** To enable authentication execute:
+#     - enable mysql
+#     - define WITH_AUTH
+#     - add users using 'kamctl'
+#
+# *** To enable IP authentication execute:
+#     - enable mysql
+#     - enable authentication
+#     - define WITH_IPAUTH
+#     - add IP addresses with group id '1' to 'address' table
+#
+# *** To enable persistent user location execute:
+#     - enable mysql
+#     - define WITH_USRLOCDB
+#
+# *** To enable presence server execute:
+#     - enable mysql
+#     - define WITH_PRESENCE
+#
+# *** To enable nat traversal execute:
+#     - define WITH_NAT
+#     - install RTPProxy: http://www.rtpproxy.org
+#     - start RTPProxy:
+#        rtpproxy -l _your_public_ip_ -s udp:localhost:7722
+#
+# *** To enable PSTN gateway routing execute:
+#     - define WITH_PSTN
+#     - set the value of pstn.gw_ip
+#     - check route[PSTN] for regexp routing condition
+#
+# *** To enable database aliases lookup execute:
+#     - enable mysql
+#     - define WITH_ALIASDB
+#
+# *** To enable multi-domain support execute:
+#     - enable mysql
+#     - define WITH_MULTIDOMAIN
+#
+# *** To enable TLS support execute:
+#     - adjust CFGDIR/tls.cfg as needed
+#     - define WITH_TLS
+#
+# *** To enable XMLRPC support execute:
+#     - define WITH_XMLRPC
+#     - adjust route[XMLRPC] for access policy
+#
+# *** To enable anti-flood detection execute:
+#     - adjust pike and htable=>ipban settings as needed (default is
+#       block if more than 16 requests in 2 seconds and ban for 300 seconds)
+#     - define WITH_ANTIFLOOD
+#
+# *** To enhance accounting execute:
+#     - enable mysql
+#     - define WITH_ACCDB
+#     - add following columns to database
+#!ifdef ACCDB_COMMENT
+  ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
+  ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
+  ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
+  ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
+  ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
+#!endif
+
+####### Defined Values #########
+# *** Value defines - IDs used later in config
+#!ifdef WITH_MYSQL
+# - database URL - used to connect to database server by modules such
+#       as: auth_db, acc, usrloc, a.s.o.
+
+
+#!endif
+#!ifdef WITH_MULTIDOMAIN
+# - the value for 'use_domain' parameters
+#!define MULTIDOMAIN 1
+#!else
+#!define MULTIDOMAIN 0
+#!endif
+
+# - flags
+#   FLT_ - per transaction (message) flags
+#	FLB_ - per branch flags
+#!define FLT_ACC 1
+#!define FLT_ACCMISSED 2
+#!define FLT_ACCFAILED 3
+#!define FLT_NATS 5
+
+#!define FLB_NATB 6
+#!define FLB_NATSIPPING 7
+
+# my defines
+#!define WITH_DEBUG
+#!define LOCAL_TEST_RUN
+#!define WITH_AUTH
+#!define DBURL "cassandra://:@127.0.0.1:9160/openser"
+
+####### Global Parameters #########
+
+#!ifdef WITH_DEBUG
+debug=5
+log_stderror=yes
+#!else
+debug=2
+log_stderror=no
+#!endif
+
+memdbg=7
+memlog=7
+
+log_facility=LOG_LOCAL0
+
+fork=yes
+children=4
+
+/* uncomment the next line to disable TCP (default on) */
+#disable_tcp=yes
+
+/* uncomment the next line to disable the auto discovery of local aliases
+   based on reverse DNS on IPs (default on) */
+#auto_aliases=no
+
+/* add local domain aliases */
+#alias="sip.mydomain.com"
+
+/* uncomment and configure the following line if you want Kamailio to 
+   bind on a specific interface/port/proto (default bind on all available) */
+
+listen=udp:10.10.10.10:5060
+/* port to listen to
+ * - can be specified more than once if needed to listen on many ports */
+#port=5060
+
+#!ifdef WITH_TLS
+enable_tls=yes
+#!endif
+
+####### Custom Parameters #########
+
+# These parameters can be modified runtime via RPC interface
+# - see the documentation of 'cfg_rpc' module.
+#
+# Format: group.id = value 'desc' description
+# Access: $sel(cfg_get.group.id) or @cfg_get.group.id
+#
+
+#!ifdef WITH_PSTN
+# PSTN GW Routing
+#
+# - pstn.gw_ip: valid IP or hostname as string value, example:
+# pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
+#
+# - by default is empty to avoid misrouting
+pstn.gw_ip = "" desc "PSTN GW Address"
+#!endif
+
+
+####### Modules Section ########
+
+# set paths to location of modules
+#!ifdef LOCAL_TEST_RUN
+mpath="modules_k:modules"
+#!else
+mpath="/usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/"
+#!endif
+
+#!ifdef WITH_MYSQL
+loadmodule "db_mysql.so"
+#!endif
+
+#my modules
+loadmodule "db_cassandra.so"
+
+loadmodule "mi_fifo.so"
+loadmodule "kex.so"
+loadmodule "tm.so"
+loadmodule "tmx.so"
+loadmodule "sl.so"
+loadmodule "rr.so"
+loadmodule "pv.so"
+loadmodule "maxfwd.so"
+loadmodule "usrloc.so"
+loadmodule "registrar.so"
+loadmodule "textops.so"
+loadmodule "siputils.so"
+loadmodule "xlog.so"
+loadmodule "sanity.so"
+loadmodule "ctl.so"
+loadmodule "mi_rpc.so"
+loadmodule "acc.so"
+
+#!ifdef WITH_AUTH
+loadmodule "auth.so"
+loadmodule "auth_db.so"
+#!ifdef WITH_IPAUTH
+loadmodule "permissions.so"
+#!endif
+#!endif
+
+#!ifdef WITH_ALIASDB
+loadmodule "alias_db.so"
+#!endif
+
+#!ifdef WITH_MULTIDOMAIN
+loadmodule "domain.so"
+#!endif
+
+#!ifdef WITH_PRESENCE
+loadmodule "presence.so"
+loadmodule "presence_xml.so"
+#!endif
+
+#!ifdef WITH_NAT
+loadmodule "nathelper.so"
+loadmodule "rtpproxy.so"
+#!endif
+
+#!ifdef WITH_TLS
+loadmodule "tls.so"
+#!endif
+
+#!ifdef WITH_ANTIFLOOD
+loadmodule "htable.so"
+loadmodule "pike.so"
+#!endif
+
+#!ifdef WITH_XMLRPC
+loadmodule "xmlrpc.so"
+#!endif
+
+
+# ----------------- setting module-specific parameters ---------------
+
+
+# ----- mi_fifo params -----
+modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
+
+
+# ----- tm params -----
+# auto-discard branches from previous serial forking leg
+modparam("tm", "failure_reply_mode", 3)
+# default retransmission timeout: 30sec
+modparam("tm", "fr_timer", 30000)
+# default invite retransmission timeout after 1xx: 120sec
+modparam("tm", "fr_inv_timer", 120000)
+
+
+# ----- rr params -----
+# add value to ;lr param to cope with most of the UAs
+modparam("rr", "enable_full_lr", 1)
+# do not append from tag to the RR (no need for this script)
+modparam("rr", "append_fromtag", 0)
+
+
+# ----- registrar params -----
+modparam("registrar", "method_filtering", 1)
+/* uncomment the next line to disable parallel forking via location */
+# modparam("registrar", "append_branches", 0)
+/* uncomment the next line not to allow more than 10 contacts per AOR */
+#modparam("registrar", "max_contacts", 10)
+modparam("registrar", "max_expires", 120)
+
+
+# ----- acc params -----
+/* what special events should be accounted ? */
+modparam("acc", "early_media", 0)
+modparam("acc", "report_ack", 0)
+modparam("acc", "report_cancels", 0)
+/* by default ww do not adjust the direct of the sequential requests.
+   if you enable this parameter, be sure the enable "append_fromtag"
+   in "rr" module */
+modparam("acc", "detect_direction", 0)
+/* account triggers (flags) */
+modparam("acc", "log_flag", FLT_ACC)
+modparam("acc", "log_missed_flag", FLT_ACCMISSED)
+modparam("acc", "log_extra", 
+	"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
+modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
+/* enhanced DB accounting */
+#!ifdef WITH_ACCDB
+modparam("acc", "db_flag", FLT_ACC)
+modparam("acc", "db_missed_flag", FLT_ACCMISSED)
+modparam("acc", "db_url", DBURL)
+modparam("acc", "db_extra",
+	"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
+#!endif
+
+
+# ----- usrloc params -----
+/* enable DB persistency for location entries */
+modparam("usrloc", "db_url", DBURL)
+modparam("usrloc", "db_mode", 3)
+modparam("usrloc", "db_update_as_insert", 1)
+#modparam("usrloc", "use_domain", MULTIDOMAIN)
+
+
+# ----- auth_db params -----
+#!ifdef WITH_AUTH
+modparam("auth_db", "db_url", DBURL)
+modparam("auth_db", "calculate_ha1", yes)
+modparam("auth_db", "password_column", "password")
+modparam("auth_db", "load_credentials", "")
+#modparam("auth_db", "use_domain", MULTIDOMAIN)
+modparam("auth_db", "use_domain", 1)
+
+# ----- permissions params -----
+#!ifdef WITH_IPAUTH
+modparam("permissions", "db_url", DBURL)
+modparam("permissions", "db_mode", 1)
+#!endif
+
+#!endif
+
+
+# ----- alias_db params -----
+#!ifdef WITH_ALIASDB
+modparam("alias_db", "db_url", DBURL)
+modparam("alias_db", "use_domain", MULTIDOMAIN)
+#!endif
+
+
+# ----- domain params -----
+#!ifdef WITH_MULTIDOMAIN
+modparam("domain", "db_url", DBURL)
+# use caching
+modparam("domain", "db_mode", 1)
+# register callback to match myself condition with domains list
+modparam("domain", "register_myself", 1)
+#!endif
+
+
+#!ifdef WITH_PRESENCE
+# ----- presence params -----
+modparam("presence", "db_url", DBURL)
+
+# ----- presence_xml params -----
+modparam("presence_xml", "db_url", DBURL)
+modparam("presence_xml", "force_active", 1)
+#!endif
+
+
+#!ifdef WITH_NAT
+# ----- rtpproxy params -----
+modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
+
+# ----- nathelper params -----
+modparam("nathelper", "natping_interval", 30)
+modparam("nathelper", "ping_nated_only", 1)
+modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
+modparam("nathelper", "sipping_from", "sip:[email protected]")
+
+# params needed for NAT traversal in other modules
+modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
+modparam("usrloc", "nat_bflag", FLB_NATB)
+#!endif
+
+
+#!ifdef WITH_TLS
+# ----- tls params -----
+modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
+#!endif
+
+#!ifdef WITH_ANTIFLOOD
+# ----- pike params -----
+modparam("pike", "sampling_time_unit", 2)
+modparam("pike", "reqs_density_per_unit", 16)
+modparam("pike", "remove_latency", 4)
+
+# ----- htable params -----
+# ip ban htable with autoexpire after 5 minutes
+modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
+#!endif
+
+#!ifdef WITH_XMLRPC
+# ----- xmlrpc params -----
+modparam("xmlrpc", "route", "XMLRPC");
+modparam("xmlrpc", "url_match", "^/RPC")
+#!endif
+
+# db_cassandra parameters
+modparam("db_cassandra", "schema_path", "/usr/local/sip-router/etc/kamctl/dbcassandra");
+
+# my parameters
+
+####### Routing Logic ########
+
+
+# Main SIP request routing logic
+# - processing of any incoming SIP request starts with this route
+route {
+
+	# per request initial checks
+	route(REQINIT);
+
+	# NAT detection
+	route(NAT);
+
+	# handle requests within SIP dialogs
+	route(WITHINDLG);
+
+	# CANCEL processing
+	if (is_method("CANCEL"))
+	{
+		if (t_check_trans())
+			t_relay();
+		exit;
+	}
+
+	t_check_trans();
+
+	# authentication
+	route(AUTH);
+
+	# record routing for dialog forming requests (in case they are routed)
+	# - remove preloaded route headers
+	remove_hf("Route");
+	if (is_method("INVITE|SUBSCRIBE"))
+		record_route();
+
+	# account only INVITEs
+	if (is_method("INVITE"))
+	{
+		setflag(FLT_ACC); # do accounting
+	}
+
+	# dispatch requests to foreign domains
+	route(SIPOUT);
+
+	### requests for my local domains
+
+	# handle presence related requests
+	route(PRESENCE);
+
+	# handle registrations
+	route(REGISTRAR);
+
+	if ($rU==$null)
+	{
+		# request with no Username in RURI
+		sl_send_reply("484","Address Incomplete");
+		exit;
+	}
+
+	# dispatch destinations to PSTN
+	route(PSTN);
+
+	# user location service
+	route(LOCATION);
+
+	route(RELAY);
+}
+
+
+route[RELAY] {
+#!ifdef WITH_NAT
+	if (check_route_param("nat=yes")) {
+		setbflag(FLB_NATB);
+	}
+	if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
+		route(RTPPROXY);
+	}
+#!endif
+
+	/* example how to enable some additional event routes */
+	if (is_method("INVITE")) {
+		#t_on_branch("BRANCH_ONE");
+		t_on_reply("REPLY_ONE");
+		t_on_failure("FAIL_ONE");
+	}
+
+	if (!t_relay()) {
+		sl_reply_error();
+	}
+	exit;
+}
+
+# Per SIP request initial checks
+route[REQINIT] {
+#!ifdef WITH_ANTIFLOOD
+	# flood dection from same IP and traffic ban for a while
+	# be sure you exclude checking trusted peers, such as pstn gateways
+	# - local host excluded (e.g., loop to self)
+	if(src_ip!=myself)
+	{
+		if($sht(ipban=>$si)!=$null)
+		{
+			# ip is already blocked
+			xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
+			exit;
+		}
+		if (!pike_check_req())
+		{
+			xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
+			$sht(ipban=>$si) = 1;
+			exit;
+		}
+	}
+#!endif
+
+	if (!mf_process_maxfwd_header("10")) {
+		sl_send_reply("483","Too Many Hops");
+		exit;
+	}
+
+	if(!sanity_check("1511", "7"))
+	{
+		xlog("Malformed SIP message from $si:$sp\n");
+		exit;
+	}
+}
+
+# Handle requests within SIP dialogs
+route[WITHINDLG] {
+	if (has_totag()) {
+		# sequential request withing a dialog should
+		# take the path determined by record-routing
+		if (loose_route()) {
+			if (is_method("BYE")) {
+				setflag(FLT_ACC); # do accounting ...
+				setflag(FLT_ACCFAILED); # ... even if the transaction fails
+			}
+			route(RELAY);
+		} else {
+			if (is_method("SUBSCRIBE") && uri == myself) {
+				# in-dialog subscribe requests
+				route(PRESENCE);
+				exit;
+			}
+			if ( is_method("ACK") ) {
+				if ( t_check_trans() ) {
+					# no loose-route, but stateful ACK;
+					# must be an ACK after a 487
+					# or e.g. 404 from upstream server
+					t_relay();
+					exit;
+				} else {
+					# ACK without matching transaction ... ignore and discard
+					exit;
+				}
+			}
+			sl_send_reply("404","Not here");
+		}
+		exit;
+	}
+}
+
+# Handle SIP registrations
+route[REGISTRAR] {
+	if (is_method("REGISTER"))
+	{
+		if(isflagset(FLT_NATS))
+		{
+			setbflag(FLB_NATB);
+			# uncomment next line to do SIP NAT pinging 
+			## setbflag(FLB_NATSIPPING);
+		}
+		if (!save("location"))
+			sl_reply_error();
+
+		exit;
+	}
+}
+
+# USER location service
+route[LOCATION] {
+
+#!ifdef WITH_ALIASDB
+	# search in DB-based aliases
+	alias_db_lookup("dbaliases");
+#!endif
+
+	if (!lookup("location")) {
+		switch ($rc) {
+			case -1:
+			case -3:
+				t_newtran();
+				t_reply("404", "Not Found");
+				exit;
+			case -2:
+				sl_send_reply("405", "Method Not Allowed");
+				exit;
+		}
+	}
+
+	# when routing via usrloc, log the missed calls also
+	if (is_method("INVITE"))
+	{
+		setflag(FLT_ACCMISSED);
+	}
+}
+
+# Presence server route
+route[PRESENCE] {
+	if(!is_method("PUBLISH|SUBSCRIBE"))
+		return;
+
+#!ifdef WITH_PRESENCE
+	if (!t_newtran())
+	{
+		sl_reply_error();
+		exit;
+	};
+
+	if(is_method("PUBLISH"))
+	{
+		handle_publish();
+		t_release();
+	}
+	else
+	if( is_method("SUBSCRIBE"))
+	{
+		handle_subscribe();
+		t_release();
+	}
+	exit;
+#!endif
+	
+	# if presence enabled, this part will not be executed
+	if (is_method("PUBLISH") || $rU==$null)
+	{
+		sl_send_reply("404", "Not here");
+		exit;
+	}
+	return;
+}
+
+# Authentication route
+route[AUTH] {
+#!ifdef WITH_AUTH
+	if (is_method("REGISTER"))
+	{
+		# authenticate the REGISTER requests (uncomment to enable auth)
+		if (!www_authorize("$td", "subscriber"))
+		{
+			www_challenge("$td", "0");
+			exit;
+		}
+
+		if ($au!=$tU)
+		{
+			sl_send_reply("403","Forbidden auth ID");
+			exit;
+		}
+	} else {
+
+#!ifdef WITH_IPAUTH
+		if(allow_source_address())
+		{
+			# source IP allowed
+			return;
+		}
+#!endif
+
+		# authenticate if from local subscriber
+		if (from_uri==myself)
+		{
+			if (!proxy_authorize("$fd", "subscriber")) {
+				proxy_challenge("$fd", "0");
+				exit;
+			}
+			if (is_method("PUBLISH"))
+			{
+				if ($au!=$tU) {
+					sl_send_reply("403","Forbidden auth ID");
+					exit;
+				}
+			} else {
+				if ($au!=$fU) {
+					sl_send_reply("403","Forbidden auth ID");
+					exit;
+				}
+			}
+
+			consume_credentials();
+			# caller authenticated
+		} else {
+			# caller is not local subscriber, then check if it calls
+			# a local destination, otherwise deny, not an open relay here
+			if (!uri==myself)
+			{
+				sl_send_reply("403","Not relaying");
+				exit;
+			}
+		}
+	}
+#!endif
+	return;
+}
+
+# Caller NAT detection route
+route[NAT] {
+#!ifdef WITH_NAT
+	force_rport();
+	if (nat_uac_test("19")) {
+		if (method=="REGISTER") {
+			fix_nated_register();
+		} else {
+			fix_nated_contact();
+		}
+		setflag(FLT_NATS);
+	}
+#!endif
+	return;
+}
+
+# RTPProxy control
+route[RTPPROXY] {
+#!ifdef WITH_NAT
+	if (is_method("BYE")) {
+		unforce_rtp_proxy();
+	} else if (is_method("INVITE")){
+		force_rtp_proxy();
+	}
+	if (!has_totag()) add_rr_param(";nat=yes");
+#!endif
+	return;
+}
+
+# Routing to foreign domains
+route[SIPOUT] {
+	if (!uri==myself)
+	{
+		append_hf("P-hint: outbound\r\n");
+		route(RELAY);
+	}
+}
+
+# PSTN GW routing
+route[PSTN] {
+#!ifdef WITH_PSTN
+	# check if PSTN GW IP is defined
+	if (strempty($sel(cfg_get.pstn.gw_ip))) {
+		xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n");
+		return;
+	}
+
+	# route to PSTN dialed numbers starting with '+' or '00'
+	#     (international format)
+	# - update the condition to match your dialing rules for PSTN routing
+	if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$"))
+		return;
+
+	# only local users allowed to call
+	if(from_uri!=myself) {
+		sl_send_reply("403", "Not Allowed");
+		exit;
+	}
+
+	$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
+
+	route(RELAY);
+	exit;
+#!endif
+
+	return;
+}
+
+# XMLRPC routing
+#!ifdef WITH_XMLRPC
+route[XMLRPC]
+{
+	# allow XMLRPC from localhost
+	if ((method=="POST" || method=="GET")
+			&& (src_ip==127.0.0.1)) {
+		# close connection only for xmlrpclib user agents (there is a bug in
+		# xmlrpclib: it waits for EOF before interpreting the response).
+		if ($hdr(User-Agent) =~ "xmlrpclib")
+			set_reply_close();
+		set_reply_no_connect();
+		dispatch_rpc();
+		exit;
+	}
+	send_reply("403", "Forbidden");
+	exit;
+}
+#!endif
+
+# Sample branch router
+branch_route[BRANCH_ONE] {
+	xdbg("new branch at $ru\n");
+}
+
+# Sample onreply route
+onreply_route[REPLY_ONE] {
+	xdbg("incoming reply\n");
+#!ifdef WITH_NAT
+	if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB))
+			&& status=~"(183)|(2[0-9][0-9])") {
+		force_rtp_proxy();
+	}
+	if (isbflagset(FLB_NATB)) {
+		fix_nated_contact();
+	}
+#!endif
+}
+
+# Sample failure route
+failure_route[FAIL_ONE] {
+#!ifdef WITH_NAT
+	if (is_method("INVITE")
+			&& (isbflagset(FLB_NATB) || isflagset(FLT_NATS))) {
+		unforce_rtp_proxy();
+	}
+#!endif
+
+	if (t_is_canceled()) {
+		exit;
+	}
+
+	# uncomment the following lines if you want to block client 
+	# redirect based on 3xx replies.
+	##if (t_check_status("3[0-9][0-9]")) {
+	##t_reply("404","Not found");
+	##	exit;
+	##}
+
+	# uncomment the following lines if you want to redirect the failed 
+	# calls to a different new destination
+	##if (t_check_status("486|408")) {
+	##	sethostport("192.168.2.100:5060");
+	##	append_branch();
+	##	# do not set the missed call flag again
+	##	t_relay();
+	##}
+}