/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#include "hive_metastore_types.h"

#include <algorithm>
#include <ostream>

#include <thrift/TToString.h>

namespace Apache { namespace Hadoop { namespace Hive {

int _kHiveObjectTypeValues[] = {
  HiveObjectType::GLOBAL,
  HiveObjectType::DATABASE,
  HiveObjectType::TABLE,
  HiveObjectType::PARTITION,
  HiveObjectType::COLUMN
};
const char* _kHiveObjectTypeNames[] = {
  "GLOBAL",
  "DATABASE",
  "TABLE",
  "PARTITION",
  "COLUMN"
};
const std::map<int, const char*> _HiveObjectType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kHiveObjectTypeValues, _kHiveObjectTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kPrincipalTypeValues[] = {
  PrincipalType::USER,
  PrincipalType::ROLE,
  PrincipalType::GROUP
};
const char* _kPrincipalTypeNames[] = {
  "USER",
  "ROLE",
  "GROUP"
};
const std::map<int, const char*> _PrincipalType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kPrincipalTypeValues, _kPrincipalTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kPartitionEventTypeValues[] = {
  PartitionEventType::LOAD_DONE
};
const char* _kPartitionEventTypeNames[] = {
  "LOAD_DONE"
};
const std::map<int, const char*> _PartitionEventType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kPartitionEventTypeValues, _kPartitionEventTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kTxnStateValues[] = {
  TxnState::COMMITTED,
  TxnState::ABORTED,
  TxnState::OPEN
};
const char* _kTxnStateNames[] = {
  "COMMITTED",
  "ABORTED",
  "OPEN"
};
const std::map<int, const char*> _TxnState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kTxnStateValues, _kTxnStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kLockLevelValues[] = {
  LockLevel::DB,
  LockLevel::TABLE,
  LockLevel::PARTITION
};
const char* _kLockLevelNames[] = {
  "DB",
  "TABLE",
  "PARTITION"
};
const std::map<int, const char*> _LockLevel_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockLevelValues, _kLockLevelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kLockStateValues[] = {
  LockState::ACQUIRED,
  LockState::WAITING,
  LockState::ABORT,
  LockState::NOT_ACQUIRED
};
const char* _kLockStateNames[] = {
  "ACQUIRED",
  "WAITING",
  "ABORT",
  "NOT_ACQUIRED"
};
const std::map<int, const char*> _LockState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kLockStateValues, _kLockStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kLockTypeValues[] = {
  LockType::SHARED_READ,
  LockType::SHARED_WRITE,
  LockType::EXCLUSIVE
};
const char* _kLockTypeNames[] = {
  "SHARED_READ",
  "SHARED_WRITE",
  "EXCLUSIVE"
};
const std::map<int, const char*> _LockType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockTypeValues, _kLockTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kCompactionTypeValues[] = {
  CompactionType::MINOR,
  CompactionType::MAJOR
};
const char* _kCompactionTypeNames[] = {
  "MINOR",
  "MAJOR"
};
const std::map<int, const char*> _CompactionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kCompactionTypeValues, _kCompactionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kGrantRevokeTypeValues[] = {
  GrantRevokeType::GRANT,
  GrantRevokeType::REVOKE
};
const char* _kGrantRevokeTypeNames[] = {
  "GRANT",
  "REVOKE"
};
const std::map<int, const char*> _GrantRevokeType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kGrantRevokeTypeValues, _kGrantRevokeTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kDataOperationTypeValues[] = {
  DataOperationType::SELECT,
  DataOperationType::INSERT,
  DataOperationType::UPDATE,
  DataOperationType::DELETE,
  DataOperationType::UNSET,
  DataOperationType::NO_TXN
};
const char* _kDataOperationTypeNames[] = {
  "SELECT",
  "INSERT",
  "UPDATE",
  "DELETE",
  "UNSET",
  "NO_TXN"
};
const std::map<int, const char*> _DataOperationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kDataOperationTypeValues, _kDataOperationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kEventRequestTypeValues[] = {
  EventRequestType::INSERT,
  EventRequestType::UPDATE,
  EventRequestType::DELETE
};
const char* _kEventRequestTypeNames[] = {
  "INSERT",
  "UPDATE",
  "DELETE"
};
const std::map<int, const char*> _EventRequestType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kEventRequestTypeValues, _kEventRequestTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kFunctionTypeValues[] = {
  FunctionType::JAVA
};
const char* _kFunctionTypeNames[] = {
  "JAVA"
};
const std::map<int, const char*> _FunctionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFunctionTypeValues, _kFunctionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kResourceTypeValues[] = {
  ResourceType::JAR,
  ResourceType::FILE,
  ResourceType::ARCHIVE
};
const char* _kResourceTypeNames[] = {
  "JAR",
  "FILE",
  "ARCHIVE"
};
const std::map<int, const char*> _ResourceType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kResourceTypeValues, _kResourceTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kFileMetadataExprTypeValues[] = {
  FileMetadataExprType::ORC_SARG
};
const char* _kFileMetadataExprTypeNames[] = {
  "ORC_SARG"
};
const std::map<int, const char*> _FileMetadataExprType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFileMetadataExprTypeValues, _kFileMetadataExprTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kClientCapabilityValues[] = {
  ClientCapability::TEST_CAPABILITY
};
const char* _kClientCapabilityNames[] = {
  "TEST_CAPABILITY"
};
const std::map<int, const char*> _ClientCapability_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kClientCapabilityValues, _kClientCapabilityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));


Version::~Version() throw() {
}


void Version::__set_version(const std::string& val) {
  this->version = val;
}

void Version::__set_comments(const std::string& val) {
  this->comments = val;
}

uint32_t Version::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->version);
          this->__isset.version = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->comments);
          this->__isset.comments = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Version");

  xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->version);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->comments);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Version &a, Version &b) {
  using ::std::swap;
  swap(a.version, b.version);
  swap(a.comments, b.comments);
  swap(a.__isset, b.__isset);
}

Version::Version(const Version& other0) {
  version = other0.version;
  comments = other0.comments;
  __isset = other0.__isset;
}
Version& Version::operator=(const Version& other1) {
  version = other1.version;
  comments = other1.comments;
  __isset = other1.__isset;
  return *this;
}
void Version::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Version(";
  out << "version=" << to_string(version);
  out << ", " << "comments=" << to_string(comments);
  out << ")";
}


FieldSchema::~FieldSchema() throw() {
}


void FieldSchema::__set_name(const std::string& val) {
  this->name = val;
}

void FieldSchema::__set_type(const std::string& val) {
  this->type = val;
}

void FieldSchema::__set_comment(const std::string& val) {
  this->comment = val;
}

uint32_t FieldSchema::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->name);
          this->__isset.name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->type);
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->comment);
          this->__isset.comment = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("FieldSchema");

  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->type);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->comment);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(FieldSchema &a, FieldSchema &b) {
  using ::std::swap;
  swap(a.name, b.name);
  swap(a.type, b.type);
  swap(a.comment, b.comment);
  swap(a.__isset, b.__isset);
}

FieldSchema::FieldSchema(const FieldSchema& other2) {
  name = other2.name;
  type = other2.type;
  comment = other2.comment;
  __isset = other2.__isset;
}
FieldSchema& FieldSchema::operator=(const FieldSchema& other3) {
  name = other3.name;
  type = other3.type;
  comment = other3.comment;
  __isset = other3.__isset;
  return *this;
}
void FieldSchema::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "FieldSchema(";
  out << "name=" << to_string(name);
  out << ", " << "type=" << to_string(type);
  out << ", " << "comment=" << to_string(comment);
  out << ")";
}


SQLPrimaryKey::~SQLPrimaryKey() throw() {
}


void SQLPrimaryKey::__set_table_db(const std::string& val) {
  this->table_db = val;
}

void SQLPrimaryKey::__set_table_name(const std::string& val) {
  this->table_name = val;
}

void SQLPrimaryKey::__set_column_name(const std::string& val) {
  this->column_name = val;
}

void SQLPrimaryKey::__set_key_seq(const int32_t val) {
  this->key_seq = val;
}

void SQLPrimaryKey::__set_pk_name(const std::string& val) {
  this->pk_name = val;
}

void SQLPrimaryKey::__set_enable_cstr(const bool val) {
  this->enable_cstr = val;
}

void SQLPrimaryKey::__set_validate_cstr(const bool val) {
  this->validate_cstr = val;
}

void SQLPrimaryKey::__set_rely_cstr(const bool val) {
  this->rely_cstr = val;
}

uint32_t SQLPrimaryKey::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->table_db);
          this->__isset.table_db = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->table_name);
          this->__isset.table_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->column_name);
          this->__isset.column_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->key_seq);
          this->__isset.key_seq = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->pk_name);
          this->__isset.pk_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->enable_cstr);
          this->__isset.enable_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->validate_cstr);
          this->__isset.validate_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->rely_cstr);
          this->__isset.rely_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t SQLPrimaryKey::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("SQLPrimaryKey");

  xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->table_db);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->table_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->column_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32(this->key_seq);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 5);
  xfer += oprot->writeString(this->pk_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6);
  xfer += oprot->writeBool(this->enable_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7);
  xfer += oprot->writeBool(this->validate_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8);
  xfer += oprot->writeBool(this->rely_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(SQLPrimaryKey &a, SQLPrimaryKey &b) {
  using ::std::swap;
  swap(a.table_db, b.table_db);
  swap(a.table_name, b.table_name);
  swap(a.column_name, b.column_name);
  swap(a.key_seq, b.key_seq);
  swap(a.pk_name, b.pk_name);
  swap(a.enable_cstr, b.enable_cstr);
  swap(a.validate_cstr, b.validate_cstr);
  swap(a.rely_cstr, b.rely_cstr);
  swap(a.__isset, b.__isset);
}

SQLPrimaryKey::SQLPrimaryKey(const SQLPrimaryKey& other4) {
  table_db = other4.table_db;
  table_name = other4.table_name;
  column_name = other4.column_name;
  key_seq = other4.key_seq;
  pk_name = other4.pk_name;
  enable_cstr = other4.enable_cstr;
  validate_cstr = other4.validate_cstr;
  rely_cstr = other4.rely_cstr;
  __isset = other4.__isset;
}
SQLPrimaryKey& SQLPrimaryKey::operator=(const SQLPrimaryKey& other5) {
  table_db = other5.table_db;
  table_name = other5.table_name;
  column_name = other5.column_name;
  key_seq = other5.key_seq;
  pk_name = other5.pk_name;
  enable_cstr = other5.enable_cstr;
  validate_cstr = other5.validate_cstr;
  rely_cstr = other5.rely_cstr;
  __isset = other5.__isset;
  return *this;
}
void SQLPrimaryKey::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "SQLPrimaryKey(";
  out << "table_db=" << to_string(table_db);
  out << ", " << "table_name=" << to_string(table_name);
  out << ", " << "column_name=" << to_string(column_name);
  out << ", " << "key_seq=" << to_string(key_seq);
  out << ", " << "pk_name=" << to_string(pk_name);
  out << ", " << "enable_cstr=" << to_string(enable_cstr);
  out << ", " << "validate_cstr=" << to_string(validate_cstr);
  out << ", " << "rely_cstr=" << to_string(rely_cstr);
  out << ")";
}


SQLForeignKey::~SQLForeignKey() throw() {
}


void SQLForeignKey::__set_pktable_db(const std::string& val) {
  this->pktable_db = val;
}

void SQLForeignKey::__set_pktable_name(const std::string& val) {
  this->pktable_name = val;
}

void SQLForeignKey::__set_pkcolumn_name(const std::string& val) {
  this->pkcolumn_name = val;
}

void SQLForeignKey::__set_fktable_db(const std::string& val) {
  this->fktable_db = val;
}

void SQLForeignKey::__set_fktable_name(const std::string& val) {
  this->fktable_name = val;
}

void SQLForeignKey::__set_fkcolumn_name(const std::string& val) {
  this->fkcolumn_name = val;
}

void SQLForeignKey::__set_key_seq(const int32_t val) {
  this->key_seq = val;
}

void SQLForeignKey::__set_update_rule(const int32_t val) {
  this->update_rule = val;
}

void SQLForeignKey::__set_delete_rule(const int32_t val) {
  this->delete_rule = val;
}

void SQLForeignKey::__set_fk_name(const std::string& val) {
  this->fk_name = val;
}

void SQLForeignKey::__set_pk_name(const std::string& val) {
  this->pk_name = val;
}

void SQLForeignKey::__set_enable_cstr(const bool val) {
  this->enable_cstr = val;
}

void SQLForeignKey::__set_validate_cstr(const bool val) {
  this->validate_cstr = val;
}

void SQLForeignKey::__set_rely_cstr(const bool val) {
  this->rely_cstr = val;
}

uint32_t SQLForeignKey::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->pktable_db);
          this->__isset.pktable_db = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->pktable_name);
          this->__isset.pktable_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->pkcolumn_name);
          this->__isset.pkcolumn_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->fktable_db);
          this->__isset.fktable_db = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->fktable_name);
          this->__isset.fktable_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->fkcolumn_name);
          this->__isset.fkcolumn_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->key_seq);
          this->__isset.key_seq = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->update_rule);
          this->__isset.update_rule = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->delete_rule);
          this->__isset.delete_rule = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->fk_name);
          this->__isset.fk_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 11:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->pk_name);
          this->__isset.pk_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 12:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->enable_cstr);
          this->__isset.enable_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 13:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->validate_cstr);
          this->__isset.validate_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 14:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->rely_cstr);
          this->__isset.rely_cstr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t SQLForeignKey::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("SQLForeignKey");

  xfer += oprot->writeFieldBegin("pktable_db", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->pktable_db);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("pktable_name", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->pktable_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("pkcolumn_name", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->pkcolumn_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("fktable_db", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->fktable_db);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("fktable_name", ::apache::thrift::protocol::T_STRING, 5);
  xfer += oprot->writeString(this->fktable_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("fkcolumn_name", ::apache::thrift::protocol::T_STRING, 6);
  xfer += oprot->writeString(this->fkcolumn_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 7);
  xfer += oprot->writeI32(this->key_seq);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("update_rule", ::apache::thrift::protocol::T_I32, 8);
  xfer += oprot->writeI32(this->update_rule);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("delete_rule", ::apache::thrift::protocol::T_I32, 9);
  xfer += oprot->writeI32(this->delete_rule);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("fk_name", ::apache::thrift::protocol::T_STRING, 10);
  xfer += oprot->writeString(this->fk_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 11);
  xfer += oprot->writeString(this->pk_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 12);
  xfer += oprot->writeBool(this->enable_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 13);
  xfer += oprot->writeBool(this->validate_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 14);
  xfer += oprot->writeBool(this->rely_cstr);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(SQLForeignKey &a, SQLForeignKey &b) {
  using ::std::swap;
  swap(a.pktable_db, b.pktable_db);
  swap(a.pktable_name, b.pktable_name);
  swap(a.pkcolumn_name, b.pkcolumn_name);
  swap(a.fktable_db, b.fktable_db);
  swap(a.fktable_name, b.fktable_name);
  swap(a.fkcolumn_name, b.fkcolumn_name);
  swap(a.key_seq, b.key_seq);
  swap(a.update_rule, b.update_rule);
  swap(a.delete_rule, b.delete_rule);
  swap(a.fk_name, b.fk_name);
  swap(a.pk_name, b.pk_name);
  swap(a.enable_cstr, b.enable_cstr);
  swap(a.validate_cstr, b.validate_cstr);
  swap(a.rely_cstr, b.rely_cstr);
  swap(a.__isset, b.__isset);
}

SQLForeignKey::SQLForeignKey(const SQLForeignKey& other6) {
  pktable_db = other6.pktable_db;
  pktable_name = other6.pktable_name;
  pkcolumn_name = other6.pkcolumn_name;
  fktable_db = other6.fktable_db;
  fktable_name = other6.fktable_name;
  fkcolumn_name = other6.fkcolumn_name;
  key_seq = other6.key_seq;
  update_rule = other6.update_rule;
  delete_rule = other6.delete_rule;
  fk_name = other6.fk_name;
  pk_name = other6.pk_name;
  enable_cstr = other6.enable_cstr;
  validate_cstr = other6.validate_cstr;
  rely_cstr = other6.rely_cstr;
  __isset = other6.__isset;
}
SQLForeignKey& SQLForeignKey::operator=(const SQLForeignKey& other7) {
  pktable_db = other7.pktable_db;
  pktable_name = other7.pktable_name;
  pkcolumn_name = other7.pkcolumn_name;
  fktable_db = other7.fktable_db;
  fktable_name = other7.fktable_name;
  fkcolumn_name = other7.fkcolumn_name;
  key_seq = other7.key_seq;
  update_rule = other7.update_rule;
  delete_rule = other7.delete_rule;
  fk_name = other7.fk_name;
  pk_name = other7.pk_name;
  enable_cstr = other7.enable_cstr;
  validate_cstr = other7.validate_cstr;
  rely_cstr = other7.rely_cstr;
  __isset = other7.__isset;
  return *this;
}
void SQLForeignKey::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "SQLForeignKey(";
  out << "pktable_db=" << to_string(pktable_db);
  out << ", " << "pktable_name=" << to_string(pktable_name);
  out << ", " << "pkcolumn_name=" << to_string(pkcolumn_name);
  out << ", " << "fktable_db=" << to_string(fktable_db);
  out << ", " << "fktable_name=" << to_string(fktable_name);
  out << ", " << "fkcolumn_name=" << to_string(fkcolumn_name);
  out << ", " << "key_seq=" << to_string(key_seq);
  out << ", " << "update_rule=" << to_string(update_rule);
  out << ", " << "delete_rule=" << to_string(delete_rule);
  out << ", " << "fk_name=" << to_string(fk_name);
  out << ", " << "pk_name=" << to_string(pk_name);
  out << ", " << "enable_cstr=" << to_string(enable_cstr);
  out << ", " << "validate_cstr=" << to_string(validate_cstr);
  out << ", " << "rely_cstr=" << to_string(rely_cstr);
  out << ")";
}


Type::~Type() throw() {
}


void Type::__set_name(const std::string& val) {
  this->name = val;
}

void Type::__set_type1(const std::string& val) {
  this->type1 = val;
__isset.type1 = true;
}

void Type::__set_type2(const std::string& val) {
  this->type2 = val;
__isset.type2 = true;
}

void Type::__set_fields(const std::vector<FieldSchema> & val) {
  this->fields = val;
__isset.fields = true;
}

uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->name);
          this->__isset.name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->type1);
          this->__isset.type1 = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->type2);
          this->__isset.type2 = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->fields.clear();
            uint32_t _size8;
            ::apache::thrift::protocol::TType _etype11;
            xfer += iprot->readListBegin(_etype11, _size8);
            this->fields.resize(_size8);
            uint32_t _i12;
            for (_i12 = 0; _i12 < _size8; ++_i12)
            {
              xfer += this->fields[_i12].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.fields = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Type");

  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->name);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.type1) {
    xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2);
    xfer += oprot->writeString(this->type1);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.type2) {
    xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->type2);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.fields) {
    xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fields.size()));
      std::vector<FieldSchema> ::const_iterator _iter13;
      for (_iter13 = this->fields.begin(); _iter13 != this->fields.end(); ++_iter13)
      {
        xfer += (*_iter13).write(oprot);
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Type &a, Type &b) {
  using ::std::swap;
  swap(a.name, b.name);
  swap(a.type1, b.type1);
  swap(a.type2, b.type2);
  swap(a.fields, b.fields);
  swap(a.__isset, b.__isset);
}

Type::Type(const Type& other14) {
  name = other14.name;
  type1 = other14.type1;
  type2 = other14.type2;
  fields = other14.fields;
  __isset = other14.__isset;
}
Type& Type::operator=(const Type& other15) {
  name = other15.name;
  type1 = other15.type1;
  type2 = other15.type2;
  fields = other15.fields;
  __isset = other15.__isset;
  return *this;
}
void Type::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Type(";
  out << "name=" << to_string(name);
  out << ", " << "type1="; (__isset.type1 ? (out << to_string(type1)) : (out << "<null>"));
  out << ", " << "type2="; (__isset.type2 ? (out << to_string(type2)) : (out << "<null>"));
  out << ", " << "fields="; (__isset.fields ? (out << to_string(fields)) : (out << "<null>"));
  out << ")";
}


HiveObjectRef::~HiveObjectRef() throw() {
}


void HiveObjectRef::__set_objectType(const HiveObjectType::type val) {
  this->objectType = val;
}

void HiveObjectRef::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void HiveObjectRef::__set_objectName(const std::string& val) {
  this->objectName = val;
}

void HiveObjectRef::__set_partValues(const std::vector<std::string> & val) {
  this->partValues = val;
}

void HiveObjectRef::__set_columnName(const std::string& val) {
  this->columnName = val;
}

uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_I32) {
          int32_t ecast16;
          xfer += iprot->readI32(ecast16);
          this->objectType = (HiveObjectType::type)ecast16;
          this->__isset.objectType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->objectName);
          this->__isset.objectName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partValues.clear();
            uint32_t _size17;
            ::apache::thrift::protocol::TType _etype20;
            xfer += iprot->readListBegin(_etype20, _size17);
            this->partValues.resize(_size17);
            uint32_t _i21;
            for (_i21 = 0; _i21 < _size17; ++_i21)
            {
              xfer += iprot->readString(this->partValues[_i21]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partValues = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->columnName);
          this->__isset.columnName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("HiveObjectRef");

  xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->objectType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->objectName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partValues.size()));
    std::vector<std::string> ::const_iterator _iter22;
    for (_iter22 = this->partValues.begin(); _iter22 != this->partValues.end(); ++_iter22)
    {
      xfer += oprot->writeString((*_iter22));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5);
  xfer += oprot->writeString(this->columnName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(HiveObjectRef &a, HiveObjectRef &b) {
  using ::std::swap;
  swap(a.objectType, b.objectType);
  swap(a.dbName, b.dbName);
  swap(a.objectName, b.objectName);
  swap(a.partValues, b.partValues);
  swap(a.columnName, b.columnName);
  swap(a.__isset, b.__isset);
}

HiveObjectRef::HiveObjectRef(const HiveObjectRef& other23) {
  objectType = other23.objectType;
  dbName = other23.dbName;
  objectName = other23.objectName;
  partValues = other23.partValues;
  columnName = other23.columnName;
  __isset = other23.__isset;
}
HiveObjectRef& HiveObjectRef::operator=(const HiveObjectRef& other24) {
  objectType = other24.objectType;
  dbName = other24.dbName;
  objectName = other24.objectName;
  partValues = other24.partValues;
  columnName = other24.columnName;
  __isset = other24.__isset;
  return *this;
}
void HiveObjectRef::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "HiveObjectRef(";
  out << "objectType=" << to_string(objectType);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "objectName=" << to_string(objectName);
  out << ", " << "partValues=" << to_string(partValues);
  out << ", " << "columnName=" << to_string(columnName);
  out << ")";
}


PrivilegeGrantInfo::~PrivilegeGrantInfo() throw() {
}


void PrivilegeGrantInfo::__set_privilege(const std::string& val) {
  this->privilege = val;
}

void PrivilegeGrantInfo::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void PrivilegeGrantInfo::__set_grantor(const std::string& val) {
  this->grantor = val;
}

void PrivilegeGrantInfo::__set_grantorType(const PrincipalType::type val) {
  this->grantorType = val;
}

void PrivilegeGrantInfo::__set_grantOption(const bool val) {
  this->grantOption = val;
}

uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->privilege);
          this->__isset.privilege = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->grantor);
          this->__isset.grantor = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast25;
          xfer += iprot->readI32(ecast25);
          this->grantorType = (PrincipalType::type)ecast25;
          this->__isset.grantorType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->grantOption);
          this->__isset.grantOption = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PrivilegeGrantInfo");

  xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->privilege);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->grantor);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32((int32_t)this->grantorType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5);
  xfer += oprot->writeBool(this->grantOption);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) {
  using ::std::swap;
  swap(a.privilege, b.privilege);
  swap(a.createTime, b.createTime);
  swap(a.grantor, b.grantor);
  swap(a.grantorType, b.grantorType);
  swap(a.grantOption, b.grantOption);
  swap(a.__isset, b.__isset);
}

PrivilegeGrantInfo::PrivilegeGrantInfo(const PrivilegeGrantInfo& other26) {
  privilege = other26.privilege;
  createTime = other26.createTime;
  grantor = other26.grantor;
  grantorType = other26.grantorType;
  grantOption = other26.grantOption;
  __isset = other26.__isset;
}
PrivilegeGrantInfo& PrivilegeGrantInfo::operator=(const PrivilegeGrantInfo& other27) {
  privilege = other27.privilege;
  createTime = other27.createTime;
  grantor = other27.grantor;
  grantorType = other27.grantorType;
  grantOption = other27.grantOption;
  __isset = other27.__isset;
  return *this;
}
void PrivilegeGrantInfo::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PrivilegeGrantInfo(";
  out << "privilege=" << to_string(privilege);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "grantor=" << to_string(grantor);
  out << ", " << "grantorType=" << to_string(grantorType);
  out << ", " << "grantOption=" << to_string(grantOption);
  out << ")";
}


HiveObjectPrivilege::~HiveObjectPrivilege() throw() {
}


void HiveObjectPrivilege::__set_hiveObject(const HiveObjectRef& val) {
  this->hiveObject = val;
}

void HiveObjectPrivilege::__set_principalName(const std::string& val) {
  this->principalName = val;
}

void HiveObjectPrivilege::__set_principalType(const PrincipalType::type val) {
  this->principalType = val;
}

void HiveObjectPrivilege::__set_grantInfo(const PrivilegeGrantInfo& val) {
  this->grantInfo = val;
}

uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->hiveObject.read(iprot);
          this->__isset.hiveObject = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->principalName);
          this->__isset.principalName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast28;
          xfer += iprot->readI32(ecast28);
          this->principalType = (PrincipalType::type)ecast28;
          this->__isset.principalType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->grantInfo.read(iprot);
          this->__isset.grantInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("HiveObjectPrivilege");

  xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1);
  xfer += this->hiveObject.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->principalName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
  xfer += oprot->writeI32((int32_t)this->principalType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4);
  xfer += this->grantInfo.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) {
  using ::std::swap;
  swap(a.hiveObject, b.hiveObject);
  swap(a.principalName, b.principalName);
  swap(a.principalType, b.principalType);
  swap(a.grantInfo, b.grantInfo);
  swap(a.__isset, b.__isset);
}

HiveObjectPrivilege::HiveObjectPrivilege(const HiveObjectPrivilege& other29) {
  hiveObject = other29.hiveObject;
  principalName = other29.principalName;
  principalType = other29.principalType;
  grantInfo = other29.grantInfo;
  __isset = other29.__isset;
}
HiveObjectPrivilege& HiveObjectPrivilege::operator=(const HiveObjectPrivilege& other30) {
  hiveObject = other30.hiveObject;
  principalName = other30.principalName;
  principalType = other30.principalType;
  grantInfo = other30.grantInfo;
  __isset = other30.__isset;
  return *this;
}
void HiveObjectPrivilege::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "HiveObjectPrivilege(";
  out << "hiveObject=" << to_string(hiveObject);
  out << ", " << "principalName=" << to_string(principalName);
  out << ", " << "principalType=" << to_string(principalType);
  out << ", " << "grantInfo=" << to_string(grantInfo);
  out << ")";
}


PrivilegeBag::~PrivilegeBag() throw() {
}


void PrivilegeBag::__set_privileges(const std::vector<HiveObjectPrivilege> & val) {
  this->privileges = val;
}

uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->privileges.clear();
            uint32_t _size31;
            ::apache::thrift::protocol::TType _etype34;
            xfer += iprot->readListBegin(_etype34, _size31);
            this->privileges.resize(_size31);
            uint32_t _i35;
            for (_i35 = 0; _i35 < _size31; ++_i35)
            {
              xfer += this->privileges[_i35].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PrivilegeBag");

  xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->privileges.size()));
    std::vector<HiveObjectPrivilege> ::const_iterator _iter36;
    for (_iter36 = this->privileges.begin(); _iter36 != this->privileges.end(); ++_iter36)
    {
      xfer += (*_iter36).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PrivilegeBag &a, PrivilegeBag &b) {
  using ::std::swap;
  swap(a.privileges, b.privileges);
  swap(a.__isset, b.__isset);
}

PrivilegeBag::PrivilegeBag(const PrivilegeBag& other37) {
  privileges = other37.privileges;
  __isset = other37.__isset;
}
PrivilegeBag& PrivilegeBag::operator=(const PrivilegeBag& other38) {
  privileges = other38.privileges;
  __isset = other38.__isset;
  return *this;
}
void PrivilegeBag::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PrivilegeBag(";
  out << "privileges=" << to_string(privileges);
  out << ")";
}


PrincipalPrivilegeSet::~PrincipalPrivilegeSet() throw() {
}


void PrincipalPrivilegeSet::__set_userPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
  this->userPrivileges = val;
}

void PrincipalPrivilegeSet::__set_groupPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
  this->groupPrivileges = val;
}

void PrincipalPrivilegeSet::__set_rolePrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
  this->rolePrivileges = val;
}

uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_MAP) {
          {
            this->userPrivileges.clear();
            uint32_t _size39;
            ::apache::thrift::protocol::TType _ktype40;
            ::apache::thrift::protocol::TType _vtype41;
            xfer += iprot->readMapBegin(_ktype40, _vtype41, _size39);
            uint32_t _i43;
            for (_i43 = 0; _i43 < _size39; ++_i43)
            {
              std::string _key44;
              xfer += iprot->readString(_key44);
              std::vector<PrivilegeGrantInfo> & _val45 = this->userPrivileges[_key44];
              {
                _val45.clear();
                uint32_t _size46;
                ::apache::thrift::protocol::TType _etype49;
                xfer += iprot->readListBegin(_etype49, _size46);
                _val45.resize(_size46);
                uint32_t _i50;
                for (_i50 = 0; _i50 < _size46; ++_i50)
                {
                  xfer += _val45[_i50].read(iprot);
                }
                xfer += iprot->readListEnd();
              }
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.userPrivileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->groupPrivileges.clear();
            uint32_t _size51;
            ::apache::thrift::protocol::TType _ktype52;
            ::apache::thrift::protocol::TType _vtype53;
            xfer += iprot->readMapBegin(_ktype52, _vtype53, _size51);
            uint32_t _i55;
            for (_i55 = 0; _i55 < _size51; ++_i55)
            {
              std::string _key56;
              xfer += iprot->readString(_key56);
              std::vector<PrivilegeGrantInfo> & _val57 = this->groupPrivileges[_key56];
              {
                _val57.clear();
                uint32_t _size58;
                ::apache::thrift::protocol::TType _etype61;
                xfer += iprot->readListBegin(_etype61, _size58);
                _val57.resize(_size58);
                uint32_t _i62;
                for (_i62 = 0; _i62 < _size58; ++_i62)
                {
                  xfer += _val57[_i62].read(iprot);
                }
                xfer += iprot->readListEnd();
              }
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.groupPrivileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->rolePrivileges.clear();
            uint32_t _size63;
            ::apache::thrift::protocol::TType _ktype64;
            ::apache::thrift::protocol::TType _vtype65;
            xfer += iprot->readMapBegin(_ktype64, _vtype65, _size63);
            uint32_t _i67;
            for (_i67 = 0; _i67 < _size63; ++_i67)
            {
              std::string _key68;
              xfer += iprot->readString(_key68);
              std::vector<PrivilegeGrantInfo> & _val69 = this->rolePrivileges[_key68];
              {
                _val69.clear();
                uint32_t _size70;
                ::apache::thrift::protocol::TType _etype73;
                xfer += iprot->readListBegin(_etype73, _size70);
                _val69.resize(_size70);
                uint32_t _i74;
                for (_i74 = 0; _i74 < _size70; ++_i74)
                {
                  xfer += _val69[_i74].read(iprot);
                }
                xfer += iprot->readListEnd();
              }
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.rolePrivileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PrincipalPrivilegeSet");

  xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->userPrivileges.size()));
    std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter75;
    for (_iter75 = this->userPrivileges.begin(); _iter75 != this->userPrivileges.end(); ++_iter75)
    {
      xfer += oprot->writeString(_iter75->first);
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter75->second.size()));
        std::vector<PrivilegeGrantInfo> ::const_iterator _iter76;
        for (_iter76 = _iter75->second.begin(); _iter76 != _iter75->second.end(); ++_iter76)
        {
          xfer += (*_iter76).write(oprot);
        }
        xfer += oprot->writeListEnd();
      }
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->groupPrivileges.size()));
    std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter77;
    for (_iter77 = this->groupPrivileges.begin(); _iter77 != this->groupPrivileges.end(); ++_iter77)
    {
      xfer += oprot->writeString(_iter77->first);
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter77->second.size()));
        std::vector<PrivilegeGrantInfo> ::const_iterator _iter78;
        for (_iter78 = _iter77->second.begin(); _iter78 != _iter77->second.end(); ++_iter78)
        {
          xfer += (*_iter78).write(oprot);
        }
        xfer += oprot->writeListEnd();
      }
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->rolePrivileges.size()));
    std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter79;
    for (_iter79 = this->rolePrivileges.begin(); _iter79 != this->rolePrivileges.end(); ++_iter79)
    {
      xfer += oprot->writeString(_iter79->first);
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter79->second.size()));
        std::vector<PrivilegeGrantInfo> ::const_iterator _iter80;
        for (_iter80 = _iter79->second.begin(); _iter80 != _iter79->second.end(); ++_iter80)
        {
          xfer += (*_iter80).write(oprot);
        }
        xfer += oprot->writeListEnd();
      }
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) {
  using ::std::swap;
  swap(a.userPrivileges, b.userPrivileges);
  swap(a.groupPrivileges, b.groupPrivileges);
  swap(a.rolePrivileges, b.rolePrivileges);
  swap(a.__isset, b.__isset);
}

PrincipalPrivilegeSet::PrincipalPrivilegeSet(const PrincipalPrivilegeSet& other81) {
  userPrivileges = other81.userPrivileges;
  groupPrivileges = other81.groupPrivileges;
  rolePrivileges = other81.rolePrivileges;
  __isset = other81.__isset;
}
PrincipalPrivilegeSet& PrincipalPrivilegeSet::operator=(const PrincipalPrivilegeSet& other82) {
  userPrivileges = other82.userPrivileges;
  groupPrivileges = other82.groupPrivileges;
  rolePrivileges = other82.rolePrivileges;
  __isset = other82.__isset;
  return *this;
}
void PrincipalPrivilegeSet::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PrincipalPrivilegeSet(";
  out << "userPrivileges=" << to_string(userPrivileges);
  out << ", " << "groupPrivileges=" << to_string(groupPrivileges);
  out << ", " << "rolePrivileges=" << to_string(rolePrivileges);
  out << ")";
}


GrantRevokePrivilegeRequest::~GrantRevokePrivilegeRequest() throw() {
}


void GrantRevokePrivilegeRequest::__set_requestType(const GrantRevokeType::type val) {
  this->requestType = val;
}

void GrantRevokePrivilegeRequest::__set_privileges(const PrivilegeBag& val) {
  this->privileges = val;
}

void GrantRevokePrivilegeRequest::__set_revokeGrantOption(const bool val) {
  this->revokeGrantOption = val;
__isset.revokeGrantOption = true;
}

uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_I32) {
          int32_t ecast83;
          xfer += iprot->readI32(ecast83);
          this->requestType = (GrantRevokeType::type)ecast83;
          this->__isset.requestType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->privileges.read(iprot);
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->revokeGrantOption);
          this->__isset.revokeGrantOption = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest");

  xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->requestType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2);
  xfer += this->privileges.write(oprot);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.revokeGrantOption) {
    xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3);
    xfer += oprot->writeBool(this->revokeGrantOption);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) {
  using ::std::swap;
  swap(a.requestType, b.requestType);
  swap(a.privileges, b.privileges);
  swap(a.revokeGrantOption, b.revokeGrantOption);
  swap(a.__isset, b.__isset);
}

GrantRevokePrivilegeRequest::GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest& other84) {
  requestType = other84.requestType;
  privileges = other84.privileges;
  revokeGrantOption = other84.revokeGrantOption;
  __isset = other84.__isset;
}
GrantRevokePrivilegeRequest& GrantRevokePrivilegeRequest::operator=(const GrantRevokePrivilegeRequest& other85) {
  requestType = other85.requestType;
  privileges = other85.privileges;
  revokeGrantOption = other85.revokeGrantOption;
  __isset = other85.__isset;
  return *this;
}
void GrantRevokePrivilegeRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GrantRevokePrivilegeRequest(";
  out << "requestType=" << to_string(requestType);
  out << ", " << "privileges=" << to_string(privileges);
  out << ", " << "revokeGrantOption="; (__isset.revokeGrantOption ? (out << to_string(revokeGrantOption)) : (out << "<null>"));
  out << ")";
}


GrantRevokePrivilegeResponse::~GrantRevokePrivilegeResponse() throw() {
}


void GrantRevokePrivilegeResponse::__set_success(const bool val) {
  this->success = val;
__isset.success = true;
}

uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_BOOL) {
          xfer += iprot->readBool(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 GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse");

  if (this->__isset.success) {
    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
    xfer += oprot->writeBool(this->success);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) {
  using ::std::swap;
  swap(a.success, b.success);
  swap(a.__isset, b.__isset);
}

GrantRevokePrivilegeResponse::GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse& other86) {
  success = other86.success;
  __isset = other86.__isset;
}
GrantRevokePrivilegeResponse& GrantRevokePrivilegeResponse::operator=(const GrantRevokePrivilegeResponse& other87) {
  success = other87.success;
  __isset = other87.__isset;
  return *this;
}
void GrantRevokePrivilegeResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GrantRevokePrivilegeResponse(";
  out << "success="; (__isset.success ? (out << to_string(success)) : (out << "<null>"));
  out << ")";
}


Role::~Role() throw() {
}


void Role::__set_roleName(const std::string& val) {
  this->roleName = val;
}

void Role::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void Role::__set_ownerName(const std::string& val) {
  this->ownerName = val;
}

uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->roleName);
          this->__isset.roleName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->ownerName);
          this->__isset.ownerName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Role");

  xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->roleName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->ownerName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Role &a, Role &b) {
  using ::std::swap;
  swap(a.roleName, b.roleName);
  swap(a.createTime, b.createTime);
  swap(a.ownerName, b.ownerName);
  swap(a.__isset, b.__isset);
}

Role::Role(const Role& other88) {
  roleName = other88.roleName;
  createTime = other88.createTime;
  ownerName = other88.ownerName;
  __isset = other88.__isset;
}
Role& Role::operator=(const Role& other89) {
  roleName = other89.roleName;
  createTime = other89.createTime;
  ownerName = other89.ownerName;
  __isset = other89.__isset;
  return *this;
}
void Role::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Role(";
  out << "roleName=" << to_string(roleName);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "ownerName=" << to_string(ownerName);
  out << ")";
}


RolePrincipalGrant::~RolePrincipalGrant() throw() {
}


void RolePrincipalGrant::__set_roleName(const std::string& val) {
  this->roleName = val;
}

void RolePrincipalGrant::__set_principalName(const std::string& val) {
  this->principalName = val;
}

void RolePrincipalGrant::__set_principalType(const PrincipalType::type val) {
  this->principalType = val;
}

void RolePrincipalGrant::__set_grantOption(const bool val) {
  this->grantOption = val;
}

void RolePrincipalGrant::__set_grantTime(const int32_t val) {
  this->grantTime = val;
}

void RolePrincipalGrant::__set_grantorName(const std::string& val) {
  this->grantorName = val;
}

void RolePrincipalGrant::__set_grantorPrincipalType(const PrincipalType::type val) {
  this->grantorPrincipalType = val;
}

uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->roleName);
          this->__isset.roleName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->principalName);
          this->__isset.principalName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast90;
          xfer += iprot->readI32(ecast90);
          this->principalType = (PrincipalType::type)ecast90;
          this->__isset.principalType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->grantOption);
          this->__isset.grantOption = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->grantTime);
          this->__isset.grantTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->grantorName);
          this->__isset.grantorName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast91;
          xfer += iprot->readI32(ecast91);
          this->grantorPrincipalType = (PrincipalType::type)ecast91;
          this->__isset.grantorPrincipalType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t RolePrincipalGrant::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("RolePrincipalGrant");

  xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->roleName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->principalName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
  xfer += oprot->writeI32((int32_t)this->principalType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 4);
  xfer += oprot->writeBool(this->grantOption);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantTime", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32(this->grantTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantorName", ::apache::thrift::protocol::T_STRING, 6);
  xfer += oprot->writeString(this->grantorName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("grantorPrincipalType", ::apache::thrift::protocol::T_I32, 7);
  xfer += oprot->writeI32((int32_t)this->grantorPrincipalType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(RolePrincipalGrant &a, RolePrincipalGrant &b) {
  using ::std::swap;
  swap(a.roleName, b.roleName);
  swap(a.principalName, b.principalName);
  swap(a.principalType, b.principalType);
  swap(a.grantOption, b.grantOption);
  swap(a.grantTime, b.grantTime);
  swap(a.grantorName, b.grantorName);
  swap(a.grantorPrincipalType, b.grantorPrincipalType);
  swap(a.__isset, b.__isset);
}

RolePrincipalGrant::RolePrincipalGrant(const RolePrincipalGrant& other92) {
  roleName = other92.roleName;
  principalName = other92.principalName;
  principalType = other92.principalType;
  grantOption = other92.grantOption;
  grantTime = other92.grantTime;
  grantorName = other92.grantorName;
  grantorPrincipalType = other92.grantorPrincipalType;
  __isset = other92.__isset;
}
RolePrincipalGrant& RolePrincipalGrant::operator=(const RolePrincipalGrant& other93) {
  roleName = other93.roleName;
  principalName = other93.principalName;
  principalType = other93.principalType;
  grantOption = other93.grantOption;
  grantTime = other93.grantTime;
  grantorName = other93.grantorName;
  grantorPrincipalType = other93.grantorPrincipalType;
  __isset = other93.__isset;
  return *this;
}
void RolePrincipalGrant::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "RolePrincipalGrant(";
  out << "roleName=" << to_string(roleName);
  out << ", " << "principalName=" << to_string(principalName);
  out << ", " << "principalType=" << to_string(principalType);
  out << ", " << "grantOption=" << to_string(grantOption);
  out << ", " << "grantTime=" << to_string(grantTime);
  out << ", " << "grantorName=" << to_string(grantorName);
  out << ", " << "grantorPrincipalType=" << to_string(grantorPrincipalType);
  out << ")";
}


GetRoleGrantsForPrincipalRequest::~GetRoleGrantsForPrincipalRequest() throw() {
}


void GetRoleGrantsForPrincipalRequest::__set_principal_name(const std::string& val) {
  this->principal_name = val;
}

void GetRoleGrantsForPrincipalRequest::__set_principal_type(const PrincipalType::type val) {
  this->principal_type = val;
}

uint32_t GetRoleGrantsForPrincipalRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_principal_name = false;
  bool isset_principal_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_STRING) {
          xfer += iprot->readString(this->principal_name);
          isset_principal_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast94;
          xfer += iprot->readI32(ecast94);
          this->principal_type = (PrincipalType::type)ecast94;
          isset_principal_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_principal_name)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_principal_type)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetRoleGrantsForPrincipalRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalRequest");

  xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->principal_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32((int32_t)this->principal_type);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b) {
  using ::std::swap;
  swap(a.principal_name, b.principal_name);
  swap(a.principal_type, b.principal_type);
}

GetRoleGrantsForPrincipalRequest::GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest& other95) {
  principal_name = other95.principal_name;
  principal_type = other95.principal_type;
}
GetRoleGrantsForPrincipalRequest& GetRoleGrantsForPrincipalRequest::operator=(const GetRoleGrantsForPrincipalRequest& other96) {
  principal_name = other96.principal_name;
  principal_type = other96.principal_type;
  return *this;
}
void GetRoleGrantsForPrincipalRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetRoleGrantsForPrincipalRequest(";
  out << "principal_name=" << to_string(principal_name);
  out << ", " << "principal_type=" << to_string(principal_type);
  out << ")";
}


GetRoleGrantsForPrincipalResponse::~GetRoleGrantsForPrincipalResponse() throw() {
}


void GetRoleGrantsForPrincipalResponse::__set_principalGrants(const std::vector<RolePrincipalGrant> & val) {
  this->principalGrants = val;
}

uint32_t GetRoleGrantsForPrincipalResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_principalGrants = 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->principalGrants.clear();
            uint32_t _size97;
            ::apache::thrift::protocol::TType _etype100;
            xfer += iprot->readListBegin(_etype100, _size97);
            this->principalGrants.resize(_size97);
            uint32_t _i101;
            for (_i101 = 0; _i101 < _size97; ++_i101)
            {
              xfer += this->principalGrants[_i101].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_principalGrants = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_principalGrants)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetRoleGrantsForPrincipalResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalResponse");

  xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->principalGrants.size()));
    std::vector<RolePrincipalGrant> ::const_iterator _iter102;
    for (_iter102 = this->principalGrants.begin(); _iter102 != this->principalGrants.end(); ++_iter102)
    {
      xfer += (*_iter102).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b) {
  using ::std::swap;
  swap(a.principalGrants, b.principalGrants);
}

GetRoleGrantsForPrincipalResponse::GetRoleGrantsForPrincipalResponse(const GetRoleGrantsForPrincipalResponse& other103) {
  principalGrants = other103.principalGrants;
}
GetRoleGrantsForPrincipalResponse& GetRoleGrantsForPrincipalResponse::operator=(const GetRoleGrantsForPrincipalResponse& other104) {
  principalGrants = other104.principalGrants;
  return *this;
}
void GetRoleGrantsForPrincipalResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetRoleGrantsForPrincipalResponse(";
  out << "principalGrants=" << to_string(principalGrants);
  out << ")";
}


GetPrincipalsInRoleRequest::~GetPrincipalsInRoleRequest() throw() {
}


void GetPrincipalsInRoleRequest::__set_roleName(const std::string& val) {
  this->roleName = val;
}

uint32_t GetPrincipalsInRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_roleName = 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->roleName);
          isset_roleName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_roleName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetPrincipalsInRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetPrincipalsInRoleRequest");

  xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->roleName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b) {
  using ::std::swap;
  swap(a.roleName, b.roleName);
}

GetPrincipalsInRoleRequest::GetPrincipalsInRoleRequest(const GetPrincipalsInRoleRequest& other105) {
  roleName = other105.roleName;
}
GetPrincipalsInRoleRequest& GetPrincipalsInRoleRequest::operator=(const GetPrincipalsInRoleRequest& other106) {
  roleName = other106.roleName;
  return *this;
}
void GetPrincipalsInRoleRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetPrincipalsInRoleRequest(";
  out << "roleName=" << to_string(roleName);
  out << ")";
}


GetPrincipalsInRoleResponse::~GetPrincipalsInRoleResponse() throw() {
}


void GetPrincipalsInRoleResponse::__set_principalGrants(const std::vector<RolePrincipalGrant> & val) {
  this->principalGrants = val;
}

uint32_t GetPrincipalsInRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_principalGrants = 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->principalGrants.clear();
            uint32_t _size107;
            ::apache::thrift::protocol::TType _etype110;
            xfer += iprot->readListBegin(_etype110, _size107);
            this->principalGrants.resize(_size107);
            uint32_t _i111;
            for (_i111 = 0; _i111 < _size107; ++_i111)
            {
              xfer += this->principalGrants[_i111].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_principalGrants = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_principalGrants)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetPrincipalsInRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetPrincipalsInRoleResponse");

  xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->principalGrants.size()));
    std::vector<RolePrincipalGrant> ::const_iterator _iter112;
    for (_iter112 = this->principalGrants.begin(); _iter112 != this->principalGrants.end(); ++_iter112)
    {
      xfer += (*_iter112).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetPrincipalsInRoleResponse &a, GetPrincipalsInRoleResponse &b) {
  using ::std::swap;
  swap(a.principalGrants, b.principalGrants);
}

GetPrincipalsInRoleResponse::GetPrincipalsInRoleResponse(const GetPrincipalsInRoleResponse& other113) {
  principalGrants = other113.principalGrants;
}
GetPrincipalsInRoleResponse& GetPrincipalsInRoleResponse::operator=(const GetPrincipalsInRoleResponse& other114) {
  principalGrants = other114.principalGrants;
  return *this;
}
void GetPrincipalsInRoleResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetPrincipalsInRoleResponse(";
  out << "principalGrants=" << to_string(principalGrants);
  out << ")";
}


GrantRevokeRoleRequest::~GrantRevokeRoleRequest() throw() {
}


void GrantRevokeRoleRequest::__set_requestType(const GrantRevokeType::type val) {
  this->requestType = val;
}

void GrantRevokeRoleRequest::__set_roleName(const std::string& val) {
  this->roleName = val;
}

void GrantRevokeRoleRequest::__set_principalName(const std::string& val) {
  this->principalName = val;
}

void GrantRevokeRoleRequest::__set_principalType(const PrincipalType::type val) {
  this->principalType = val;
}

void GrantRevokeRoleRequest::__set_grantor(const std::string& val) {
  this->grantor = val;
__isset.grantor = true;
}

void GrantRevokeRoleRequest::__set_grantorType(const PrincipalType::type val) {
  this->grantorType = val;
__isset.grantorType = true;
}

void GrantRevokeRoleRequest::__set_grantOption(const bool val) {
  this->grantOption = val;
__isset.grantOption = true;
}

uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_I32) {
          int32_t ecast115;
          xfer += iprot->readI32(ecast115);
          this->requestType = (GrantRevokeType::type)ecast115;
          this->__isset.requestType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->roleName);
          this->__isset.roleName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->principalName);
          this->__isset.principalName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast116;
          xfer += iprot->readI32(ecast116);
          this->principalType = (PrincipalType::type)ecast116;
          this->__isset.principalType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->grantor);
          this->__isset.grantor = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast117;
          xfer += iprot->readI32(ecast117);
          this->grantorType = (PrincipalType::type)ecast117;
          this->__isset.grantorType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->grantOption);
          this->__isset.grantOption = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t GrantRevokeRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GrantRevokeRoleRequest");

  xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->requestType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->roleName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->principalName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32((int32_t)this->principalType);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.grantor) {
    xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->grantor);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.grantorType) {
    xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 6);
    xfer += oprot->writeI32((int32_t)this->grantorType);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.grantOption) {
    xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 7);
    xfer += oprot->writeBool(this->grantOption);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GrantRevokeRoleRequest &a, GrantRevokeRoleRequest &b) {
  using ::std::swap;
  swap(a.requestType, b.requestType);
  swap(a.roleName, b.roleName);
  swap(a.principalName, b.principalName);
  swap(a.principalType, b.principalType);
  swap(a.grantor, b.grantor);
  swap(a.grantorType, b.grantorType);
  swap(a.grantOption, b.grantOption);
  swap(a.__isset, b.__isset);
}

GrantRevokeRoleRequest::GrantRevokeRoleRequest(const GrantRevokeRoleRequest& other118) {
  requestType = other118.requestType;
  roleName = other118.roleName;
  principalName = other118.principalName;
  principalType = other118.principalType;
  grantor = other118.grantor;
  grantorType = other118.grantorType;
  grantOption = other118.grantOption;
  __isset = other118.__isset;
}
GrantRevokeRoleRequest& GrantRevokeRoleRequest::operator=(const GrantRevokeRoleRequest& other119) {
  requestType = other119.requestType;
  roleName = other119.roleName;
  principalName = other119.principalName;
  principalType = other119.principalType;
  grantor = other119.grantor;
  grantorType = other119.grantorType;
  grantOption = other119.grantOption;
  __isset = other119.__isset;
  return *this;
}
void GrantRevokeRoleRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GrantRevokeRoleRequest(";
  out << "requestType=" << to_string(requestType);
  out << ", " << "roleName=" << to_string(roleName);
  out << ", " << "principalName=" << to_string(principalName);
  out << ", " << "principalType=" << to_string(principalType);
  out << ", " << "grantor="; (__isset.grantor ? (out << to_string(grantor)) : (out << "<null>"));
  out << ", " << "grantorType="; (__isset.grantorType ? (out << to_string(grantorType)) : (out << "<null>"));
  out << ", " << "grantOption="; (__isset.grantOption ? (out << to_string(grantOption)) : (out << "<null>"));
  out << ")";
}


GrantRevokeRoleResponse::~GrantRevokeRoleResponse() throw() {
}


void GrantRevokeRoleResponse::__set_success(const bool val) {
  this->success = val;
__isset.success = true;
}

uint32_t GrantRevokeRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_BOOL) {
          xfer += iprot->readBool(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 GrantRevokeRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GrantRevokeRoleResponse");

  if (this->__isset.success) {
    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
    xfer += oprot->writeBool(this->success);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GrantRevokeRoleResponse &a, GrantRevokeRoleResponse &b) {
  using ::std::swap;
  swap(a.success, b.success);
  swap(a.__isset, b.__isset);
}

GrantRevokeRoleResponse::GrantRevokeRoleResponse(const GrantRevokeRoleResponse& other120) {
  success = other120.success;
  __isset = other120.__isset;
}
GrantRevokeRoleResponse& GrantRevokeRoleResponse::operator=(const GrantRevokeRoleResponse& other121) {
  success = other121.success;
  __isset = other121.__isset;
  return *this;
}
void GrantRevokeRoleResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GrantRevokeRoleResponse(";
  out << "success="; (__isset.success ? (out << to_string(success)) : (out << "<null>"));
  out << ")";
}


Database::~Database() throw() {
}


void Database::__set_name(const std::string& val) {
  this->name = val;
}

void Database::__set_description(const std::string& val) {
  this->description = val;
}

void Database::__set_locationUri(const std::string& val) {
  this->locationUri = val;
}

void Database::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void Database::__set_privileges(const PrincipalPrivilegeSet& val) {
  this->privileges = val;
__isset.privileges = true;
}

void Database::__set_ownerName(const std::string& val) {
  this->ownerName = val;
__isset.ownerName = true;
}

void Database::__set_ownerType(const PrincipalType::type val) {
  this->ownerType = val;
__isset.ownerType = true;
}

uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->name);
          this->__isset.name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->description);
          this->__isset.description = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->locationUri);
          this->__isset.locationUri = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size122;
            ::apache::thrift::protocol::TType _ktype123;
            ::apache::thrift::protocol::TType _vtype124;
            xfer += iprot->readMapBegin(_ktype123, _vtype124, _size122);
            uint32_t _i126;
            for (_i126 = 0; _i126 < _size122; ++_i126)
            {
              std::string _key127;
              xfer += iprot->readString(_key127);
              std::string& _val128 = this->parameters[_key127];
              xfer += iprot->readString(_val128);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->privileges.read(iprot);
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->ownerName);
          this->__isset.ownerName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast129;
          xfer += iprot->readI32(ecast129);
          this->ownerType = (PrincipalType::type)ecast129;
          this->__isset.ownerType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Database");

  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->description);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("locationUri", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->locationUri);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter130;
    for (_iter130 = this->parameters.begin(); _iter130 != this->parameters.end(); ++_iter130)
    {
      xfer += oprot->writeString(_iter130->first);
      xfer += oprot->writeString(_iter130->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.privileges) {
    xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 5);
    xfer += this->privileges.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.ownerName) {
    xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 6);
    xfer += oprot->writeString(this->ownerName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.ownerType) {
    xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 7);
    xfer += oprot->writeI32((int32_t)this->ownerType);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Database &a, Database &b) {
  using ::std::swap;
  swap(a.name, b.name);
  swap(a.description, b.description);
  swap(a.locationUri, b.locationUri);
  swap(a.parameters, b.parameters);
  swap(a.privileges, b.privileges);
  swap(a.ownerName, b.ownerName);
  swap(a.ownerType, b.ownerType);
  swap(a.__isset, b.__isset);
}

Database::Database(const Database& other131) {
  name = other131.name;
  description = other131.description;
  locationUri = other131.locationUri;
  parameters = other131.parameters;
  privileges = other131.privileges;
  ownerName = other131.ownerName;
  ownerType = other131.ownerType;
  __isset = other131.__isset;
}
Database& Database::operator=(const Database& other132) {
  name = other132.name;
  description = other132.description;
  locationUri = other132.locationUri;
  parameters = other132.parameters;
  privileges = other132.privileges;
  ownerName = other132.ownerName;
  ownerType = other132.ownerType;
  __isset = other132.__isset;
  return *this;
}
void Database::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Database(";
  out << "name=" << to_string(name);
  out << ", " << "description=" << to_string(description);
  out << ", " << "locationUri=" << to_string(locationUri);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "<null>"));
  out << ", " << "ownerName="; (__isset.ownerName ? (out << to_string(ownerName)) : (out << "<null>"));
  out << ", " << "ownerType="; (__isset.ownerType ? (out << to_string(ownerType)) : (out << "<null>"));
  out << ")";
}


SerDeInfo::~SerDeInfo() throw() {
}


void SerDeInfo::__set_name(const std::string& val) {
  this->name = val;
}

void SerDeInfo::__set_serializationLib(const std::string& val) {
  this->serializationLib = val;
}

void SerDeInfo::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->name);
          this->__isset.name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->serializationLib);
          this->__isset.serializationLib = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size133;
            ::apache::thrift::protocol::TType _ktype134;
            ::apache::thrift::protocol::TType _vtype135;
            xfer += iprot->readMapBegin(_ktype134, _vtype135, _size133);
            uint32_t _i137;
            for (_i137 = 0; _i137 < _size133; ++_i137)
            {
              std::string _key138;
              xfer += iprot->readString(_key138);
              std::string& _val139 = this->parameters[_key138];
              xfer += iprot->readString(_val139);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("SerDeInfo");

  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("serializationLib", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->serializationLib);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter140;
    for (_iter140 = this->parameters.begin(); _iter140 != this->parameters.end(); ++_iter140)
    {
      xfer += oprot->writeString(_iter140->first);
      xfer += oprot->writeString(_iter140->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(SerDeInfo &a, SerDeInfo &b) {
  using ::std::swap;
  swap(a.name, b.name);
  swap(a.serializationLib, b.serializationLib);
  swap(a.parameters, b.parameters);
  swap(a.__isset, b.__isset);
}

SerDeInfo::SerDeInfo(const SerDeInfo& other141) {
  name = other141.name;
  serializationLib = other141.serializationLib;
  parameters = other141.parameters;
  __isset = other141.__isset;
}
SerDeInfo& SerDeInfo::operator=(const SerDeInfo& other142) {
  name = other142.name;
  serializationLib = other142.serializationLib;
  parameters = other142.parameters;
  __isset = other142.__isset;
  return *this;
}
void SerDeInfo::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "SerDeInfo(";
  out << "name=" << to_string(name);
  out << ", " << "serializationLib=" << to_string(serializationLib);
  out << ", " << "parameters=" << to_string(parameters);
  out << ")";
}


Order::~Order() throw() {
}


void Order::__set_col(const std::string& val) {
  this->col = val;
}

void Order::__set_order(const int32_t val) {
  this->order = val;
}

uint32_t Order::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->col);
          this->__isset.col = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->order);
          this->__isset.order = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Order");

  xfer += oprot->writeFieldBegin("col", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->col);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32(this->order);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Order &a, Order &b) {
  using ::std::swap;
  swap(a.col, b.col);
  swap(a.order, b.order);
  swap(a.__isset, b.__isset);
}

Order::Order(const Order& other143) {
  col = other143.col;
  order = other143.order;
  __isset = other143.__isset;
}
Order& Order::operator=(const Order& other144) {
  col = other144.col;
  order = other144.order;
  __isset = other144.__isset;
  return *this;
}
void Order::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Order(";
  out << "col=" << to_string(col);
  out << ", " << "order=" << to_string(order);
  out << ")";
}


SkewedInfo::~SkewedInfo() throw() {
}


void SkewedInfo::__set_skewedColNames(const std::vector<std::string> & val) {
  this->skewedColNames = val;
}

void SkewedInfo::__set_skewedColValues(const std::vector<std::vector<std::string> > & val) {
  this->skewedColValues = val;
}

void SkewedInfo::__set_skewedColValueLocationMaps(const std::map<std::vector<std::string> , std::string> & val) {
  this->skewedColValueLocationMaps = val;
}

uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->skewedColNames.clear();
            uint32_t _size145;
            ::apache::thrift::protocol::TType _etype148;
            xfer += iprot->readListBegin(_etype148, _size145);
            this->skewedColNames.resize(_size145);
            uint32_t _i149;
            for (_i149 = 0; _i149 < _size145; ++_i149)
            {
              xfer += iprot->readString(this->skewedColNames[_i149]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.skewedColNames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->skewedColValues.clear();
            uint32_t _size150;
            ::apache::thrift::protocol::TType _etype153;
            xfer += iprot->readListBegin(_etype153, _size150);
            this->skewedColValues.resize(_size150);
            uint32_t _i154;
            for (_i154 = 0; _i154 < _size150; ++_i154)
            {
              {
                this->skewedColValues[_i154].clear();
                uint32_t _size155;
                ::apache::thrift::protocol::TType _etype158;
                xfer += iprot->readListBegin(_etype158, _size155);
                this->skewedColValues[_i154].resize(_size155);
                uint32_t _i159;
                for (_i159 = 0; _i159 < _size155; ++_i159)
                {
                  xfer += iprot->readString(this->skewedColValues[_i154][_i159]);
                }
                xfer += iprot->readListEnd();
              }
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.skewedColValues = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->skewedColValueLocationMaps.clear();
            uint32_t _size160;
            ::apache::thrift::protocol::TType _ktype161;
            ::apache::thrift::protocol::TType _vtype162;
            xfer += iprot->readMapBegin(_ktype161, _vtype162, _size160);
            uint32_t _i164;
            for (_i164 = 0; _i164 < _size160; ++_i164)
            {
              std::vector<std::string>  _key165;
              {
                _key165.clear();
                uint32_t _size167;
                ::apache::thrift::protocol::TType _etype170;
                xfer += iprot->readListBegin(_etype170, _size167);
                _key165.resize(_size167);
                uint32_t _i171;
                for (_i171 = 0; _i171 < _size167; ++_i171)
                {
                  xfer += iprot->readString(_key165[_i171]);
                }
                xfer += iprot->readListEnd();
              }
              std::string& _val166 = this->skewedColValueLocationMaps[_key165];
              xfer += iprot->readString(_val166);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.skewedColValueLocationMaps = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("SkewedInfo");

  xfer += oprot->writeFieldBegin("skewedColNames", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->skewedColNames.size()));
    std::vector<std::string> ::const_iterator _iter172;
    for (_iter172 = this->skewedColNames.begin(); _iter172 != this->skewedColNames.end(); ++_iter172)
    {
      xfer += oprot->writeString((*_iter172));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("skewedColValues", ::apache::thrift::protocol::T_LIST, 2);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->skewedColValues.size()));
    std::vector<std::vector<std::string> > ::const_iterator _iter173;
    for (_iter173 = this->skewedColValues.begin(); _iter173 != this->skewedColValues.end(); ++_iter173)
    {
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*_iter173).size()));
        std::vector<std::string> ::const_iterator _iter174;
        for (_iter174 = (*_iter173).begin(); _iter174 != (*_iter173).end(); ++_iter174)
        {
          xfer += oprot->writeString((*_iter174));
        }
        xfer += oprot->writeListEnd();
      }
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("skewedColValueLocationMaps", ::apache::thrift::protocol::T_MAP, 3);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_LIST, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->skewedColValueLocationMaps.size()));
    std::map<std::vector<std::string> , std::string> ::const_iterator _iter175;
    for (_iter175 = this->skewedColValueLocationMaps.begin(); _iter175 != this->skewedColValueLocationMaps.end(); ++_iter175)
    {
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(_iter175->first.size()));
        std::vector<std::string> ::const_iterator _iter176;
        for (_iter176 = _iter175->first.begin(); _iter176 != _iter175->first.end(); ++_iter176)
        {
          xfer += oprot->writeString((*_iter176));
        }
        xfer += oprot->writeListEnd();
      }
      xfer += oprot->writeString(_iter175->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(SkewedInfo &a, SkewedInfo &b) {
  using ::std::swap;
  swap(a.skewedColNames, b.skewedColNames);
  swap(a.skewedColValues, b.skewedColValues);
  swap(a.skewedColValueLocationMaps, b.skewedColValueLocationMaps);
  swap(a.__isset, b.__isset);
}

SkewedInfo::SkewedInfo(const SkewedInfo& other177) {
  skewedColNames = other177.skewedColNames;
  skewedColValues = other177.skewedColValues;
  skewedColValueLocationMaps = other177.skewedColValueLocationMaps;
  __isset = other177.__isset;
}
SkewedInfo& SkewedInfo::operator=(const SkewedInfo& other178) {
  skewedColNames = other178.skewedColNames;
  skewedColValues = other178.skewedColValues;
  skewedColValueLocationMaps = other178.skewedColValueLocationMaps;
  __isset = other178.__isset;
  return *this;
}
void SkewedInfo::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "SkewedInfo(";
  out << "skewedColNames=" << to_string(skewedColNames);
  out << ", " << "skewedColValues=" << to_string(skewedColValues);
  out << ", " << "skewedColValueLocationMaps=" << to_string(skewedColValueLocationMaps);
  out << ")";
}


StorageDescriptor::~StorageDescriptor() throw() {
}


void StorageDescriptor::__set_cols(const std::vector<FieldSchema> & val) {
  this->cols = val;
}

void StorageDescriptor::__set_location(const std::string& val) {
  this->location = val;
}

void StorageDescriptor::__set_inputFormat(const std::string& val) {
  this->inputFormat = val;
}

void StorageDescriptor::__set_outputFormat(const std::string& val) {
  this->outputFormat = val;
}

void StorageDescriptor::__set_compressed(const bool val) {
  this->compressed = val;
}

void StorageDescriptor::__set_numBuckets(const int32_t val) {
  this->numBuckets = val;
}

void StorageDescriptor::__set_serdeInfo(const SerDeInfo& val) {
  this->serdeInfo = val;
}

void StorageDescriptor::__set_bucketCols(const std::vector<std::string> & val) {
  this->bucketCols = val;
}

void StorageDescriptor::__set_sortCols(const std::vector<Order> & val) {
  this->sortCols = val;
}

void StorageDescriptor::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void StorageDescriptor::__set_skewedInfo(const SkewedInfo& val) {
  this->skewedInfo = val;
__isset.skewedInfo = true;
}

void StorageDescriptor::__set_storedAsSubDirectories(const bool val) {
  this->storedAsSubDirectories = val;
__isset.storedAsSubDirectories = true;
}

uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->cols.clear();
            uint32_t _size179;
            ::apache::thrift::protocol::TType _etype182;
            xfer += iprot->readListBegin(_etype182, _size179);
            this->cols.resize(_size179);
            uint32_t _i183;
            for (_i183 = 0; _i183 < _size179; ++_i183)
            {
              xfer += this->cols[_i183].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.cols = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->location);
          this->__isset.location = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->inputFormat);
          this->__isset.inputFormat = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->outputFormat);
          this->__isset.outputFormat = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->compressed);
          this->__isset.compressed = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->numBuckets);
          this->__isset.numBuckets = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->serdeInfo.read(iprot);
          this->__isset.serdeInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->bucketCols.clear();
            uint32_t _size184;
            ::apache::thrift::protocol::TType _etype187;
            xfer += iprot->readListBegin(_etype187, _size184);
            this->bucketCols.resize(_size184);
            uint32_t _i188;
            for (_i188 = 0; _i188 < _size184; ++_i188)
            {
              xfer += iprot->readString(this->bucketCols[_i188]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.bucketCols = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->sortCols.clear();
            uint32_t _size189;
            ::apache::thrift::protocol::TType _etype192;
            xfer += iprot->readListBegin(_etype192, _size189);
            this->sortCols.resize(_size189);
            uint32_t _i193;
            for (_i193 = 0; _i193 < _size189; ++_i193)
            {
              xfer += this->sortCols[_i193].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.sortCols = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size194;
            ::apache::thrift::protocol::TType _ktype195;
            ::apache::thrift::protocol::TType _vtype196;
            xfer += iprot->readMapBegin(_ktype195, _vtype196, _size194);
            uint32_t _i198;
            for (_i198 = 0; _i198 < _size194; ++_i198)
            {
              std::string _key199;
              xfer += iprot->readString(_key199);
              std::string& _val200 = this->parameters[_key199];
              xfer += iprot->readString(_val200);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 11:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->skewedInfo.read(iprot);
          this->__isset.skewedInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 12:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->storedAsSubDirectories);
          this->__isset.storedAsSubDirectories = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("StorageDescriptor");

  xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->cols.size()));
    std::vector<FieldSchema> ::const_iterator _iter201;
    for (_iter201 = this->cols.begin(); _iter201 != this->cols.end(); ++_iter201)
    {
      xfer += (*_iter201).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("location", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->location);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("inputFormat", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->inputFormat);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("outputFormat", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->outputFormat);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("compressed", ::apache::thrift::protocol::T_BOOL, 5);
  xfer += oprot->writeBool(this->compressed);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numBuckets", ::apache::thrift::protocol::T_I32, 6);
  xfer += oprot->writeI32(this->numBuckets);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("serdeInfo", ::apache::thrift::protocol::T_STRUCT, 7);
  xfer += this->serdeInfo.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->bucketCols.size()));
    std::vector<std::string> ::const_iterator _iter202;
    for (_iter202 = this->bucketCols.begin(); _iter202 != this->bucketCols.end(); ++_iter202)
    {
      xfer += oprot->writeString((*_iter202));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->sortCols.size()));
    std::vector<Order> ::const_iterator _iter203;
    for (_iter203 = this->sortCols.begin(); _iter203 != this->sortCols.end(); ++_iter203)
    {
      xfer += (*_iter203).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter204;
    for (_iter204 = this->parameters.begin(); _iter204 != this->parameters.end(); ++_iter204)
    {
      xfer += oprot->writeString(_iter204->first);
      xfer += oprot->writeString(_iter204->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.skewedInfo) {
    xfer += oprot->writeFieldBegin("skewedInfo", ::apache::thrift::protocol::T_STRUCT, 11);
    xfer += this->skewedInfo.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.storedAsSubDirectories) {
    xfer += oprot->writeFieldBegin("storedAsSubDirectories", ::apache::thrift::protocol::T_BOOL, 12);
    xfer += oprot->writeBool(this->storedAsSubDirectories);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(StorageDescriptor &a, StorageDescriptor &b) {
  using ::std::swap;
  swap(a.cols, b.cols);
  swap(a.location, b.location);
  swap(a.inputFormat, b.inputFormat);
  swap(a.outputFormat, b.outputFormat);
  swap(a.compressed, b.compressed);
  swap(a.numBuckets, b.numBuckets);
  swap(a.serdeInfo, b.serdeInfo);
  swap(a.bucketCols, b.bucketCols);
  swap(a.sortCols, b.sortCols);
  swap(a.parameters, b.parameters);
  swap(a.skewedInfo, b.skewedInfo);
  swap(a.storedAsSubDirectories, b.storedAsSubDirectories);
  swap(a.__isset, b.__isset);
}

StorageDescriptor::StorageDescriptor(const StorageDescriptor& other205) {
  cols = other205.cols;
  location = other205.location;
  inputFormat = other205.inputFormat;
  outputFormat = other205.outputFormat;
  compressed = other205.compressed;
  numBuckets = other205.numBuckets;
  serdeInfo = other205.serdeInfo;
  bucketCols = other205.bucketCols;
  sortCols = other205.sortCols;
  parameters = other205.parameters;
  skewedInfo = other205.skewedInfo;
  storedAsSubDirectories = other205.storedAsSubDirectories;
  __isset = other205.__isset;
}
StorageDescriptor& StorageDescriptor::operator=(const StorageDescriptor& other206) {
  cols = other206.cols;
  location = other206.location;
  inputFormat = other206.inputFormat;
  outputFormat = other206.outputFormat;
  compressed = other206.compressed;
  numBuckets = other206.numBuckets;
  serdeInfo = other206.serdeInfo;
  bucketCols = other206.bucketCols;
  sortCols = other206.sortCols;
  parameters = other206.parameters;
  skewedInfo = other206.skewedInfo;
  storedAsSubDirectories = other206.storedAsSubDirectories;
  __isset = other206.__isset;
  return *this;
}
void StorageDescriptor::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "StorageDescriptor(";
  out << "cols=" << to_string(cols);
  out << ", " << "location=" << to_string(location);
  out << ", " << "inputFormat=" << to_string(inputFormat);
  out << ", " << "outputFormat=" << to_string(outputFormat);
  out << ", " << "compressed=" << to_string(compressed);
  out << ", " << "numBuckets=" << to_string(numBuckets);
  out << ", " << "serdeInfo=" << to_string(serdeInfo);
  out << ", " << "bucketCols=" << to_string(bucketCols);
  out << ", " << "sortCols=" << to_string(sortCols);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "skewedInfo="; (__isset.skewedInfo ? (out << to_string(skewedInfo)) : (out << "<null>"));
  out << ", " << "storedAsSubDirectories="; (__isset.storedAsSubDirectories ? (out << to_string(storedAsSubDirectories)) : (out << "<null>"));
  out << ")";
}


Table::~Table() throw() {
}


void Table::__set_tableName(const std::string& val) {
  this->tableName = val;
}

void Table::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void Table::__set_owner(const std::string& val) {
  this->owner = val;
}

void Table::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void Table::__set_lastAccessTime(const int32_t val) {
  this->lastAccessTime = val;
}

void Table::__set_retention(const int32_t val) {
  this->retention = val;
}

void Table::__set_sd(const StorageDescriptor& val) {
  this->sd = val;
}

void Table::__set_partitionKeys(const std::vector<FieldSchema> & val) {
  this->partitionKeys = val;
}

void Table::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void Table::__set_viewOriginalText(const std::string& val) {
  this->viewOriginalText = val;
}

void Table::__set_viewExpandedText(const std::string& val) {
  this->viewExpandedText = val;
}

void Table::__set_tableType(const std::string& val) {
  this->tableType = val;
}

void Table::__set_privileges(const PrincipalPrivilegeSet& val) {
  this->privileges = val;
__isset.privileges = true;
}

void Table::__set_temporary(const bool val) {
  this->temporary = val;
__isset.temporary = true;
}

void Table::__set_rewriteEnabled(const bool val) {
  this->rewriteEnabled = val;
__isset.rewriteEnabled = true;
}

uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->tableName);
          this->__isset.tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->owner);
          this->__isset.owner = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->lastAccessTime);
          this->__isset.lastAccessTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->retention);
          this->__isset.retention = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->sd.read(iprot);
          this->__isset.sd = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partitionKeys.clear();
            uint32_t _size207;
            ::apache::thrift::protocol::TType _etype210;
            xfer += iprot->readListBegin(_etype210, _size207);
            this->partitionKeys.resize(_size207);
            uint32_t _i211;
            for (_i211 = 0; _i211 < _size207; ++_i211)
            {
              xfer += this->partitionKeys[_i211].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitionKeys = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size212;
            ::apache::thrift::protocol::TType _ktype213;
            ::apache::thrift::protocol::TType _vtype214;
            xfer += iprot->readMapBegin(_ktype213, _vtype214, _size212);
            uint32_t _i216;
            for (_i216 = 0; _i216 < _size212; ++_i216)
            {
              std::string _key217;
              xfer += iprot->readString(_key217);
              std::string& _val218 = this->parameters[_key217];
              xfer += iprot->readString(_val218);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->viewOriginalText);
          this->__isset.viewOriginalText = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 11:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->viewExpandedText);
          this->__isset.viewExpandedText = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 12:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableType);
          this->__isset.tableType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 13:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->privileges.read(iprot);
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 14:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->temporary);
          this->__isset.temporary = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 15:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->rewriteEnabled);
          this->__isset.rewriteEnabled = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Table");

  xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->tableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->owner);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32(this->lastAccessTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("retention", ::apache::thrift::protocol::T_I32, 6);
  xfer += oprot->writeI32(this->retention);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 7);
  xfer += this->sd.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitionKeys.size()));
    std::vector<FieldSchema> ::const_iterator _iter219;
    for (_iter219 = this->partitionKeys.begin(); _iter219 != this->partitionKeys.end(); ++_iter219)
    {
      xfer += (*_iter219).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter220;
    for (_iter220 = this->parameters.begin(); _iter220 != this->parameters.end(); ++_iter220)
    {
      xfer += oprot->writeString(_iter220->first);
      xfer += oprot->writeString(_iter220->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("viewOriginalText", ::apache::thrift::protocol::T_STRING, 10);
  xfer += oprot->writeString(this->viewOriginalText);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("viewExpandedText", ::apache::thrift::protocol::T_STRING, 11);
  xfer += oprot->writeString(this->viewExpandedText);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12);
  xfer += oprot->writeString(this->tableType);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.privileges) {
    xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 13);
    xfer += this->privileges.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.temporary) {
    xfer += oprot->writeFieldBegin("temporary", ::apache::thrift::protocol::T_BOOL, 14);
    xfer += oprot->writeBool(this->temporary);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.rewriteEnabled) {
    xfer += oprot->writeFieldBegin("rewriteEnabled", ::apache::thrift::protocol::T_BOOL, 15);
    xfer += oprot->writeBool(this->rewriteEnabled);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Table &a, Table &b) {
  using ::std::swap;
  swap(a.tableName, b.tableName);
  swap(a.dbName, b.dbName);
  swap(a.owner, b.owner);
  swap(a.createTime, b.createTime);
  swap(a.lastAccessTime, b.lastAccessTime);
  swap(a.retention, b.retention);
  swap(a.sd, b.sd);
  swap(a.partitionKeys, b.partitionKeys);
  swap(a.parameters, b.parameters);
  swap(a.viewOriginalText, b.viewOriginalText);
  swap(a.viewExpandedText, b.viewExpandedText);
  swap(a.tableType, b.tableType);
  swap(a.privileges, b.privileges);
  swap(a.temporary, b.temporary);
  swap(a.rewriteEnabled, b.rewriteEnabled);
  swap(a.__isset, b.__isset);
}

Table::Table(const Table& other221) {
  tableName = other221.tableName;
  dbName = other221.dbName;
  owner = other221.owner;
  createTime = other221.createTime;
  lastAccessTime = other221.lastAccessTime;
  retention = other221.retention;
  sd = other221.sd;
  partitionKeys = other221.partitionKeys;
  parameters = other221.parameters;
  viewOriginalText = other221.viewOriginalText;
  viewExpandedText = other221.viewExpandedText;
  tableType = other221.tableType;
  privileges = other221.privileges;
  temporary = other221.temporary;
  rewriteEnabled = other221.rewriteEnabled;
  __isset = other221.__isset;
}
Table& Table::operator=(const Table& other222) {
  tableName = other222.tableName;
  dbName = other222.dbName;
  owner = other222.owner;
  createTime = other222.createTime;
  lastAccessTime = other222.lastAccessTime;
  retention = other222.retention;
  sd = other222.sd;
  partitionKeys = other222.partitionKeys;
  parameters = other222.parameters;
  viewOriginalText = other222.viewOriginalText;
  viewExpandedText = other222.viewExpandedText;
  tableType = other222.tableType;
  privileges = other222.privileges;
  temporary = other222.temporary;
  rewriteEnabled = other222.rewriteEnabled;
  __isset = other222.__isset;
  return *this;
}
void Table::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Table(";
  out << "tableName=" << to_string(tableName);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "owner=" << to_string(owner);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "lastAccessTime=" << to_string(lastAccessTime);
  out << ", " << "retention=" << to_string(retention);
  out << ", " << "sd=" << to_string(sd);
  out << ", " << "partitionKeys=" << to_string(partitionKeys);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "viewOriginalText=" << to_string(viewOriginalText);
  out << ", " << "viewExpandedText=" << to_string(viewExpandedText);
  out << ", " << "tableType=" << to_string(tableType);
  out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "<null>"));
  out << ", " << "temporary="; (__isset.temporary ? (out << to_string(temporary)) : (out << "<null>"));
  out << ", " << "rewriteEnabled="; (__isset.rewriteEnabled ? (out << to_string(rewriteEnabled)) : (out << "<null>"));
  out << ")";
}


Partition::~Partition() throw() {
}


void Partition::__set_values(const std::vector<std::string> & val) {
  this->values = val;
}

void Partition::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void Partition::__set_tableName(const std::string& val) {
  this->tableName = val;
}

void Partition::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void Partition::__set_lastAccessTime(const int32_t val) {
  this->lastAccessTime = val;
}

void Partition::__set_sd(const StorageDescriptor& val) {
  this->sd = val;
}

void Partition::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void Partition::__set_privileges(const PrincipalPrivilegeSet& val) {
  this->privileges = val;
__isset.privileges = true;
}

uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->values.clear();
            uint32_t _size223;
            ::apache::thrift::protocol::TType _etype226;
            xfer += iprot->readListBegin(_etype226, _size223);
            this->values.resize(_size223);
            uint32_t _i227;
            for (_i227 = 0; _i227 < _size223; ++_i227)
            {
              xfer += iprot->readString(this->values[_i227]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.values = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          this->__isset.tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->lastAccessTime);
          this->__isset.lastAccessTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->sd.read(iprot);
          this->__isset.sd = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size228;
            ::apache::thrift::protocol::TType _ktype229;
            ::apache::thrift::protocol::TType _vtype230;
            xfer += iprot->readMapBegin(_ktype229, _vtype230, _size228);
            uint32_t _i232;
            for (_i232 = 0; _i232 < _size228; ++_i232)
            {
              std::string _key233;
              xfer += iprot->readString(_key233);
              std::string& _val234 = this->parameters[_key233];
              xfer += iprot->readString(_val234);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->privileges.read(iprot);
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Partition");

  xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->values.size()));
    std::vector<std::string> ::const_iterator _iter235;
    for (_iter235 = this->values.begin(); _iter235 != this->values.end(); ++_iter235)
    {
      xfer += oprot->writeString((*_iter235));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->tableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32(this->lastAccessTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 6);
  xfer += this->sd.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter236;
    for (_iter236 = this->parameters.begin(); _iter236 != this->parameters.end(); ++_iter236)
    {
      xfer += oprot->writeString(_iter236->first);
      xfer += oprot->writeString(_iter236->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.privileges) {
    xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 8);
    xfer += this->privileges.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Partition &a, Partition &b) {
  using ::std::swap;
  swap(a.values, b.values);
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.createTime, b.createTime);
  swap(a.lastAccessTime, b.lastAccessTime);
  swap(a.sd, b.sd);
  swap(a.parameters, b.parameters);
  swap(a.privileges, b.privileges);
  swap(a.__isset, b.__isset);
}

Partition::Partition(const Partition& other237) {
  values = other237.values;
  dbName = other237.dbName;
  tableName = other237.tableName;
  createTime = other237.createTime;
  lastAccessTime = other237.lastAccessTime;
  sd = other237.sd;
  parameters = other237.parameters;
  privileges = other237.privileges;
  __isset = other237.__isset;
}
Partition& Partition::operator=(const Partition& other238) {
  values = other238.values;
  dbName = other238.dbName;
  tableName = other238.tableName;
  createTime = other238.createTime;
  lastAccessTime = other238.lastAccessTime;
  sd = other238.sd;
  parameters = other238.parameters;
  privileges = other238.privileges;
  __isset = other238.__isset;
  return *this;
}
void Partition::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Partition(";
  out << "values=" << to_string(values);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "tableName=" << to_string(tableName);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "lastAccessTime=" << to_string(lastAccessTime);
  out << ", " << "sd=" << to_string(sd);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "<null>"));
  out << ")";
}


PartitionWithoutSD::~PartitionWithoutSD() throw() {
}


void PartitionWithoutSD::__set_values(const std::vector<std::string> & val) {
  this->values = val;
}

void PartitionWithoutSD::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void PartitionWithoutSD::__set_lastAccessTime(const int32_t val) {
  this->lastAccessTime = val;
}

void PartitionWithoutSD::__set_relativePath(const std::string& val) {
  this->relativePath = val;
}

void PartitionWithoutSD::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void PartitionWithoutSD::__set_privileges(const PrincipalPrivilegeSet& val) {
  this->privileges = val;
__isset.privileges = true;
}

uint32_t PartitionWithoutSD::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->values.clear();
            uint32_t _size239;
            ::apache::thrift::protocol::TType _etype242;
            xfer += iprot->readListBegin(_etype242, _size239);
            this->values.resize(_size239);
            uint32_t _i243;
            for (_i243 = 0; _i243 < _size239; ++_i243)
            {
              xfer += iprot->readString(this->values[_i243]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.values = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->lastAccessTime);
          this->__isset.lastAccessTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->relativePath);
          this->__isset.relativePath = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size244;
            ::apache::thrift::protocol::TType _ktype245;
            ::apache::thrift::protocol::TType _vtype246;
            xfer += iprot->readMapBegin(_ktype245, _vtype246, _size244);
            uint32_t _i248;
            for (_i248 = 0; _i248 < _size244; ++_i248)
            {
              std::string _key249;
              xfer += iprot->readString(_key249);
              std::string& _val250 = this->parameters[_key249];
              xfer += iprot->readString(_val250);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->privileges.read(iprot);
          this->__isset.privileges = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PartitionWithoutSD::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionWithoutSD");

  xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->values.size()));
    std::vector<std::string> ::const_iterator _iter251;
    for (_iter251 = this->values.begin(); _iter251 != this->values.end(); ++_iter251)
    {
      xfer += oprot->writeString((*_iter251));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 3);
  xfer += oprot->writeI32(this->lastAccessTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("relativePath", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->relativePath);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 5);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter252;
    for (_iter252 = this->parameters.begin(); _iter252 != this->parameters.end(); ++_iter252)
    {
      xfer += oprot->writeString(_iter252->first);
      xfer += oprot->writeString(_iter252->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.privileges) {
    xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 6);
    xfer += this->privileges.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionWithoutSD &a, PartitionWithoutSD &b) {
  using ::std::swap;
  swap(a.values, b.values);
  swap(a.createTime, b.createTime);
  swap(a.lastAccessTime, b.lastAccessTime);
  swap(a.relativePath, b.relativePath);
  swap(a.parameters, b.parameters);
  swap(a.privileges, b.privileges);
  swap(a.__isset, b.__isset);
}

PartitionWithoutSD::PartitionWithoutSD(const PartitionWithoutSD& other253) {
  values = other253.values;
  createTime = other253.createTime;
  lastAccessTime = other253.lastAccessTime;
  relativePath = other253.relativePath;
  parameters = other253.parameters;
  privileges = other253.privileges;
  __isset = other253.__isset;
}
PartitionWithoutSD& PartitionWithoutSD::operator=(const PartitionWithoutSD& other254) {
  values = other254.values;
  createTime = other254.createTime;
  lastAccessTime = other254.lastAccessTime;
  relativePath = other254.relativePath;
  parameters = other254.parameters;
  privileges = other254.privileges;
  __isset = other254.__isset;
  return *this;
}
void PartitionWithoutSD::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionWithoutSD(";
  out << "values=" << to_string(values);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "lastAccessTime=" << to_string(lastAccessTime);
  out << ", " << "relativePath=" << to_string(relativePath);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "<null>"));
  out << ")";
}


PartitionSpecWithSharedSD::~PartitionSpecWithSharedSD() throw() {
}


void PartitionSpecWithSharedSD::__set_partitions(const std::vector<PartitionWithoutSD> & val) {
  this->partitions = val;
}

void PartitionSpecWithSharedSD::__set_sd(const StorageDescriptor& val) {
  this->sd = val;
}

uint32_t PartitionSpecWithSharedSD::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->partitions.clear();
            uint32_t _size255;
            ::apache::thrift::protocol::TType _etype258;
            xfer += iprot->readListBegin(_etype258, _size255);
            this->partitions.resize(_size255);
            uint32_t _i259;
            for (_i259 = 0; _i259 < _size255; ++_i259)
            {
              xfer += this->partitions[_i259].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->sd.read(iprot);
          this->__isset.sd = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PartitionSpecWithSharedSD::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionSpecWithSharedSD");

  xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
    std::vector<PartitionWithoutSD> ::const_iterator _iter260;
    for (_iter260 = this->partitions.begin(); _iter260 != this->partitions.end(); ++_iter260)
    {
      xfer += (*_iter260).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 2);
  xfer += this->sd.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionSpecWithSharedSD &a, PartitionSpecWithSharedSD &b) {
  using ::std::swap;
  swap(a.partitions, b.partitions);
  swap(a.sd, b.sd);
  swap(a.__isset, b.__isset);
}

PartitionSpecWithSharedSD::PartitionSpecWithSharedSD(const PartitionSpecWithSharedSD& other261) {
  partitions = other261.partitions;
  sd = other261.sd;
  __isset = other261.__isset;
}
PartitionSpecWithSharedSD& PartitionSpecWithSharedSD::operator=(const PartitionSpecWithSharedSD& other262) {
  partitions = other262.partitions;
  sd = other262.sd;
  __isset = other262.__isset;
  return *this;
}
void PartitionSpecWithSharedSD::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionSpecWithSharedSD(";
  out << "partitions=" << to_string(partitions);
  out << ", " << "sd=" << to_string(sd);
  out << ")";
}


PartitionListComposingSpec::~PartitionListComposingSpec() throw() {
}


void PartitionListComposingSpec::__set_partitions(const std::vector<Partition> & val) {
  this->partitions = val;
}

uint32_t PartitionListComposingSpec::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->partitions.clear();
            uint32_t _size263;
            ::apache::thrift::protocol::TType _etype266;
            xfer += iprot->readListBegin(_etype266, _size263);
            this->partitions.resize(_size263);
            uint32_t _i267;
            for (_i267 = 0; _i267 < _size263; ++_i267)
            {
              xfer += this->partitions[_i267].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PartitionListComposingSpec::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionListComposingSpec");

  xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
    std::vector<Partition> ::const_iterator _iter268;
    for (_iter268 = this->partitions.begin(); _iter268 != this->partitions.end(); ++_iter268)
    {
      xfer += (*_iter268).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionListComposingSpec &a, PartitionListComposingSpec &b) {
  using ::std::swap;
  swap(a.partitions, b.partitions);
  swap(a.__isset, b.__isset);
}

PartitionListComposingSpec::PartitionListComposingSpec(const PartitionListComposingSpec& other269) {
  partitions = other269.partitions;
  __isset = other269.__isset;
}
PartitionListComposingSpec& PartitionListComposingSpec::operator=(const PartitionListComposingSpec& other270) {
  partitions = other270.partitions;
  __isset = other270.__isset;
  return *this;
}
void PartitionListComposingSpec::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionListComposingSpec(";
  out << "partitions=" << to_string(partitions);
  out << ")";
}


PartitionSpec::~PartitionSpec() throw() {
}


void PartitionSpec::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void PartitionSpec::__set_tableName(const std::string& val) {
  this->tableName = val;
}

void PartitionSpec::__set_rootPath(const std::string& val) {
  this->rootPath = val;
}

void PartitionSpec::__set_sharedSDPartitionSpec(const PartitionSpecWithSharedSD& val) {
  this->sharedSDPartitionSpec = val;
__isset.sharedSDPartitionSpec = true;
}

void PartitionSpec::__set_partitionList(const PartitionListComposingSpec& val) {
  this->partitionList = val;
__isset.partitionList = true;
}

uint32_t PartitionSpec::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          this->__isset.tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->rootPath);
          this->__isset.rootPath = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->sharedSDPartitionSpec.read(iprot);
          this->__isset.sharedSDPartitionSpec = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->partitionList.read(iprot);
          this->__isset.partitionList = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PartitionSpec::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionSpec");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("rootPath", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->rootPath);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.sharedSDPartitionSpec) {
    xfer += oprot->writeFieldBegin("sharedSDPartitionSpec", ::apache::thrift::protocol::T_STRUCT, 4);
    xfer += this->sharedSDPartitionSpec.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.partitionList) {
    xfer += oprot->writeFieldBegin("partitionList", ::apache::thrift::protocol::T_STRUCT, 5);
    xfer += this->partitionList.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionSpec &a, PartitionSpec &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.rootPath, b.rootPath);
  swap(a.sharedSDPartitionSpec, b.sharedSDPartitionSpec);
  swap(a.partitionList, b.partitionList);
  swap(a.__isset, b.__isset);
}

PartitionSpec::PartitionSpec(const PartitionSpec& other271) {
  dbName = other271.dbName;
  tableName = other271.tableName;
  rootPath = other271.rootPath;
  sharedSDPartitionSpec = other271.sharedSDPartitionSpec;
  partitionList = other271.partitionList;
  __isset = other271.__isset;
}
PartitionSpec& PartitionSpec::operator=(const PartitionSpec& other272) {
  dbName = other272.dbName;
  tableName = other272.tableName;
  rootPath = other272.rootPath;
  sharedSDPartitionSpec = other272.sharedSDPartitionSpec;
  partitionList = other272.partitionList;
  __isset = other272.__isset;
  return *this;
}
void PartitionSpec::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionSpec(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tableName=" << to_string(tableName);
  out << ", " << "rootPath=" << to_string(rootPath);
  out << ", " << "sharedSDPartitionSpec="; (__isset.sharedSDPartitionSpec ? (out << to_string(sharedSDPartitionSpec)) : (out << "<null>"));
  out << ", " << "partitionList="; (__isset.partitionList ? (out << to_string(partitionList)) : (out << "<null>"));
  out << ")";
}


Index::~Index() throw() {
}


void Index::__set_indexName(const std::string& val) {
  this->indexName = val;
}

void Index::__set_indexHandlerClass(const std::string& val) {
  this->indexHandlerClass = val;
}

void Index::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void Index::__set_origTableName(const std::string& val) {
  this->origTableName = val;
}

void Index::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void Index::__set_lastAccessTime(const int32_t val) {
  this->lastAccessTime = val;
}

void Index::__set_indexTableName(const std::string& val) {
  this->indexTableName = val;
}

void Index::__set_sd(const StorageDescriptor& val) {
  this->sd = val;
}

void Index::__set_parameters(const std::map<std::string, std::string> & val) {
  this->parameters = val;
}

void Index::__set_deferredRebuild(const bool val) {
  this->deferredRebuild = val;
}

uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->indexName);
          this->__isset.indexName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->indexHandlerClass);
          this->__isset.indexHandlerClass = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->origTableName);
          this->__isset.origTableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->lastAccessTime);
          this->__isset.lastAccessTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->indexTableName);
          this->__isset.indexTableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->sd.read(iprot);
          this->__isset.sd = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->parameters.clear();
            uint32_t _size273;
            ::apache::thrift::protocol::TType _ktype274;
            ::apache::thrift::protocol::TType _vtype275;
            xfer += iprot->readMapBegin(_ktype274, _vtype275, _size273);
            uint32_t _i277;
            for (_i277 = 0; _i277 < _size273; ++_i277)
            {
              std::string _key278;
              xfer += iprot->readString(_key278);
              std::string& _val279 = this->parameters[_key278];
              xfer += iprot->readString(_val279);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.parameters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->deferredRebuild);
          this->__isset.deferredRebuild = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Index");

  xfer += oprot->writeFieldBegin("indexName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->indexName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("indexHandlerClass", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->indexHandlerClass);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("origTableName", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->origTableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 6);
  xfer += oprot->writeI32(this->lastAccessTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("indexTableName", ::apache::thrift::protocol::T_STRING, 7);
  xfer += oprot->writeString(this->indexTableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 8);
  xfer += this->sd.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
    std::map<std::string, std::string> ::const_iterator _iter280;
    for (_iter280 = this->parameters.begin(); _iter280 != this->parameters.end(); ++_iter280)
    {
      xfer += oprot->writeString(_iter280->first);
      xfer += oprot->writeString(_iter280->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10);
  xfer += oprot->writeBool(this->deferredRebuild);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Index &a, Index &b) {
  using ::std::swap;
  swap(a.indexName, b.indexName);
  swap(a.indexHandlerClass, b.indexHandlerClass);
  swap(a.dbName, b.dbName);
  swap(a.origTableName, b.origTableName);
  swap(a.createTime, b.createTime);
  swap(a.lastAccessTime, b.lastAccessTime);
  swap(a.indexTableName, b.indexTableName);
  swap(a.sd, b.sd);
  swap(a.parameters, b.parameters);
  swap(a.deferredRebuild, b.deferredRebuild);
  swap(a.__isset, b.__isset);
}

Index::Index(const Index& other281) {
  indexName = other281.indexName;
  indexHandlerClass = other281.indexHandlerClass;
  dbName = other281.dbName;
  origTableName = other281.origTableName;
  createTime = other281.createTime;
  lastAccessTime = other281.lastAccessTime;
  indexTableName = other281.indexTableName;
  sd = other281.sd;
  parameters = other281.parameters;
  deferredRebuild = other281.deferredRebuild;
  __isset = other281.__isset;
}
Index& Index::operator=(const Index& other282) {
  indexName = other282.indexName;
  indexHandlerClass = other282.indexHandlerClass;
  dbName = other282.dbName;
  origTableName = other282.origTableName;
  createTime = other282.createTime;
  lastAccessTime = other282.lastAccessTime;
  indexTableName = other282.indexTableName;
  sd = other282.sd;
  parameters = other282.parameters;
  deferredRebuild = other282.deferredRebuild;
  __isset = other282.__isset;
  return *this;
}
void Index::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Index(";
  out << "indexName=" << to_string(indexName);
  out << ", " << "indexHandlerClass=" << to_string(indexHandlerClass);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "origTableName=" << to_string(origTableName);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "lastAccessTime=" << to_string(lastAccessTime);
  out << ", " << "indexTableName=" << to_string(indexTableName);
  out << ", " << "sd=" << to_string(sd);
  out << ", " << "parameters=" << to_string(parameters);
  out << ", " << "deferredRebuild=" << to_string(deferredRebuild);
  out << ")";
}


BooleanColumnStatsData::~BooleanColumnStatsData() throw() {
}


void BooleanColumnStatsData::__set_numTrues(const int64_t val) {
  this->numTrues = val;
}

void BooleanColumnStatsData::__set_numFalses(const int64_t val) {
  this->numFalses = val;
}

void BooleanColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void BooleanColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t BooleanColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_numTrues = false;
  bool isset_numFalses = false;
  bool isset_numNulls = 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_I64) {
          xfer += iprot->readI64(this->numTrues);
          isset_numTrues = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numFalses);
          isset_numFalses = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_numTrues)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numFalses)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("BooleanColumnStatsData");

  xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->numTrues);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2);
  xfer += oprot->writeI64(this->numFalses);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b) {
  using ::std::swap;
  swap(a.numTrues, b.numTrues);
  swap(a.numFalses, b.numFalses);
  swap(a.numNulls, b.numNulls);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

BooleanColumnStatsData::BooleanColumnStatsData(const BooleanColumnStatsData& other283) {
  numTrues = other283.numTrues;
  numFalses = other283.numFalses;
  numNulls = other283.numNulls;
  bitVectors = other283.bitVectors;
  __isset = other283.__isset;
}
BooleanColumnStatsData& BooleanColumnStatsData::operator=(const BooleanColumnStatsData& other284) {
  numTrues = other284.numTrues;
  numFalses = other284.numFalses;
  numNulls = other284.numNulls;
  bitVectors = other284.bitVectors;
  __isset = other284.__isset;
  return *this;
}
void BooleanColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "BooleanColumnStatsData(";
  out << "numTrues=" << to_string(numTrues);
  out << ", " << "numFalses=" << to_string(numFalses);
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


DoubleColumnStatsData::~DoubleColumnStatsData() throw() {
}


void DoubleColumnStatsData::__set_lowValue(const double val) {
  this->lowValue = val;
__isset.lowValue = true;
}

void DoubleColumnStatsData::__set_highValue(const double val) {
  this->highValue = val;
__isset.highValue = true;
}

void DoubleColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void DoubleColumnStatsData::__set_numDVs(const int64_t val) {
  this->numDVs = val;
}

void DoubleColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t DoubleColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_numNulls = false;
  bool isset_numDVs = 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_DOUBLE) {
          xfer += iprot->readDouble(this->lowValue);
          this->__isset.lowValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
          xfer += iprot->readDouble(this->highValue);
          this->__isset.highValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numDVs);
          isset_numDVs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numDVs)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DoubleColumnStatsData");

  if (this->__isset.lowValue) {
    xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1);
    xfer += oprot->writeDouble(this->lowValue);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.highValue) {
    xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2);
    xfer += oprot->writeDouble(this->highValue);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
  xfer += oprot->writeI64(this->numDVs);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b) {
  using ::std::swap;
  swap(a.lowValue, b.lowValue);
  swap(a.highValue, b.highValue);
  swap(a.numNulls, b.numNulls);
  swap(a.numDVs, b.numDVs);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

DoubleColumnStatsData::DoubleColumnStatsData(const DoubleColumnStatsData& other285) {
  lowValue = other285.lowValue;
  highValue = other285.highValue;
  numNulls = other285.numNulls;
  numDVs = other285.numDVs;
  bitVectors = other285.bitVectors;
  __isset = other285.__isset;
}
DoubleColumnStatsData& DoubleColumnStatsData::operator=(const DoubleColumnStatsData& other286) {
  lowValue = other286.lowValue;
  highValue = other286.highValue;
  numNulls = other286.numNulls;
  numDVs = other286.numDVs;
  bitVectors = other286.bitVectors;
  __isset = other286.__isset;
  return *this;
}
void DoubleColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DoubleColumnStatsData(";
  out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "<null>"));
  out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "<null>"));
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "numDVs=" << to_string(numDVs);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


LongColumnStatsData::~LongColumnStatsData() throw() {
}


void LongColumnStatsData::__set_lowValue(const int64_t val) {
  this->lowValue = val;
__isset.lowValue = true;
}

void LongColumnStatsData::__set_highValue(const int64_t val) {
  this->highValue = val;
__isset.highValue = true;
}

void LongColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void LongColumnStatsData::__set_numDVs(const int64_t val) {
  this->numDVs = val;
}

void LongColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_numNulls = false;
  bool isset_numDVs = 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_I64) {
          xfer += iprot->readI64(this->lowValue);
          this->__isset.lowValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->highValue);
          this->__isset.highValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numDVs);
          isset_numDVs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numDVs)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("LongColumnStatsData");

  if (this->__isset.lowValue) {
    xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1);
    xfer += oprot->writeI64(this->lowValue);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.highValue) {
    xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2);
    xfer += oprot->writeI64(this->highValue);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
  xfer += oprot->writeI64(this->numDVs);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(LongColumnStatsData &a, LongColumnStatsData &b) {
  using ::std::swap;
  swap(a.lowValue, b.lowValue);
  swap(a.highValue, b.highValue);
  swap(a.numNulls, b.numNulls);
  swap(a.numDVs, b.numDVs);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

LongColumnStatsData::LongColumnStatsData(const LongColumnStatsData& other287) {
  lowValue = other287.lowValue;
  highValue = other287.highValue;
  numNulls = other287.numNulls;
  numDVs = other287.numDVs;
  bitVectors = other287.bitVectors;
  __isset = other287.__isset;
}
LongColumnStatsData& LongColumnStatsData::operator=(const LongColumnStatsData& other288) {
  lowValue = other288.lowValue;
  highValue = other288.highValue;
  numNulls = other288.numNulls;
  numDVs = other288.numDVs;
  bitVectors = other288.bitVectors;
  __isset = other288.__isset;
  return *this;
}
void LongColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "LongColumnStatsData(";
  out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "<null>"));
  out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "<null>"));
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "numDVs=" << to_string(numDVs);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


StringColumnStatsData::~StringColumnStatsData() throw() {
}


void StringColumnStatsData::__set_maxColLen(const int64_t val) {
  this->maxColLen = val;
}

void StringColumnStatsData::__set_avgColLen(const double val) {
  this->avgColLen = val;
}

void StringColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void StringColumnStatsData::__set_numDVs(const int64_t val) {
  this->numDVs = val;
}

void StringColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t StringColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_maxColLen = false;
  bool isset_avgColLen = false;
  bool isset_numNulls = false;
  bool isset_numDVs = 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_I64) {
          xfer += iprot->readI64(this->maxColLen);
          isset_maxColLen = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
          xfer += iprot->readDouble(this->avgColLen);
          isset_avgColLen = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numDVs);
          isset_numDVs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_maxColLen)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_avgColLen)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numDVs)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("StringColumnStatsData");

  xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->maxColLen);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2);
  xfer += oprot->writeDouble(this->avgColLen);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
  xfer += oprot->writeI64(this->numDVs);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(StringColumnStatsData &a, StringColumnStatsData &b) {
  using ::std::swap;
  swap(a.maxColLen, b.maxColLen);
  swap(a.avgColLen, b.avgColLen);
  swap(a.numNulls, b.numNulls);
  swap(a.numDVs, b.numDVs);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

StringColumnStatsData::StringColumnStatsData(const StringColumnStatsData& other289) {
  maxColLen = other289.maxColLen;
  avgColLen = other289.avgColLen;
  numNulls = other289.numNulls;
  numDVs = other289.numDVs;
  bitVectors = other289.bitVectors;
  __isset = other289.__isset;
}
StringColumnStatsData& StringColumnStatsData::operator=(const StringColumnStatsData& other290) {
  maxColLen = other290.maxColLen;
  avgColLen = other290.avgColLen;
  numNulls = other290.numNulls;
  numDVs = other290.numDVs;
  bitVectors = other290.bitVectors;
  __isset = other290.__isset;
  return *this;
}
void StringColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "StringColumnStatsData(";
  out << "maxColLen=" << to_string(maxColLen);
  out << ", " << "avgColLen=" << to_string(avgColLen);
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "numDVs=" << to_string(numDVs);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


BinaryColumnStatsData::~BinaryColumnStatsData() throw() {
}


void BinaryColumnStatsData::__set_maxColLen(const int64_t val) {
  this->maxColLen = val;
}

void BinaryColumnStatsData::__set_avgColLen(const double val) {
  this->avgColLen = val;
}

void BinaryColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void BinaryColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t BinaryColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_maxColLen = false;
  bool isset_avgColLen = false;
  bool isset_numNulls = 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_I64) {
          xfer += iprot->readI64(this->maxColLen);
          isset_maxColLen = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
          xfer += iprot->readDouble(this->avgColLen);
          isset_avgColLen = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_maxColLen)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_avgColLen)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("BinaryColumnStatsData");

  xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->maxColLen);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2);
  xfer += oprot->writeDouble(this->avgColLen);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b) {
  using ::std::swap;
  swap(a.maxColLen, b.maxColLen);
  swap(a.avgColLen, b.avgColLen);
  swap(a.numNulls, b.numNulls);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

BinaryColumnStatsData::BinaryColumnStatsData(const BinaryColumnStatsData& other291) {
  maxColLen = other291.maxColLen;
  avgColLen = other291.avgColLen;
  numNulls = other291.numNulls;
  bitVectors = other291.bitVectors;
  __isset = other291.__isset;
}
BinaryColumnStatsData& BinaryColumnStatsData::operator=(const BinaryColumnStatsData& other292) {
  maxColLen = other292.maxColLen;
  avgColLen = other292.avgColLen;
  numNulls = other292.numNulls;
  bitVectors = other292.bitVectors;
  __isset = other292.__isset;
  return *this;
}
void BinaryColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "BinaryColumnStatsData(";
  out << "maxColLen=" << to_string(maxColLen);
  out << ", " << "avgColLen=" << to_string(avgColLen);
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


Decimal::~Decimal() throw() {
}


void Decimal::__set_unscaled(const std::string& val) {
  this->unscaled = val;
}

void Decimal::__set_scale(const int16_t val) {
  this->scale = val;
}

uint32_t Decimal::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_unscaled = false;
  bool isset_scale = 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->unscaled);
          isset_unscaled = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I16) {
          xfer += iprot->readI16(this->scale);
          isset_scale = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_unscaled)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_scale)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t Decimal::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Decimal");

  xfer += oprot->writeFieldBegin("unscaled", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeBinary(this->unscaled);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I16, 3);
  xfer += oprot->writeI16(this->scale);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Decimal &a, Decimal &b) {
  using ::std::swap;
  swap(a.unscaled, b.unscaled);
  swap(a.scale, b.scale);
}

Decimal::Decimal(const Decimal& other293) {
  unscaled = other293.unscaled;
  scale = other293.scale;
}
Decimal& Decimal::operator=(const Decimal& other294) {
  unscaled = other294.unscaled;
  scale = other294.scale;
  return *this;
}
void Decimal::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Decimal(";
  out << "unscaled=" << to_string(unscaled);
  out << ", " << "scale=" << to_string(scale);
  out << ")";
}


DecimalColumnStatsData::~DecimalColumnStatsData() throw() {
}


void DecimalColumnStatsData::__set_lowValue(const Decimal& val) {
  this->lowValue = val;
__isset.lowValue = true;
}

void DecimalColumnStatsData::__set_highValue(const Decimal& val) {
  this->highValue = val;
__isset.highValue = true;
}

void DecimalColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void DecimalColumnStatsData::__set_numDVs(const int64_t val) {
  this->numDVs = val;
}

void DecimalColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t DecimalColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_numNulls = false;
  bool isset_numDVs = 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->lowValue.read(iprot);
          this->__isset.lowValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->highValue.read(iprot);
          this->__isset.highValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numDVs);
          isset_numDVs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numDVs)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DecimalColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DecimalColumnStatsData");

  if (this->__isset.lowValue) {
    xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1);
    xfer += this->lowValue.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.highValue) {
    xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2);
    xfer += this->highValue.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
  xfer += oprot->writeI64(this->numDVs);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DecimalColumnStatsData &a, DecimalColumnStatsData &b) {
  using ::std::swap;
  swap(a.lowValue, b.lowValue);
  swap(a.highValue, b.highValue);
  swap(a.numNulls, b.numNulls);
  swap(a.numDVs, b.numDVs);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

DecimalColumnStatsData::DecimalColumnStatsData(const DecimalColumnStatsData& other295) {
  lowValue = other295.lowValue;
  highValue = other295.highValue;
  numNulls = other295.numNulls;
  numDVs = other295.numDVs;
  bitVectors = other295.bitVectors;
  __isset = other295.__isset;
}
DecimalColumnStatsData& DecimalColumnStatsData::operator=(const DecimalColumnStatsData& other296) {
  lowValue = other296.lowValue;
  highValue = other296.highValue;
  numNulls = other296.numNulls;
  numDVs = other296.numDVs;
  bitVectors = other296.bitVectors;
  __isset = other296.__isset;
  return *this;
}
void DecimalColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DecimalColumnStatsData(";
  out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "<null>"));
  out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "<null>"));
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "numDVs=" << to_string(numDVs);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


Date::~Date() throw() {
}


void Date::__set_daysSinceEpoch(const int64_t val) {
  this->daysSinceEpoch = val;
}

uint32_t Date::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_daysSinceEpoch = 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_I64) {
          xfer += iprot->readI64(this->daysSinceEpoch);
          isset_daysSinceEpoch = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_daysSinceEpoch)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t Date::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Date");

  xfer += oprot->writeFieldBegin("daysSinceEpoch", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->daysSinceEpoch);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Date &a, Date &b) {
  using ::std::swap;
  swap(a.daysSinceEpoch, b.daysSinceEpoch);
}

Date::Date(const Date& other297) {
  daysSinceEpoch = other297.daysSinceEpoch;
}
Date& Date::operator=(const Date& other298) {
  daysSinceEpoch = other298.daysSinceEpoch;
  return *this;
}
void Date::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Date(";
  out << "daysSinceEpoch=" << to_string(daysSinceEpoch);
  out << ")";
}


DateColumnStatsData::~DateColumnStatsData() throw() {
}


void DateColumnStatsData::__set_lowValue(const Date& val) {
  this->lowValue = val;
__isset.lowValue = true;
}

void DateColumnStatsData::__set_highValue(const Date& val) {
  this->highValue = val;
__isset.highValue = true;
}

void DateColumnStatsData::__set_numNulls(const int64_t val) {
  this->numNulls = val;
}

void DateColumnStatsData::__set_numDVs(const int64_t val) {
  this->numDVs = val;
}

void DateColumnStatsData::__set_bitVectors(const std::string& val) {
  this->bitVectors = val;
__isset.bitVectors = true;
}

uint32_t DateColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_numNulls = false;
  bool isset_numDVs = 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->lowValue.read(iprot);
          this->__isset.lowValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->highValue.read(iprot);
          this->__isset.highValue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numNulls);
          isset_numNulls = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->numDVs);
          isset_numDVs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->bitVectors);
          this->__isset.bitVectors = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_numNulls)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_numDVs)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DateColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DateColumnStatsData");

  if (this->__isset.lowValue) {
    xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1);
    xfer += this->lowValue.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.highValue) {
    xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2);
    xfer += this->highValue.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
  xfer += oprot->writeI64(this->numNulls);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
  xfer += oprot->writeI64(this->numDVs);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.bitVectors) {
    xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->bitVectors);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DateColumnStatsData &a, DateColumnStatsData &b) {
  using ::std::swap;
  swap(a.lowValue, b.lowValue);
  swap(a.highValue, b.highValue);
  swap(a.numNulls, b.numNulls);
  swap(a.numDVs, b.numDVs);
  swap(a.bitVectors, b.bitVectors);
  swap(a.__isset, b.__isset);
}

DateColumnStatsData::DateColumnStatsData(const DateColumnStatsData& other299) {
  lowValue = other299.lowValue;
  highValue = other299.highValue;
  numNulls = other299.numNulls;
  numDVs = other299.numDVs;
  bitVectors = other299.bitVectors;
  __isset = other299.__isset;
}
DateColumnStatsData& DateColumnStatsData::operator=(const DateColumnStatsData& other300) {
  lowValue = other300.lowValue;
  highValue = other300.highValue;
  numNulls = other300.numNulls;
  numDVs = other300.numDVs;
  bitVectors = other300.bitVectors;
  __isset = other300.__isset;
  return *this;
}
void DateColumnStatsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DateColumnStatsData(";
  out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "<null>"));
  out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "<null>"));
  out << ", " << "numNulls=" << to_string(numNulls);
  out << ", " << "numDVs=" << to_string(numDVs);
  out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "<null>"));
  out << ")";
}


ColumnStatisticsData::~ColumnStatisticsData() throw() {
}


void ColumnStatisticsData::__set_booleanStats(const BooleanColumnStatsData& val) {
  this->booleanStats = val;
}

void ColumnStatisticsData::__set_longStats(const LongColumnStatsData& val) {
  this->longStats = val;
}

void ColumnStatisticsData::__set_doubleStats(const DoubleColumnStatsData& val) {
  this->doubleStats = val;
}

void ColumnStatisticsData::__set_stringStats(const StringColumnStatsData& val) {
  this->stringStats = val;
}

void ColumnStatisticsData::__set_binaryStats(const BinaryColumnStatsData& val) {
  this->binaryStats = val;
}

void ColumnStatisticsData::__set_decimalStats(const DecimalColumnStatsData& val) {
  this->decimalStats = val;
}

void ColumnStatisticsData::__set_dateStats(const DateColumnStatsData& val) {
  this->dateStats = val;
}

uint32_t ColumnStatisticsData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->booleanStats.read(iprot);
          this->__isset.booleanStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->longStats.read(iprot);
          this->__isset.longStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->doubleStats.read(iprot);
          this->__isset.doubleStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->stringStats.read(iprot);
          this->__isset.stringStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->binaryStats.read(iprot);
          this->__isset.binaryStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->decimalStats.read(iprot);
          this->__isset.decimalStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->dateStats.read(iprot);
          this->__isset.dateStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ColumnStatisticsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ColumnStatisticsData");

  xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1);
  xfer += this->booleanStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2);
  xfer += this->longStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3);
  xfer += this->doubleStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4);
  xfer += this->stringStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5);
  xfer += this->binaryStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("decimalStats", ::apache::thrift::protocol::T_STRUCT, 6);
  xfer += this->decimalStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dateStats", ::apache::thrift::protocol::T_STRUCT, 7);
  xfer += this->dateStats.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ColumnStatisticsData &a, ColumnStatisticsData &b) {
  using ::std::swap;
  swap(a.booleanStats, b.booleanStats);
  swap(a.longStats, b.longStats);
  swap(a.doubleStats, b.doubleStats);
  swap(a.stringStats, b.stringStats);
  swap(a.binaryStats, b.binaryStats);
  swap(a.decimalStats, b.decimalStats);
  swap(a.dateStats, b.dateStats);
  swap(a.__isset, b.__isset);
}

ColumnStatisticsData::ColumnStatisticsData(const ColumnStatisticsData& other301) {
  booleanStats = other301.booleanStats;
  longStats = other301.longStats;
  doubleStats = other301.doubleStats;
  stringStats = other301.stringStats;
  binaryStats = other301.binaryStats;
  decimalStats = other301.decimalStats;
  dateStats = other301.dateStats;
  __isset = other301.__isset;
}
ColumnStatisticsData& ColumnStatisticsData::operator=(const ColumnStatisticsData& other302) {
  booleanStats = other302.booleanStats;
  longStats = other302.longStats;
  doubleStats = other302.doubleStats;
  stringStats = other302.stringStats;
  binaryStats = other302.binaryStats;
  decimalStats = other302.decimalStats;
  dateStats = other302.dateStats;
  __isset = other302.__isset;
  return *this;
}
void ColumnStatisticsData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ColumnStatisticsData(";
  out << "booleanStats=" << to_string(booleanStats);
  out << ", " << "longStats=" << to_string(longStats);
  out << ", " << "doubleStats=" << to_string(doubleStats);
  out << ", " << "stringStats=" << to_string(stringStats);
  out << ", " << "binaryStats=" << to_string(binaryStats);
  out << ", " << "decimalStats=" << to_string(decimalStats);
  out << ", " << "dateStats=" << to_string(dateStats);
  out << ")";
}


ColumnStatisticsObj::~ColumnStatisticsObj() throw() {
}


void ColumnStatisticsObj::__set_colName(const std::string& val) {
  this->colName = val;
}

void ColumnStatisticsObj::__set_colType(const std::string& val) {
  this->colType = val;
}

void ColumnStatisticsObj::__set_statsData(const ColumnStatisticsData& val) {
  this->statsData = val;
}

uint32_t ColumnStatisticsObj::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_colName = false;
  bool isset_colType = false;
  bool isset_statsData = 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->colName);
          isset_colName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->colType);
          isset_colType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->statsData.read(iprot);
          isset_statsData = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_colName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_colType)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_statsData)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ColumnStatisticsObj");

  xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->colName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->colType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3);
  xfer += this->statsData.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b) {
  using ::std::swap;
  swap(a.colName, b.colName);
  swap(a.colType, b.colType);
  swap(a.statsData, b.statsData);
}

ColumnStatisticsObj::ColumnStatisticsObj(const ColumnStatisticsObj& other303) {
  colName = other303.colName;
  colType = other303.colType;
  statsData = other303.statsData;
}
ColumnStatisticsObj& ColumnStatisticsObj::operator=(const ColumnStatisticsObj& other304) {
  colName = other304.colName;
  colType = other304.colType;
  statsData = other304.statsData;
  return *this;
}
void ColumnStatisticsObj::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ColumnStatisticsObj(";
  out << "colName=" << to_string(colName);
  out << ", " << "colType=" << to_string(colType);
  out << ", " << "statsData=" << to_string(statsData);
  out << ")";
}


ColumnStatisticsDesc::~ColumnStatisticsDesc() throw() {
}


void ColumnStatisticsDesc::__set_isTblLevel(const bool val) {
  this->isTblLevel = val;
}

void ColumnStatisticsDesc::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void ColumnStatisticsDesc::__set_tableName(const std::string& val) {
  this->tableName = val;
}

void ColumnStatisticsDesc::__set_partName(const std::string& val) {
  this->partName = val;
__isset.partName = true;
}

void ColumnStatisticsDesc::__set_lastAnalyzed(const int64_t val) {
  this->lastAnalyzed = val;
__isset.lastAnalyzed = true;
}

uint32_t ColumnStatisticsDesc::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_isTblLevel = false;
  bool isset_dbName = false;
  bool isset_tableName = 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_BOOL) {
          xfer += iprot->readBool(this->isTblLevel);
          isset_isTblLevel = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          isset_tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partName);
          this->__isset.partName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->lastAnalyzed);
          this->__isset.lastAnalyzed = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_isTblLevel)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tableName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ColumnStatisticsDesc::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ColumnStatisticsDesc");

  xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1);
  xfer += oprot->writeBool(this->isTblLevel);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->tableName);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.partName) {
    xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->partName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.lastAnalyzed) {
    xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 5);
    xfer += oprot->writeI64(this->lastAnalyzed);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b) {
  using ::std::swap;
  swap(a.isTblLevel, b.isTblLevel);
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.partName, b.partName);
  swap(a.lastAnalyzed, b.lastAnalyzed);
  swap(a.__isset, b.__isset);
}

ColumnStatisticsDesc::ColumnStatisticsDesc(const ColumnStatisticsDesc& other305) {
  isTblLevel = other305.isTblLevel;
  dbName = other305.dbName;
  tableName = other305.tableName;
  partName = other305.partName;
  lastAnalyzed = other305.lastAnalyzed;
  __isset = other305.__isset;
}
ColumnStatisticsDesc& ColumnStatisticsDesc::operator=(const ColumnStatisticsDesc& other306) {
  isTblLevel = other306.isTblLevel;
  dbName = other306.dbName;
  tableName = other306.tableName;
  partName = other306.partName;
  lastAnalyzed = other306.lastAnalyzed;
  __isset = other306.__isset;
  return *this;
}
void ColumnStatisticsDesc::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ColumnStatisticsDesc(";
  out << "isTblLevel=" << to_string(isTblLevel);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "tableName=" << to_string(tableName);
  out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "<null>"));
  out << ", " << "lastAnalyzed="; (__isset.lastAnalyzed ? (out << to_string(lastAnalyzed)) : (out << "<null>"));
  out << ")";
}


ColumnStatistics::~ColumnStatistics() throw() {
}


void ColumnStatistics::__set_statsDesc(const ColumnStatisticsDesc& val) {
  this->statsDesc = val;
}

void ColumnStatistics::__set_statsObj(const std::vector<ColumnStatisticsObj> & val) {
  this->statsObj = val;
}

uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_statsDesc = false;
  bool isset_statsObj = 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->statsDesc.read(iprot);
          isset_statsDesc = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->statsObj.clear();
            uint32_t _size307;
            ::apache::thrift::protocol::TType _etype310;
            xfer += iprot->readListBegin(_etype310, _size307);
            this->statsObj.resize(_size307);
            uint32_t _i311;
            for (_i311 = 0; _i311 < _size307; ++_i311)
            {
              xfer += this->statsObj[_i311].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_statsObj = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_statsDesc)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_statsObj)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ColumnStatistics");

  xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1);
  xfer += this->statsDesc.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->statsObj.size()));
    std::vector<ColumnStatisticsObj> ::const_iterator _iter312;
    for (_iter312 = this->statsObj.begin(); _iter312 != this->statsObj.end(); ++_iter312)
    {
      xfer += (*_iter312).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ColumnStatistics &a, ColumnStatistics &b) {
  using ::std::swap;
  swap(a.statsDesc, b.statsDesc);
  swap(a.statsObj, b.statsObj);
}

ColumnStatistics::ColumnStatistics(const ColumnStatistics& other313) {
  statsDesc = other313.statsDesc;
  statsObj = other313.statsObj;
}
ColumnStatistics& ColumnStatistics::operator=(const ColumnStatistics& other314) {
  statsDesc = other314.statsDesc;
  statsObj = other314.statsObj;
  return *this;
}
void ColumnStatistics::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ColumnStatistics(";
  out << "statsDesc=" << to_string(statsDesc);
  out << ", " << "statsObj=" << to_string(statsObj);
  out << ")";
}


AggrStats::~AggrStats() throw() {
}


void AggrStats::__set_colStats(const std::vector<ColumnStatisticsObj> & val) {
  this->colStats = val;
}

void AggrStats::__set_partsFound(const int64_t val) {
  this->partsFound = val;
}

uint32_t AggrStats::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_colStats = false;
  bool isset_partsFound = 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->colStats.clear();
            uint32_t _size315;
            ::apache::thrift::protocol::TType _etype318;
            xfer += iprot->readListBegin(_etype318, _size315);
            this->colStats.resize(_size315);
            uint32_t _i319;
            for (_i319 = 0; _i319 < _size315; ++_i319)
            {
              xfer += this->colStats[_i319].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_colStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->partsFound);
          isset_partsFound = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_colStats)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_partsFound)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AggrStats::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AggrStats");

  xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->colStats.size()));
    std::vector<ColumnStatisticsObj> ::const_iterator _iter320;
    for (_iter320 = this->colStats.begin(); _iter320 != this->colStats.end(); ++_iter320)
    {
      xfer += (*_iter320).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partsFound", ::apache::thrift::protocol::T_I64, 2);
  xfer += oprot->writeI64(this->partsFound);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AggrStats &a, AggrStats &b) {
  using ::std::swap;
  swap(a.colStats, b.colStats);
  swap(a.partsFound, b.partsFound);
}

AggrStats::AggrStats(const AggrStats& other321) {
  colStats = other321.colStats;
  partsFound = other321.partsFound;
}
AggrStats& AggrStats::operator=(const AggrStats& other322) {
  colStats = other322.colStats;
  partsFound = other322.partsFound;
  return *this;
}
void AggrStats::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AggrStats(";
  out << "colStats=" << to_string(colStats);
  out << ", " << "partsFound=" << to_string(partsFound);
  out << ")";
}


SetPartitionsStatsRequest::~SetPartitionsStatsRequest() throw() {
}


void SetPartitionsStatsRequest::__set_colStats(const std::vector<ColumnStatistics> & val) {
  this->colStats = val;
}

void SetPartitionsStatsRequest::__set_needMerge(const bool val) {
  this->needMerge = val;
__isset.needMerge = true;
}

uint32_t SetPartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_colStats = 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->colStats.clear();
            uint32_t _size323;
            ::apache::thrift::protocol::TType _etype326;
            xfer += iprot->readListBegin(_etype326, _size323);
            this->colStats.resize(_size323);
            uint32_t _i327;
            for (_i327 = 0; _i327 < _size323; ++_i327)
            {
              xfer += this->colStats[_i327].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_colStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->needMerge);
          this->__isset.needMerge = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_colStats)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t SetPartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("SetPartitionsStatsRequest");

  xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->colStats.size()));
    std::vector<ColumnStatistics> ::const_iterator _iter328;
    for (_iter328 = this->colStats.begin(); _iter328 != this->colStats.end(); ++_iter328)
    {
      xfer += (*_iter328).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.needMerge) {
    xfer += oprot->writeFieldBegin("needMerge", ::apache::thrift::protocol::T_BOOL, 2);
    xfer += oprot->writeBool(this->needMerge);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(SetPartitionsStatsRequest &a, SetPartitionsStatsRequest &b) {
  using ::std::swap;
  swap(a.colStats, b.colStats);
  swap(a.needMerge, b.needMerge);
  swap(a.__isset, b.__isset);
}

SetPartitionsStatsRequest::SetPartitionsStatsRequest(const SetPartitionsStatsRequest& other329) {
  colStats = other329.colStats;
  needMerge = other329.needMerge;
  __isset = other329.__isset;
}
SetPartitionsStatsRequest& SetPartitionsStatsRequest::operator=(const SetPartitionsStatsRequest& other330) {
  colStats = other330.colStats;
  needMerge = other330.needMerge;
  __isset = other330.__isset;
  return *this;
}
void SetPartitionsStatsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "SetPartitionsStatsRequest(";
  out << "colStats=" << to_string(colStats);
  out << ", " << "needMerge="; (__isset.needMerge ? (out << to_string(needMerge)) : (out << "<null>"));
  out << ")";
}


Schema::~Schema() throw() {
}


void Schema::__set_fieldSchemas(const std::vector<FieldSchema> & val) {
  this->fieldSchemas = val;
}

void Schema::__set_properties(const std::map<std::string, std::string> & val) {
  this->properties = val;
}

uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->fieldSchemas.clear();
            uint32_t _size331;
            ::apache::thrift::protocol::TType _etype334;
            xfer += iprot->readListBegin(_etype334, _size331);
            this->fieldSchemas.resize(_size331);
            uint32_t _i335;
            for (_i335 = 0; _i335 < _size331; ++_i335)
            {
              xfer += this->fieldSchemas[_i335].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.fieldSchemas = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->properties.clear();
            uint32_t _size336;
            ::apache::thrift::protocol::TType _ktype337;
            ::apache::thrift::protocol::TType _vtype338;
            xfer += iprot->readMapBegin(_ktype337, _vtype338, _size336);
            uint32_t _i340;
            for (_i340 = 0; _i340 < _size336; ++_i340)
            {
              std::string _key341;
              xfer += iprot->readString(_key341);
              std::string& _val342 = this->properties[_key341];
              xfer += iprot->readString(_val342);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.properties = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Schema");

  xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fieldSchemas.size()));
    std::vector<FieldSchema> ::const_iterator _iter343;
    for (_iter343 = this->fieldSchemas.begin(); _iter343 != this->fieldSchemas.end(); ++_iter343)
    {
      xfer += (*_iter343).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
    std::map<std::string, std::string> ::const_iterator _iter344;
    for (_iter344 = this->properties.begin(); _iter344 != this->properties.end(); ++_iter344)
    {
      xfer += oprot->writeString(_iter344->first);
      xfer += oprot->writeString(_iter344->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Schema &a, Schema &b) {
  using ::std::swap;
  swap(a.fieldSchemas, b.fieldSchemas);
  swap(a.properties, b.properties);
  swap(a.__isset, b.__isset);
}

Schema::Schema(const Schema& other345) {
  fieldSchemas = other345.fieldSchemas;
  properties = other345.properties;
  __isset = other345.__isset;
}
Schema& Schema::operator=(const Schema& other346) {
  fieldSchemas = other346.fieldSchemas;
  properties = other346.properties;
  __isset = other346.__isset;
  return *this;
}
void Schema::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Schema(";
  out << "fieldSchemas=" << to_string(fieldSchemas);
  out << ", " << "properties=" << to_string(properties);
  out << ")";
}


EnvironmentContext::~EnvironmentContext() throw() {
}


void EnvironmentContext::__set_properties(const std::map<std::string, std::string> & val) {
  this->properties = val;
}

uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_MAP) {
          {
            this->properties.clear();
            uint32_t _size347;
            ::apache::thrift::protocol::TType _ktype348;
            ::apache::thrift::protocol::TType _vtype349;
            xfer += iprot->readMapBegin(_ktype348, _vtype349, _size347);
            uint32_t _i351;
            for (_i351 = 0; _i351 < _size347; ++_i351)
            {
              std::string _key352;
              xfer += iprot->readString(_key352);
              std::string& _val353 = this->properties[_key352];
              xfer += iprot->readString(_val353);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.properties = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("EnvironmentContext");

  xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
    std::map<std::string, std::string> ::const_iterator _iter354;
    for (_iter354 = this->properties.begin(); _iter354 != this->properties.end(); ++_iter354)
    {
      xfer += oprot->writeString(_iter354->first);
      xfer += oprot->writeString(_iter354->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(EnvironmentContext &a, EnvironmentContext &b) {
  using ::std::swap;
  swap(a.properties, b.properties);
  swap(a.__isset, b.__isset);
}

EnvironmentContext::EnvironmentContext(const EnvironmentContext& other355) {
  properties = other355.properties;
  __isset = other355.__isset;
}
EnvironmentContext& EnvironmentContext::operator=(const EnvironmentContext& other356) {
  properties = other356.properties;
  __isset = other356.__isset;
  return *this;
}
void EnvironmentContext::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "EnvironmentContext(";
  out << "properties=" << to_string(properties);
  out << ")";
}


PrimaryKeysRequest::~PrimaryKeysRequest() throw() {
}


void PrimaryKeysRequest::__set_db_name(const std::string& val) {
  this->db_name = val;
}

void PrimaryKeysRequest::__set_tbl_name(const std::string& val) {
  this->tbl_name = val;
}

uint32_t PrimaryKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_db_name = false;
  bool isset_tbl_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->db_name);
          isset_db_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tbl_name);
          isset_tbl_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_db_name)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tbl_name)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PrimaryKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PrimaryKeysRequest");

  xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->db_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tbl_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PrimaryKeysRequest &a, PrimaryKeysRequest &b) {
  using ::std::swap;
  swap(a.db_name, b.db_name);
  swap(a.tbl_name, b.tbl_name);
}

PrimaryKeysRequest::PrimaryKeysRequest(const PrimaryKeysRequest& other357) {
  db_name = other357.db_name;
  tbl_name = other357.tbl_name;
}
PrimaryKeysRequest& PrimaryKeysRequest::operator=(const PrimaryKeysRequest& other358) {
  db_name = other358.db_name;
  tbl_name = other358.tbl_name;
  return *this;
}
void PrimaryKeysRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PrimaryKeysRequest(";
  out << "db_name=" << to_string(db_name);
  out << ", " << "tbl_name=" << to_string(tbl_name);
  out << ")";
}


PrimaryKeysResponse::~PrimaryKeysResponse() throw() {
}


void PrimaryKeysResponse::__set_primaryKeys(const std::vector<SQLPrimaryKey> & val) {
  this->primaryKeys = val;
}

uint32_t PrimaryKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_primaryKeys = 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->primaryKeys.clear();
            uint32_t _size359;
            ::apache::thrift::protocol::TType _etype362;
            xfer += iprot->readListBegin(_etype362, _size359);
            this->primaryKeys.resize(_size359);
            uint32_t _i363;
            for (_i363 = 0; _i363 < _size359; ++_i363)
            {
              xfer += this->primaryKeys[_i363].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_primaryKeys = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_primaryKeys)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PrimaryKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PrimaryKeysResponse");

  xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->primaryKeys.size()));
    std::vector<SQLPrimaryKey> ::const_iterator _iter364;
    for (_iter364 = this->primaryKeys.begin(); _iter364 != this->primaryKeys.end(); ++_iter364)
    {
      xfer += (*_iter364).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PrimaryKeysResponse &a, PrimaryKeysResponse &b) {
  using ::std::swap;
  swap(a.primaryKeys, b.primaryKeys);
}

PrimaryKeysResponse::PrimaryKeysResponse(const PrimaryKeysResponse& other365) {
  primaryKeys = other365.primaryKeys;
}
PrimaryKeysResponse& PrimaryKeysResponse::operator=(const PrimaryKeysResponse& other366) {
  primaryKeys = other366.primaryKeys;
  return *this;
}
void PrimaryKeysResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PrimaryKeysResponse(";
  out << "primaryKeys=" << to_string(primaryKeys);
  out << ")";
}


ForeignKeysRequest::~ForeignKeysRequest() throw() {
}


void ForeignKeysRequest::__set_parent_db_name(const std::string& val) {
  this->parent_db_name = val;
}

void ForeignKeysRequest::__set_parent_tbl_name(const std::string& val) {
  this->parent_tbl_name = val;
}

void ForeignKeysRequest::__set_foreign_db_name(const std::string& val) {
  this->foreign_db_name = val;
}

void ForeignKeysRequest::__set_foreign_tbl_name(const std::string& val) {
  this->foreign_tbl_name = val;
}

uint32_t ForeignKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->parent_db_name);
          this->__isset.parent_db_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->parent_tbl_name);
          this->__isset.parent_tbl_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->foreign_db_name);
          this->__isset.foreign_db_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->foreign_tbl_name);
          this->__isset.foreign_tbl_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ForeignKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ForeignKeysRequest");

  xfer += oprot->writeFieldBegin("parent_db_name", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->parent_db_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parent_tbl_name", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->parent_tbl_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("foreign_db_name", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->foreign_db_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("foreign_tbl_name", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->foreign_tbl_name);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ForeignKeysRequest &a, ForeignKeysRequest &b) {
  using ::std::swap;
  swap(a.parent_db_name, b.parent_db_name);
  swap(a.parent_tbl_name, b.parent_tbl_name);
  swap(a.foreign_db_name, b.foreign_db_name);
  swap(a.foreign_tbl_name, b.foreign_tbl_name);
  swap(a.__isset, b.__isset);
}

ForeignKeysRequest::ForeignKeysRequest(const ForeignKeysRequest& other367) {
  parent_db_name = other367.parent_db_name;
  parent_tbl_name = other367.parent_tbl_name;
  foreign_db_name = other367.foreign_db_name;
  foreign_tbl_name = other367.foreign_tbl_name;
  __isset = other367.__isset;
}
ForeignKeysRequest& ForeignKeysRequest::operator=(const ForeignKeysRequest& other368) {
  parent_db_name = other368.parent_db_name;
  parent_tbl_name = other368.parent_tbl_name;
  foreign_db_name = other368.foreign_db_name;
  foreign_tbl_name = other368.foreign_tbl_name;
  __isset = other368.__isset;
  return *this;
}
void ForeignKeysRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ForeignKeysRequest(";
  out << "parent_db_name=" << to_string(parent_db_name);
  out << ", " << "parent_tbl_name=" << to_string(parent_tbl_name);
  out << ", " << "foreign_db_name=" << to_string(foreign_db_name);
  out << ", " << "foreign_tbl_name=" << to_string(foreign_tbl_name);
  out << ")";
}


ForeignKeysResponse::~ForeignKeysResponse() throw() {
}


void ForeignKeysResponse::__set_foreignKeys(const std::vector<SQLForeignKey> & val) {
  this->foreignKeys = val;
}

uint32_t ForeignKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_foreignKeys = 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->foreignKeys.clear();
            uint32_t _size369;
            ::apache::thrift::protocol::TType _etype372;
            xfer += iprot->readListBegin(_etype372, _size369);
            this->foreignKeys.resize(_size369);
            uint32_t _i373;
            for (_i373 = 0; _i373 < _size369; ++_i373)
            {
              xfer += this->foreignKeys[_i373].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_foreignKeys = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_foreignKeys)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ForeignKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ForeignKeysResponse");

  xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->foreignKeys.size()));
    std::vector<SQLForeignKey> ::const_iterator _iter374;
    for (_iter374 = this->foreignKeys.begin(); _iter374 != this->foreignKeys.end(); ++_iter374)
    {
      xfer += (*_iter374).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ForeignKeysResponse &a, ForeignKeysResponse &b) {
  using ::std::swap;
  swap(a.foreignKeys, b.foreignKeys);
}

ForeignKeysResponse::ForeignKeysResponse(const ForeignKeysResponse& other375) {
  foreignKeys = other375.foreignKeys;
}
ForeignKeysResponse& ForeignKeysResponse::operator=(const ForeignKeysResponse& other376) {
  foreignKeys = other376.foreignKeys;
  return *this;
}
void ForeignKeysResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ForeignKeysResponse(";
  out << "foreignKeys=" << to_string(foreignKeys);
  out << ")";
}


DropConstraintRequest::~DropConstraintRequest() throw() {
}


void DropConstraintRequest::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void DropConstraintRequest::__set_tablename(const std::string& val) {
  this->tablename = val;
}

void DropConstraintRequest::__set_constraintname(const std::string& val) {
  this->constraintname = val;
}

uint32_t DropConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbname = false;
  bool isset_tablename = false;
  bool isset_constraintname = 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->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          isset_tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->constraintname);
          isset_constraintname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tablename)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_constraintname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DropConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DropConstraintRequest");

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tablename);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("constraintname", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->constraintname);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DropConstraintRequest &a, DropConstraintRequest &b) {
  using ::std::swap;
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.constraintname, b.constraintname);
}

DropConstraintRequest::DropConstraintRequest(const DropConstraintRequest& other377) {
  dbname = other377.dbname;
  tablename = other377.tablename;
  constraintname = other377.constraintname;
}
DropConstraintRequest& DropConstraintRequest::operator=(const DropConstraintRequest& other378) {
  dbname = other378.dbname;
  tablename = other378.tablename;
  constraintname = other378.constraintname;
  return *this;
}
void DropConstraintRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DropConstraintRequest(";
  out << "dbname=" << to_string(dbname);
  out << ", " << "tablename=" << to_string(tablename);
  out << ", " << "constraintname=" << to_string(constraintname);
  out << ")";
}


AddPrimaryKeyRequest::~AddPrimaryKeyRequest() throw() {
}


void AddPrimaryKeyRequest::__set_primaryKeyCols(const std::vector<SQLPrimaryKey> & val) {
  this->primaryKeyCols = val;
}

uint32_t AddPrimaryKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_primaryKeyCols = 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->primaryKeyCols.clear();
            uint32_t _size379;
            ::apache::thrift::protocol::TType _etype382;
            xfer += iprot->readListBegin(_etype382, _size379);
            this->primaryKeyCols.resize(_size379);
            uint32_t _i383;
            for (_i383 = 0; _i383 < _size379; ++_i383)
            {
              xfer += this->primaryKeyCols[_i383].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_primaryKeyCols = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_primaryKeyCols)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AddPrimaryKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AddPrimaryKeyRequest");

  xfer += oprot->writeFieldBegin("primaryKeyCols", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->primaryKeyCols.size()));
    std::vector<SQLPrimaryKey> ::const_iterator _iter384;
    for (_iter384 = this->primaryKeyCols.begin(); _iter384 != this->primaryKeyCols.end(); ++_iter384)
    {
      xfer += (*_iter384).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AddPrimaryKeyRequest &a, AddPrimaryKeyRequest &b) {
  using ::std::swap;
  swap(a.primaryKeyCols, b.primaryKeyCols);
}

AddPrimaryKeyRequest::AddPrimaryKeyRequest(const AddPrimaryKeyRequest& other385) {
  primaryKeyCols = other385.primaryKeyCols;
}
AddPrimaryKeyRequest& AddPrimaryKeyRequest::operator=(const AddPrimaryKeyRequest& other386) {
  primaryKeyCols = other386.primaryKeyCols;
  return *this;
}
void AddPrimaryKeyRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AddPrimaryKeyRequest(";
  out << "primaryKeyCols=" << to_string(primaryKeyCols);
  out << ")";
}


AddForeignKeyRequest::~AddForeignKeyRequest() throw() {
}


void AddForeignKeyRequest::__set_foreignKeyCols(const std::vector<SQLForeignKey> & val) {
  this->foreignKeyCols = val;
}

uint32_t AddForeignKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_foreignKeyCols = 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->foreignKeyCols.clear();
            uint32_t _size387;
            ::apache::thrift::protocol::TType _etype390;
            xfer += iprot->readListBegin(_etype390, _size387);
            this->foreignKeyCols.resize(_size387);
            uint32_t _i391;
            for (_i391 = 0; _i391 < _size387; ++_i391)
            {
              xfer += this->foreignKeyCols[_i391].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_foreignKeyCols = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_foreignKeyCols)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AddForeignKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AddForeignKeyRequest");

  xfer += oprot->writeFieldBegin("foreignKeyCols", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->foreignKeyCols.size()));
    std::vector<SQLForeignKey> ::const_iterator _iter392;
    for (_iter392 = this->foreignKeyCols.begin(); _iter392 != this->foreignKeyCols.end(); ++_iter392)
    {
      xfer += (*_iter392).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AddForeignKeyRequest &a, AddForeignKeyRequest &b) {
  using ::std::swap;
  swap(a.foreignKeyCols, b.foreignKeyCols);
}

AddForeignKeyRequest::AddForeignKeyRequest(const AddForeignKeyRequest& other393) {
  foreignKeyCols = other393.foreignKeyCols;
}
AddForeignKeyRequest& AddForeignKeyRequest::operator=(const AddForeignKeyRequest& other394) {
  foreignKeyCols = other394.foreignKeyCols;
  return *this;
}
void AddForeignKeyRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AddForeignKeyRequest(";
  out << "foreignKeyCols=" << to_string(foreignKeyCols);
  out << ")";
}


PartitionsByExprResult::~PartitionsByExprResult() throw() {
}


void PartitionsByExprResult::__set_partitions(const std::vector<Partition> & val) {
  this->partitions = val;
}

void PartitionsByExprResult::__set_hasUnknownPartitions(const bool val) {
  this->hasUnknownPartitions = val;
}

uint32_t PartitionsByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_partitions = false;
  bool isset_hasUnknownPartitions = 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->partitions.clear();
            uint32_t _size395;
            ::apache::thrift::protocol::TType _etype398;
            xfer += iprot->readListBegin(_etype398, _size395);
            this->partitions.resize(_size395);
            uint32_t _i399;
            for (_i399 = 0; _i399 < _size395; ++_i399)
            {
              xfer += this->partitions[_i399].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_partitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->hasUnknownPartitions);
          isset_hasUnknownPartitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_partitions)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hasUnknownPartitions)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PartitionsByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionsByExprResult");

  xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
    std::vector<Partition> ::const_iterator _iter400;
    for (_iter400 = this->partitions.begin(); _iter400 != this->partitions.end(); ++_iter400)
    {
      xfer += (*_iter400).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("hasUnknownPartitions", ::apache::thrift::protocol::T_BOOL, 2);
  xfer += oprot->writeBool(this->hasUnknownPartitions);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionsByExprResult &a, PartitionsByExprResult &b) {
  using ::std::swap;
  swap(a.partitions, b.partitions);
  swap(a.hasUnknownPartitions, b.hasUnknownPartitions);
}

PartitionsByExprResult::PartitionsByExprResult(const PartitionsByExprResult& other401) {
  partitions = other401.partitions;
  hasUnknownPartitions = other401.hasUnknownPartitions;
}
PartitionsByExprResult& PartitionsByExprResult::operator=(const PartitionsByExprResult& other402) {
  partitions = other402.partitions;
  hasUnknownPartitions = other402.hasUnknownPartitions;
  return *this;
}
void PartitionsByExprResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionsByExprResult(";
  out << "partitions=" << to_string(partitions);
  out << ", " << "hasUnknownPartitions=" << to_string(hasUnknownPartitions);
  out << ")";
}


PartitionsByExprRequest::~PartitionsByExprRequest() throw() {
}


void PartitionsByExprRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void PartitionsByExprRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void PartitionsByExprRequest::__set_expr(const std::string& val) {
  this->expr = val;
}

void PartitionsByExprRequest::__set_defaultPartitionName(const std::string& val) {
  this->defaultPartitionName = val;
__isset.defaultPartitionName = true;
}

void PartitionsByExprRequest::__set_maxParts(const int16_t val) {
  this->maxParts = val;
__isset.maxParts = true;
}

uint32_t PartitionsByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = false;
  bool isset_expr = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readBinary(this->expr);
          isset_expr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->defaultPartitionName);
          this->__isset.defaultPartitionName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I16) {
          xfer += iprot->readI16(this->maxParts);
          this->__isset.maxParts = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_expr)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PartitionsByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionsByExprRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeBinary(this->expr);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.defaultPartitionName) {
    xfer += oprot->writeFieldBegin("defaultPartitionName", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->defaultPartitionName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.maxParts) {
    xfer += oprot->writeFieldBegin("maxParts", ::apache::thrift::protocol::T_I16, 5);
    xfer += oprot->writeI16(this->maxParts);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionsByExprRequest &a, PartitionsByExprRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.expr, b.expr);
  swap(a.defaultPartitionName, b.defaultPartitionName);
  swap(a.maxParts, b.maxParts);
  swap(a.__isset, b.__isset);
}

PartitionsByExprRequest::PartitionsByExprRequest(const PartitionsByExprRequest& other403) {
  dbName = other403.dbName;
  tblName = other403.tblName;
  expr = other403.expr;
  defaultPartitionName = other403.defaultPartitionName;
  maxParts = other403.maxParts;
  __isset = other403.__isset;
}
PartitionsByExprRequest& PartitionsByExprRequest::operator=(const PartitionsByExprRequest& other404) {
  dbName = other404.dbName;
  tblName = other404.tblName;
  expr = other404.expr;
  defaultPartitionName = other404.defaultPartitionName;
  maxParts = other404.maxParts;
  __isset = other404.__isset;
  return *this;
}
void PartitionsByExprRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionsByExprRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "expr=" << to_string(expr);
  out << ", " << "defaultPartitionName="; (__isset.defaultPartitionName ? (out << to_string(defaultPartitionName)) : (out << "<null>"));
  out << ", " << "maxParts="; (__isset.maxParts ? (out << to_string(maxParts)) : (out << "<null>"));
  out << ")";
}


TableStatsResult::~TableStatsResult() throw() {
}


void TableStatsResult::__set_tableStats(const std::vector<ColumnStatisticsObj> & val) {
  this->tableStats = val;
}

uint32_t TableStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_tableStats = 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->tableStats.clear();
            uint32_t _size405;
            ::apache::thrift::protocol::TType _etype408;
            xfer += iprot->readListBegin(_etype408, _size405);
            this->tableStats.resize(_size405);
            uint32_t _i409;
            for (_i409 = 0; _i409 < _size405; ++_i409)
            {
              xfer += this->tableStats[_i409].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_tableStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_tableStats)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t TableStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TableStatsResult");

  xfer += oprot->writeFieldBegin("tableStats", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tableStats.size()));
    std::vector<ColumnStatisticsObj> ::const_iterator _iter410;
    for (_iter410 = this->tableStats.begin(); _iter410 != this->tableStats.end(); ++_iter410)
    {
      xfer += (*_iter410).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TableStatsResult &a, TableStatsResult &b) {
  using ::std::swap;
  swap(a.tableStats, b.tableStats);
}

TableStatsResult::TableStatsResult(const TableStatsResult& other411) {
  tableStats = other411.tableStats;
}
TableStatsResult& TableStatsResult::operator=(const TableStatsResult& other412) {
  tableStats = other412.tableStats;
  return *this;
}
void TableStatsResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TableStatsResult(";
  out << "tableStats=" << to_string(tableStats);
  out << ")";
}


PartitionsStatsResult::~PartitionsStatsResult() throw() {
}


void PartitionsStatsResult::__set_partStats(const std::map<std::string, std::vector<ColumnStatisticsObj> > & val) {
  this->partStats = val;
}

uint32_t PartitionsStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_partStats = 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->partStats.clear();
            uint32_t _size413;
            ::apache::thrift::protocol::TType _ktype414;
            ::apache::thrift::protocol::TType _vtype415;
            xfer += iprot->readMapBegin(_ktype414, _vtype415, _size413);
            uint32_t _i417;
            for (_i417 = 0; _i417 < _size413; ++_i417)
            {
              std::string _key418;
              xfer += iprot->readString(_key418);
              std::vector<ColumnStatisticsObj> & _val419 = this->partStats[_key418];
              {
                _val419.clear();
                uint32_t _size420;
                ::apache::thrift::protocol::TType _etype423;
                xfer += iprot->readListBegin(_etype423, _size420);
                _val419.resize(_size420);
                uint32_t _i424;
                for (_i424 = 0; _i424 < _size420; ++_i424)
                {
                  xfer += _val419[_i424].read(iprot);
                }
                xfer += iprot->readListEnd();
              }
            }
            xfer += iprot->readMapEnd();
          }
          isset_partStats = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_partStats)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PartitionsStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionsStatsResult");

  xfer += oprot->writeFieldBegin("partStats", ::apache::thrift::protocol::T_MAP, 1);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->partStats.size()));
    std::map<std::string, std::vector<ColumnStatisticsObj> > ::const_iterator _iter425;
    for (_iter425 = this->partStats.begin(); _iter425 != this->partStats.end(); ++_iter425)
    {
      xfer += oprot->writeString(_iter425->first);
      {
        xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter425->second.size()));
        std::vector<ColumnStatisticsObj> ::const_iterator _iter426;
        for (_iter426 = _iter425->second.begin(); _iter426 != _iter425->second.end(); ++_iter426)
        {
          xfer += (*_iter426).write(oprot);
        }
        xfer += oprot->writeListEnd();
      }
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionsStatsResult &a, PartitionsStatsResult &b) {
  using ::std::swap;
  swap(a.partStats, b.partStats);
}

PartitionsStatsResult::PartitionsStatsResult(const PartitionsStatsResult& other427) {
  partStats = other427.partStats;
}
PartitionsStatsResult& PartitionsStatsResult::operator=(const PartitionsStatsResult& other428) {
  partStats = other428.partStats;
  return *this;
}
void PartitionsStatsResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionsStatsResult(";
  out << "partStats=" << to_string(partStats);
  out << ")";
}


TableStatsRequest::~TableStatsRequest() throw() {
}


void TableStatsRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void TableStatsRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void TableStatsRequest::__set_colNames(const std::vector<std::string> & val) {
  this->colNames = val;
}

uint32_t TableStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = false;
  bool isset_colNames = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->colNames.clear();
            uint32_t _size429;
            ::apache::thrift::protocol::TType _etype432;
            xfer += iprot->readListBegin(_etype432, _size429);
            this->colNames.resize(_size429);
            uint32_t _i433;
            for (_i433 = 0; _i433 < _size429; ++_i433)
            {
              xfer += iprot->readString(this->colNames[_i433]);
            }
            xfer += iprot->readListEnd();
          }
          isset_colNames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_colNames)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t TableStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TableStatsRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->colNames.size()));
    std::vector<std::string> ::const_iterator _iter434;
    for (_iter434 = this->colNames.begin(); _iter434 != this->colNames.end(); ++_iter434)
    {
      xfer += oprot->writeString((*_iter434));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TableStatsRequest &a, TableStatsRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.colNames, b.colNames);
}

TableStatsRequest::TableStatsRequest(const TableStatsRequest& other435) {
  dbName = other435.dbName;
  tblName = other435.tblName;
  colNames = other435.colNames;
}
TableStatsRequest& TableStatsRequest::operator=(const TableStatsRequest& other436) {
  dbName = other436.dbName;
  tblName = other436.tblName;
  colNames = other436.colNames;
  return *this;
}
void TableStatsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TableStatsRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "colNames=" << to_string(colNames);
  out << ")";
}


PartitionsStatsRequest::~PartitionsStatsRequest() throw() {
}


void PartitionsStatsRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void PartitionsStatsRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void PartitionsStatsRequest::__set_colNames(const std::vector<std::string> & val) {
  this->colNames = val;
}

void PartitionsStatsRequest::__set_partNames(const std::vector<std::string> & val) {
  this->partNames = val;
}

uint32_t PartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = false;
  bool isset_colNames = false;
  bool isset_partNames = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->colNames.clear();
            uint32_t _size437;
            ::apache::thrift::protocol::TType _etype440;
            xfer += iprot->readListBegin(_etype440, _size437);
            this->colNames.resize(_size437);
            uint32_t _i441;
            for (_i441 = 0; _i441 < _size437; ++_i441)
            {
              xfer += iprot->readString(this->colNames[_i441]);
            }
            xfer += iprot->readListEnd();
          }
          isset_colNames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partNames.clear();
            uint32_t _size442;
            ::apache::thrift::protocol::TType _etype445;
            xfer += iprot->readListBegin(_etype445, _size442);
            this->partNames.resize(_size442);
            uint32_t _i446;
            for (_i446 = 0; _i446 < _size442; ++_i446)
            {
              xfer += iprot->readString(this->partNames[_i446]);
            }
            xfer += iprot->readListEnd();
          }
          isset_partNames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_colNames)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_partNames)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PartitionsStatsRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->colNames.size()));
    std::vector<std::string> ::const_iterator _iter447;
    for (_iter447 = this->colNames.begin(); _iter447 != this->colNames.end(); ++_iter447)
    {
      xfer += oprot->writeString((*_iter447));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 4);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partNames.size()));
    std::vector<std::string> ::const_iterator _iter448;
    for (_iter448 = this->partNames.begin(); _iter448 != this->partNames.end(); ++_iter448)
    {
      xfer += oprot->writeString((*_iter448));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PartitionsStatsRequest &a, PartitionsStatsRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.colNames, b.colNames);
  swap(a.partNames, b.partNames);
}

PartitionsStatsRequest::PartitionsStatsRequest(const PartitionsStatsRequest& other449) {
  dbName = other449.dbName;
  tblName = other449.tblName;
  colNames = other449.colNames;
  partNames = other449.partNames;
}
PartitionsStatsRequest& PartitionsStatsRequest::operator=(const PartitionsStatsRequest& other450) {
  dbName = other450.dbName;
  tblName = other450.tblName;
  colNames = other450.colNames;
  partNames = other450.partNames;
  return *this;
}
void PartitionsStatsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PartitionsStatsRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "colNames=" << to_string(colNames);
  out << ", " << "partNames=" << to_string(partNames);
  out << ")";
}


AddPartitionsResult::~AddPartitionsResult() throw() {
}


void AddPartitionsResult::__set_partitions(const std::vector<Partition> & val) {
  this->partitions = val;
__isset.partitions = true;
}

uint32_t AddPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->partitions.clear();
            uint32_t _size451;
            ::apache::thrift::protocol::TType _etype454;
            xfer += iprot->readListBegin(_etype454, _size451);
            this->partitions.resize(_size451);
            uint32_t _i455;
            for (_i455 = 0; _i455 < _size451; ++_i455)
            {
              xfer += this->partitions[_i455].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t AddPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AddPartitionsResult");

  if (this->__isset.partitions) {
    xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
      std::vector<Partition> ::const_iterator _iter456;
      for (_iter456 = this->partitions.begin(); _iter456 != this->partitions.end(); ++_iter456)
      {
        xfer += (*_iter456).write(oprot);
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AddPartitionsResult &a, AddPartitionsResult &b) {
  using ::std::swap;
  swap(a.partitions, b.partitions);
  swap(a.__isset, b.__isset);
}

AddPartitionsResult::AddPartitionsResult(const AddPartitionsResult& other457) {
  partitions = other457.partitions;
  __isset = other457.__isset;
}
AddPartitionsResult& AddPartitionsResult::operator=(const AddPartitionsResult& other458) {
  partitions = other458.partitions;
  __isset = other458.__isset;
  return *this;
}
void AddPartitionsResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AddPartitionsResult(";
  out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "<null>"));
  out << ")";
}


AddPartitionsRequest::~AddPartitionsRequest() throw() {
}


void AddPartitionsRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void AddPartitionsRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void AddPartitionsRequest::__set_parts(const std::vector<Partition> & val) {
  this->parts = val;
}

void AddPartitionsRequest::__set_ifNotExists(const bool val) {
  this->ifNotExists = val;
}

void AddPartitionsRequest::__set_needResult(const bool val) {
  this->needResult = val;
__isset.needResult = true;
}

uint32_t AddPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = false;
  bool isset_parts = false;
  bool isset_ifNotExists = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->parts.clear();
            uint32_t _size459;
            ::apache::thrift::protocol::TType _etype462;
            xfer += iprot->readListBegin(_etype462, _size459);
            this->parts.resize(_size459);
            uint32_t _i463;
            for (_i463 = 0; _i463 < _size459; ++_i463)
            {
              xfer += this->parts[_i463].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_parts = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->ifNotExists);
          isset_ifNotExists = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->needResult);
          this->__isset.needResult = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_parts)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_ifNotExists)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AddPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AddPartitionsRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 3);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->parts.size()));
    std::vector<Partition> ::const_iterator _iter464;
    for (_iter464 = this->parts.begin(); _iter464 != this->parts.end(); ++_iter464)
    {
      xfer += (*_iter464).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 4);
  xfer += oprot->writeBool(this->ifNotExists);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.needResult) {
    xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 5);
    xfer += oprot->writeBool(this->needResult);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AddPartitionsRequest &a, AddPartitionsRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.parts, b.parts);
  swap(a.ifNotExists, b.ifNotExists);
  swap(a.needResult, b.needResult);
  swap(a.__isset, b.__isset);
}

AddPartitionsRequest::AddPartitionsRequest(const AddPartitionsRequest& other465) {
  dbName = other465.dbName;
  tblName = other465.tblName;
  parts = other465.parts;
  ifNotExists = other465.ifNotExists;
  needResult = other465.needResult;
  __isset = other465.__isset;
}
AddPartitionsRequest& AddPartitionsRequest::operator=(const AddPartitionsRequest& other466) {
  dbName = other466.dbName;
  tblName = other466.tblName;
  parts = other466.parts;
  ifNotExists = other466.ifNotExists;
  needResult = other466.needResult;
  __isset = other466.__isset;
  return *this;
}
void AddPartitionsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AddPartitionsRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "parts=" << to_string(parts);
  out << ", " << "ifNotExists=" << to_string(ifNotExists);
  out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "<null>"));
  out << ")";
}


DropPartitionsResult::~DropPartitionsResult() throw() {
}


void DropPartitionsResult::__set_partitions(const std::vector<Partition> & val) {
  this->partitions = val;
__isset.partitions = true;
}

uint32_t DropPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->partitions.clear();
            uint32_t _size467;
            ::apache::thrift::protocol::TType _etype470;
            xfer += iprot->readListBegin(_etype470, _size467);
            this->partitions.resize(_size467);
            uint32_t _i471;
            for (_i471 = 0; _i471 < _size467; ++_i471)
            {
              xfer += this->partitions[_i471].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t DropPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DropPartitionsResult");

  if (this->__isset.partitions) {
    xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
      std::vector<Partition> ::const_iterator _iter472;
      for (_iter472 = this->partitions.begin(); _iter472 != this->partitions.end(); ++_iter472)
      {
        xfer += (*_iter472).write(oprot);
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DropPartitionsResult &a, DropPartitionsResult &b) {
  using ::std::swap;
  swap(a.partitions, b.partitions);
  swap(a.__isset, b.__isset);
}

DropPartitionsResult::DropPartitionsResult(const DropPartitionsResult& other473) {
  partitions = other473.partitions;
  __isset = other473.__isset;
}
DropPartitionsResult& DropPartitionsResult::operator=(const DropPartitionsResult& other474) {
  partitions = other474.partitions;
  __isset = other474.__isset;
  return *this;
}
void DropPartitionsResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DropPartitionsResult(";
  out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "<null>"));
  out << ")";
}


DropPartitionsExpr::~DropPartitionsExpr() throw() {
}


void DropPartitionsExpr::__set_expr(const std::string& val) {
  this->expr = val;
}

void DropPartitionsExpr::__set_partArchiveLevel(const int32_t val) {
  this->partArchiveLevel = val;
__isset.partArchiveLevel = true;
}

uint32_t DropPartitionsExpr::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_expr = 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->expr);
          isset_expr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->partArchiveLevel);
          this->__isset.partArchiveLevel = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_expr)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DropPartitionsExpr::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DropPartitionsExpr");

  xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeBinary(this->expr);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.partArchiveLevel) {
    xfer += oprot->writeFieldBegin("partArchiveLevel", ::apache::thrift::protocol::T_I32, 2);
    xfer += oprot->writeI32(this->partArchiveLevel);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DropPartitionsExpr &a, DropPartitionsExpr &b) {
  using ::std::swap;
  swap(a.expr, b.expr);
  swap(a.partArchiveLevel, b.partArchiveLevel);
  swap(a.__isset, b.__isset);
}

DropPartitionsExpr::DropPartitionsExpr(const DropPartitionsExpr& other475) {
  expr = other475.expr;
  partArchiveLevel = other475.partArchiveLevel;
  __isset = other475.__isset;
}
DropPartitionsExpr& DropPartitionsExpr::operator=(const DropPartitionsExpr& other476) {
  expr = other476.expr;
  partArchiveLevel = other476.partArchiveLevel;
  __isset = other476.__isset;
  return *this;
}
void DropPartitionsExpr::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DropPartitionsExpr(";
  out << "expr=" << to_string(expr);
  out << ", " << "partArchiveLevel="; (__isset.partArchiveLevel ? (out << to_string(partArchiveLevel)) : (out << "<null>"));
  out << ")";
}


RequestPartsSpec::~RequestPartsSpec() throw() {
}


void RequestPartsSpec::__set_names(const std::vector<std::string> & val) {
  this->names = val;
}

void RequestPartsSpec::__set_exprs(const std::vector<DropPartitionsExpr> & val) {
  this->exprs = val;
}

uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->names.clear();
            uint32_t _size477;
            ::apache::thrift::protocol::TType _etype480;
            xfer += iprot->readListBegin(_etype480, _size477);
            this->names.resize(_size477);
            uint32_t _i481;
            for (_i481 = 0; _i481 < _size477; ++_i481)
            {
              xfer += iprot->readString(this->names[_i481]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.names = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->exprs.clear();
            uint32_t _size482;
            ::apache::thrift::protocol::TType _etype485;
            xfer += iprot->readListBegin(_etype485, _size482);
            this->exprs.resize(_size482);
            uint32_t _i486;
            for (_i486 = 0; _i486 < _size482; ++_i486)
            {
              xfer += this->exprs[_i486].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.exprs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("RequestPartsSpec");

  xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->names.size()));
    std::vector<std::string> ::const_iterator _iter487;
    for (_iter487 = this->names.begin(); _iter487 != this->names.end(); ++_iter487)
    {
      xfer += oprot->writeString((*_iter487));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("exprs", ::apache::thrift::protocol::T_LIST, 2);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->exprs.size()));
    std::vector<DropPartitionsExpr> ::const_iterator _iter488;
    for (_iter488 = this->exprs.begin(); _iter488 != this->exprs.end(); ++_iter488)
    {
      xfer += (*_iter488).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(RequestPartsSpec &a, RequestPartsSpec &b) {
  using ::std::swap;
  swap(a.names, b.names);
  swap(a.exprs, b.exprs);
  swap(a.__isset, b.__isset);
}

RequestPartsSpec::RequestPartsSpec(const RequestPartsSpec& other489) {
  names = other489.names;
  exprs = other489.exprs;
  __isset = other489.__isset;
}
RequestPartsSpec& RequestPartsSpec::operator=(const RequestPartsSpec& other490) {
  names = other490.names;
  exprs = other490.exprs;
  __isset = other490.__isset;
  return *this;
}
void RequestPartsSpec::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "RequestPartsSpec(";
  out << "names=" << to_string(names);
  out << ", " << "exprs=" << to_string(exprs);
  out << ")";
}


DropPartitionsRequest::~DropPartitionsRequest() throw() {
}


void DropPartitionsRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void DropPartitionsRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void DropPartitionsRequest::__set_parts(const RequestPartsSpec& val) {
  this->parts = val;
}

void DropPartitionsRequest::__set_deleteData(const bool val) {
  this->deleteData = val;
__isset.deleteData = true;
}

void DropPartitionsRequest::__set_ifExists(const bool val) {
  this->ifExists = val;
__isset.ifExists = true;
}

void DropPartitionsRequest::__set_ignoreProtection(const bool val) {
  this->ignoreProtection = val;
__isset.ignoreProtection = true;
}

void DropPartitionsRequest::__set_environmentContext(const EnvironmentContext& val) {
  this->environmentContext = val;
__isset.environmentContext = true;
}

void DropPartitionsRequest::__set_needResult(const bool val) {
  this->needResult = val;
__isset.needResult = true;
}

uint32_t DropPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = false;
  bool isset_parts = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->parts.read(iprot);
          isset_parts = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->deleteData);
          this->__isset.deleteData = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->ifExists);
          this->__isset.ifExists = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->ignoreProtection);
          this->__isset.ignoreProtection = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->environmentContext.read(iprot);
          this->__isset.environmentContext = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->needResult);
          this->__isset.needResult = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_parts)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t DropPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("DropPartitionsRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_STRUCT, 3);
  xfer += this->parts.write(oprot);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.deleteData) {
    xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4);
    xfer += oprot->writeBool(this->deleteData);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.ifExists) {
    xfer += oprot->writeFieldBegin("ifExists", ::apache::thrift::protocol::T_BOOL, 5);
    xfer += oprot->writeBool(this->ifExists);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.ignoreProtection) {
    xfer += oprot->writeFieldBegin("ignoreProtection", ::apache::thrift::protocol::T_BOOL, 6);
    xfer += oprot->writeBool(this->ignoreProtection);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.environmentContext) {
    xfer += oprot->writeFieldBegin("environmentContext", ::apache::thrift::protocol::T_STRUCT, 7);
    xfer += this->environmentContext.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.needResult) {
    xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 8);
    xfer += oprot->writeBool(this->needResult);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(DropPartitionsRequest &a, DropPartitionsRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.parts, b.parts);
  swap(a.deleteData, b.deleteData);
  swap(a.ifExists, b.ifExists);
  swap(a.ignoreProtection, b.ignoreProtection);
  swap(a.environmentContext, b.environmentContext);
  swap(a.needResult, b.needResult);
  swap(a.__isset, b.__isset);
}

DropPartitionsRequest::DropPartitionsRequest(const DropPartitionsRequest& other491) {
  dbName = other491.dbName;
  tblName = other491.tblName;
  parts = other491.parts;
  deleteData = other491.deleteData;
  ifExists = other491.ifExists;
  ignoreProtection = other491.ignoreProtection;
  environmentContext = other491.environmentContext;
  needResult = other491.needResult;
  __isset = other491.__isset;
}
DropPartitionsRequest& DropPartitionsRequest::operator=(const DropPartitionsRequest& other492) {
  dbName = other492.dbName;
  tblName = other492.tblName;
  parts = other492.parts;
  deleteData = other492.deleteData;
  ifExists = other492.ifExists;
  ignoreProtection = other492.ignoreProtection;
  environmentContext = other492.environmentContext;
  needResult = other492.needResult;
  __isset = other492.__isset;
  return *this;
}
void DropPartitionsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "DropPartitionsRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "parts=" << to_string(parts);
  out << ", " << "deleteData="; (__isset.deleteData ? (out << to_string(deleteData)) : (out << "<null>"));
  out << ", " << "ifExists="; (__isset.ifExists ? (out << to_string(ifExists)) : (out << "<null>"));
  out << ", " << "ignoreProtection="; (__isset.ignoreProtection ? (out << to_string(ignoreProtection)) : (out << "<null>"));
  out << ", " << "environmentContext="; (__isset.environmentContext ? (out << to_string(environmentContext)) : (out << "<null>"));
  out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "<null>"));
  out << ")";
}


ResourceUri::~ResourceUri() throw() {
}


void ResourceUri::__set_resourceType(const ResourceType::type val) {
  this->resourceType = val;
}

void ResourceUri::__set_uri(const std::string& val) {
  this->uri = val;
}

uint32_t ResourceUri::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_I32) {
          int32_t ecast493;
          xfer += iprot->readI32(ecast493);
          this->resourceType = (ResourceType::type)ecast493;
          this->__isset.resourceType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->uri);
          this->__isset.uri = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ResourceUri::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ResourceUri");

  xfer += oprot->writeFieldBegin("resourceType", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->resourceType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("uri", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->uri);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ResourceUri &a, ResourceUri &b) {
  using ::std::swap;
  swap(a.resourceType, b.resourceType);
  swap(a.uri, b.uri);
  swap(a.__isset, b.__isset);
}

ResourceUri::ResourceUri(const ResourceUri& other494) {
  resourceType = other494.resourceType;
  uri = other494.uri;
  __isset = other494.__isset;
}
ResourceUri& ResourceUri::operator=(const ResourceUri& other495) {
  resourceType = other495.resourceType;
  uri = other495.uri;
  __isset = other495.__isset;
  return *this;
}
void ResourceUri::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ResourceUri(";
  out << "resourceType=" << to_string(resourceType);
  out << ", " << "uri=" << to_string(uri);
  out << ")";
}


Function::~Function() throw() {
}


void Function::__set_functionName(const std::string& val) {
  this->functionName = val;
}

void Function::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void Function::__set_className(const std::string& val) {
  this->className = val;
}

void Function::__set_ownerName(const std::string& val) {
  this->ownerName = val;
}

void Function::__set_ownerType(const PrincipalType::type val) {
  this->ownerType = val;
}

void Function::__set_createTime(const int32_t val) {
  this->createTime = val;
}

void Function::__set_functionType(const FunctionType::type val) {
  this->functionType = val;
}

void Function::__set_resourceUris(const std::vector<ResourceUri> & val) {
  this->resourceUris = val;
}

uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->functionName);
          this->__isset.functionName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->className);
          this->__isset.className = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->ownerName);
          this->__isset.ownerName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast496;
          xfer += iprot->readI32(ecast496);
          this->ownerType = (PrincipalType::type)ecast496;
          this->__isset.ownerType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->createTime);
          this->__isset.createTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast497;
          xfer += iprot->readI32(ecast497);
          this->functionType = (FunctionType::type)ecast497;
          this->__isset.functionType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->resourceUris.clear();
            uint32_t _size498;
            ::apache::thrift::protocol::TType _etype501;
            xfer += iprot->readListBegin(_etype501, _size498);
            this->resourceUris.resize(_size498);
            uint32_t _i502;
            for (_i502 = 0; _i502 < _size498; ++_i502)
            {
              xfer += this->resourceUris[_i502].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.resourceUris = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("Function");

  xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->functionName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->className);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->ownerName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32((int32_t)this->ownerType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 6);
  xfer += oprot->writeI32(this->createTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_I32, 7);
  xfer += oprot->writeI32((int32_t)this->functionType);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("resourceUris", ::apache::thrift::protocol::T_LIST, 8);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->resourceUris.size()));
    std::vector<ResourceUri> ::const_iterator _iter503;
    for (_iter503 = this->resourceUris.begin(); _iter503 != this->resourceUris.end(); ++_iter503)
    {
      xfer += (*_iter503).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Function &a, Function &b) {
  using ::std::swap;
  swap(a.functionName, b.functionName);
  swap(a.dbName, b.dbName);
  swap(a.className, b.className);
  swap(a.ownerName, b.ownerName);
  swap(a.ownerType, b.ownerType);
  swap(a.createTime, b.createTime);
  swap(a.functionType, b.functionType);
  swap(a.resourceUris, b.resourceUris);
  swap(a.__isset, b.__isset);
}

Function::Function(const Function& other504) {
  functionName = other504.functionName;
  dbName = other504.dbName;
  className = other504.className;
  ownerName = other504.ownerName;
  ownerType = other504.ownerType;
  createTime = other504.createTime;
  functionType = other504.functionType;
  resourceUris = other504.resourceUris;
  __isset = other504.__isset;
}
Function& Function::operator=(const Function& other505) {
  functionName = other505.functionName;
  dbName = other505.dbName;
  className = other505.className;
  ownerName = other505.ownerName;
  ownerType = other505.ownerType;
  createTime = other505.createTime;
  functionType = other505.functionType;
  resourceUris = other505.resourceUris;
  __isset = other505.__isset;
  return *this;
}
void Function::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Function(";
  out << "functionName=" << to_string(functionName);
  out << ", " << "dbName=" << to_string(dbName);
  out << ", " << "className=" << to_string(className);
  out << ", " << "ownerName=" << to_string(ownerName);
  out << ", " << "ownerType=" << to_string(ownerType);
  out << ", " << "createTime=" << to_string(createTime);
  out << ", " << "functionType=" << to_string(functionType);
  out << ", " << "resourceUris=" << to_string(resourceUris);
  out << ")";
}


TxnInfo::~TxnInfo() throw() {
}


void TxnInfo::__set_id(const int64_t val) {
  this->id = val;
}

void TxnInfo::__set_state(const TxnState::type val) {
  this->state = val;
}

void TxnInfo::__set_user(const std::string& val) {
  this->user = val;
}

void TxnInfo::__set_hostname(const std::string& val) {
  this->hostname = val;
}

void TxnInfo::__set_agentInfo(const std::string& val) {
  this->agentInfo = val;
__isset.agentInfo = true;
}

void TxnInfo::__set_heartbeatCount(const int32_t val) {
  this->heartbeatCount = val;
__isset.heartbeatCount = true;
}

void TxnInfo::__set_metaInfo(const std::string& val) {
  this->metaInfo = val;
__isset.metaInfo = true;
}

void TxnInfo::__set_startedTime(const int64_t val) {
  this->startedTime = val;
__isset.startedTime = true;
}

void TxnInfo::__set_lastHeartbeatTime(const int64_t val) {
  this->lastHeartbeatTime = val;
__isset.lastHeartbeatTime = true;
}

uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_id = false;
  bool isset_state = false;
  bool isset_user = false;
  bool isset_hostname = 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_I64) {
          xfer += iprot->readI64(this->id);
          isset_id = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast506;
          xfer += iprot->readI32(ecast506);
          this->state = (TxnState::type)ecast506;
          isset_state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->user);
          isset_user = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->hostname);
          isset_hostname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->agentInfo);
          this->__isset.agentInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->heartbeatCount);
          this->__isset.heartbeatCount = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->metaInfo);
          this->__isset.metaInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->startedTime);
          this->__isset.startedTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->lastHeartbeatTime);
          this->__isset.lastHeartbeatTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_id)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_state)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_user)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hostname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t TxnInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TxnInfo");

  xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->id);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32((int32_t)this->state);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->user);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->hostname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.agentInfo) {
    xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->agentInfo);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.heartbeatCount) {
    xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 6);
    xfer += oprot->writeI32(this->heartbeatCount);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.metaInfo) {
    xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 7);
    xfer += oprot->writeString(this->metaInfo);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.startedTime) {
    xfer += oprot->writeFieldBegin("startedTime", ::apache::thrift::protocol::T_I64, 8);
    xfer += oprot->writeI64(this->startedTime);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.lastHeartbeatTime) {
    xfer += oprot->writeFieldBegin("lastHeartbeatTime", ::apache::thrift::protocol::T_I64, 9);
    xfer += oprot->writeI64(this->lastHeartbeatTime);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TxnInfo &a, TxnInfo &b) {
  using ::std::swap;
  swap(a.id, b.id);
  swap(a.state, b.state);
  swap(a.user, b.user);
  swap(a.hostname, b.hostname);
  swap(a.agentInfo, b.agentInfo);
  swap(a.heartbeatCount, b.heartbeatCount);
  swap(a.metaInfo, b.metaInfo);
  swap(a.startedTime, b.startedTime);
  swap(a.lastHeartbeatTime, b.lastHeartbeatTime);
  swap(a.__isset, b.__isset);
}

TxnInfo::TxnInfo(const TxnInfo& other507) {
  id = other507.id;
  state = other507.state;
  user = other507.user;
  hostname = other507.hostname;
  agentInfo = other507.agentInfo;
  heartbeatCount = other507.heartbeatCount;
  metaInfo = other507.metaInfo;
  startedTime = other507.startedTime;
  lastHeartbeatTime = other507.lastHeartbeatTime;
  __isset = other507.__isset;
}
TxnInfo& TxnInfo::operator=(const TxnInfo& other508) {
  id = other508.id;
  state = other508.state;
  user = other508.user;
  hostname = other508.hostname;
  agentInfo = other508.agentInfo;
  heartbeatCount = other508.heartbeatCount;
  metaInfo = other508.metaInfo;
  startedTime = other508.startedTime;
  lastHeartbeatTime = other508.lastHeartbeatTime;
  __isset = other508.__isset;
  return *this;
}
void TxnInfo::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TxnInfo(";
  out << "id=" << to_string(id);
  out << ", " << "state=" << to_string(state);
  out << ", " << "user=" << to_string(user);
  out << ", " << "hostname=" << to_string(hostname);
  out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
  out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "<null>"));
  out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "<null>"));
  out << ", " << "startedTime="; (__isset.startedTime ? (out << to_string(startedTime)) : (out << "<null>"));
  out << ", " << "lastHeartbeatTime="; (__isset.lastHeartbeatTime ? (out << to_string(lastHeartbeatTime)) : (out << "<null>"));
  out << ")";
}


GetOpenTxnsInfoResponse::~GetOpenTxnsInfoResponse() throw() {
}


void GetOpenTxnsInfoResponse::__set_txn_high_water_mark(const int64_t val) {
  this->txn_high_water_mark = val;
}

void GetOpenTxnsInfoResponse::__set_open_txns(const std::vector<TxnInfo> & val) {
  this->open_txns = val;
}

uint32_t GetOpenTxnsInfoResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txn_high_water_mark = false;
  bool isset_open_txns = 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_I64) {
          xfer += iprot->readI64(this->txn_high_water_mark);
          isset_txn_high_water_mark = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->open_txns.clear();
            uint32_t _size509;
            ::apache::thrift::protocol::TType _etype512;
            xfer += iprot->readListBegin(_etype512, _size509);
            this->open_txns.resize(_size509);
            uint32_t _i513;
            for (_i513 = 0; _i513 < _size509; ++_i513)
            {
              xfer += this->open_txns[_i513].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_open_txns = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txn_high_water_mark)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_open_txns)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetOpenTxnsInfoResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetOpenTxnsInfoResponse");

  xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->txn_high_water_mark);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->open_txns.size()));
    std::vector<TxnInfo> ::const_iterator _iter514;
    for (_iter514 = this->open_txns.begin(); _iter514 != this->open_txns.end(); ++_iter514)
    {
      xfer += (*_iter514).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetOpenTxnsInfoResponse &a, GetOpenTxnsInfoResponse &b) {
  using ::std::swap;
  swap(a.txn_high_water_mark, b.txn_high_water_mark);
  swap(a.open_txns, b.open_txns);
}

GetOpenTxnsInfoResponse::GetOpenTxnsInfoResponse(const GetOpenTxnsInfoResponse& other515) {
  txn_high_water_mark = other515.txn_high_water_mark;
  open_txns = other515.open_txns;
}
GetOpenTxnsInfoResponse& GetOpenTxnsInfoResponse::operator=(const GetOpenTxnsInfoResponse& other516) {
  txn_high_water_mark = other516.txn_high_water_mark;
  open_txns = other516.open_txns;
  return *this;
}
void GetOpenTxnsInfoResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetOpenTxnsInfoResponse(";
  out << "txn_high_water_mark=" << to_string(txn_high_water_mark);
  out << ", " << "open_txns=" << to_string(open_txns);
  out << ")";
}


GetOpenTxnsResponse::~GetOpenTxnsResponse() throw() {
}


void GetOpenTxnsResponse::__set_txn_high_water_mark(const int64_t val) {
  this->txn_high_water_mark = val;
}

void GetOpenTxnsResponse::__set_open_txns(const std::set<int64_t> & val) {
  this->open_txns = val;
}

void GetOpenTxnsResponse::__set_min_open_txn(const int64_t val) {
  this->min_open_txn = val;
__isset.min_open_txn = true;
}

uint32_t GetOpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txn_high_water_mark = false;
  bool isset_open_txns = 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_I64) {
          xfer += iprot->readI64(this->txn_high_water_mark);
          isset_txn_high_water_mark = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_SET) {
          {
            this->open_txns.clear();
            uint32_t _size517;
            ::apache::thrift::protocol::TType _etype520;
            xfer += iprot->readSetBegin(_etype520, _size517);
            uint32_t _i521;
            for (_i521 = 0; _i521 < _size517; ++_i521)
            {
              int64_t _elem522;
              xfer += iprot->readI64(_elem522);
              this->open_txns.insert(_elem522);
            }
            xfer += iprot->readSetEnd();
          }
          isset_open_txns = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->min_open_txn);
          this->__isset.min_open_txn = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txn_high_water_mark)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_open_txns)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetOpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetOpenTxnsResponse");

  xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->txn_high_water_mark);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_SET, 2);
  {
    xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->open_txns.size()));
    std::set<int64_t> ::const_iterator _iter523;
    for (_iter523 = this->open_txns.begin(); _iter523 != this->open_txns.end(); ++_iter523)
    {
      xfer += oprot->writeI64((*_iter523));
    }
    xfer += oprot->writeSetEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.min_open_txn) {
    xfer += oprot->writeFieldBegin("min_open_txn", ::apache::thrift::protocol::T_I64, 3);
    xfer += oprot->writeI64(this->min_open_txn);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b) {
  using ::std::swap;
  swap(a.txn_high_water_mark, b.txn_high_water_mark);
  swap(a.open_txns, b.open_txns);
  swap(a.min_open_txn, b.min_open_txn);
  swap(a.__isset, b.__isset);
}

GetOpenTxnsResponse::GetOpenTxnsResponse(const GetOpenTxnsResponse& other524) {
  txn_high_water_mark = other524.txn_high_water_mark;
  open_txns = other524.open_txns;
  min_open_txn = other524.min_open_txn;
  __isset = other524.__isset;
}
GetOpenTxnsResponse& GetOpenTxnsResponse::operator=(const GetOpenTxnsResponse& other525) {
  txn_high_water_mark = other525.txn_high_water_mark;
  open_txns = other525.open_txns;
  min_open_txn = other525.min_open_txn;
  __isset = other525.__isset;
  return *this;
}
void GetOpenTxnsResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetOpenTxnsResponse(";
  out << "txn_high_water_mark=" << to_string(txn_high_water_mark);
  out << ", " << "open_txns=" << to_string(open_txns);
  out << ", " << "min_open_txn="; (__isset.min_open_txn ? (out << to_string(min_open_txn)) : (out << "<null>"));
  out << ")";
}


OpenTxnRequest::~OpenTxnRequest() throw() {
}


void OpenTxnRequest::__set_num_txns(const int32_t val) {
  this->num_txns = val;
}

void OpenTxnRequest::__set_user(const std::string& val) {
  this->user = val;
}

void OpenTxnRequest::__set_hostname(const std::string& val) {
  this->hostname = val;
}

void OpenTxnRequest::__set_agentInfo(const std::string& val) {
  this->agentInfo = val;
__isset.agentInfo = true;
}

uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_num_txns = false;
  bool isset_user = false;
  bool isset_hostname = 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) {
          xfer += iprot->readI32(this->num_txns);
          isset_num_txns = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->user);
          isset_user = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->hostname);
          isset_hostname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->agentInfo);
          this->__isset.agentInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_num_txns)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_user)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hostname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t OpenTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("OpenTxnRequest");

  xfer += oprot->writeFieldBegin("num_txns", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32(this->num_txns);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->user);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->hostname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.agentInfo) {
    xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->agentInfo);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(OpenTxnRequest &a, OpenTxnRequest &b) {
  using ::std::swap;
  swap(a.num_txns, b.num_txns);
  swap(a.user, b.user);
  swap(a.hostname, b.hostname);
  swap(a.agentInfo, b.agentInfo);
  swap(a.__isset, b.__isset);
}

OpenTxnRequest::OpenTxnRequest(const OpenTxnRequest& other526) {
  num_txns = other526.num_txns;
  user = other526.user;
  hostname = other526.hostname;
  agentInfo = other526.agentInfo;
  __isset = other526.__isset;
}
OpenTxnRequest& OpenTxnRequest::operator=(const OpenTxnRequest& other527) {
  num_txns = other527.num_txns;
  user = other527.user;
  hostname = other527.hostname;
  agentInfo = other527.agentInfo;
  __isset = other527.__isset;
  return *this;
}
void OpenTxnRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "OpenTxnRequest(";
  out << "num_txns=" << to_string(num_txns);
  out << ", " << "user=" << to_string(user);
  out << ", " << "hostname=" << to_string(hostname);
  out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
  out << ")";
}


OpenTxnsResponse::~OpenTxnsResponse() throw() {
}


void OpenTxnsResponse::__set_txn_ids(const std::vector<int64_t> & val) {
  this->txn_ids = val;
}

uint32_t OpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txn_ids = 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->txn_ids.clear();
            uint32_t _size528;
            ::apache::thrift::protocol::TType _etype531;
            xfer += iprot->readListBegin(_etype531, _size528);
            this->txn_ids.resize(_size528);
            uint32_t _i532;
            for (_i532 = 0; _i532 < _size528; ++_i532)
            {
              xfer += iprot->readI64(this->txn_ids[_i532]);
            }
            xfer += iprot->readListEnd();
          }
          isset_txn_ids = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txn_ids)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t OpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("OpenTxnsResponse");

  xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->txn_ids.size()));
    std::vector<int64_t> ::const_iterator _iter533;
    for (_iter533 = this->txn_ids.begin(); _iter533 != this->txn_ids.end(); ++_iter533)
    {
      xfer += oprot->writeI64((*_iter533));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(OpenTxnsResponse &a, OpenTxnsResponse &b) {
  using ::std::swap;
  swap(a.txn_ids, b.txn_ids);
}

OpenTxnsResponse::OpenTxnsResponse(const OpenTxnsResponse& other534) {
  txn_ids = other534.txn_ids;
}
OpenTxnsResponse& OpenTxnsResponse::operator=(const OpenTxnsResponse& other535) {
  txn_ids = other535.txn_ids;
  return *this;
}
void OpenTxnsResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "OpenTxnsResponse(";
  out << "txn_ids=" << to_string(txn_ids);
  out << ")";
}


AbortTxnRequest::~AbortTxnRequest() throw() {
}


void AbortTxnRequest::__set_txnid(const int64_t val) {
  this->txnid = val;
}

uint32_t AbortTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txnid = 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_I64) {
          xfer += iprot->readI64(this->txnid);
          isset_txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txnid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AbortTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AbortTxnRequest");

  xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->txnid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AbortTxnRequest &a, AbortTxnRequest &b) {
  using ::std::swap;
  swap(a.txnid, b.txnid);
}

AbortTxnRequest::AbortTxnRequest(const AbortTxnRequest& other536) {
  txnid = other536.txnid;
}
AbortTxnRequest& AbortTxnRequest::operator=(const AbortTxnRequest& other537) {
  txnid = other537.txnid;
  return *this;
}
void AbortTxnRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AbortTxnRequest(";
  out << "txnid=" << to_string(txnid);
  out << ")";
}


AbortTxnsRequest::~AbortTxnsRequest() throw() {
}


void AbortTxnsRequest::__set_txn_ids(const std::vector<int64_t> & val) {
  this->txn_ids = val;
}

uint32_t AbortTxnsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txn_ids = 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->txn_ids.clear();
            uint32_t _size538;
            ::apache::thrift::protocol::TType _etype541;
            xfer += iprot->readListBegin(_etype541, _size538);
            this->txn_ids.resize(_size538);
            uint32_t _i542;
            for (_i542 = 0; _i542 < _size538; ++_i542)
            {
              xfer += iprot->readI64(this->txn_ids[_i542]);
            }
            xfer += iprot->readListEnd();
          }
          isset_txn_ids = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txn_ids)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AbortTxnsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AbortTxnsRequest");

  xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->txn_ids.size()));
    std::vector<int64_t> ::const_iterator _iter543;
    for (_iter543 = this->txn_ids.begin(); _iter543 != this->txn_ids.end(); ++_iter543)
    {
      xfer += oprot->writeI64((*_iter543));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AbortTxnsRequest &a, AbortTxnsRequest &b) {
  using ::std::swap;
  swap(a.txn_ids, b.txn_ids);
}

AbortTxnsRequest::AbortTxnsRequest(const AbortTxnsRequest& other544) {
  txn_ids = other544.txn_ids;
}
AbortTxnsRequest& AbortTxnsRequest::operator=(const AbortTxnsRequest& other545) {
  txn_ids = other545.txn_ids;
  return *this;
}
void AbortTxnsRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AbortTxnsRequest(";
  out << "txn_ids=" << to_string(txn_ids);
  out << ")";
}


CommitTxnRequest::~CommitTxnRequest() throw() {
}


void CommitTxnRequest::__set_txnid(const int64_t val) {
  this->txnid = val;
}

uint32_t CommitTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txnid = 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_I64) {
          xfer += iprot->readI64(this->txnid);
          isset_txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txnid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CommitTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CommitTxnRequest");

  xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->txnid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CommitTxnRequest &a, CommitTxnRequest &b) {
  using ::std::swap;
  swap(a.txnid, b.txnid);
}

CommitTxnRequest::CommitTxnRequest(const CommitTxnRequest& other546) {
  txnid = other546.txnid;
}
CommitTxnRequest& CommitTxnRequest::operator=(const CommitTxnRequest& other547) {
  txnid = other547.txnid;
  return *this;
}
void CommitTxnRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CommitTxnRequest(";
  out << "txnid=" << to_string(txnid);
  out << ")";
}


LockComponent::~LockComponent() throw() {
}


void LockComponent::__set_type(const LockType::type val) {
  this->type = val;
}

void LockComponent::__set_level(const LockLevel::type val) {
  this->level = val;
}

void LockComponent::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void LockComponent::__set_tablename(const std::string& val) {
  this->tablename = val;
__isset.tablename = true;
}

void LockComponent::__set_partitionname(const std::string& val) {
  this->partitionname = val;
__isset.partitionname = true;
}

void LockComponent::__set_operationType(const DataOperationType::type val) {
  this->operationType = val;
__isset.operationType = true;
}

void LockComponent::__set_isAcid(const bool val) {
  this->isAcid = val;
__isset.isAcid = true;
}

void LockComponent::__set_isDynamicPartitionWrite(const bool val) {
  this->isDynamicPartitionWrite = val;
__isset.isDynamicPartitionWrite = true;
}

uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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;
  bool isset_level = false;
  bool isset_dbname = 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 ecast548;
          xfer += iprot->readI32(ecast548);
          this->type = (LockType::type)ecast548;
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast549;
          xfer += iprot->readI32(ecast549);
          this->level = (LockLevel::type)ecast549;
          isset_level = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          this->__isset.tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partitionname);
          this->__isset.partitionname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast550;
          xfer += iprot->readI32(ecast550);
          this->operationType = (DataOperationType::type)ecast550;
          this->__isset.operationType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isAcid);
          this->__isset.isAcid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isDynamicPartitionWrite);
          this->__isset.isDynamicPartitionWrite = 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);
  if (!isset_level)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("LockComponent");

  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->type);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32((int32_t)this->level);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.tablename) {
    xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->tablename);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.partitionname) {
    xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->partitionname);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.operationType) {
    xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6);
    xfer += oprot->writeI32((int32_t)this->operationType);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.isAcid) {
    xfer += oprot->writeFieldBegin("isAcid", ::apache::thrift::protocol::T_BOOL, 7);
    xfer += oprot->writeBool(this->isAcid);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.isDynamicPartitionWrite) {
    xfer += oprot->writeFieldBegin("isDynamicPartitionWrite", ::apache::thrift::protocol::T_BOOL, 8);
    xfer += oprot->writeBool(this->isDynamicPartitionWrite);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(LockComponent &a, LockComponent &b) {
  using ::std::swap;
  swap(a.type, b.type);
  swap(a.level, b.level);
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partitionname, b.partitionname);
  swap(a.operationType, b.operationType);
  swap(a.isAcid, b.isAcid);
  swap(a.isDynamicPartitionWrite, b.isDynamicPartitionWrite);
  swap(a.__isset, b.__isset);
}

LockComponent::LockComponent(const LockComponent& other551) {
  type = other551.type;
  level = other551.level;
  dbname = other551.dbname;
  tablename = other551.tablename;
  partitionname = other551.partitionname;
  operationType = other551.operationType;
  isAcid = other551.isAcid;
  isDynamicPartitionWrite = other551.isDynamicPartitionWrite;
  __isset = other551.__isset;
}
LockComponent& LockComponent::operator=(const LockComponent& other552) {
  type = other552.type;
  level = other552.level;
  dbname = other552.dbname;
  tablename = other552.tablename;
  partitionname = other552.partitionname;
  operationType = other552.operationType;
  isAcid = other552.isAcid;
  isDynamicPartitionWrite = other552.isDynamicPartitionWrite;
  __isset = other552.__isset;
  return *this;
}
void LockComponent::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "LockComponent(";
  out << "type=" << to_string(type);
  out << ", " << "level=" << to_string(level);
  out << ", " << "dbname=" << to_string(dbname);
  out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
  out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>"));
  out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
  out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : (out << "<null>"));
  out << ", " << "isDynamicPartitionWrite="; (__isset.isDynamicPartitionWrite ? (out << to_string(isDynamicPartitionWrite)) : (out << "<null>"));
  out << ")";
}


LockRequest::~LockRequest() throw() {
}


void LockRequest::__set_component(const std::vector<LockComponent> & val) {
  this->component = val;
}

void LockRequest::__set_txnid(const int64_t val) {
  this->txnid = val;
__isset.txnid = true;
}

void LockRequest::__set_user(const std::string& val) {
  this->user = val;
}

void LockRequest::__set_hostname(const std::string& val) {
  this->hostname = val;
}

void LockRequest::__set_agentInfo(const std::string& val) {
  this->agentInfo = val;
__isset.agentInfo = true;
}

uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_component = false;
  bool isset_user = false;
  bool isset_hostname = 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->component.clear();
            uint32_t _size553;
            ::apache::thrift::protocol::TType _etype556;
            xfer += iprot->readListBegin(_etype556, _size553);
            this->component.resize(_size553);
            uint32_t _i557;
            for (_i557 = 0; _i557 < _size553; ++_i557)
            {
              xfer += this->component[_i557].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_component = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->txnid);
          this->__isset.txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->user);
          isset_user = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->hostname);
          isset_hostname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->agentInfo);
          this->__isset.agentInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_component)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_user)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hostname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("LockRequest");

  xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->component.size()));
    std::vector<LockComponent> ::const_iterator _iter558;
    for (_iter558 = this->component.begin(); _iter558 != this->component.end(); ++_iter558)
    {
      xfer += (*_iter558).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.txnid) {
    xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
    xfer += oprot->writeI64(this->txnid);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->user);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4);
  xfer += oprot->writeString(this->hostname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.agentInfo) {
    xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->agentInfo);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(LockRequest &a, LockRequest &b) {
  using ::std::swap;
  swap(a.component, b.component);
  swap(a.txnid, b.txnid);
  swap(a.user, b.user);
  swap(a.hostname, b.hostname);
  swap(a.agentInfo, b.agentInfo);
  swap(a.__isset, b.__isset);
}

LockRequest::LockRequest(const LockRequest& other559) {
  component = other559.component;
  txnid = other559.txnid;
  user = other559.user;
  hostname = other559.hostname;
  agentInfo = other559.agentInfo;
  __isset = other559.__isset;
}
LockRequest& LockRequest::operator=(const LockRequest& other560) {
  component = other560.component;
  txnid = other560.txnid;
  user = other560.user;
  hostname = other560.hostname;
  agentInfo = other560.agentInfo;
  __isset = other560.__isset;
  return *this;
}
void LockRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "LockRequest(";
  out << "component=" << to_string(component);
  out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
  out << ", " << "user=" << to_string(user);
  out << ", " << "hostname=" << to_string(hostname);
  out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
  out << ")";
}


LockResponse::~LockResponse() throw() {
}


void LockResponse::__set_lockid(const int64_t val) {
  this->lockid = val;
}

void LockResponse::__set_state(const LockState::type val) {
  this->state = val;
}

uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_lockid = false;
  bool isset_state = 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_I64) {
          xfer += iprot->readI64(this->lockid);
          isset_lockid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast561;
          xfer += iprot->readI32(ecast561);
          this->state = (LockState::type)ecast561;
          isset_state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_lockid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_state)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t LockResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("LockResponse");

  xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->lockid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32((int32_t)this->state);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(LockResponse &a, LockResponse &b) {
  using ::std::swap;
  swap(a.lockid, b.lockid);
  swap(a.state, b.state);
}

LockResponse::LockResponse(const LockResponse& other562) {
  lockid = other562.lockid;
  state = other562.state;
}
LockResponse& LockResponse::operator=(const LockResponse& other563) {
  lockid = other563.lockid;
  state = other563.state;
  return *this;
}
void LockResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "LockResponse(";
  out << "lockid=" << to_string(lockid);
  out << ", " << "state=" << to_string(state);
  out << ")";
}


CheckLockRequest::~CheckLockRequest() throw() {
}


void CheckLockRequest::__set_lockid(const int64_t val) {
  this->lockid = val;
}

void CheckLockRequest::__set_txnid(const int64_t val) {
  this->txnid = val;
__isset.txnid = true;
}

void CheckLockRequest::__set_elapsed_ms(const int64_t val) {
  this->elapsed_ms = val;
__isset.elapsed_ms = true;
}

uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_lockid = 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_I64) {
          xfer += iprot->readI64(this->lockid);
          isset_lockid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->txnid);
          this->__isset.txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->elapsed_ms);
          this->__isset.elapsed_ms = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_lockid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CheckLockRequest");

  xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->lockid);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.txnid) {
    xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
    xfer += oprot->writeI64(this->txnid);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.elapsed_ms) {
    xfer += oprot->writeFieldBegin("elapsed_ms", ::apache::thrift::protocol::T_I64, 3);
    xfer += oprot->writeI64(this->elapsed_ms);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CheckLockRequest &a, CheckLockRequest &b) {
  using ::std::swap;
  swap(a.lockid, b.lockid);
  swap(a.txnid, b.txnid);
  swap(a.elapsed_ms, b.elapsed_ms);
  swap(a.__isset, b.__isset);
}

CheckLockRequest::CheckLockRequest(const CheckLockRequest& other564) {
  lockid = other564.lockid;
  txnid = other564.txnid;
  elapsed_ms = other564.elapsed_ms;
  __isset = other564.__isset;
}
CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other565) {
  lockid = other565.lockid;
  txnid = other565.txnid;
  elapsed_ms = other565.elapsed_ms;
  __isset = other565.__isset;
  return *this;
}
void CheckLockRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CheckLockRequest(";
  out << "lockid=" << to_string(lockid);
  out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
  out << ", " << "elapsed_ms="; (__isset.elapsed_ms ? (out << to_string(elapsed_ms)) : (out << "<null>"));
  out << ")";
}


UnlockRequest::~UnlockRequest() throw() {
}


void UnlockRequest::__set_lockid(const int64_t val) {
  this->lockid = val;
}

uint32_t UnlockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_lockid = 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_I64) {
          xfer += iprot->readI64(this->lockid);
          isset_lockid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_lockid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t UnlockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("UnlockRequest");

  xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->lockid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(UnlockRequest &a, UnlockRequest &b) {
  using ::std::swap;
  swap(a.lockid, b.lockid);
}

UnlockRequest::UnlockRequest(const UnlockRequest& other566) {
  lockid = other566.lockid;
}
UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other567) {
  lockid = other567.lockid;
  return *this;
}
void UnlockRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "UnlockRequest(";
  out << "lockid=" << to_string(lockid);
  out << ")";
}


ShowLocksRequest::~ShowLocksRequest() throw() {
}


void ShowLocksRequest::__set_dbname(const std::string& val) {
  this->dbname = val;
__isset.dbname = true;
}

void ShowLocksRequest::__set_tablename(const std::string& val) {
  this->tablename = val;
__isset.tablename = true;
}

void ShowLocksRequest::__set_partname(const std::string& val) {
  this->partname = val;
__isset.partname = true;
}

void ShowLocksRequest::__set_isExtended(const bool val) {
  this->isExtended = val;
__isset.isExtended = true;
}

uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->dbname);
          this->__isset.dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          this->__isset.tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partname);
          this->__isset.partname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isExtended);
          this->__isset.isExtended = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowLocksRequest");

  if (this->__isset.dbname) {
    xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
    xfer += oprot->writeString(this->dbname);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.tablename) {
    xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
    xfer += oprot->writeString(this->tablename);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.partname) {
    xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->partname);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.isExtended) {
    xfer += oprot->writeFieldBegin("isExtended", ::apache::thrift::protocol::T_BOOL, 4);
    xfer += oprot->writeBool(this->isExtended);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
  using ::std::swap;
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partname, b.partname);
  swap(a.isExtended, b.isExtended);
  swap(a.__isset, b.__isset);
}

ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other568) {
  dbname = other568.dbname;
  tablename = other568.tablename;
  partname = other568.partname;
  isExtended = other568.isExtended;
  __isset = other568.__isset;
}
ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other569) {
  dbname = other569.dbname;
  tablename = other569.tablename;
  partname = other569.partname;
  isExtended = other569.isExtended;
  __isset = other569.__isset;
  return *this;
}
void ShowLocksRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowLocksRequest(";
  out << "dbname="; (__isset.dbname ? (out << to_string(dbname)) : (out << "<null>"));
  out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
  out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "<null>"));
  out << ", " << "isExtended="; (__isset.isExtended ? (out << to_string(isExtended)) : (out << "<null>"));
  out << ")";
}


ShowLocksResponseElement::~ShowLocksResponseElement() throw() {
}


void ShowLocksResponseElement::__set_lockid(const int64_t val) {
  this->lockid = val;
}

void ShowLocksResponseElement::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void ShowLocksResponseElement::__set_tablename(const std::string& val) {
  this->tablename = val;
__isset.tablename = true;
}

void ShowLocksResponseElement::__set_partname(const std::string& val) {
  this->partname = val;
__isset.partname = true;
}

void ShowLocksResponseElement::__set_state(const LockState::type val) {
  this->state = val;
}

void ShowLocksResponseElement::__set_type(const LockType::type val) {
  this->type = val;
}

void ShowLocksResponseElement::__set_txnid(const int64_t val) {
  this->txnid = val;
__isset.txnid = true;
}

void ShowLocksResponseElement::__set_lastheartbeat(const int64_t val) {
  this->lastheartbeat = val;
}

void ShowLocksResponseElement::__set_acquiredat(const int64_t val) {
  this->acquiredat = val;
__isset.acquiredat = true;
}

void ShowLocksResponseElement::__set_user(const std::string& val) {
  this->user = val;
}

void ShowLocksResponseElement::__set_hostname(const std::string& val) {
  this->hostname = val;
}

void ShowLocksResponseElement::__set_heartbeatCount(const int32_t val) {
  this->heartbeatCount = val;
__isset.heartbeatCount = true;
}

void ShowLocksResponseElement::__set_agentInfo(const std::string& val) {
  this->agentInfo = val;
__isset.agentInfo = true;
}

void ShowLocksResponseElement::__set_blockedByExtId(const int64_t val) {
  this->blockedByExtId = val;
__isset.blockedByExtId = true;
}

void ShowLocksResponseElement::__set_blockedByIntId(const int64_t val) {
  this->blockedByIntId = val;
__isset.blockedByIntId = true;
}

void ShowLocksResponseElement::__set_lockIdInternal(const int64_t val) {
  this->lockIdInternal = val;
__isset.lockIdInternal = true;
}

uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_lockid = false;
  bool isset_dbname = false;
  bool isset_state = false;
  bool isset_type = false;
  bool isset_lastheartbeat = false;
  bool isset_user = false;
  bool isset_hostname = 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_I64) {
          xfer += iprot->readI64(this->lockid);
          isset_lockid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          this->__isset.tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partname);
          this->__isset.partname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast570;
          xfer += iprot->readI32(ecast570);
          this->state = (LockState::type)ecast570;
          isset_state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast571;
          xfer += iprot->readI32(ecast571);
          this->type = (LockType::type)ecast571;
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->txnid);
          this->__isset.txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->lastheartbeat);
          isset_lastheartbeat = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->acquiredat);
          this->__isset.acquiredat = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->user);
          isset_user = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 11:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->hostname);
          isset_hostname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 12:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->heartbeatCount);
          this->__isset.heartbeatCount = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 13:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->agentInfo);
          this->__isset.agentInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 14:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->blockedByExtId);
          this->__isset.blockedByExtId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 15:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->blockedByIntId);
          this->__isset.blockedByIntId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 16:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->lockIdInternal);
          this->__isset.lockIdInternal = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_lockid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_state)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_type)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_lastheartbeat)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_user)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hostname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ShowLocksResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowLocksResponseElement");

  xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->lockid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.tablename) {
    xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->tablename);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.partname) {
    xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->partname);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 5);
  xfer += oprot->writeI32((int32_t)this->state);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6);
  xfer += oprot->writeI32((int32_t)this->type);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.txnid) {
    xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 7);
    xfer += oprot->writeI64(this->txnid);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("lastheartbeat", ::apache::thrift::protocol::T_I64, 8);
  xfer += oprot->writeI64(this->lastheartbeat);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.acquiredat) {
    xfer += oprot->writeFieldBegin("acquiredat", ::apache::thrift::protocol::T_I64, 9);
    xfer += oprot->writeI64(this->acquiredat);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 10);
  xfer += oprot->writeString(this->user);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 11);
  xfer += oprot->writeString(this->hostname);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.heartbeatCount) {
    xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 12);
    xfer += oprot->writeI32(this->heartbeatCount);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.agentInfo) {
    xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 13);
    xfer += oprot->writeString(this->agentInfo);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.blockedByExtId) {
    xfer += oprot->writeFieldBegin("blockedByExtId", ::apache::thrift::protocol::T_I64, 14);
    xfer += oprot->writeI64(this->blockedByExtId);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.blockedByIntId) {
    xfer += oprot->writeFieldBegin("blockedByIntId", ::apache::thrift::protocol::T_I64, 15);
    xfer += oprot->writeI64(this->blockedByIntId);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.lockIdInternal) {
    xfer += oprot->writeFieldBegin("lockIdInternal", ::apache::thrift::protocol::T_I64, 16);
    xfer += oprot->writeI64(this->lockIdInternal);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) {
  using ::std::swap;
  swap(a.lockid, b.lockid);
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partname, b.partname);
  swap(a.state, b.state);
  swap(a.type, b.type);
  swap(a.txnid, b.txnid);
  swap(a.lastheartbeat, b.lastheartbeat);
  swap(a.acquiredat, b.acquiredat);
  swap(a.user, b.user);
  swap(a.hostname, b.hostname);
  swap(a.heartbeatCount, b.heartbeatCount);
  swap(a.agentInfo, b.agentInfo);
  swap(a.blockedByExtId, b.blockedByExtId);
  swap(a.blockedByIntId, b.blockedByIntId);
  swap(a.lockIdInternal, b.lockIdInternal);
  swap(a.__isset, b.__isset);
}

ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other572) {
  lockid = other572.lockid;
  dbname = other572.dbname;
  tablename = other572.tablename;
  partname = other572.partname;
  state = other572.state;
  type = other572.type;
  txnid = other572.txnid;
  lastheartbeat = other572.lastheartbeat;
  acquiredat = other572.acquiredat;
  user = other572.user;
  hostname = other572.hostname;
  heartbeatCount = other572.heartbeatCount;
  agentInfo = other572.agentInfo;
  blockedByExtId = other572.blockedByExtId;
  blockedByIntId = other572.blockedByIntId;
  lockIdInternal = other572.lockIdInternal;
  __isset = other572.__isset;
}
ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other573) {
  lockid = other573.lockid;
  dbname = other573.dbname;
  tablename = other573.tablename;
  partname = other573.partname;
  state = other573.state;
  type = other573.type;
  txnid = other573.txnid;
  lastheartbeat = other573.lastheartbeat;
  acquiredat = other573.acquiredat;
  user = other573.user;
  hostname = other573.hostname;
  heartbeatCount = other573.heartbeatCount;
  agentInfo = other573.agentInfo;
  blockedByExtId = other573.blockedByExtId;
  blockedByIntId = other573.blockedByIntId;
  lockIdInternal = other573.lockIdInternal;
  __isset = other573.__isset;
  return *this;
}
void ShowLocksResponseElement::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowLocksResponseElement(";
  out << "lockid=" << to_string(lockid);
  out << ", " << "dbname=" << to_string(dbname);
  out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
  out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "<null>"));
  out << ", " << "state=" << to_string(state);
  out << ", " << "type=" << to_string(type);
  out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
  out << ", " << "lastheartbeat=" << to_string(lastheartbeat);
  out << ", " << "acquiredat="; (__isset.acquiredat ? (out << to_string(acquiredat)) : (out << "<null>"));
  out << ", " << "user=" << to_string(user);
  out << ", " << "hostname=" << to_string(hostname);
  out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "<null>"));
  out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
  out << ", " << "blockedByExtId="; (__isset.blockedByExtId ? (out << to_string(blockedByExtId)) : (out << "<null>"));
  out << ", " << "blockedByIntId="; (__isset.blockedByIntId ? (out << to_string(blockedByIntId)) : (out << "<null>"));
  out << ", " << "lockIdInternal="; (__isset.lockIdInternal ? (out << to_string(lockIdInternal)) : (out << "<null>"));
  out << ")";
}


ShowLocksResponse::~ShowLocksResponse() throw() {
}


void ShowLocksResponse::__set_locks(const std::vector<ShowLocksResponseElement> & val) {
  this->locks = val;
}

uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->locks.clear();
            uint32_t _size574;
            ::apache::thrift::protocol::TType _etype577;
            xfer += iprot->readListBegin(_etype577, _size574);
            this->locks.resize(_size574);
            uint32_t _i578;
            for (_i578 = 0; _i578 < _size574; ++_i578)
            {
              xfer += this->locks[_i578].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.locks = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowLocksResponse");

  xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locks.size()));
    std::vector<ShowLocksResponseElement> ::const_iterator _iter579;
    for (_iter579 = this->locks.begin(); _iter579 != this->locks.end(); ++_iter579)
    {
      xfer += (*_iter579).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowLocksResponse &a, ShowLocksResponse &b) {
  using ::std::swap;
  swap(a.locks, b.locks);
  swap(a.__isset, b.__isset);
}

ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other580) {
  locks = other580.locks;
  __isset = other580.__isset;
}
ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other581) {
  locks = other581.locks;
  __isset = other581.__isset;
  return *this;
}
void ShowLocksResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowLocksResponse(";
  out << "locks=" << to_string(locks);
  out << ")";
}


HeartbeatRequest::~HeartbeatRequest() throw() {
}


void HeartbeatRequest::__set_lockid(const int64_t val) {
  this->lockid = val;
__isset.lockid = true;
}

void HeartbeatRequest::__set_txnid(const int64_t val) {
  this->txnid = val;
__isset.txnid = true;
}

uint32_t HeartbeatRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->lockid);
          this->__isset.lockid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->txnid);
          this->__isset.txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t HeartbeatRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("HeartbeatRequest");

  if (this->__isset.lockid) {
    xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
    xfer += oprot->writeI64(this->lockid);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.txnid) {
    xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
    xfer += oprot->writeI64(this->txnid);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(HeartbeatRequest &a, HeartbeatRequest &b) {
  using ::std::swap;
  swap(a.lockid, b.lockid);
  swap(a.txnid, b.txnid);
  swap(a.__isset, b.__isset);
}

HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other582) {
  lockid = other582.lockid;
  txnid = other582.txnid;
  __isset = other582.__isset;
}
HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other583) {
  lockid = other583.lockid;
  txnid = other583.txnid;
  __isset = other583.__isset;
  return *this;
}
void HeartbeatRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "HeartbeatRequest(";
  out << "lockid="; (__isset.lockid ? (out << to_string(lockid)) : (out << "<null>"));
  out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
  out << ")";
}


HeartbeatTxnRangeRequest::~HeartbeatTxnRangeRequest() throw() {
}


void HeartbeatTxnRangeRequest::__set_min(const int64_t val) {
  this->min = val;
}

void HeartbeatTxnRangeRequest::__set_max(const int64_t val) {
  this->max = val;
}

uint32_t HeartbeatTxnRangeRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_min = false;
  bool isset_max = 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_I64) {
          xfer += iprot->readI64(this->min);
          isset_min = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->max);
          isset_max = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_min)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_max)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t HeartbeatTxnRangeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("HeartbeatTxnRangeRequest");

  xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->min);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I64, 2);
  xfer += oprot->writeI64(this->max);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) {
  using ::std::swap;
  swap(a.min, b.min);
  swap(a.max, b.max);
}

HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other584) {
  min = other584.min;
  max = other584.max;
}
HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other585) {
  min = other585.min;
  max = other585.max;
  return *this;
}
void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "HeartbeatTxnRangeRequest(";
  out << "min=" << to_string(min);
  out << ", " << "max=" << to_string(max);
  out << ")";
}


HeartbeatTxnRangeResponse::~HeartbeatTxnRangeResponse() throw() {
}


void HeartbeatTxnRangeResponse::__set_aborted(const std::set<int64_t> & val) {
  this->aborted = val;
}

void HeartbeatTxnRangeResponse::__set_nosuch(const std::set<int64_t> & val) {
  this->nosuch = val;
}

uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_aborted = false;
  bool isset_nosuch = 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_SET) {
          {
            this->aborted.clear();
            uint32_t _size586;
            ::apache::thrift::protocol::TType _etype589;
            xfer += iprot->readSetBegin(_etype589, _size586);
            uint32_t _i590;
            for (_i590 = 0; _i590 < _size586; ++_i590)
            {
              int64_t _elem591;
              xfer += iprot->readI64(_elem591);
              this->aborted.insert(_elem591);
            }
            xfer += iprot->readSetEnd();
          }
          isset_aborted = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_SET) {
          {
            this->nosuch.clear();
            uint32_t _size592;
            ::apache::thrift::protocol::TType _etype595;
            xfer += iprot->readSetBegin(_etype595, _size592);
            uint32_t _i596;
            for (_i596 = 0; _i596 < _size592; ++_i596)
            {
              int64_t _elem597;
              xfer += iprot->readI64(_elem597);
              this->nosuch.insert(_elem597);
            }
            xfer += iprot->readSetEnd();
          }
          isset_nosuch = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_aborted)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_nosuch)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("HeartbeatTxnRangeResponse");

  xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1);
  {
    xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->aborted.size()));
    std::set<int64_t> ::const_iterator _iter598;
    for (_iter598 = this->aborted.begin(); _iter598 != this->aborted.end(); ++_iter598)
    {
      xfer += oprot->writeI64((*_iter598));
    }
    xfer += oprot->writeSetEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2);
  {
    xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->nosuch.size()));
    std::set<int64_t> ::const_iterator _iter599;
    for (_iter599 = this->nosuch.begin(); _iter599 != this->nosuch.end(); ++_iter599)
    {
      xfer += oprot->writeI64((*_iter599));
    }
    xfer += oprot->writeSetEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) {
  using ::std::swap;
  swap(a.aborted, b.aborted);
  swap(a.nosuch, b.nosuch);
}

HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other600) {
  aborted = other600.aborted;
  nosuch = other600.nosuch;
}
HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other601) {
  aborted = other601.aborted;
  nosuch = other601.nosuch;
  return *this;
}
void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "HeartbeatTxnRangeResponse(";
  out << "aborted=" << to_string(aborted);
  out << ", " << "nosuch=" << to_string(nosuch);
  out << ")";
}


CompactionRequest::~CompactionRequest() throw() {
}


void CompactionRequest::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void CompactionRequest::__set_tablename(const std::string& val) {
  this->tablename = val;
}

void CompactionRequest::__set_partitionname(const std::string& val) {
  this->partitionname = val;
__isset.partitionname = true;
}

void CompactionRequest::__set_type(const CompactionType::type val) {
  this->type = val;
}

void CompactionRequest::__set_runas(const std::string& val) {
  this->runas = val;
__isset.runas = true;
}

void CompactionRequest::__set_properties(const std::map<std::string, std::string> & val) {
  this->properties = val;
__isset.properties = true;
}

uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbname = false;
  bool isset_tablename = false;
  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_STRING) {
          xfer += iprot->readString(this->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          isset_tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partitionname);
          this->__isset.partitionname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast602;
          xfer += iprot->readI32(ecast602);
          this->type = (CompactionType::type)ecast602;
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->runas);
          this->__isset.runas = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->properties.clear();
            uint32_t _size603;
            ::apache::thrift::protocol::TType _ktype604;
            ::apache::thrift::protocol::TType _vtype605;
            xfer += iprot->readMapBegin(_ktype604, _vtype605, _size603);
            uint32_t _i607;
            for (_i607 = 0; _i607 < _size603; ++_i607)
            {
              std::string _key608;
              xfer += iprot->readString(_key608);
              std::string& _val609 = this->properties[_key608];
              xfer += iprot->readString(_val609);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.properties = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tablename)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_type)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CompactionRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CompactionRequest");

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tablename);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.partitionname) {
    xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->partitionname);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32((int32_t)this->type);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.runas) {
    xfer += oprot->writeFieldBegin("runas", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->runas);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.properties) {
    xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 6);
    {
      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
      std::map<std::string, std::string> ::const_iterator _iter610;
      for (_iter610 = this->properties.begin(); _iter610 != this->properties.end(); ++_iter610)
      {
        xfer += oprot->writeString(_iter610->first);
        xfer += oprot->writeString(_iter610->second);
      }
      xfer += oprot->writeMapEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CompactionRequest &a, CompactionRequest &b) {
  using ::std::swap;
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partitionname, b.partitionname);
  swap(a.type, b.type);
  swap(a.runas, b.runas);
  swap(a.properties, b.properties);
  swap(a.__isset, b.__isset);
}

CompactionRequest::CompactionRequest(const CompactionRequest& other611) {
  dbname = other611.dbname;
  tablename = other611.tablename;
  partitionname = other611.partitionname;
  type = other611.type;
  runas = other611.runas;
  properties = other611.properties;
  __isset = other611.__isset;
}
CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other612) {
  dbname = other612.dbname;
  tablename = other612.tablename;
  partitionname = other612.partitionname;
  type = other612.type;
  runas = other612.runas;
  properties = other612.properties;
  __isset = other612.__isset;
  return *this;
}
void CompactionRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CompactionRequest(";
  out << "dbname=" << to_string(dbname);
  out << ", " << "tablename=" << to_string(tablename);
  out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>"));
  out << ", " << "type=" << to_string(type);
  out << ", " << "runas="; (__isset.runas ? (out << to_string(runas)) : (out << "<null>"));
  out << ", " << "properties="; (__isset.properties ? (out << to_string(properties)) : (out << "<null>"));
  out << ")";
}


CompactionResponse::~CompactionResponse() throw() {
}


void CompactionResponse::__set_id(const int64_t val) {
  this->id = val;
}

void CompactionResponse::__set_state(const std::string& val) {
  this->state = val;
}

void CompactionResponse::__set_accepted(const bool val) {
  this->accepted = val;
}

uint32_t CompactionResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_id = false;
  bool isset_state = false;
  bool isset_accepted = 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_I64) {
          xfer += iprot->readI64(this->id);
          isset_id = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->state);
          isset_state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->accepted);
          isset_accepted = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_id)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_state)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_accepted)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CompactionResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CompactionResponse");

  xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->id);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->state);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("accepted", ::apache::thrift::protocol::T_BOOL, 3);
  xfer += oprot->writeBool(this->accepted);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CompactionResponse &a, CompactionResponse &b) {
  using ::std::swap;
  swap(a.id, b.id);
  swap(a.state, b.state);
  swap(a.accepted, b.accepted);
}

CompactionResponse::CompactionResponse(const CompactionResponse& other613) {
  id = other613.id;
  state = other613.state;
  accepted = other613.accepted;
}
CompactionResponse& CompactionResponse::operator=(const CompactionResponse& other614) {
  id = other614.id;
  state = other614.state;
  accepted = other614.accepted;
  return *this;
}
void CompactionResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CompactionResponse(";
  out << "id=" << to_string(id);
  out << ", " << "state=" << to_string(state);
  out << ", " << "accepted=" << to_string(accepted);
  out << ")";
}


ShowCompactRequest::~ShowCompactRequest() throw() {
}


uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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;
    }
    xfer += iprot->skip(ftype);
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ShowCompactRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowCompactRequest");

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowCompactRequest &a, ShowCompactRequest &b) {
  using ::std::swap;
  (void) a;
  (void) b;
}

ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other615) {
  (void) other615;
}
ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other616) {
  (void) other616;
  return *this;
}
void ShowCompactRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowCompactRequest(";
  out << ")";
}


ShowCompactResponseElement::~ShowCompactResponseElement() throw() {
}


void ShowCompactResponseElement::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void ShowCompactResponseElement::__set_tablename(const std::string& val) {
  this->tablename = val;
}

void ShowCompactResponseElement::__set_partitionname(const std::string& val) {
  this->partitionname = val;
__isset.partitionname = true;
}

void ShowCompactResponseElement::__set_type(const CompactionType::type val) {
  this->type = val;
}

void ShowCompactResponseElement::__set_state(const std::string& val) {
  this->state = val;
}

void ShowCompactResponseElement::__set_workerid(const std::string& val) {
  this->workerid = val;
__isset.workerid = true;
}

void ShowCompactResponseElement::__set_start(const int64_t val) {
  this->start = val;
__isset.start = true;
}

void ShowCompactResponseElement::__set_runAs(const std::string& val) {
  this->runAs = val;
__isset.runAs = true;
}

void ShowCompactResponseElement::__set_hightestTxnId(const int64_t val) {
  this->hightestTxnId = val;
__isset.hightestTxnId = true;
}

void ShowCompactResponseElement::__set_metaInfo(const std::string& val) {
  this->metaInfo = val;
__isset.metaInfo = true;
}

void ShowCompactResponseElement::__set_endTime(const int64_t val) {
  this->endTime = val;
__isset.endTime = true;
}

void ShowCompactResponseElement::__set_hadoopJobId(const std::string& val) {
  this->hadoopJobId = val;
__isset.hadoopJobId = true;
}

void ShowCompactResponseElement::__set_id(const int64_t val) {
  this->id = val;
__isset.id = true;
}

uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbname = false;
  bool isset_tablename = false;
  bool isset_type = false;
  bool isset_state = 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->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          isset_tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partitionname);
          this->__isset.partitionname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast617;
          xfer += iprot->readI32(ecast617);
          this->type = (CompactionType::type)ecast617;
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->state);
          isset_state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->workerid);
          this->__isset.workerid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->start);
          this->__isset.start = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->runAs);
          this->__isset.runAs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->hightestTxnId);
          this->__isset.hightestTxnId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 10:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->metaInfo);
          this->__isset.metaInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 11:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->endTime);
          this->__isset.endTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 12:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->hadoopJobId);
          this->__isset.hadoopJobId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 13:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->id);
          this->__isset.id = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tablename)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_type)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_state)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowCompactResponseElement");

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tablename);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.partitionname) {
    xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->partitionname);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
  xfer += oprot->writeI32((int32_t)this->type);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 5);
  xfer += oprot->writeString(this->state);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.workerid) {
    xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6);
    xfer += oprot->writeString(this->workerid);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.start) {
    xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7);
    xfer += oprot->writeI64(this->start);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.runAs) {
    xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8);
    xfer += oprot->writeString(this->runAs);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.hightestTxnId) {
    xfer += oprot->writeFieldBegin("hightestTxnId", ::apache::thrift::protocol::T_I64, 9);
    xfer += oprot->writeI64(this->hightestTxnId);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.metaInfo) {
    xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 10);
    xfer += oprot->writeString(this->metaInfo);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.endTime) {
    xfer += oprot->writeFieldBegin("endTime", ::apache::thrift::protocol::T_I64, 11);
    xfer += oprot->writeI64(this->endTime);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.hadoopJobId) {
    xfer += oprot->writeFieldBegin("hadoopJobId", ::apache::thrift::protocol::T_STRING, 12);
    xfer += oprot->writeString(this->hadoopJobId);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.id) {
    xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 13);
    xfer += oprot->writeI64(this->id);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) {
  using ::std::swap;
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partitionname, b.partitionname);
  swap(a.type, b.type);
  swap(a.state, b.state);
  swap(a.workerid, b.workerid);
  swap(a.start, b.start);
  swap(a.runAs, b.runAs);
  swap(a.hightestTxnId, b.hightestTxnId);
  swap(a.metaInfo, b.metaInfo);
  swap(a.endTime, b.endTime);
  swap(a.hadoopJobId, b.hadoopJobId);
  swap(a.id, b.id);
  swap(a.__isset, b.__isset);
}

ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other618) {
  dbname = other618.dbname;
  tablename = other618.tablename;
  partitionname = other618.partitionname;
  type = other618.type;
  state = other618.state;
  workerid = other618.workerid;
  start = other618.start;
  runAs = other618.runAs;
  hightestTxnId = other618.hightestTxnId;
  metaInfo = other618.metaInfo;
  endTime = other618.endTime;
  hadoopJobId = other618.hadoopJobId;
  id = other618.id;
  __isset = other618.__isset;
}
ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other619) {
  dbname = other619.dbname;
  tablename = other619.tablename;
  partitionname = other619.partitionname;
  type = other619.type;
  state = other619.state;
  workerid = other619.workerid;
  start = other619.start;
  runAs = other619.runAs;
  hightestTxnId = other619.hightestTxnId;
  metaInfo = other619.metaInfo;
  endTime = other619.endTime;
  hadoopJobId = other619.hadoopJobId;
  id = other619.id;
  __isset = other619.__isset;
  return *this;
}
void ShowCompactResponseElement::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowCompactResponseElement(";
  out << "dbname=" << to_string(dbname);
  out << ", " << "tablename=" << to_string(tablename);
  out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>"));
  out << ", " << "type=" << to_string(type);
  out << ", " << "state=" << to_string(state);
  out << ", " << "workerid="; (__isset.workerid ? (out << to_string(workerid)) : (out << "<null>"));
  out << ", " << "start="; (__isset.start ? (out << to_string(start)) : (out << "<null>"));
  out << ", " << "runAs="; (__isset.runAs ? (out << to_string(runAs)) : (out << "<null>"));
  out << ", " << "hightestTxnId="; (__isset.hightestTxnId ? (out << to_string(hightestTxnId)) : (out << "<null>"));
  out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "<null>"));
  out << ", " << "endTime="; (__isset.endTime ? (out << to_string(endTime)) : (out << "<null>"));
  out << ", " << "hadoopJobId="; (__isset.hadoopJobId ? (out << to_string(hadoopJobId)) : (out << "<null>"));
  out << ", " << "id="; (__isset.id ? (out << to_string(id)) : (out << "<null>"));
  out << ")";
}


ShowCompactResponse::~ShowCompactResponse() throw() {
}


void ShowCompactResponse::__set_compacts(const std::vector<ShowCompactResponseElement> & val) {
  this->compacts = val;
}

uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_compacts = 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->compacts.clear();
            uint32_t _size620;
            ::apache::thrift::protocol::TType _etype623;
            xfer += iprot->readListBegin(_etype623, _size620);
            this->compacts.resize(_size620);
            uint32_t _i624;
            for (_i624 = 0; _i624 < _size620; ++_i624)
            {
              xfer += this->compacts[_i624].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_compacts = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_compacts)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ShowCompactResponse");

  xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->compacts.size()));
    std::vector<ShowCompactResponseElement> ::const_iterator _iter625;
    for (_iter625 = this->compacts.begin(); _iter625 != this->compacts.end(); ++_iter625)
    {
      xfer += (*_iter625).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ShowCompactResponse &a, ShowCompactResponse &b) {
  using ::std::swap;
  swap(a.compacts, b.compacts);
}

ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other626) {
  compacts = other626.compacts;
}
ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other627) {
  compacts = other627.compacts;
  return *this;
}
void ShowCompactResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ShowCompactResponse(";
  out << "compacts=" << to_string(compacts);
  out << ")";
}


AddDynamicPartitions::~AddDynamicPartitions() throw() {
}


void AddDynamicPartitions::__set_txnid(const int64_t val) {
  this->txnid = val;
}

void AddDynamicPartitions::__set_dbname(const std::string& val) {
  this->dbname = val;
}

void AddDynamicPartitions::__set_tablename(const std::string& val) {
  this->tablename = val;
}

void AddDynamicPartitions::__set_partitionnames(const std::vector<std::string> & val) {
  this->partitionnames = val;
}

void AddDynamicPartitions::__set_operationType(const DataOperationType::type val) {
  this->operationType = val;
__isset.operationType = true;
}

uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_txnid = false;
  bool isset_dbname = false;
  bool isset_tablename = false;
  bool isset_partitionnames = 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_I64) {
          xfer += iprot->readI64(this->txnid);
          isset_txnid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbname);
          isset_dbname = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tablename);
          isset_tablename = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partitionnames.clear();
            uint32_t _size628;
            ::apache::thrift::protocol::TType _etype631;
            xfer += iprot->readListBegin(_etype631, _size628);
            this->partitionnames.resize(_size628);
            uint32_t _i632;
            for (_i632 = 0; _i632 < _size628; ++_i632)
            {
              xfer += iprot->readString(this->partitionnames[_i632]);
            }
            xfer += iprot->readListEnd();
          }
          isset_partitionnames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast633;
          xfer += iprot->readI32(ecast633);
          this->operationType = (DataOperationType::type)ecast633;
          this->__isset.operationType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_txnid)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_dbname)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tablename)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_partitionnames)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AddDynamicPartitions");

  xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->txnid);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->dbname);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->tablename);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partitionnames", ::apache::thrift::protocol::T_LIST, 4);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionnames.size()));
    std::vector<std::string> ::const_iterator _iter634;
    for (_iter634 = this->partitionnames.begin(); _iter634 != this->partitionnames.end(); ++_iter634)
    {
      xfer += oprot->writeString((*_iter634));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.operationType) {
    xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5);
    xfer += oprot->writeI32((int32_t)this->operationType);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) {
  using ::std::swap;
  swap(a.txnid, b.txnid);
  swap(a.dbname, b.dbname);
  swap(a.tablename, b.tablename);
  swap(a.partitionnames, b.partitionnames);
  swap(a.operationType, b.operationType);
  swap(a.__isset, b.__isset);
}

AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other635) {
  txnid = other635.txnid;
  dbname = other635.dbname;
  tablename = other635.tablename;
  partitionnames = other635.partitionnames;
  operationType = other635.operationType;
  __isset = other635.__isset;
}
AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other636) {
  txnid = other636.txnid;
  dbname = other636.dbname;
  tablename = other636.tablename;
  partitionnames = other636.partitionnames;
  operationType = other636.operationType;
  __isset = other636.__isset;
  return *this;
}
void AddDynamicPartitions::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AddDynamicPartitions(";
  out << "txnid=" << to_string(txnid);
  out << ", " << "dbname=" << to_string(dbname);
  out << ", " << "tablename=" << to_string(tablename);
  out << ", " << "partitionnames=" << to_string(partitionnames);
  out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
  out << ")";
}


NotificationEventRequest::~NotificationEventRequest() throw() {
}


void NotificationEventRequest::__set_lastEvent(const int64_t val) {
  this->lastEvent = val;
}

void NotificationEventRequest::__set_maxEvents(const int32_t val) {
  this->maxEvents = val;
__isset.maxEvents = true;
}

uint32_t NotificationEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_lastEvent = 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_I64) {
          xfer += iprot->readI64(this->lastEvent);
          isset_lastEvent = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->maxEvents);
          this->__isset.maxEvents = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_lastEvent)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t NotificationEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NotificationEventRequest");

  xfer += oprot->writeFieldBegin("lastEvent", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->lastEvent);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.maxEvents) {
    xfer += oprot->writeFieldBegin("maxEvents", ::apache::thrift::protocol::T_I32, 2);
    xfer += oprot->writeI32(this->maxEvents);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NotificationEventRequest &a, NotificationEventRequest &b) {
  using ::std::swap;
  swap(a.lastEvent, b.lastEvent);
  swap(a.maxEvents, b.maxEvents);
  swap(a.__isset, b.__isset);
}

NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other637) {
  lastEvent = other637.lastEvent;
  maxEvents = other637.maxEvents;
  __isset = other637.__isset;
}
NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other638) {
  lastEvent = other638.lastEvent;
  maxEvents = other638.maxEvents;
  __isset = other638.__isset;
  return *this;
}
void NotificationEventRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NotificationEventRequest(";
  out << "lastEvent=" << to_string(lastEvent);
  out << ", " << "maxEvents="; (__isset.maxEvents ? (out << to_string(maxEvents)) : (out << "<null>"));
  out << ")";
}


NotificationEvent::~NotificationEvent() throw() {
}


void NotificationEvent::__set_eventId(const int64_t val) {
  this->eventId = val;
}

void NotificationEvent::__set_eventTime(const int32_t val) {
  this->eventTime = val;
}

void NotificationEvent::__set_eventType(const std::string& val) {
  this->eventType = val;
}

void NotificationEvent::__set_dbName(const std::string& val) {
  this->dbName = val;
__isset.dbName = true;
}

void NotificationEvent::__set_tableName(const std::string& val) {
  this->tableName = val;
__isset.tableName = true;
}

void NotificationEvent::__set_message(const std::string& val) {
  this->message = val;
}

void NotificationEvent::__set_messageFormat(const std::string& val) {
  this->messageFormat = val;
__isset.messageFormat = true;
}

uint32_t NotificationEvent::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_eventId = false;
  bool isset_eventTime = false;
  bool isset_eventType = false;
  bool isset_message = 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_I64) {
          xfer += iprot->readI64(this->eventId);
          isset_eventId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->eventTime);
          isset_eventTime = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->eventType);
          isset_eventType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          this->__isset.tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->message);
          isset_message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->messageFormat);
          this->__isset.messageFormat = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_eventId)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_eventTime)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_eventType)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_message)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t NotificationEvent::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NotificationEvent");

  xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->eventId);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("eventTime", ::apache::thrift::protocol::T_I32, 2);
  xfer += oprot->writeI32(this->eventTime);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->eventType);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.dbName) {
    xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->dbName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.tableName) {
    xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 5);
    xfer += oprot->writeString(this->tableName);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 6);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.messageFormat) {
    xfer += oprot->writeFieldBegin("messageFormat", ::apache::thrift::protocol::T_STRING, 7);
    xfer += oprot->writeString(this->messageFormat);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NotificationEvent &a, NotificationEvent &b) {
  using ::std::swap;
  swap(a.eventId, b.eventId);
  swap(a.eventTime, b.eventTime);
  swap(a.eventType, b.eventType);
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.message, b.message);
  swap(a.messageFormat, b.messageFormat);
  swap(a.__isset, b.__isset);
}

NotificationEvent::NotificationEvent(const NotificationEvent& other639) {
  eventId = other639.eventId;
  eventTime = other639.eventTime;
  eventType = other639.eventType;
  dbName = other639.dbName;
  tableName = other639.tableName;
  message = other639.message;
  messageFormat = other639.messageFormat;
  __isset = other639.__isset;
}
NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other640) {
  eventId = other640.eventId;
  eventTime = other640.eventTime;
  eventType = other640.eventType;
  dbName = other640.dbName;
  tableName = other640.tableName;
  message = other640.message;
  messageFormat = other640.messageFormat;
  __isset = other640.__isset;
  return *this;
}
void NotificationEvent::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NotificationEvent(";
  out << "eventId=" << to_string(eventId);
  out << ", " << "eventTime=" << to_string(eventTime);
  out << ", " << "eventType=" << to_string(eventType);
  out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "<null>"));
  out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "<null>"));
  out << ", " << "message=" << to_string(message);
  out << ", " << "messageFormat="; (__isset.messageFormat ? (out << to_string(messageFormat)) : (out << "<null>"));
  out << ")";
}


NotificationEventResponse::~NotificationEventResponse() throw() {
}


void NotificationEventResponse::__set_events(const std::vector<NotificationEvent> & val) {
  this->events = val;
}

uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_events = 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->events.clear();
            uint32_t _size641;
            ::apache::thrift::protocol::TType _etype644;
            xfer += iprot->readListBegin(_etype644, _size641);
            this->events.resize(_size641);
            uint32_t _i645;
            for (_i645 = 0; _i645 < _size641; ++_i645)
            {
              xfer += this->events[_i645].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_events = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_events)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NotificationEventResponse");

  xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->events.size()));
    std::vector<NotificationEvent> ::const_iterator _iter646;
    for (_iter646 = this->events.begin(); _iter646 != this->events.end(); ++_iter646)
    {
      xfer += (*_iter646).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NotificationEventResponse &a, NotificationEventResponse &b) {
  using ::std::swap;
  swap(a.events, b.events);
}

NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other647) {
  events = other647.events;
}
NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other648) {
  events = other648.events;
  return *this;
}
void NotificationEventResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NotificationEventResponse(";
  out << "events=" << to_string(events);
  out << ")";
}


CurrentNotificationEventId::~CurrentNotificationEventId() throw() {
}


void CurrentNotificationEventId::__set_eventId(const int64_t val) {
  this->eventId = val;
}

uint32_t CurrentNotificationEventId::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_eventId = 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_I64) {
          xfer += iprot->readI64(this->eventId);
          isset_eventId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_eventId)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CurrentNotificationEventId::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CurrentNotificationEventId");

  xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1);
  xfer += oprot->writeI64(this->eventId);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) {
  using ::std::swap;
  swap(a.eventId, b.eventId);
}

CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other649) {
  eventId = other649.eventId;
}
CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other650) {
  eventId = other650.eventId;
  return *this;
}
void CurrentNotificationEventId::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CurrentNotificationEventId(";
  out << "eventId=" << to_string(eventId);
  out << ")";
}


InsertEventRequestData::~InsertEventRequestData() throw() {
}


void InsertEventRequestData::__set_filesAdded(const std::vector<std::string> & val) {
  this->filesAdded = val;
}

void InsertEventRequestData::__set_filesAddedChecksum(const std::vector<std::string> & val) {
  this->filesAddedChecksum = val;
__isset.filesAddedChecksum = true;
}

uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_filesAdded = 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->filesAdded.clear();
            uint32_t _size651;
            ::apache::thrift::protocol::TType _etype654;
            xfer += iprot->readListBegin(_etype654, _size651);
            this->filesAdded.resize(_size651);
            uint32_t _i655;
            for (_i655 = 0; _i655 < _size651; ++_i655)
            {
              xfer += iprot->readString(this->filesAdded[_i655]);
            }
            xfer += iprot->readListEnd();
          }
          isset_filesAdded = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->filesAddedChecksum.clear();
            uint32_t _size656;
            ::apache::thrift::protocol::TType _etype659;
            xfer += iprot->readListBegin(_etype659, _size656);
            this->filesAddedChecksum.resize(_size656);
            uint32_t _i660;
            for (_i660 = 0; _i660 < _size656; ++_i660)
            {
              xfer += iprot->readString(this->filesAddedChecksum[_i660]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.filesAddedChecksum = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_filesAdded)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("InsertEventRequestData");

  xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAdded.size()));
    std::vector<std::string> ::const_iterator _iter661;
    for (_iter661 = this->filesAdded.begin(); _iter661 != this->filesAdded.end(); ++_iter661)
    {
      xfer += oprot->writeString((*_iter661));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.filesAddedChecksum) {
    xfer += oprot->writeFieldBegin("filesAddedChecksum", ::apache::thrift::protocol::T_LIST, 2);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAddedChecksum.size()));
      std::vector<std::string> ::const_iterator _iter662;
      for (_iter662 = this->filesAddedChecksum.begin(); _iter662 != this->filesAddedChecksum.end(); ++_iter662)
      {
        xfer += oprot->writeString((*_iter662));
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(InsertEventRequestData &a, InsertEventRequestData &b) {
  using ::std::swap;
  swap(a.filesAdded, b.filesAdded);
  swap(a.filesAddedChecksum, b.filesAddedChecksum);
  swap(a.__isset, b.__isset);
}

InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other663) {
  filesAdded = other663.filesAdded;
  filesAddedChecksum = other663.filesAddedChecksum;
  __isset = other663.__isset;
}
InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other664) {
  filesAdded = other664.filesAdded;
  filesAddedChecksum = other664.filesAddedChecksum;
  __isset = other664.__isset;
  return *this;
}
void InsertEventRequestData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "InsertEventRequestData(";
  out << "filesAdded=" << to_string(filesAdded);
  out << ", " << "filesAddedChecksum="; (__isset.filesAddedChecksum ? (out << to_string(filesAddedChecksum)) : (out << "<null>"));
  out << ")";
}


FireEventRequestData::~FireEventRequestData() throw() {
}


void FireEventRequestData::__set_insertData(const InsertEventRequestData& val) {
  this->insertData = val;
}

uint32_t FireEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->insertData.read(iprot);
          this->__isset.insertData = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t FireEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("FireEventRequestData");

  xfer += oprot->writeFieldBegin("insertData", ::apache::thrift::protocol::T_STRUCT, 1);
  xfer += this->insertData.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(FireEventRequestData &a, FireEventRequestData &b) {
  using ::std::swap;
  swap(a.insertData, b.insertData);
  swap(a.__isset, b.__isset);
}

FireEventRequestData::FireEventRequestData(const FireEventRequestData& other665) {
  insertData = other665.insertData;
  __isset = other665.__isset;
}
FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other666) {
  insertData = other666.insertData;
  __isset = other666.__isset;
  return *this;
}
void FireEventRequestData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "FireEventRequestData(";
  out << "insertData=" << to_string(insertData);
  out << ")";
}


FireEventRequest::~FireEventRequest() throw() {
}


void FireEventRequest::__set_successful(const bool val) {
  this->successful = val;
}

void FireEventRequest::__set_data(const FireEventRequestData& val) {
  this->data = val;
}

void FireEventRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
__isset.dbName = true;
}

void FireEventRequest::__set_tableName(const std::string& val) {
  this->tableName = val;
__isset.tableName = true;
}

void FireEventRequest::__set_partitionVals(const std::vector<std::string> & val) {
  this->partitionVals = val;
__isset.partitionVals = true;
}

uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_successful = false;
  bool isset_data = 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_BOOL) {
          xfer += iprot->readBool(this->successful);
          isset_successful = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->data.read(iprot);
          isset_data = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->dbName);
          this->__isset.dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          this->__isset.tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partitionVals.clear();
            uint32_t _size667;
            ::apache::thrift::protocol::TType _etype670;
            xfer += iprot->readListBegin(_etype670, _size667);
            this->partitionVals.resize(_size667);
            uint32_t _i671;
            for (_i671 = 0; _i671 < _size667; ++_i671)
            {
              xfer += iprot->readString(this->partitionVals[_i671]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.partitionVals = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_successful)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_data)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("FireEventRequest");

  xfer += oprot->writeFieldBegin("successful", ::apache::thrift::protocol::T_BOOL, 1);
  xfer += oprot->writeBool(this->successful);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2);
  xfer += this->data.write(oprot);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.dbName) {
    xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->dbName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.tableName) {
    xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->tableName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.partitionVals) {
    xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionVals.size()));
      std::vector<std::string> ::const_iterator _iter672;
      for (_iter672 = this->partitionVals.begin(); _iter672 != this->partitionVals.end(); ++_iter672)
      {
        xfer += oprot->writeString((*_iter672));
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(FireEventRequest &a, FireEventRequest &b) {
  using ::std::swap;
  swap(a.successful, b.successful);
  swap(a.data, b.data);
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.partitionVals, b.partitionVals);
  swap(a.__isset, b.__isset);
}

FireEventRequest::FireEventRequest(const FireEventRequest& other673) {
  successful = other673.successful;
  data = other673.data;
  dbName = other673.dbName;
  tableName = other673.tableName;
  partitionVals = other673.partitionVals;
  __isset = other673.__isset;
}
FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other674) {
  successful = other674.successful;
  data = other674.data;
  dbName = other674.dbName;
  tableName = other674.tableName;
  partitionVals = other674.partitionVals;
  __isset = other674.__isset;
  return *this;
}
void FireEventRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "FireEventRequest(";
  out << "successful=" << to_string(successful);
  out << ", " << "data=" << to_string(data);
  out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "<null>"));
  out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "<null>"));
  out << ", " << "partitionVals="; (__isset.partitionVals ? (out << to_string(partitionVals)) : (out << "<null>"));
  out << ")";
}


FireEventResponse::~FireEventResponse() throw() {
}


uint32_t FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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;
    }
    xfer += iprot->skip(ftype);
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t FireEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("FireEventResponse");

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(FireEventResponse &a, FireEventResponse &b) {
  using ::std::swap;
  (void) a;
  (void) b;
}

FireEventResponse::FireEventResponse(const FireEventResponse& other675) {
  (void) other675;
}
FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other676) {
  (void) other676;
  return *this;
}
void FireEventResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "FireEventResponse(";
  out << ")";
}


MetadataPpdResult::~MetadataPpdResult() throw() {
}


void MetadataPpdResult::__set_metadata(const std::string& val) {
  this->metadata = val;
__isset.metadata = true;
}

void MetadataPpdResult::__set_includeBitset(const std::string& val) {
  this->includeBitset = val;
__isset.includeBitset = true;
}

uint32_t MetadataPpdResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->readBinary(this->metadata);
          this->__isset.metadata = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readBinary(this->includeBitset);
          this->__isset.includeBitset = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t MetadataPpdResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("MetadataPpdResult");

  if (this->__isset.metadata) {
    xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_STRING, 1);
    xfer += oprot->writeBinary(this->metadata);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.includeBitset) {
    xfer += oprot->writeFieldBegin("includeBitset", ::apache::thrift::protocol::T_STRING, 2);
    xfer += oprot->writeBinary(this->includeBitset);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(MetadataPpdResult &a, MetadataPpdResult &b) {
  using ::std::swap;
  swap(a.metadata, b.metadata);
  swap(a.includeBitset, b.includeBitset);
  swap(a.__isset, b.__isset);
}

MetadataPpdResult::MetadataPpdResult(const MetadataPpdResult& other677) {
  metadata = other677.metadata;
  includeBitset = other677.includeBitset;
  __isset = other677.__isset;
}
MetadataPpdResult& MetadataPpdResult::operator=(const MetadataPpdResult& other678) {
  metadata = other678.metadata;
  includeBitset = other678.includeBitset;
  __isset = other678.__isset;
  return *this;
}
void MetadataPpdResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "MetadataPpdResult(";
  out << "metadata="; (__isset.metadata ? (out << to_string(metadata)) : (out << "<null>"));
  out << ", " << "includeBitset="; (__isset.includeBitset ? (out << to_string(includeBitset)) : (out << "<null>"));
  out << ")";
}


GetFileMetadataByExprResult::~GetFileMetadataByExprResult() throw() {
}


void GetFileMetadataByExprResult::__set_metadata(const std::map<int64_t, MetadataPpdResult> & val) {
  this->metadata = val;
}

void GetFileMetadataByExprResult::__set_isSupported(const bool val) {
  this->isSupported = val;
}

uint32_t GetFileMetadataByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_metadata = false;
  bool isset_isSupported = 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->metadata.clear();
            uint32_t _size679;
            ::apache::thrift::protocol::TType _ktype680;
            ::apache::thrift::protocol::TType _vtype681;
            xfer += iprot->readMapBegin(_ktype680, _vtype681, _size679);
            uint32_t _i683;
            for (_i683 = 0; _i683 < _size679; ++_i683)
            {
              int64_t _key684;
              xfer += iprot->readI64(_key684);
              MetadataPpdResult& _val685 = this->metadata[_key684];
              xfer += _val685.read(iprot);
            }
            xfer += iprot->readMapEnd();
          }
          isset_metadata = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isSupported);
          isset_isSupported = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_metadata)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_isSupported)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetFileMetadataByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetFileMetadataByExprResult");

  xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->metadata.size()));
    std::map<int64_t, MetadataPpdResult> ::const_iterator _iter686;
    for (_iter686 = this->metadata.begin(); _iter686 != this->metadata.end(); ++_iter686)
    {
      xfer += oprot->writeI64(_iter686->first);
      xfer += _iter686->second.write(oprot);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2);
  xfer += oprot->writeBool(this->isSupported);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b) {
  using ::std::swap;
  swap(a.metadata, b.metadata);
  swap(a.isSupported, b.isSupported);
}

GetFileMetadataByExprResult::GetFileMetadataByExprResult(const GetFileMetadataByExprResult& other687) {
  metadata = other687.metadata;
  isSupported = other687.isSupported;
}
GetFileMetadataByExprResult& GetFileMetadataByExprResult::operator=(const GetFileMetadataByExprResult& other688) {
  metadata = other688.metadata;
  isSupported = other688.isSupported;
  return *this;
}
void GetFileMetadataByExprResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetFileMetadataByExprResult(";
  out << "metadata=" << to_string(metadata);
  out << ", " << "isSupported=" << to_string(isSupported);
  out << ")";
}


GetFileMetadataByExprRequest::~GetFileMetadataByExprRequest() throw() {
}


void GetFileMetadataByExprRequest::__set_fileIds(const std::vector<int64_t> & val) {
  this->fileIds = val;
}

void GetFileMetadataByExprRequest::__set_expr(const std::string& val) {
  this->expr = val;
}

void GetFileMetadataByExprRequest::__set_doGetFooters(const bool val) {
  this->doGetFooters = val;
__isset.doGetFooters = true;
}

void GetFileMetadataByExprRequest::__set_type(const FileMetadataExprType::type val) {
  this->type = val;
__isset.type = true;
}

uint32_t GetFileMetadataByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_fileIds = false;
  bool isset_expr = 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->fileIds.clear();
            uint32_t _size689;
            ::apache::thrift::protocol::TType _etype692;
            xfer += iprot->readListBegin(_etype692, _size689);
            this->fileIds.resize(_size689);
            uint32_t _i693;
            for (_i693 = 0; _i693 < _size689; ++_i693)
            {
              xfer += iprot->readI64(this->fileIds[_i693]);
            }
            xfer += iprot->readListEnd();
          }
          isset_fileIds = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readBinary(this->expr);
          isset_expr = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->doGetFooters);
          this->__isset.doGetFooters = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast694;
          xfer += iprot->readI32(ecast694);
          this->type = (FileMetadataExprType::type)ecast694;
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_fileIds)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_expr)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetFileMetadataByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetFileMetadataByExprRequest");

  xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    std::vector<int64_t> ::const_iterator _iter695;
    for (_iter695 = this->fileIds.begin(); _iter695 != this->fileIds.end(); ++_iter695)
    {
      xfer += oprot->writeI64((*_iter695));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeBinary(this->expr);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.doGetFooters) {
    xfer += oprot->writeFieldBegin("doGetFooters", ::apache::thrift::protocol::T_BOOL, 3);
    xfer += oprot->writeBool(this->doGetFooters);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.type) {
    xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
    xfer += oprot->writeI32((int32_t)this->type);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b) {
  using ::std::swap;
  swap(a.fileIds, b.fileIds);
  swap(a.expr, b.expr);
  swap(a.doGetFooters, b.doGetFooters);
  swap(a.type, b.type);
  swap(a.__isset, b.__isset);
}

GetFileMetadataByExprRequest::GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest& other696) {
  fileIds = other696.fileIds;
  expr = other696.expr;
  doGetFooters = other696.doGetFooters;
  type = other696.type;
  __isset = other696.__isset;
}
GetFileMetadataByExprRequest& GetFileMetadataByExprRequest::operator=(const GetFileMetadataByExprRequest& other697) {
  fileIds = other697.fileIds;
  expr = other697.expr;
  doGetFooters = other697.doGetFooters;
  type = other697.type;
  __isset = other697.__isset;
  return *this;
}
void GetFileMetadataByExprRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetFileMetadataByExprRequest(";
  out << "fileIds=" << to_string(fileIds);
  out << ", " << "expr=" << to_string(expr);
  out << ", " << "doGetFooters="; (__isset.doGetFooters ? (out << to_string(doGetFooters)) : (out << "<null>"));
  out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>"));
  out << ")";
}


GetFileMetadataResult::~GetFileMetadataResult() throw() {
}


void GetFileMetadataResult::__set_metadata(const std::map<int64_t, std::string> & val) {
  this->metadata = val;
}

void GetFileMetadataResult::__set_isSupported(const bool val) {
  this->isSupported = val;
}

uint32_t GetFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_metadata = false;
  bool isset_isSupported = 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->metadata.clear();
            uint32_t _size698;
            ::apache::thrift::protocol::TType _ktype699;
            ::apache::thrift::protocol::TType _vtype700;
            xfer += iprot->readMapBegin(_ktype699, _vtype700, _size698);
            uint32_t _i702;
            for (_i702 = 0; _i702 < _size698; ++_i702)
            {
              int64_t _key703;
              xfer += iprot->readI64(_key703);
              std::string& _val704 = this->metadata[_key703];
              xfer += iprot->readBinary(_val704);
            }
            xfer += iprot->readMapEnd();
          }
          isset_metadata = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isSupported);
          isset_isSupported = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_metadata)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_isSupported)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetFileMetadataResult");

  xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1);
  {
    xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->metadata.size()));
    std::map<int64_t, std::string> ::const_iterator _iter705;
    for (_iter705 = this->metadata.begin(); _iter705 != this->metadata.end(); ++_iter705)
    {
      xfer += oprot->writeI64(_iter705->first);
      xfer += oprot->writeBinary(_iter705->second);
    }
    xfer += oprot->writeMapEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2);
  xfer += oprot->writeBool(this->isSupported);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetFileMetadataResult &a, GetFileMetadataResult &b) {
  using ::std::swap;
  swap(a.metadata, b.metadata);
  swap(a.isSupported, b.isSupported);
}

GetFileMetadataResult::GetFileMetadataResult(const GetFileMetadataResult& other706) {
  metadata = other706.metadata;
  isSupported = other706.isSupported;
}
GetFileMetadataResult& GetFileMetadataResult::operator=(const GetFileMetadataResult& other707) {
  metadata = other707.metadata;
  isSupported = other707.isSupported;
  return *this;
}
void GetFileMetadataResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetFileMetadataResult(";
  out << "metadata=" << to_string(metadata);
  out << ", " << "isSupported=" << to_string(isSupported);
  out << ")";
}


GetFileMetadataRequest::~GetFileMetadataRequest() throw() {
}


void GetFileMetadataRequest::__set_fileIds(const std::vector<int64_t> & val) {
  this->fileIds = val;
}

uint32_t GetFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_fileIds = 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->fileIds.clear();
            uint32_t _size708;
            ::apache::thrift::protocol::TType _etype711;
            xfer += iprot->readListBegin(_etype711, _size708);
            this->fileIds.resize(_size708);
            uint32_t _i712;
            for (_i712 = 0; _i712 < _size708; ++_i712)
            {
              xfer += iprot->readI64(this->fileIds[_i712]);
            }
            xfer += iprot->readListEnd();
          }
          isset_fileIds = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_fileIds)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetFileMetadataRequest");

  xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    std::vector<int64_t> ::const_iterator _iter713;
    for (_iter713 = this->fileIds.begin(); _iter713 != this->fileIds.end(); ++_iter713)
    {
      xfer += oprot->writeI64((*_iter713));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b) {
  using ::std::swap;
  swap(a.fileIds, b.fileIds);
}

GetFileMetadataRequest::GetFileMetadataRequest(const GetFileMetadataRequest& other714) {
  fileIds = other714.fileIds;
}
GetFileMetadataRequest& GetFileMetadataRequest::operator=(const GetFileMetadataRequest& other715) {
  fileIds = other715.fileIds;
  return *this;
}
void GetFileMetadataRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetFileMetadataRequest(";
  out << "fileIds=" << to_string(fileIds);
  out << ")";
}


PutFileMetadataResult::~PutFileMetadataResult() throw() {
}


uint32_t PutFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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;
    }
    xfer += iprot->skip(ftype);
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t PutFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PutFileMetadataResult");

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PutFileMetadataResult &a, PutFileMetadataResult &b) {
  using ::std::swap;
  (void) a;
  (void) b;
}

PutFileMetadataResult::PutFileMetadataResult(const PutFileMetadataResult& other716) {
  (void) other716;
}
PutFileMetadataResult& PutFileMetadataResult::operator=(const PutFileMetadataResult& other717) {
  (void) other717;
  return *this;
}
void PutFileMetadataResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PutFileMetadataResult(";
  out << ")";
}


PutFileMetadataRequest::~PutFileMetadataRequest() throw() {
}


void PutFileMetadataRequest::__set_fileIds(const std::vector<int64_t> & val) {
  this->fileIds = val;
}

void PutFileMetadataRequest::__set_metadata(const std::vector<std::string> & val) {
  this->metadata = val;
}

void PutFileMetadataRequest::__set_type(const FileMetadataExprType::type val) {
  this->type = val;
__isset.type = true;
}

uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_fileIds = false;
  bool isset_metadata = 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->fileIds.clear();
            uint32_t _size718;
            ::apache::thrift::protocol::TType _etype721;
            xfer += iprot->readListBegin(_etype721, _size718);
            this->fileIds.resize(_size718);
            uint32_t _i722;
            for (_i722 = 0; _i722 < _size718; ++_i722)
            {
              xfer += iprot->readI64(this->fileIds[_i722]);
            }
            xfer += iprot->readListEnd();
          }
          isset_fileIds = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->metadata.clear();
            uint32_t _size723;
            ::apache::thrift::protocol::TType _etype726;
            xfer += iprot->readListBegin(_etype726, _size723);
            this->metadata.resize(_size723);
            uint32_t _i727;
            for (_i727 = 0; _i727 < _size723; ++_i727)
            {
              xfer += iprot->readBinary(this->metadata[_i727]);
            }
            xfer += iprot->readListEnd();
          }
          isset_metadata = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast728;
          xfer += iprot->readI32(ecast728);
          this->type = (FileMetadataExprType::type)ecast728;
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_fileIds)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_metadata)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("PutFileMetadataRequest");

  xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    std::vector<int64_t> ::const_iterator _iter729;
    for (_iter729 = this->fileIds.begin(); _iter729 != this->fileIds.end(); ++_iter729)
    {
      xfer += oprot->writeI64((*_iter729));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_LIST, 2);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->metadata.size()));
    std::vector<std::string> ::const_iterator _iter730;
    for (_iter730 = this->metadata.begin(); _iter730 != this->metadata.end(); ++_iter730)
    {
      xfer += oprot->writeBinary((*_iter730));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  if (this->__isset.type) {
    xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3);
    xfer += oprot->writeI32((int32_t)this->type);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b) {
  using ::std::swap;
  swap(a.fileIds, b.fileIds);
  swap(a.metadata, b.metadata);
  swap(a.type, b.type);
  swap(a.__isset, b.__isset);
}

PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other731) {
  fileIds = other731.fileIds;
  metadata = other731.metadata;
  type = other731.type;
  __isset = other731.__isset;
}
PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other732) {
  fileIds = other732.fileIds;
  metadata = other732.metadata;
  type = other732.type;
  __isset = other732.__isset;
  return *this;
}
void PutFileMetadataRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PutFileMetadataRequest(";
  out << "fileIds=" << to_string(fileIds);
  out << ", " << "metadata=" << to_string(metadata);
  out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>"));
  out << ")";
}


ClearFileMetadataResult::~ClearFileMetadataResult() throw() {
}


uint32_t ClearFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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;
    }
    xfer += iprot->skip(ftype);
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ClearFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ClearFileMetadataResult");

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b) {
  using ::std::swap;
  (void) a;
  (void) b;
}

ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other733) {
  (void) other733;
}
ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other734) {
  (void) other734;
  return *this;
}
void ClearFileMetadataResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ClearFileMetadataResult(";
  out << ")";
}


ClearFileMetadataRequest::~ClearFileMetadataRequest() throw() {
}


void ClearFileMetadataRequest::__set_fileIds(const std::vector<int64_t> & val) {
  this->fileIds = val;
}

uint32_t ClearFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_fileIds = 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->fileIds.clear();
            uint32_t _size735;
            ::apache::thrift::protocol::TType _etype738;
            xfer += iprot->readListBegin(_etype738, _size735);
            this->fileIds.resize(_size735);
            uint32_t _i739;
            for (_i739 = 0; _i739 < _size735; ++_i739)
            {
              xfer += iprot->readI64(this->fileIds[_i739]);
            }
            xfer += iprot->readListEnd();
          }
          isset_fileIds = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_fileIds)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ClearFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ClearFileMetadataRequest");

  xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    std::vector<int64_t> ::const_iterator _iter740;
    for (_iter740 = this->fileIds.begin(); _iter740 != this->fileIds.end(); ++_iter740)
    {
      xfer += oprot->writeI64((*_iter740));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b) {
  using ::std::swap;
  swap(a.fileIds, b.fileIds);
}

ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other741) {
  fileIds = other741.fileIds;
}
ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other742) {
  fileIds = other742.fileIds;
  return *this;
}
void ClearFileMetadataRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ClearFileMetadataRequest(";
  out << "fileIds=" << to_string(fileIds);
  out << ")";
}


CacheFileMetadataResult::~CacheFileMetadataResult() throw() {
}


void CacheFileMetadataResult::__set_isSupported(const bool val) {
  this->isSupported = val;
}

uint32_t CacheFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_isSupported = 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_BOOL) {
          xfer += iprot->readBool(this->isSupported);
          isset_isSupported = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_isSupported)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CacheFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CacheFileMetadataResult");

  xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 1);
  xfer += oprot->writeBool(this->isSupported);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b) {
  using ::std::swap;
  swap(a.isSupported, b.isSupported);
}

CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other743) {
  isSupported = other743.isSupported;
}
CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other744) {
  isSupported = other744.isSupported;
  return *this;
}
void CacheFileMetadataResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CacheFileMetadataResult(";
  out << "isSupported=" << to_string(isSupported);
  out << ")";
}


CacheFileMetadataRequest::~CacheFileMetadataRequest() throw() {
}


void CacheFileMetadataRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void CacheFileMetadataRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void CacheFileMetadataRequest::__set_partName(const std::string& val) {
  this->partName = val;
__isset.partName = true;
}

void CacheFileMetadataRequest::__set_isAllParts(const bool val) {
  this->isAllParts = val;
__isset.isAllParts = true;
}

uint32_t CacheFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->partName);
          this->__isset.partName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isAllParts);
          this->__isset.isAllParts = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t CacheFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("CacheFileMetadataRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.partName) {
    xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 3);
    xfer += oprot->writeString(this->partName);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.isAllParts) {
    xfer += oprot->writeFieldBegin("isAllParts", ::apache::thrift::protocol::T_BOOL, 4);
    xfer += oprot->writeBool(this->isAllParts);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.partName, b.partName);
  swap(a.isAllParts, b.isAllParts);
  swap(a.__isset, b.__isset);
}

CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other745) {
  dbName = other745.dbName;
  tblName = other745.tblName;
  partName = other745.partName;
  isAllParts = other745.isAllParts;
  __isset = other745.__isset;
}
CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other746) {
  dbName = other746.dbName;
  tblName = other746.tblName;
  partName = other746.partName;
  isAllParts = other746.isAllParts;
  __isset = other746.__isset;
  return *this;
}
void CacheFileMetadataRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CacheFileMetadataRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "<null>"));
  out << ", " << "isAllParts="; (__isset.isAllParts ? (out << to_string(isAllParts)) : (out << "<null>"));
  out << ")";
}


GetAllFunctionsResponse::~GetAllFunctionsResponse() throw() {
}


void GetAllFunctionsResponse::__set_functions(const std::vector<Function> & val) {
  this->functions = val;
__isset.functions = true;
}

uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->functions.clear();
            uint32_t _size747;
            ::apache::thrift::protocol::TType _etype750;
            xfer += iprot->readListBegin(_etype750, _size747);
            this->functions.resize(_size747);
            uint32_t _i751;
            for (_i751 = 0; _i751 < _size747; ++_i751)
            {
              xfer += this->functions[_i751].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.functions = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetAllFunctionsResponse");

  if (this->__isset.functions) {
    xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->functions.size()));
      std::vector<Function> ::const_iterator _iter752;
      for (_iter752 = this->functions.begin(); _iter752 != this->functions.end(); ++_iter752)
      {
        xfer += (*_iter752).write(oprot);
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) {
  using ::std::swap;
  swap(a.functions, b.functions);
  swap(a.__isset, b.__isset);
}

GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other753) {
  functions = other753.functions;
  __isset = other753.__isset;
}
GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other754) {
  functions = other754.functions;
  __isset = other754.__isset;
  return *this;
}
void GetAllFunctionsResponse::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetAllFunctionsResponse(";
  out << "functions="; (__isset.functions ? (out << to_string(functions)) : (out << "<null>"));
  out << ")";
}


ClientCapabilities::~ClientCapabilities() throw() {
}


void ClientCapabilities::__set_values(const std::vector<ClientCapability::type> & val) {
  this->values = val;
}

uint32_t ClientCapabilities::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_values = 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->values.clear();
            uint32_t _size755;
            ::apache::thrift::protocol::TType _etype758;
            xfer += iprot->readListBegin(_etype758, _size755);
            this->values.resize(_size755);
            uint32_t _i759;
            for (_i759 = 0; _i759 < _size755; ++_i759)
            {
              int32_t ecast760;
              xfer += iprot->readI32(ecast760);
              this->values[_i759] = (ClientCapability::type)ecast760;
            }
            xfer += iprot->readListEnd();
          }
          isset_values = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_values)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t ClientCapabilities::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ClientCapabilities");

  xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->values.size()));
    std::vector<ClientCapability::type> ::const_iterator _iter761;
    for (_iter761 = this->values.begin(); _iter761 != this->values.end(); ++_iter761)
    {
      xfer += oprot->writeI32((int32_t)(*_iter761));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ClientCapabilities &a, ClientCapabilities &b) {
  using ::std::swap;
  swap(a.values, b.values);
}

ClientCapabilities::ClientCapabilities(const ClientCapabilities& other762) {
  values = other762.values;
}
ClientCapabilities& ClientCapabilities::operator=(const ClientCapabilities& other763) {
  values = other763.values;
  return *this;
}
void ClientCapabilities::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ClientCapabilities(";
  out << "values=" << to_string(values);
  out << ")";
}


GetTableRequest::~GetTableRequest() throw() {
}


void GetTableRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void GetTableRequest::__set_tblName(const std::string& val) {
  this->tblName = val;
}

void GetTableRequest::__set_capabilities(const ClientCapabilities& val) {
  this->capabilities = val;
__isset.capabilities = true;
}

uint32_t GetTableRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tblName = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tblName);
          isset_tblName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->capabilities.read(iprot);
          this->__isset.capabilities = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tblName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetTableRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetTableRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tblName);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.capabilities) {
    xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3);
    xfer += this->capabilities.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetTableRequest &a, GetTableRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblName, b.tblName);
  swap(a.capabilities, b.capabilities);
  swap(a.__isset, b.__isset);
}

GetTableRequest::GetTableRequest(const GetTableRequest& other764) {
  dbName = other764.dbName;
  tblName = other764.tblName;
  capabilities = other764.capabilities;
  __isset = other764.__isset;
}
GetTableRequest& GetTableRequest::operator=(const GetTableRequest& other765) {
  dbName = other765.dbName;
  tblName = other765.tblName;
  capabilities = other765.capabilities;
  __isset = other765.__isset;
  return *this;
}
void GetTableRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetTableRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblName=" << to_string(tblName);
  out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "<null>"));
  out << ")";
}


GetTableResult::~GetTableResult() throw() {
}


void GetTableResult::__set_table(const Table& val) {
  this->table = val;
}

uint32_t GetTableResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_table = 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->table.read(iprot);
          isset_table = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_table)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetTableResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetTableResult");

  xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRUCT, 1);
  xfer += this->table.write(oprot);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetTableResult &a, GetTableResult &b) {
  using ::std::swap;
  swap(a.table, b.table);
}

GetTableResult::GetTableResult(const GetTableResult& other766) {
  table = other766.table;
}
GetTableResult& GetTableResult::operator=(const GetTableResult& other767) {
  table = other767.table;
  return *this;
}
void GetTableResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetTableResult(";
  out << "table=" << to_string(table);
  out << ")";
}


GetTablesRequest::~GetTablesRequest() throw() {
}


void GetTablesRequest::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void GetTablesRequest::__set_tblNames(const std::vector<std::string> & val) {
  this->tblNames = val;
__isset.tblNames = true;
}

void GetTablesRequest::__set_capabilities(const ClientCapabilities& val) {
  this->capabilities = val;
__isset.capabilities = true;
}

uint32_t GetTablesRequest::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->tblNames.clear();
            uint32_t _size768;
            ::apache::thrift::protocol::TType _etype771;
            xfer += iprot->readListBegin(_etype771, _size768);
            this->tblNames.resize(_size768);
            uint32_t _i772;
            for (_i772 = 0; _i772 < _size768; ++_i772)
            {
              xfer += iprot->readString(this->tblNames[_i772]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.tblNames = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->capabilities.read(iprot);
          this->__isset.capabilities = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetTablesRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetTablesRequest");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.tblNames) {
    xfer += oprot->writeFieldBegin("tblNames", ::apache::thrift::protocol::T_LIST, 2);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tblNames.size()));
      std::vector<std::string> ::const_iterator _iter773;
      for (_iter773 = this->tblNames.begin(); _iter773 != this->tblNames.end(); ++_iter773)
      {
        xfer += oprot->writeString((*_iter773));
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.capabilities) {
    xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3);
    xfer += this->capabilities.write(oprot);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetTablesRequest &a, GetTablesRequest &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tblNames, b.tblNames);
  swap(a.capabilities, b.capabilities);
  swap(a.__isset, b.__isset);
}

GetTablesRequest::GetTablesRequest(const GetTablesRequest& other774) {
  dbName = other774.dbName;
  tblNames = other774.tblNames;
  capabilities = other774.capabilities;
  __isset = other774.__isset;
}
GetTablesRequest& GetTablesRequest::operator=(const GetTablesRequest& other775) {
  dbName = other775.dbName;
  tblNames = other775.tblNames;
  capabilities = other775.capabilities;
  __isset = other775.__isset;
  return *this;
}
void GetTablesRequest::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetTablesRequest(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tblNames="; (__isset.tblNames ? (out << to_string(tblNames)) : (out << "<null>"));
  out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "<null>"));
  out << ")";
}


GetTablesResult::~GetTablesResult() throw() {
}


void GetTablesResult::__set_tables(const std::vector<Table> & val) {
  this->tables = val;
}

uint32_t GetTablesResult::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_tables = 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->tables.clear();
            uint32_t _size776;
            ::apache::thrift::protocol::TType _etype779;
            xfer += iprot->readListBegin(_etype779, _size776);
            this->tables.resize(_size776);
            uint32_t _i780;
            for (_i780 = 0; _i780 < _size776; ++_i780)
            {
              xfer += this->tables[_i780].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          isset_tables = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_tables)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t GetTablesResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("GetTablesResult");

  xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tables.size()));
    std::vector<Table> ::const_iterator _iter781;
    for (_iter781 = this->tables.begin(); _iter781 != this->tables.end(); ++_iter781)
    {
      xfer += (*_iter781).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(GetTablesResult &a, GetTablesResult &b) {
  using ::std::swap;
  swap(a.tables, b.tables);
}

GetTablesResult::GetTablesResult(const GetTablesResult& other782) {
  tables = other782.tables;
}
GetTablesResult& GetTablesResult::operator=(const GetTablesResult& other783) {
  tables = other783.tables;
  return *this;
}
void GetTablesResult::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "GetTablesResult(";
  out << "tables=" << to_string(tables);
  out << ")";
}


TableMeta::~TableMeta() throw() {
}


void TableMeta::__set_dbName(const std::string& val) {
  this->dbName = val;
}

void TableMeta::__set_tableName(const std::string& val) {
  this->tableName = val;
}

void TableMeta::__set_tableType(const std::string& val) {
  this->tableType = val;
}

void TableMeta::__set_comments(const std::string& val) {
  this->comments = val;
__isset.comments = true;
}

uint32_t TableMeta::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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_dbName = false;
  bool isset_tableName = false;
  bool isset_tableType = 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->dbName);
          isset_dbName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableName);
          isset_tableName = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->tableType);
          isset_tableType = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->comments);
          this->__isset.comments = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_dbName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tableName)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_tableType)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

uint32_t TableMeta::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TableMeta");

  xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->dbName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->tableName);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3);
  xfer += oprot->writeString(this->tableType);
  xfer += oprot->writeFieldEnd();

  if (this->__isset.comments) {
    xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 4);
    xfer += oprot->writeString(this->comments);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TableMeta &a, TableMeta &b) {
  using ::std::swap;
  swap(a.dbName, b.dbName);
  swap(a.tableName, b.tableName);
  swap(a.tableType, b.tableType);
  swap(a.comments, b.comments);
  swap(a.__isset, b.__isset);
}

TableMeta::TableMeta(const TableMeta& other784) {
  dbName = other784.dbName;
  tableName = other784.tableName;
  tableType = other784.tableType;
  comments = other784.comments;
  __isset = other784.__isset;
}
TableMeta& TableMeta::operator=(const TableMeta& other785) {
  dbName = other785.dbName;
  tableName = other785.tableName;
  tableType = other785.tableType;
  comments = other785.comments;
  __isset = other785.__isset;
  return *this;
}
void TableMeta::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TableMeta(";
  out << "dbName=" << to_string(dbName);
  out << ", " << "tableName=" << to_string(tableName);
  out << ", " << "tableType=" << to_string(tableType);
  out << ", " << "comments="; (__isset.comments ? (out << to_string(comments)) : (out << "<null>"));
  out << ")";
}


MetaException::~MetaException() throw() {
}


void MetaException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("MetaException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(MetaException &a, MetaException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

MetaException::MetaException(const MetaException& other786) : TException() {
  message = other786.message;
  __isset = other786.__isset;
}
MetaException& MetaException::operator=(const MetaException& other787) {
  message = other787.message;
  __isset = other787.__isset;
  return *this;
}
void MetaException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "MetaException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* MetaException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: MetaException";
  }
}


UnknownTableException::~UnknownTableException() throw() {
}


void UnknownTableException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t UnknownTableException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("UnknownTableException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(UnknownTableException &a, UnknownTableException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

UnknownTableException::UnknownTableException(const UnknownTableException& other788) : TException() {
  message = other788.message;
  __isset = other788.__isset;
}
UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other789) {
  message = other789.message;
  __isset = other789.__isset;
  return *this;
}
void UnknownTableException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "UnknownTableException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* UnknownTableException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: UnknownTableException";
  }
}


UnknownDBException::~UnknownDBException() throw() {
}


void UnknownDBException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t UnknownDBException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("UnknownDBException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(UnknownDBException &a, UnknownDBException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

UnknownDBException::UnknownDBException(const UnknownDBException& other790) : TException() {
  message = other790.message;
  __isset = other790.__isset;
}
UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other791) {
  message = other791.message;
  __isset = other791.__isset;
  return *this;
}
void UnknownDBException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "UnknownDBException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* UnknownDBException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: UnknownDBException";
  }
}


AlreadyExistsException::~AlreadyExistsException() throw() {
}


void AlreadyExistsException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t AlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("AlreadyExistsException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(AlreadyExistsException &a, AlreadyExistsException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other792) : TException() {
  message = other792.message;
  __isset = other792.__isset;
}
AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other793) {
  message = other793.message;
  __isset = other793.__isset;
  return *this;
}
void AlreadyExistsException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "AlreadyExistsException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* AlreadyExistsException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: AlreadyExistsException";
  }
}


InvalidPartitionException::~InvalidPartitionException() throw() {
}


void InvalidPartitionException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t InvalidPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t InvalidPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("InvalidPartitionException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(InvalidPartitionException &a, InvalidPartitionException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other794) : TException() {
  message = other794.message;
  __isset = other794.__isset;
}
InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other795) {
  message = other795.message;
  __isset = other795.__isset;
  return *this;
}
void InvalidPartitionException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "InvalidPartitionException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* InvalidPartitionException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: InvalidPartitionException";
  }
}


UnknownPartitionException::~UnknownPartitionException() throw() {
}


void UnknownPartitionException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t UnknownPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t UnknownPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("UnknownPartitionException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(UnknownPartitionException &a, UnknownPartitionException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other796) : TException() {
  message = other796.message;
  __isset = other796.__isset;
}
UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other797) {
  message = other797.message;
  __isset = other797.__isset;
  return *this;
}
void UnknownPartitionException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "UnknownPartitionException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* UnknownPartitionException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: UnknownPartitionException";
  }
}


InvalidObjectException::~InvalidObjectException() throw() {
}


void InvalidObjectException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t InvalidObjectException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("InvalidObjectException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(InvalidObjectException &a, InvalidObjectException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

InvalidObjectException::InvalidObjectException(const InvalidObjectException& other798) : TException() {
  message = other798.message;
  __isset = other798.__isset;
}
InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other799) {
  message = other799.message;
  __isset = other799.__isset;
  return *this;
}
void InvalidObjectException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "InvalidObjectException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* InvalidObjectException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: InvalidObjectException";
  }
}


NoSuchObjectException::~NoSuchObjectException() throw() {
}


void NoSuchObjectException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t NoSuchObjectException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NoSuchObjectException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NoSuchObjectException &a, NoSuchObjectException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other800) : TException() {
  message = other800.message;
  __isset = other800.__isset;
}
NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other801) {
  message = other801.message;
  __isset = other801.__isset;
  return *this;
}
void NoSuchObjectException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NoSuchObjectException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* NoSuchObjectException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: NoSuchObjectException";
  }
}


IndexAlreadyExistsException::~IndexAlreadyExistsException() throw() {
}


void IndexAlreadyExistsException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t IndexAlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("IndexAlreadyExistsException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other802) : TException() {
  message = other802.message;
  __isset = other802.__isset;
}
IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other803) {
  message = other803.message;
  __isset = other803.__isset;
  return *this;
}
void IndexAlreadyExistsException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "IndexAlreadyExistsException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* IndexAlreadyExistsException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: IndexAlreadyExistsException";
  }
}


InvalidOperationException::~InvalidOperationException() throw() {
}


void InvalidOperationException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t InvalidOperationException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("InvalidOperationException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(InvalidOperationException &a, InvalidOperationException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

InvalidOperationException::InvalidOperationException(const InvalidOperationException& other804) : TException() {
  message = other804.message;
  __isset = other804.__isset;
}
InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other805) {
  message = other805.message;
  __isset = other805.__isset;
  return *this;
}
void InvalidOperationException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "InvalidOperationException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* InvalidOperationException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: InvalidOperationException";
  }
}


ConfigValSecurityException::~ConfigValSecurityException() throw() {
}


void ConfigValSecurityException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t ConfigValSecurityException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ConfigValSecurityException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other806) : TException() {
  message = other806.message;
  __isset = other806.__isset;
}
ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other807) {
  message = other807.message;
  __isset = other807.__isset;
  return *this;
}
void ConfigValSecurityException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ConfigValSecurityException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* ConfigValSecurityException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: ConfigValSecurityException";
  }
}


InvalidInputException::~InvalidInputException() throw() {
}


void InvalidInputException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t InvalidInputException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t InvalidInputException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("InvalidInputException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(InvalidInputException &a, InvalidInputException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

InvalidInputException::InvalidInputException(const InvalidInputException& other808) : TException() {
  message = other808.message;
  __isset = other808.__isset;
}
InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other809) {
  message = other809.message;
  __isset = other809.__isset;
  return *this;
}
void InvalidInputException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "InvalidInputException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* InvalidInputException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: InvalidInputException";
  }
}


NoSuchTxnException::~NoSuchTxnException() throw() {
}


void NoSuchTxnException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t NoSuchTxnException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t NoSuchTxnException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NoSuchTxnException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NoSuchTxnException &a, NoSuchTxnException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other810) : TException() {
  message = other810.message;
  __isset = other810.__isset;
}
NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other811) {
  message = other811.message;
  __isset = other811.__isset;
  return *this;
}
void NoSuchTxnException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NoSuchTxnException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* NoSuchTxnException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: NoSuchTxnException";
  }
}


TxnAbortedException::~TxnAbortedException() throw() {
}


void TxnAbortedException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t TxnAbortedException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t TxnAbortedException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TxnAbortedException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TxnAbortedException &a, TxnAbortedException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

TxnAbortedException::TxnAbortedException(const TxnAbortedException& other812) : TException() {
  message = other812.message;
  __isset = other812.__isset;
}
TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other813) {
  message = other813.message;
  __isset = other813.__isset;
  return *this;
}
void TxnAbortedException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TxnAbortedException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* TxnAbortedException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: TxnAbortedException";
  }
}


TxnOpenException::~TxnOpenException() throw() {
}


void TxnOpenException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t TxnOpenException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t TxnOpenException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("TxnOpenException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(TxnOpenException &a, TxnOpenException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

TxnOpenException::TxnOpenException(const TxnOpenException& other814) : TException() {
  message = other814.message;
  __isset = other814.__isset;
}
TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other815) {
  message = other815.message;
  __isset = other815.__isset;
  return *this;
}
void TxnOpenException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "TxnOpenException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* TxnOpenException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: TxnOpenException";
  }
}


NoSuchLockException::~NoSuchLockException() throw() {
}


void NoSuchLockException::__set_message(const std::string& val) {
  this->message = val;
}

uint32_t NoSuchLockException::read(::apache::thrift::protocol::TProtocol* iprot) {

  apache::thrift::protocol::TInputRecursionTracker tracker(*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->message);
          this->__isset.message = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t NoSuchLockException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("NoSuchLockException");

  xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
  xfer += oprot->writeString(this->message);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(NoSuchLockException &a, NoSuchLockException &b) {
  using ::std::swap;
  swap(a.message, b.message);
  swap(a.__isset, b.__isset);
}

NoSuchLockException::NoSuchLockException(const NoSuchLockException& other816) : TException() {
  message = other816.message;
  __isset = other816.__isset;
}
NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other817) {
  message = other817.message;
  __isset = other817.__isset;
  return *this;
}
void NoSuchLockException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "NoSuchLockException(";
  out << "message=" << to_string(message);
  out << ")";
}

const char* NoSuchLockException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: NoSuchLockException";
  }
}

}}} // namespace
