text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#include <dsn/dist/replication/replication_types.h>

#include <algorithm>
#include <ostream>

#include <thrift/TToString.h>

namespace dsn { namespace replication {

int _kpartition_statusValues[] = {
  partition_status::PS_INVALID,
  partition_status::PS_INACTIVE,
  partition_status::PS_ERROR,
  partition_status::PS_PRIMARY,
  partition_status::PS_SECONDARY,
  partition_status::PS_POTENTIAL_SECONDARY
};
const char* _kpartition_statusNames[] = {
  "PS_INVALID",
  "PS_INACTIVE",
  "PS_ERROR",
  "PS_PRIMARY",
  "PS_SECONDARY",
  "PS_POTENTIAL_SECONDARY"
};
const std::map<int, const char*> _partition_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kpartition_statusValues, _kpartition_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kread_semanticValues[] = {
  read_semantic::ReadInvalid,
  read_semantic::ReadLastUpdate,
  read_semantic::ReadOutdated,
  read_semantic::ReadSnapshot
};
const char* _kread_semanticNames[] = {
  "ReadInvalid",
  "ReadLastUpdate",
  "ReadOutdated",
  "ReadSnapshot"
};
const std::map<int, const char*> _read_semantic_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kread_semanticValues, _kread_semanticNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _klearn_typeValues[] = {
  learn_type::LT_INVALID,
  learn_type::LT_CACHE,
  learn_type::LT_APP,
  learn_type::LT_LOG
};
const char* _klearn_typeNames[] = {
  "LT_INVALID",
  "LT_CACHE",
  "LT_APP",
  "LT_LOG"
};
const std::map<int, const char*> _learn_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _klearn_typeValues, _klearn_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _klearner_statusValues[] = {
  learner_status::LearningInvalid,
  learner_status::LearningWithoutPrepare,
  learner_status::LearningWithPrepareTransient,
  learner_status::LearningWithPrepare,
  learner_status::LearningSucceeded,
  learner_status::LearningFailed
};
const char* _klearner_statusNames[] = {
  "LearningInvalid",
  "LearningWithoutPrepare",
  "LearningWithPrepareTransient",
  "LearningWithPrepare",
  "LearningSucceeded",
  "LearningFailed"
};
const std::map<int, const char*> _learner_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _klearner_statusValues, _klearner_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kconfig_typeValues[] = {
  config_type::CT_INVALID,
  config_type::CT_ASSIGN_PRIMARY,
  config_type::CT_UPGRADE_TO_PRIMARY,
  config_type::CT_ADD_SECONDARY,
  config_type::CT_UPGRADE_TO_SECONDARY,
  config_type::CT_DOWNGRADE_TO_SECONDARY,
  config_type::CT_DOWNGRADE_TO_INACTIVE,
  config_type::CT_REMOVE,
  config_type::CT_ADD_SECONDARY_FOR_LB
};
const char* _kconfig_typeNames[] = {
  "CT_INVALID",
  "CT_ASSIGN_PRIMARY",
  "CT_UPGRADE_TO_PRIMARY",
  "CT_ADD_SECONDARY",
  "CT_UPGRADE_TO_SECONDARY",
  "CT_DOWNGRADE_TO_SECONDARY",
  "CT_DOWNGRADE_TO_INACTIVE",
  "CT_REMOVE",
  "CT_ADD_SECONDARY_FOR_LB"
};
const std::map<int, const char*> _config_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(9, _kconfig_typeValues, _kconfig_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _knode_statusValues[] = {
  node_status::NS_INVALID,
  node_status::NS_ALIVE,
  node_status::NS_UNALIVE
};
const char* _knode_statusNames[] = {
  "NS_INVALID",
  "NS_ALIVE",
  "NS_UNALIVE"
};
const std::map<int, const char*> _node_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _knode_statusValues, _knode_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kmeta_ctrl_flagsValues[] = {
  meta_ctrl_flags::ctrl_meta_freeze,
  meta_ctrl_flags::ctrl_disable_replica_migration
};
const char* _kmeta_ctrl_flagsNames[] = {
  "ctrl_meta_freeze",
  "ctrl_disable_replica_migration"
};
const std::map<int, const char*> _meta_ctrl_flags_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kmeta_ctrl_flagsValues, _kmeta_ctrl_flagsNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

int _kmeta_ctrl_typeValues[] = {
  meta_ctrl_type::meta_flags_invalid,
  meta_ctrl_type::meta_flags_and,
  meta_ctrl_type::meta_flags_or,
  meta_ctrl_type::meta_flags_overwrite
};
const char* _kmeta_ctrl_typeNames[] = {
  "meta_flags_invalid",
  "meta_flags_and",
  "meta_flags_or",
  "meta_flags_overwrite"
};
const std::map<int, const char*> _meta_ctrl_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kmeta_ctrl_typeValues, _kmeta_ctrl_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

mutation_header::~mutation_header() throw() {
}

void mutation_header::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void mutation_header::__set_ballot(const int64_t val) {
  this->ballot = val;
}

void mutation_header::__set_decree(const int64_t val) {
  this->decree = val;
}

void mutation_header::__set_log_offset(const int64_t val) {
  this->log_offset = val;
}

void mutation_header::__set_last_committed_decree(const int64_t val) {
  this->last_committed_decree = val;
}

uint32_t mutation_header::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->ballot);
          this->__isset.ballot = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->decree);
          this->__isset.decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->log_offset);
          this->__isset.log_offset = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree);
          this->__isset.last_committed_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

void swap(mutation_header &a, mutation_header &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.ballot, b.ballot);
  swap(a.decree, b.decree);
  swap(a.log_offset, b.log_offset);
  swap(a.last_committed_decree, b.last_committed_decree);
  swap(a.__isset, b.__isset);
}

mutation_header::mutation_header(const mutation_header& other0) {
  pid = other0.pid;
  ballot = other0.ballot;
  decree = other0.decree;
  log_offset = other0.log_offset;
  last_committed_decree = other0.last_committed_decree;
  __isset = other0.__isset;
}
mutation_header::mutation_header( mutation_header&& other1) {
  pid = std::move(other1.pid);
  ballot = std::move(other1.ballot);
  decree = std::move(other1.decree);
  log_offset = std::move(other1.log_offset);
  last_committed_decree = std::move(other1.last_committed_decree);
  __isset = std::move(other1.__isset);
}
mutation_header& mutation_header::operator=(const mutation_header& other2) {
  pid = other2.pid;
  ballot = other2.ballot;
  decree = other2.decree;
  log_offset = other2.log_offset;
  last_committed_decree = other2.last_committed_decree;
  __isset = other2.__isset;
  return *this;
}
mutation_header& mutation_header::operator=(mutation_header&& other3) {
  pid = std::move(other3.pid);
  ballot = std::move(other3.ballot);
  decree = std::move(other3.decree);
  log_offset = std::move(other3.log_offset);
  last_committed_decree = std::move(other3.last_committed_decree);
  __isset = std::move(other3.__isset);
  return *this;
}
void mutation_header::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "mutation_header(";
  out << "pid=" << to_string(pid);
  out << ", " << "ballot=" << to_string(ballot);
  out << ", " << "decree=" << to_string(decree);
  out << ", " << "log_offset=" << to_string(log_offset);
  out << ", " << "last_committed_decree=" << to_string(last_committed_decree);
  out << ")";
}

mutation_update::~mutation_update() throw() {
}

void mutation_update::__set_code(const  ::dsn::task_code& val) {
  this->code = val;
}

void mutation_update::__set_serialization_type(const int32_t val) {
  this->serialization_type = val;
}

void mutation_update::__set_data(const  ::dsn::blob& val) {
  this->data = val;
}

uint32_t mutation_update::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->code.read(iprot);
          this->__isset.code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->serialization_type);
          this->__isset.serialization_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->data.read(iprot);
          this->__isset.data = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

void swap(mutation_update &a, mutation_update &b) {
  using ::std::swap;
  swap(a.code, b.code);
  swap(a.serialization_type, b.serialization_type);
  swap(a.data, b.data);
  swap(a.__isset, b.__isset);
}

mutation_update::mutation_update(const mutation_update& other4) {
  code = other4.code;
  serialization_type = other4.serialization_type;
  data = other4.data;
  __isset = other4.__isset;
}
mutation_update::mutation_update( mutation_update&& other5) {
  code = std::move(other5.code);
  serialization_type = std::move(other5.serialization_type);
  data = std::move(other5.data);
  __isset = std::move(other5.__isset);
}
mutation_update& mutation_update::operator=(const mutation_update& other6) {
  code = other6.code;
  serialization_type = other6.serialization_type;
  data = other6.data;
  __isset = other6.__isset;
  return *this;
}
mutation_update& mutation_update::operator=(mutation_update&& other7) {
  code = std::move(other7.code);
  serialization_type = std::move(other7.serialization_type);
  data = std::move(other7.data);
  __isset = std::move(other7.__isset);
  return *this;
}
void mutation_update::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "mutation_update(";
  out << "code=" << to_string(code);
  out << ", " << "serialization_type=" << to_string(serialization_type);
  out << ", " << "data=" << to_string(data);
  out << ")";
}

mutation_data::~mutation_data() throw() {
}

void mutation_data::__set_header(const mutation_header& val) {
  this->header = val;
}

void mutation_data::__set_updates(const std::vector<mutation_update> & val) {
  this->updates = val;
}

uint32_t mutation_data::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->header.read(iprot);
          this->__isset.header = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->updates.clear();
            uint32_t _size8;
            ::apache::thrift::protocol::TType _etype11;
            xfer += iprot->readListBegin(_etype11, _size8);
            this->updates.resize(_size8);
            uint32_t _i12;
            for (_i12 = 0; _i12 < _size8; ++_i12)
            {
              xfer += this->updates[_i12].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.updates = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(mutation_data &a, mutation_data &b) {
  using ::std::swap;
  swap(a.header, b.header);
  swap(a.updates, b.updates);
  swap(a.__isset, b.__isset);
}

mutation_data::mutation_data(const mutation_data& other14) {
  header = other14.header;
  updates = other14.updates;
  __isset = other14.__isset;
}
mutation_data::mutation_data( mutation_data&& other15) {
  header = std::move(other15.header);
  updates = std::move(other15.updates);
  __isset = std::move(other15.__isset);
}
mutation_data& mutation_data::operator=(const mutation_data& other16) {
  header = other16.header;
  updates = other16.updates;
  __isset = other16.__isset;
  return *this;
}
mutation_data& mutation_data::operator=(mutation_data&& other17) {
  header = std::move(other17.header);
  updates = std::move(other17.updates);
  __isset = std::move(other17.__isset);
  return *this;
}
void mutation_data::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "mutation_data(";
  out << "header=" << to_string(header);
  out << ", " << "updates=" << to_string(updates);
  out << ")";
}

replica_configuration::~replica_configuration() throw() {
}

void replica_configuration::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void replica_configuration::__set_ballot(const int64_t val) {
  this->ballot = val;
}

void replica_configuration::__set_primary(const  ::dsn::rpc_address& val) {
  this->primary = val;
}

void replica_configuration::__set_status(const partition_status::type val) {
  this->status = val;
}

void replica_configuration::__set_learner_signature(const int64_t val) {
  this->learner_signature = val;
}

uint32_t replica_configuration::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->ballot);
          this->__isset.ballot = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->primary.read(iprot);
          this->__isset.primary = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast18;
          xfer += iprot->readI32(ecast18);
          this->status = (partition_status::type)ecast18;
          this->__isset.status = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->learner_signature);
          this->__isset.learner_signature = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

void swap(replica_configuration &a, replica_configuration &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.ballot, b.ballot);
  swap(a.primary, b.primary);
  swap(a.status, b.status);
  swap(a.learner_signature, b.learner_signature);
  swap(a.__isset, b.__isset);
}

replica_configuration::replica_configuration(const replica_configuration& other19) {
  pid = other19.pid;
  ballot = other19.ballot;
  primary = other19.primary;
  status = other19.status;
  learner_signature = other19.learner_signature;
  __isset = other19.__isset;
}
replica_configuration::replica_configuration( replica_configuration&& other20) {
  pid = std::move(other20.pid);
  ballot = std::move(other20.ballot);
  primary = std::move(other20.primary);
  status = std::move(other20.status);
  learner_signature = std::move(other20.learner_signature);
  __isset = std::move(other20.__isset);
}
replica_configuration& replica_configuration::operator=(const replica_configuration& other21) {
  pid = other21.pid;
  ballot = other21.ballot;
  primary = other21.primary;
  status = other21.status;
  learner_signature = other21.learner_signature;
  __isset = other21.__isset;
  return *this;
}
replica_configuration& replica_configuration::operator=(replica_configuration&& other22) {
  pid = std::move(other22.pid);
  ballot = std::move(other22.ballot);
  primary = std::move(other22.primary);
  status = std::move(other22.status);
  learner_signature = std::move(other22.learner_signature);
  __isset = std::move(other22.__isset);
  return *this;
}
void replica_configuration::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "replica_configuration(";
  out << "pid=" << to_string(pid);
  out << ", " << "ballot=" << to_string(ballot);
  out << ", " << "primary=" << to_string(primary);
  out << ", " << "status=" << to_string(status);
  out << ", " << "learner_signature=" << to_string(learner_signature);
  out << ")";
}

prepare_msg::~prepare_msg() throw() {
}

void prepare_msg::__set_config(const replica_configuration& val) {
  this->config = val;
}

void prepare_msg::__set_mu(const mutation_data& val) {
  this->mu = val;
}

uint32_t prepare_msg::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->config.read(iprot);
          this->__isset.config = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->mu.read(iprot);
          this->__isset.mu = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(prepare_msg &a, prepare_msg &b) {
  using ::std::swap;
  swap(a.config, b.config);
  swap(a.mu, b.mu);
  swap(a.__isset, b.__isset);
}

prepare_msg::prepare_msg(const prepare_msg& other23) {
  config = other23.config;
  mu = other23.mu;
  __isset = other23.__isset;
}
prepare_msg::prepare_msg( prepare_msg&& other24) {
  config = std::move(other24.config);
  mu = std::move(other24.mu);
  __isset = std::move(other24.__isset);
}
prepare_msg& prepare_msg::operator=(const prepare_msg& other25) {
  config = other25.config;
  mu = other25.mu;
  __isset = other25.__isset;
  return *this;
}
prepare_msg& prepare_msg::operator=(prepare_msg&& other26) {
  config = std::move(other26.config);
  mu = std::move(other26.mu);
  __isset = std::move(other26.__isset);
  return *this;
}
void prepare_msg::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "prepare_msg(";
  out << "config=" << to_string(config);
  out << ", " << "mu=" << to_string(mu);
  out << ")";
}

read_request_header::~read_request_header() throw() {
}

void read_request_header::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void read_request_header::__set_code(const  ::dsn::task_code& val) {
  this->code = val;
}

void read_request_header::__set_semantic(const read_semantic::type val) {
  this->semantic = val;
}

void read_request_header::__set_version_decree(const int64_t val) {
  this->version_decree = val;
}

uint32_t read_request_header::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->code.read(iprot);
          this->__isset.code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast27;
          xfer += iprot->readI32(ecast27);
          this->semantic = (read_semantic::type)ecast27;
          this->__isset.semantic = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->version_decree);
          this->__isset.version_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

void swap(read_request_header &a, read_request_header &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.code, b.code);
  swap(a.semantic, b.semantic);
  swap(a.version_decree, b.version_decree);
  swap(a.__isset, b.__isset);
}

read_request_header::read_request_header(const read_request_header& other28) {
  pid = other28.pid;
  code = other28.code;
  semantic = other28.semantic;
  version_decree = other28.version_decree;
  __isset = other28.__isset;
}
read_request_header::read_request_header( read_request_header&& other29) {
  pid = std::move(other29.pid);
  code = std::move(other29.code);
  semantic = std::move(other29.semantic);
  version_decree = std::move(other29.version_decree);
  __isset = std::move(other29.__isset);
}
read_request_header& read_request_header::operator=(const read_request_header& other30) {
  pid = other30.pid;
  code = other30.code;
  semantic = other30.semantic;
  version_decree = other30.version_decree;
  __isset = other30.__isset;
  return *this;
}
read_request_header& read_request_header::operator=(read_request_header&& other31) {
  pid = std::move(other31.pid);
  code = std::move(other31.code);
  semantic = std::move(other31.semantic);
  version_decree = std::move(other31.version_decree);
  __isset = std::move(other31.__isset);
  return *this;
}
void read_request_header::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "read_request_header(";
  out << "pid=" << to_string(pid);
  out << ", " << "code=" << to_string(code);
  out << ", " << "semantic=" << to_string(semantic);
  out << ", " << "version_decree=" << to_string(version_decree);
  out << ")";
}

write_request_header::~write_request_header() throw() {
}

void write_request_header::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void write_request_header::__set_code(const  ::dsn::task_code& val) {
  this->code = val;
}

uint32_t write_request_header::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->code.read(iprot);
          this->__isset.code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(write_request_header &a, write_request_header &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.code, b.code);
  swap(a.__isset, b.__isset);
}

write_request_header::write_request_header(const write_request_header& other32) {
  pid = other32.pid;
  code = other32.code;
  __isset = other32.__isset;
}
write_request_header::write_request_header( write_request_header&& other33) {
  pid = std::move(other33.pid);
  code = std::move(other33.code);
  __isset = std::move(other33.__isset);
}
write_request_header& write_request_header::operator=(const write_request_header& other34) {
  pid = other34.pid;
  code = other34.code;
  __isset = other34.__isset;
  return *this;
}
write_request_header& write_request_header::operator=(write_request_header&& other35) {
  pid = std::move(other35.pid);
  code = std::move(other35.code);
  __isset = std::move(other35.__isset);
  return *this;
}
void write_request_header::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "write_request_header(";
  out << "pid=" << to_string(pid);
  out << ", " << "code=" << to_string(code);
  out << ")";
}

rw_response_header::~rw_response_header() throw() {
}

void rw_response_header::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

uint32_t rw_response_header::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

prepare_ack::~prepare_ack() throw() {
}

void prepare_ack::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void prepare_ack::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void prepare_ack::__set_ballot(const int64_t val) {
  this->ballot = val;
}

void prepare_ack::__set_decree(const int64_t val) {
  this->decree = val;
}

void prepare_ack::__set_last_committed_decree_in_app(const int64_t val) {
  this->last_committed_decree_in_app = val;
}

void prepare_ack::__set_last_committed_decree_in_prepare_list(const int64_t val) {
  this->last_committed_decree_in_prepare_list = val;
}

uint32_t prepare_ack::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->ballot);
          this->__isset.ballot = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->decree);
          this->__isset.decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_app);
          this->__isset.last_committed_decree_in_app = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_prepare_list);
          this->__isset.last_committed_decree_in_prepare_list = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

void swap(prepare_ack &a, prepare_ack &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.err, b.err);
  swap(a.ballot, b.ballot);
  swap(a.decree, b.decree);
  swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app);
  swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list);
  swap(a.__isset, b.__isset);
}

prepare_ack::prepare_ack(const prepare_ack& other40) {
  pid = other40.pid;
  err = other40.err;
  ballot = other40.ballot;
  decree = other40.decree;
  last_committed_decree_in_app = other40.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other40.last_committed_decree_in_prepare_list;
  __isset = other40.__isset;
}
prepare_ack::prepare_ack( prepare_ack&& other41) {
  pid = std::move(other41.pid);
  err = std::move(other41.err);
  ballot = std::move(other41.ballot);
  decree = std::move(other41.decree);
  last_committed_decree_in_app = std::move(other41.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other41.last_committed_decree_in_prepare_list);
  __isset = std::move(other41.__isset);
}
prepare_ack& prepare_ack::operator=(const prepare_ack& other42) {
  pid = other42.pid;
  err = other42.err;
  ballot = other42.ballot;
  decree = other42.decree;
  last_committed_decree_in_app = other42.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other42.last_committed_decree_in_prepare_list;
  __isset = other42.__isset;
  return *this;
}
prepare_ack& prepare_ack::operator=(prepare_ack&& other43) {
  pid = std::move(other43.pid);
  err = std::move(other43.err);
  ballot = std::move(other43.ballot);
  decree = std::move(other43.decree);
  last_committed_decree_in_app = std::move(other43.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other43.last_committed_decree_in_prepare_list);
  __isset = std::move(other43.__isset);
  return *this;
}
void prepare_ack::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "prepare_ack(";
  out << "pid=" << to_string(pid);
  out << ", " << "err=" << to_string(err);
  out << ", " << "ballot=" << to_string(ballot);
  out << ", " << "decree=" << to_string(decree);
  out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app);
  out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list);
  out << ")";
}

learn_state::~learn_state() throw() {
}

void learn_state::__set_from_decree_excluded(const int64_t val) {
  this->from_decree_excluded = val;
}

void learn_state::__set_to_decree_included(const int64_t val) {
  this->to_decree_included = val;
}

void learn_state::__set_meta(const  ::dsn::blob& val) {
  this->meta = val;
}

void learn_state::__set_files(const std::vector<std::string> & val) {
  this->files = val;
}

uint32_t learn_state::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->from_decree_excluded);
          this->__isset.from_decree_excluded = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->to_decree_included);
          this->__isset.to_decree_included = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->meta.read(iprot);
          this->__isset.meta = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->files.clear();
            uint32_t _size44;
            ::apache::thrift::protocol::TType _etype47;
            xfer += iprot->readListBegin(_etype47, _size44);
            this->files.resize(_size44);
            uint32_t _i48;
            for (_i48 = 0; _i48 < _size44; ++_i48)
            {
              xfer += iprot->readString(this->files[_i48]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.files = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

void swap(learn_state &a, learn_state &b) {
  using ::std::swap;
  swap(a.from_decree_excluded, b.from_decree_excluded);
  swap(a.to_decree_included, b.to_decree_included);
  swap(a.meta, b.meta);
  swap(a.files, b.files);
  swap(a.__isset, b.__isset);
}

learn_state::learn_state(const learn_state& other50) {
  from_decree_excluded = other50.from_decree_excluded;
  to_decree_included = other50.to_decree_included;
  meta = other50.meta;
  files = other50.files;
  __isset = other50.__isset;
}
learn_state::learn_state( learn_state&& other51) {
  from_decree_excluded = std::move(other51.from_decree_excluded);
  to_decree_included = std::move(other51.to_decree_included);
  meta = std::move(other51.meta);
  files = std::move(other51.files);
  __isset = std::move(other51.__isset);
}
learn_state& learn_state::operator=(const learn_state& other52) {
  from_decree_excluded = other52.from_decree_excluded;
  to_decree_included = other52.to_decree_included;
  meta = other52.meta;
  files = other52.files;
  __isset = other52.__isset;
  return *this;
}
learn_state& learn_state::operator=(learn_state&& other53) {
  from_decree_excluded = std::move(other53.from_decree_excluded);
  to_decree_included = std::move(other53.to_decree_included);
  meta = std::move(other53.meta);
  files = std::move(other53.files);
  __isset = std::move(other53.__isset);
  return *this;
}
void learn_state::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "learn_state(";
  out << "from_decree_excluded=" << to_string(from_decree_excluded);
  out << ", " << "to_decree_included=" << to_string(to_decree_included);
  out << ", " << "meta=" << to_string(meta);
  out << ", " << "files=" << to_string(files);
  out << ")";
}

learn_request::~learn_request() throw() {
}

void learn_request::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void learn_request::__set_learner(const  ::dsn::rpc_address& val) {
  this->learner = val;
}

void learn_request::__set_signature(const int64_t val) {
  this->signature = val;
}

void learn_request::__set_last_committed_decree_in_app(const int64_t val) {
  this->last_committed_decree_in_app = val;
}

void learn_request::__set_last_committed_decree_in_prepare_list(const int64_t val) {
  this->last_committed_decree_in_prepare_list = val;
}

void learn_request::__set_app_specific_learn_request(const  ::dsn::blob& val) {
  this->app_specific_learn_request = val;
}

uint32_t learn_request::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->learner.read(iprot);
          this->__isset.learner = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->signature);
          this->__isset.signature = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_app);
          this->__isset.last_committed_decree_in_app = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_prepare_list);
          this->__isset.last_committed_decree_in_prepare_list = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->app_specific_learn_request.read(iprot);
          this->__isset.app_specific_learn_request = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

void swap(learn_request &a, learn_request &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.learner, b.learner);
  swap(a.signature, b.signature);
  swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app);
  swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list);
  swap(a.app_specific_learn_request, b.app_specific_learn_request);
  swap(a.__isset, b.__isset);
}

learn_request::learn_request(const learn_request& other54) {
  pid = other54.pid;
  learner = other54.learner;
  signature = other54.signature;
  last_committed_decree_in_app = other54.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other54.last_committed_decree_in_prepare_list;
  app_specific_learn_request = other54.app_specific_learn_request;
  __isset = other54.__isset;
}
learn_request::learn_request( learn_request&& other55) {
  pid = std::move(other55.pid);
  learner = std::move(other55.learner);
  signature = std::move(other55.signature);
  last_committed_decree_in_app = std::move(other55.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other55.last_committed_decree_in_prepare_list);
  app_specific_learn_request = std::move(other55.app_specific_learn_request);
  __isset = std::move(other55.__isset);
}
learn_request& learn_request::operator=(const learn_request& other56) {
  pid = other56.pid;
  learner = other56.learner;
  signature = other56.signature;
  last_committed_decree_in_app = other56.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other56.last_committed_decree_in_prepare_list;
  app_specific_learn_request = other56.app_specific_learn_request;
  __isset = other56.__isset;
  return *this;
}
learn_request& learn_request::operator=(learn_request&& other57) {
  pid = std::move(other57.pid);
  learner = std::move(other57.learner);
  signature = std::move(other57.signature);
  last_committed_decree_in_app = std::move(other57.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other57.last_committed_decree_in_prepare_list);
  app_specific_learn_request = std::move(other57.app_specific_learn_request);
  __isset = std::move(other57.__isset);
  return *this;
}
void learn_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "learn_request(";
  out << "pid=" << to_string(pid);
  out << ", " << "learner=" << to_string(learner);
  out << ", " << "signature=" << to_string(signature);
  out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app);
  out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list);
  out << ", " << "app_specific_learn_request=" << to_string(app_specific_learn_request);
  out << ")";
}

learn_response::~learn_response() throw() {
}

void learn_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void learn_response::__set_config(const replica_configuration& val) {
  this->config = val;
}

void learn_response::__set_last_committed_decree(const int64_t val) {
  this->last_committed_decree = val;
}

void learn_response::__set_prepare_start_decree(const int64_t val) {
  this->prepare_start_decree = val;
}

void learn_response::__set_type(const learn_type::type val) {
  this->type = val;
}

void learn_response::__set_state(const learn_state& val) {
  this->state = val;
}

void learn_response::__set_address(const  ::dsn::rpc_address& val) {
  this->address = val;
}

void learn_response::__set_base_local_dir(const std::string& val) {
  this->base_local_dir = val;
}

uint32_t learn_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->config.read(iprot);
          this->__isset.config = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree);
          this->__isset.last_committed_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->prepare_start_decree);
          this->__isset.prepare_start_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast58;
          xfer += iprot->readI32(ecast58);
          this->type = (learn_type::type)ecast58;
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->state.read(iprot);
          this->__isset.state = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->address.read(iprot);
          this->__isset.address = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->base_local_dir);
          this->__isset.base_local_dir = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

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

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

void swap(learn_response &a, learn_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.config, b.config);
  swap(a.last_committed_decree, b.last_committed_decree);
  swap(a.prepare_start_decree, b.prepare_start_decree);
  swap(a.type, b.type);
  swap(a.state, b.state);
  swap(a.address, b.address);
  swap(a.base_local_dir, b.base_local_dir);
  swap(a.__isset, b.__isset);
}

learn_response::learn_response(const learn_response& other59) {
  err = other59.err;
  config = other59.config;
  last_committed_decree = other59.last_committed_decree;
  prepare_start_decree = other59.prepare_start_decree;
  type = other59.type;
  state = other59.state;
  address = other59.address;
  base_local_dir = other59.base_local_dir;
  __isset = other59.__isset;
}
learn_response::learn_response( learn_response&& other60) {
  err = std::move(other60.err);
  config = std::move(other60.config);
  last_committed_decree = std::move(other60.last_committed_decree);
  prepare_start_decree = std::move(other60.prepare_start_decree);
  type = std::move(other60.type);
  state = std::move(other60.state);
  address = std::move(other60.address);
  base_local_dir = std::move(other60.base_local_dir);
  __isset = std::move(other60.__isset);
}
learn_response& learn_response::operator=(const learn_response& other61) {
  err = other61.err;
  config = other61.config;
  last_committed_decree = other61.last_committed_decree;
  prepare_start_decree = other61.prepare_start_decree;
  type = other61.type;
  state = other61.state;
  address = other61.address;
  base_local_dir = other61.base_local_dir;
  __isset = other61.__isset;
  return *this;
}
learn_response& learn_response::operator=(learn_response&& other62) {
  err = std::move(other62.err);
  config = std::move(other62.config);
  last_committed_decree = std::move(other62.last_committed_decree);
  prepare_start_decree = std::move(other62.prepare_start_decree);
  type = std::move(other62.type);
  state = std::move(other62.state);
  address = std::move(other62.address);
  base_local_dir = std::move(other62.base_local_dir);
  __isset = std::move(other62.__isset);
  return *this;
}
void learn_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "learn_response(";
  out << "err=" << to_string(err);
  out << ", " << "config=" << to_string(config);
  out << ", " << "last_committed_decree=" << to_string(last_committed_decree);
  out << ", " << "prepare_start_decree=" << to_string(prepare_start_decree);
  out << ", " << "type=" << to_string(type);
  out << ", " << "state=" << to_string(state);
  out << ", " << "address=" << to_string(address);
  out << ", " << "base_local_dir=" << to_string(base_local_dir);
  out << ")";
}

group_check_request::~group_check_request() throw() {
}

void group_check_request::__set_app(const  ::dsn::app_info& val) {
  this->app = val;
}

void group_check_request::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

void group_check_request::__set_config(const replica_configuration& val) {
  this->config = val;
}

void group_check_request::__set_last_committed_decree(const int64_t val) {
  this->last_committed_decree = val;
}

uint32_t group_check_request::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->app.read(iprot);
          this->__isset.app = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->config.read(iprot);
          this->__isset.config = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree);
          this->__isset.last_committed_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

void swap(group_check_request &a, group_check_request &b) {
  using ::std::swap;
  swap(a.app, b.app);
  swap(a.node, b.node);
  swap(a.config, b.config);
  swap(a.last_committed_decree, b.last_committed_decree);
  swap(a.__isset, b.__isset);
}

group_check_request::group_check_request(const group_check_request& other63) {
  app = other63.app;
  node = other63.node;
  config = other63.config;
  last_committed_decree = other63.last_committed_decree;
  __isset = other63.__isset;
}
group_check_request::group_check_request( group_check_request&& other64) {
  app = std::move(other64.app);
  node = std::move(other64.node);
  config = std::move(other64.config);
  last_committed_decree = std::move(other64.last_committed_decree);
  __isset = std::move(other64.__isset);
}
group_check_request& group_check_request::operator=(const group_check_request& other65) {
  app = other65.app;
  node = other65.node;
  config = other65.config;
  last_committed_decree = other65.last_committed_decree;
  __isset = other65.__isset;
  return *this;
}
group_check_request& group_check_request::operator=(group_check_request&& other66) {
  app = std::move(other66.app);
  node = std::move(other66.node);
  config = std::move(other66.config);
  last_committed_decree = std::move(other66.last_committed_decree);
  __isset = std::move(other66.__isset);
  return *this;
}
void group_check_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "group_check_request(";
  out << "app=" << to_string(app);
  out << ", " << "node=" << to_string(node);
  out << ", " << "config=" << to_string(config);
  out << ", " << "last_committed_decree=" << to_string(last_committed_decree);
  out << ")";
}

group_check_response::~group_check_response() throw() {
}

void group_check_response::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void group_check_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void group_check_response::__set_last_committed_decree_in_app(const int64_t val) {
  this->last_committed_decree_in_app = val;
}

void group_check_response::__set_last_committed_decree_in_prepare_list(const int64_t val) {
  this->last_committed_decree_in_prepare_list = val;
}

void group_check_response::__set_learner_status_(const learner_status::type val) {
  this->learner_status_ = val;
}

void group_check_response::__set_learner_signature(const int64_t val) {
  this->learner_signature = val;
}

void group_check_response::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

uint32_t group_check_response::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_app);
          this->__isset.last_committed_decree_in_app = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree_in_prepare_list);
          this->__isset.last_committed_decree_in_prepare_list = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast67;
          xfer += iprot->readI32(ecast67);
          this->learner_status_ = (learner_status::type)ecast67;
          this->__isset.learner_status_ = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->learner_signature);
          this->__isset.learner_signature = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

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

void swap(group_check_response &a, group_check_response &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.err, b.err);
  swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app);
  swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list);
  swap(a.learner_status_, b.learner_status_);
  swap(a.learner_signature, b.learner_signature);
  swap(a.node, b.node);
  swap(a.__isset, b.__isset);
}

group_check_response::group_check_response(const group_check_response& other68) {
  pid = other68.pid;
  err = other68.err;
  last_committed_decree_in_app = other68.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other68.last_committed_decree_in_prepare_list;
  learner_status_ = other68.learner_status_;
  learner_signature = other68.learner_signature;
  node = other68.node;
  __isset = other68.__isset;
}
group_check_response::group_check_response( group_check_response&& other69) {
  pid = std::move(other69.pid);
  err = std::move(other69.err);
  last_committed_decree_in_app = std::move(other69.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other69.last_committed_decree_in_prepare_list);
  learner_status_ = std::move(other69.learner_status_);
  learner_signature = std::move(other69.learner_signature);
  node = std::move(other69.node);
  __isset = std::move(other69.__isset);
}
group_check_response& group_check_response::operator=(const group_check_response& other70) {
  pid = other70.pid;
  err = other70.err;
  last_committed_decree_in_app = other70.last_committed_decree_in_app;
  last_committed_decree_in_prepare_list = other70.last_committed_decree_in_prepare_list;
  learner_status_ = other70.learner_status_;
  learner_signature = other70.learner_signature;
  node = other70.node;
  __isset = other70.__isset;
  return *this;
}
group_check_response& group_check_response::operator=(group_check_response&& other71) {
  pid = std::move(other71.pid);
  err = std::move(other71.err);
  last_committed_decree_in_app = std::move(other71.last_committed_decree_in_app);
  last_committed_decree_in_prepare_list = std::move(other71.last_committed_decree_in_prepare_list);
  learner_status_ = std::move(other71.learner_status_);
  learner_signature = std::move(other71.learner_signature);
  node = std::move(other71.node);
  __isset = std::move(other71.__isset);
  return *this;
}
void group_check_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "group_check_response(";
  out << "pid=" << to_string(pid);
  out << ", " << "err=" << to_string(err);
  out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app);
  out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list);
  out << ", " << "learner_status_=" << to_string(learner_status_);
  out << ", " << "learner_signature=" << to_string(learner_signature);
  out << ", " << "node=" << to_string(node);
  out << ")";
}

node_info::~node_info() throw() {
}

void node_info::__set_status(const node_status::type val) {
  this->status = val;
}

void node_info::__set_address(const  ::dsn::rpc_address& val) {
  this->address = val;
}

uint32_t node_info::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 ecast72;
          xfer += iprot->readI32(ecast72);
          this->status = (node_status::type)ecast72;
          this->__isset.status = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->address.read(iprot);
          this->__isset.address = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(node_info &a, node_info &b) {
  using ::std::swap;
  swap(a.status, b.status);
  swap(a.address, b.address);
  swap(a.__isset, b.__isset);
}

node_info::node_info(const node_info& other73) {
  status = other73.status;
  address = other73.address;
  __isset = other73.__isset;
}
node_info::node_info( node_info&& other74) {
  status = std::move(other74.status);
  address = std::move(other74.address);
  __isset = std::move(other74.__isset);
}
node_info& node_info::operator=(const node_info& other75) {
  status = other75.status;
  address = other75.address;
  __isset = other75.__isset;
  return *this;
}
node_info& node_info::operator=(node_info&& other76) {
  status = std::move(other76.status);
  address = std::move(other76.address);
  __isset = std::move(other76.__isset);
  return *this;
}
void node_info::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "node_info(";
  out << "status=" << to_string(status);
  out << ", " << "address=" << to_string(address);
  out << ")";
}

meta_response_header::~meta_response_header() throw() {
}

void meta_response_header::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void meta_response_header::__set_primary_address(const  ::dsn::rpc_address& val) {
  this->primary_address = val;
}

uint32_t meta_response_header::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->primary_address.read(iprot);
          this->__isset.primary_address = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(meta_response_header &a, meta_response_header &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.primary_address, b.primary_address);
  swap(a.__isset, b.__isset);
}

meta_response_header::meta_response_header(const meta_response_header& other77) {
  err = other77.err;
  primary_address = other77.primary_address;
  __isset = other77.__isset;
}
meta_response_header::meta_response_header( meta_response_header&& other78) {
  err = std::move(other78.err);
  primary_address = std::move(other78.primary_address);
  __isset = std::move(other78.__isset);
}
meta_response_header& meta_response_header::operator=(const meta_response_header& other79) {
  err = other79.err;
  primary_address = other79.primary_address;
  __isset = other79.__isset;
  return *this;
}
meta_response_header& meta_response_header::operator=(meta_response_header&& other80) {
  err = std::move(other80.err);
  primary_address = std::move(other80.primary_address);
  __isset = std::move(other80.__isset);
  return *this;
}
void meta_response_header::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "meta_response_header(";
  out << "err=" << to_string(err);
  out << ", " << "primary_address=" << to_string(primary_address);
  out << ")";
}

configuration_update_request::~configuration_update_request() throw() {
}

void configuration_update_request::__set_info(const  ::dsn::app_info& val) {
  this->info = val;
}

void configuration_update_request::__set_config(const  ::dsn::partition_configuration& val) {
  this->config = val;
}

void configuration_update_request::__set_type(const config_type::type val) {
  this->type = val;
}

void configuration_update_request::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

void configuration_update_request::__set_host_node(const  ::dsn::rpc_address& val) {
  this->host_node = val;
}

uint32_t configuration_update_request::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->info.read(iprot);
          this->__isset.info = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->config.read(iprot);
          this->__isset.config = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast81;
          xfer += iprot->readI32(ecast81);
          this->type = (config_type::type)ecast81;
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->host_node.read(iprot);
          this->__isset.host_node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

void swap(configuration_update_request &a, configuration_update_request &b) {
  using ::std::swap;
  swap(a.info, b.info);
  swap(a.config, b.config);
  swap(a.type, b.type);
  swap(a.node, b.node);
  swap(a.host_node, b.host_node);
  swap(a.__isset, b.__isset);
}

configuration_update_request::configuration_update_request(const configuration_update_request& other82) {
  info = other82.info;
  config = other82.config;
  type = other82.type;
  node = other82.node;
  host_node = other82.host_node;
  __isset = other82.__isset;
}
configuration_update_request::configuration_update_request( configuration_update_request&& other83) {
  info = std::move(other83.info);
  config = std::move(other83.config);
  type = std::move(other83.type);
  node = std::move(other83.node);
  host_node = std::move(other83.host_node);
  __isset = std::move(other83.__isset);
}
configuration_update_request& configuration_update_request::operator=(const configuration_update_request& other84) {
  info = other84.info;
  config = other84.config;
  type = other84.type;
  node = other84.node;
  host_node = other84.host_node;
  __isset = other84.__isset;
  return *this;
}
configuration_update_request& configuration_update_request::operator=(configuration_update_request&& other85) {
  info = std::move(other85.info);
  config = std::move(other85.config);
  type = std::move(other85.type);
  node = std::move(other85.node);
  host_node = std::move(other85.host_node);
  __isset = std::move(other85.__isset);
  return *this;
}
void configuration_update_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_update_request(";
  out << "info=" << to_string(info);
  out << ", " << "config=" << to_string(config);
  out << ", " << "type=" << to_string(type);
  out << ", " << "node=" << to_string(node);
  out << ", " << "host_node=" << to_string(host_node);
  out << ")";
}

configuration_update_response::~configuration_update_response() throw() {
}

void configuration_update_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void configuration_update_response::__set_config(const  ::dsn::partition_configuration& val) {
  this->config = val;
}

uint32_t configuration_update_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->config.read(iprot);
          this->__isset.config = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_update_response &a, configuration_update_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.config, b.config);
  swap(a.__isset, b.__isset);
}

configuration_update_response::configuration_update_response(const configuration_update_response& other86) {
  err = other86.err;
  config = other86.config;
  __isset = other86.__isset;
}
configuration_update_response::configuration_update_response( configuration_update_response&& other87) {
  err = std::move(other87.err);
  config = std::move(other87.config);
  __isset = std::move(other87.__isset);
}
configuration_update_response& configuration_update_response::operator=(const configuration_update_response& other88) {
  err = other88.err;
  config = other88.config;
  __isset = other88.__isset;
  return *this;
}
configuration_update_response& configuration_update_response::operator=(configuration_update_response&& other89) {
  err = std::move(other89.err);
  config = std::move(other89.config);
  __isset = std::move(other89.__isset);
  return *this;
}
void configuration_update_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_update_response(";
  out << "err=" << to_string(err);
  out << ", " << "config=" << to_string(config);
  out << ")";
}

configuration_query_by_node_request::~configuration_query_by_node_request() throw() {
}

void configuration_query_by_node_request::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

uint32_t configuration_query_by_node_request::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->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_query_by_node_request::configuration_query_by_node_request(const configuration_query_by_node_request& other90) {
  node = other90.node;
  __isset = other90.__isset;
}
configuration_query_by_node_request::configuration_query_by_node_request( configuration_query_by_node_request&& other91) {
  node = std::move(other91.node);
  __isset = std::move(other91.__isset);
}
configuration_query_by_node_request& configuration_query_by_node_request::operator=(const configuration_query_by_node_request& other92) {
  node = other92.node;
  __isset = other92.__isset;
  return *this;
}
configuration_query_by_node_request& configuration_query_by_node_request::operator=(configuration_query_by_node_request&& other93) {
  node = std::move(other93.node);
  __isset = std::move(other93.__isset);
  return *this;
}
void configuration_query_by_node_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_query_by_node_request(";
  out << "node=" << to_string(node);
  out << ")";
}

configuration_query_by_node_response::~configuration_query_by_node_response() throw() {
}

void configuration_query_by_node_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

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

uint32_t configuration_query_by_node_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->partitions.clear();
            uint32_t _size94;
            ::apache::thrift::protocol::TType _etype97;
            xfer += iprot->readListBegin(_etype97, _size94);
            this->partitions.resize(_size94);
            uint32_t _i98;
            for (_i98 = 0; _i98 < _size94; ++_i98)
            {
              xfer += this->partitions[_i98].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 configuration_query_by_node_response::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("configuration_query_by_node_response");

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

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

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

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

configuration_query_by_node_response::configuration_query_by_node_response(const configuration_query_by_node_response& other100) {
  err = other100.err;
  partitions = other100.partitions;
  __isset = other100.__isset;
}
configuration_query_by_node_response::configuration_query_by_node_response( configuration_query_by_node_response&& other101) {
  err = std::move(other101.err);
  partitions = std::move(other101.partitions);
  __isset = std::move(other101.__isset);
}
configuration_query_by_node_response& configuration_query_by_node_response::operator=(const configuration_query_by_node_response& other102) {
  err = other102.err;
  partitions = other102.partitions;
  __isset = other102.__isset;
  return *this;
}
configuration_query_by_node_response& configuration_query_by_node_response::operator=(configuration_query_by_node_response&& other103) {
  err = std::move(other103.err);
  partitions = std::move(other103.partitions);
  __isset = std::move(other103.__isset);
  return *this;
}
void configuration_query_by_node_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_query_by_node_response(";
  out << "err=" << to_string(err);
  out << ", " << "partitions=" << to_string(partitions);
  out << ")";
}

create_app_options::~create_app_options() throw() {
}

void create_app_options::__set_partition_count(const int32_t val) {
  this->partition_count = val;
}

void create_app_options::__set_replica_count(const int32_t val) {
  this->replica_count = val;
}

void create_app_options::__set_success_if_exist(const bool val) {
  this->success_if_exist = val;
}

void create_app_options::__set_app_type(const std::string& val) {
  this->app_type = val;
}

void create_app_options::__set_is_stateful(const bool val) {
  this->is_stateful = val;
}

void create_app_options::__set_envs(const std::map<std::string, std::string> & val) {
  this->envs = val;
}

uint32_t create_app_options::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) {
          xfer += iprot->readI32(this->partition_count);
          this->__isset.partition_count = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->replica_count);
          this->__isset.replica_count = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->success_if_exist);
          this->__isset.success_if_exist = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->app_type);
          this->__isset.app_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->is_stateful);
          this->__isset.is_stateful = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->envs.clear();
            uint32_t _size104;
            ::apache::thrift::protocol::TType _ktype105;
            ::apache::thrift::protocol::TType _vtype106;
            xfer += iprot->readMapBegin(_ktype105, _vtype106, _size104);
            uint32_t _i108;
            for (_i108 = 0; _i108 < _size104; ++_i108)
            {
              std::string _key109;
              xfer += iprot->readString(_key109);
              std::string& _val110 = this->envs[_key109];
              xfer += iprot->readString(_val110);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.envs = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

void swap(create_app_options &a, create_app_options &b) {
  using ::std::swap;
  swap(a.partition_count, b.partition_count);
  swap(a.replica_count, b.replica_count);
  swap(a.success_if_exist, b.success_if_exist);
  swap(a.app_type, b.app_type);
  swap(a.is_stateful, b.is_stateful);
  swap(a.envs, b.envs);
  swap(a.__isset, b.__isset);
}

create_app_options::create_app_options(const create_app_options& other112) {
  partition_count = other112.partition_count;
  replica_count = other112.replica_count;
  success_if_exist = other112.success_if_exist;
  app_type = other112.app_type;
  is_stateful = other112.is_stateful;
  envs = other112.envs;
  __isset = other112.__isset;
}
create_app_options::create_app_options( create_app_options&& other113) {
  partition_count = std::move(other113.partition_count);
  replica_count = std::move(other113.replica_count);
  success_if_exist = std::move(other113.success_if_exist);
  app_type = std::move(other113.app_type);
  is_stateful = std::move(other113.is_stateful);
  envs = std::move(other113.envs);
  __isset = std::move(other113.__isset);
}
create_app_options& create_app_options::operator=(const create_app_options& other114) {
  partition_count = other114.partition_count;
  replica_count = other114.replica_count;
  success_if_exist = other114.success_if_exist;
  app_type = other114.app_type;
  is_stateful = other114.is_stateful;
  envs = other114.envs;
  __isset = other114.__isset;
  return *this;
}
create_app_options& create_app_options::operator=(create_app_options&& other115) {
  partition_count = std::move(other115.partition_count);
  replica_count = std::move(other115.replica_count);
  success_if_exist = std::move(other115.success_if_exist);
  app_type = std::move(other115.app_type);
  is_stateful = std::move(other115.is_stateful);
  envs = std::move(other115.envs);
  __isset = std::move(other115.__isset);
  return *this;
}
void create_app_options::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "create_app_options(";
  out << "partition_count=" << to_string(partition_count);
  out << ", " << "replica_count=" << to_string(replica_count);
  out << ", " << "success_if_exist=" << to_string(success_if_exist);
  out << ", " << "app_type=" << to_string(app_type);
  out << ", " << "is_stateful=" << to_string(is_stateful);
  out << ", " << "envs=" << to_string(envs);
  out << ")";
}

configuration_create_app_request::~configuration_create_app_request() throw() {
}

void configuration_create_app_request::__set_app_name(const std::string& val) {
  this->app_name = val;
}

void configuration_create_app_request::__set_options(const create_app_options& val) {
  this->options = val;
}

uint32_t configuration_create_app_request::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->app_name);
          this->__isset.app_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->options.read(iprot);
          this->__isset.options = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_create_app_request &a, configuration_create_app_request &b) {
  using ::std::swap;
  swap(a.app_name, b.app_name);
  swap(a.options, b.options);
  swap(a.__isset, b.__isset);
}

configuration_create_app_request::configuration_create_app_request(const configuration_create_app_request& other116) {
  app_name = other116.app_name;
  options = other116.options;
  __isset = other116.__isset;
}
configuration_create_app_request::configuration_create_app_request( configuration_create_app_request&& other117) {
  app_name = std::move(other117.app_name);
  options = std::move(other117.options);
  __isset = std::move(other117.__isset);
}
configuration_create_app_request& configuration_create_app_request::operator=(const configuration_create_app_request& other118) {
  app_name = other118.app_name;
  options = other118.options;
  __isset = other118.__isset;
  return *this;
}
configuration_create_app_request& configuration_create_app_request::operator=(configuration_create_app_request&& other119) {
  app_name = std::move(other119.app_name);
  options = std::move(other119.options);
  __isset = std::move(other119.__isset);
  return *this;
}
void configuration_create_app_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_create_app_request(";
  out << "app_name=" << to_string(app_name);
  out << ", " << "options=" << to_string(options);
  out << ")";
}

drop_app_options::~drop_app_options() throw() {
}

void drop_app_options::__set_success_if_not_exist(const bool val) {
  this->success_if_not_exist = val;
}

uint32_t drop_app_options::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_if_not_exist);
          this->__isset.success_if_not_exist = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

drop_app_options::drop_app_options(const drop_app_options& other120) {
  success_if_not_exist = other120.success_if_not_exist;
  __isset = other120.__isset;
}
drop_app_options::drop_app_options( drop_app_options&& other121) {
  success_if_not_exist = std::move(other121.success_if_not_exist);
  __isset = std::move(other121.__isset);
}
drop_app_options& drop_app_options::operator=(const drop_app_options& other122) {
  success_if_not_exist = other122.success_if_not_exist;
  __isset = other122.__isset;
  return *this;
}
drop_app_options& drop_app_options::operator=(drop_app_options&& other123) {
  success_if_not_exist = std::move(other123.success_if_not_exist);
  __isset = std::move(other123.__isset);
  return *this;
}
void drop_app_options::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "drop_app_options(";
  out << "success_if_not_exist=" << to_string(success_if_not_exist);
  out << ")";
}

configuration_drop_app_request::~configuration_drop_app_request() throw() {
}

void configuration_drop_app_request::__set_app_name(const std::string& val) {
  this->app_name = val;
}

void configuration_drop_app_request::__set_options(const drop_app_options& val) {
  this->options = val;
}

uint32_t configuration_drop_app_request::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->app_name);
          this->__isset.app_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->options.read(iprot);
          this->__isset.options = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_drop_app_request &a, configuration_drop_app_request &b) {
  using ::std::swap;
  swap(a.app_name, b.app_name);
  swap(a.options, b.options);
  swap(a.__isset, b.__isset);
}

configuration_drop_app_request::configuration_drop_app_request(const configuration_drop_app_request& other124) {
  app_name = other124.app_name;
  options = other124.options;
  __isset = other124.__isset;
}
configuration_drop_app_request::configuration_drop_app_request( configuration_drop_app_request&& other125) {
  app_name = std::move(other125.app_name);
  options = std::move(other125.options);
  __isset = std::move(other125.__isset);
}
configuration_drop_app_request& configuration_drop_app_request::operator=(const configuration_drop_app_request& other126) {
  app_name = other126.app_name;
  options = other126.options;
  __isset = other126.__isset;
  return *this;
}
configuration_drop_app_request& configuration_drop_app_request::operator=(configuration_drop_app_request&& other127) {
  app_name = std::move(other127.app_name);
  options = std::move(other127.options);
  __isset = std::move(other127.__isset);
  return *this;
}
void configuration_drop_app_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_drop_app_request(";
  out << "app_name=" << to_string(app_name);
  out << ", " << "options=" << to_string(options);
  out << ")";
}

configuration_list_apps_request::~configuration_list_apps_request() throw() {
}

void configuration_list_apps_request::__set_status(const  ::dsn::app_status::type val) {
  this->status = val;
}

uint32_t configuration_list_apps_request::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 ecast128;
          xfer += iprot->readI32(ecast128);
          this->status = ( ::dsn::app_status::type)ecast128;
          this->__isset.status = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_list_apps_request::configuration_list_apps_request(const configuration_list_apps_request& other129) {
  status = other129.status;
  __isset = other129.__isset;
}
configuration_list_apps_request::configuration_list_apps_request( configuration_list_apps_request&& other130) {
  status = std::move(other130.status);
  __isset = std::move(other130.__isset);
}
configuration_list_apps_request& configuration_list_apps_request::operator=(const configuration_list_apps_request& other131) {
  status = other131.status;
  __isset = other131.__isset;
  return *this;
}
configuration_list_apps_request& configuration_list_apps_request::operator=(configuration_list_apps_request&& other132) {
  status = std::move(other132.status);
  __isset = std::move(other132.__isset);
  return *this;
}
void configuration_list_apps_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_list_apps_request(";
  out << "status=" << to_string(status);
  out << ")";
}

configuration_list_nodes_request::~configuration_list_nodes_request() throw() {
}

void configuration_list_nodes_request::__set_status(const node_status::type val) {
  this->status = val;
}

uint32_t configuration_list_nodes_request::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 ecast133;
          xfer += iprot->readI32(ecast133);
          this->status = (node_status::type)ecast133;
          this->__isset.status = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_list_nodes_request::configuration_list_nodes_request(const configuration_list_nodes_request& other134) {
  status = other134.status;
  __isset = other134.__isset;
}
configuration_list_nodes_request::configuration_list_nodes_request( configuration_list_nodes_request&& other135) {
  status = std::move(other135.status);
  __isset = std::move(other135.__isset);
}
configuration_list_nodes_request& configuration_list_nodes_request::operator=(const configuration_list_nodes_request& other136) {
  status = other136.status;
  __isset = other136.__isset;
  return *this;
}
configuration_list_nodes_request& configuration_list_nodes_request::operator=(configuration_list_nodes_request&& other137) {
  status = std::move(other137.status);
  __isset = std::move(other137.__isset);
  return *this;
}
void configuration_list_nodes_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_list_nodes_request(";
  out << "status=" << to_string(status);
  out << ")";
}

configuration_cluster_info_request::~configuration_cluster_info_request() throw() {
}

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

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

void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b) {
  using ::std::swap;
  (void) a;
  (void) b;
}

configuration_cluster_info_request::configuration_cluster_info_request(const configuration_cluster_info_request& other138) {
  (void) other138;
}
configuration_cluster_info_request::configuration_cluster_info_request( configuration_cluster_info_request&& other139) {
  (void) other139;
}
configuration_cluster_info_request& configuration_cluster_info_request::operator=(const configuration_cluster_info_request& other140) {
  (void) other140;
  return *this;
}
configuration_cluster_info_request& configuration_cluster_info_request::operator=(configuration_cluster_info_request&& other141) {
  (void) other141;
  return *this;
}
void configuration_cluster_info_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_cluster_info_request(";
  out << ")";
}

configuration_create_app_response::~configuration_create_app_response() throw() {
}

void configuration_create_app_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void configuration_create_app_response::__set_appid(const int32_t val) {
  this->appid = val;
}

uint32_t configuration_create_app_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->appid);
          this->__isset.appid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_create_app_response &a, configuration_create_app_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.appid, b.appid);
  swap(a.__isset, b.__isset);
}

configuration_create_app_response::configuration_create_app_response(const configuration_create_app_response& other142) {
  err = other142.err;
  appid = other142.appid;
  __isset = other142.__isset;
}
configuration_create_app_response::configuration_create_app_response( configuration_create_app_response&& other143) {
  err = std::move(other143.err);
  appid = std::move(other143.appid);
  __isset = std::move(other143.__isset);
}
configuration_create_app_response& configuration_create_app_response::operator=(const configuration_create_app_response& other144) {
  err = other144.err;
  appid = other144.appid;
  __isset = other144.__isset;
  return *this;
}
configuration_create_app_response& configuration_create_app_response::operator=(configuration_create_app_response&& other145) {
  err = std::move(other145.err);
  appid = std::move(other145.appid);
  __isset = std::move(other145.__isset);
  return *this;
}
void configuration_create_app_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_create_app_response(";
  out << "err=" << to_string(err);
  out << ", " << "appid=" << to_string(appid);
  out << ")";
}

configuration_meta_control_request::~configuration_meta_control_request() throw() {
}

void configuration_meta_control_request::__set_ctrl_flags(const int64_t val) {
  this->ctrl_flags = val;
}

void configuration_meta_control_request::__set_ctrl_type(const meta_ctrl_type::type val) {
  this->ctrl_type = val;
}

uint32_t configuration_meta_control_request::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->ctrl_flags);
          this->__isset.ctrl_flags = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast146;
          xfer += iprot->readI32(ecast146);
          this->ctrl_type = (meta_ctrl_type::type)ecast146;
          this->__isset.ctrl_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_meta_control_request &a, configuration_meta_control_request &b) {
  using ::std::swap;
  swap(a.ctrl_flags, b.ctrl_flags);
  swap(a.ctrl_type, b.ctrl_type);
  swap(a.__isset, b.__isset);
}

configuration_meta_control_request::configuration_meta_control_request(const configuration_meta_control_request& other147) {
  ctrl_flags = other147.ctrl_flags;
  ctrl_type = other147.ctrl_type;
  __isset = other147.__isset;
}
configuration_meta_control_request::configuration_meta_control_request( configuration_meta_control_request&& other148) {
  ctrl_flags = std::move(other148.ctrl_flags);
  ctrl_type = std::move(other148.ctrl_type);
  __isset = std::move(other148.__isset);
}
configuration_meta_control_request& configuration_meta_control_request::operator=(const configuration_meta_control_request& other149) {
  ctrl_flags = other149.ctrl_flags;
  ctrl_type = other149.ctrl_type;
  __isset = other149.__isset;
  return *this;
}
configuration_meta_control_request& configuration_meta_control_request::operator=(configuration_meta_control_request&& other150) {
  ctrl_flags = std::move(other150.ctrl_flags);
  ctrl_type = std::move(other150.ctrl_type);
  __isset = std::move(other150.__isset);
  return *this;
}
void configuration_meta_control_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_meta_control_request(";
  out << "ctrl_flags=" << to_string(ctrl_flags);
  out << ", " << "ctrl_type=" << to_string(ctrl_type);
  out << ")";
}

configuration_meta_control_response::~configuration_meta_control_response() throw() {
}

void configuration_meta_control_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

uint32_t configuration_meta_control_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_meta_control_response::configuration_meta_control_response(const configuration_meta_control_response& other151) {
  err = other151.err;
  __isset = other151.__isset;
}
configuration_meta_control_response::configuration_meta_control_response( configuration_meta_control_response&& other152) {
  err = std::move(other152.err);
  __isset = std::move(other152.__isset);
}
configuration_meta_control_response& configuration_meta_control_response::operator=(const configuration_meta_control_response& other153) {
  err = other153.err;
  __isset = other153.__isset;
  return *this;
}
configuration_meta_control_response& configuration_meta_control_response::operator=(configuration_meta_control_response&& other154) {
  err = std::move(other154.err);
  __isset = std::move(other154.__isset);
  return *this;
}
void configuration_meta_control_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_meta_control_response(";
  out << "err=" << to_string(err);
  out << ")";
}

configuration_proposal_action::~configuration_proposal_action() throw() {
}

void configuration_proposal_action::__set_target(const  ::dsn::rpc_address& val) {
  this->target = val;
}

void configuration_proposal_action::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

void configuration_proposal_action::__set_type(const config_type::type val) {
  this->type = val;
}

uint32_t configuration_proposal_action::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->target.read(iprot);
          this->__isset.target = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast155;
          xfer += iprot->readI32(ecast155);
          this->type = (config_type::type)ecast155;
          this->__isset.type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

  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(configuration_proposal_action &a, configuration_proposal_action &b) {
  using ::std::swap;
  swap(a.target, b.target);
  swap(a.node, b.node);
  swap(a.type, b.type);
  swap(a.__isset, b.__isset);
}

configuration_proposal_action::configuration_proposal_action(const configuration_proposal_action& other156) {
  target = other156.target;
  node = other156.node;
  type = other156.type;
  __isset = other156.__isset;
}
configuration_proposal_action::configuration_proposal_action( configuration_proposal_action&& other157) {
  target = std::move(other157.target);
  node = std::move(other157.node);
  type = std::move(other157.type);
  __isset = std::move(other157.__isset);
}
configuration_proposal_action& configuration_proposal_action::operator=(const configuration_proposal_action& other158) {
  target = other158.target;
  node = other158.node;
  type = other158.type;
  __isset = other158.__isset;
  return *this;
}
configuration_proposal_action& configuration_proposal_action::operator=(configuration_proposal_action&& other159) {
  target = std::move(other159.target);
  node = std::move(other159.node);
  type = std::move(other159.type);
  __isset = std::move(other159.__isset);
  return *this;
}
void configuration_proposal_action::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_proposal_action(";
  out << "target=" << to_string(target);
  out << ", " << "node=" << to_string(node);
  out << ", " << "type=" << to_string(type);
  out << ")";
}

configuration_balancer_request::~configuration_balancer_request() throw() {
}

void configuration_balancer_request::__set_gpid(const  ::dsn::gpid& val) {
  this->gpid = val;
}

void configuration_balancer_request::__set_action_list(const std::vector<configuration_proposal_action> & val) {
  this->action_list = val;
}

void configuration_balancer_request::__set_force(const bool val) {
  this->force = val;
__isset.force = true;
}

uint32_t configuration_balancer_request::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->gpid.read(iprot);
          this->__isset.gpid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->action_list.clear();
            uint32_t _size160;
            ::apache::thrift::protocol::TType _etype163;
            xfer += iprot->readListBegin(_etype163, _size160);
            this->action_list.resize(_size160);
            uint32_t _i164;
            for (_i164 = 0; _i164 < _size160; ++_i164)
            {
              xfer += this->action_list[_i164].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.action_list = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->force);
          this->__isset.force = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_balancer_request &a, configuration_balancer_request &b) {
  using ::std::swap;
  swap(a.gpid, b.gpid);
  swap(a.action_list, b.action_list);
  swap(a.force, b.force);
  swap(a.__isset, b.__isset);
}

configuration_balancer_request::configuration_balancer_request(const configuration_balancer_request& other166) {
  gpid = other166.gpid;
  action_list = other166.action_list;
  force = other166.force;
  __isset = other166.__isset;
}
configuration_balancer_request::configuration_balancer_request( configuration_balancer_request&& other167) {
  gpid = std::move(other167.gpid);
  action_list = std::move(other167.action_list);
  force = std::move(other167.force);
  __isset = std::move(other167.__isset);
}
configuration_balancer_request& configuration_balancer_request::operator=(const configuration_balancer_request& other168) {
  gpid = other168.gpid;
  action_list = other168.action_list;
  force = other168.force;
  __isset = other168.__isset;
  return *this;
}
configuration_balancer_request& configuration_balancer_request::operator=(configuration_balancer_request&& other169) {
  gpid = std::move(other169.gpid);
  action_list = std::move(other169.action_list);
  force = std::move(other169.force);
  __isset = std::move(other169.__isset);
  return *this;
}
void configuration_balancer_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_balancer_request(";
  out << "gpid=" << to_string(gpid);
  out << ", " << "action_list=" << to_string(action_list);
  out << ", " << "force="; (__isset.force ? (out << to_string(force)) : (out << "<null>"));
  out << ")";
}

configuration_balancer_response::~configuration_balancer_response() throw() {
}

void configuration_balancer_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

uint32_t configuration_balancer_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_balancer_response::configuration_balancer_response(const configuration_balancer_response& other170) {
  err = other170.err;
  __isset = other170.__isset;
}
configuration_balancer_response::configuration_balancer_response( configuration_balancer_response&& other171) {
  err = std::move(other171.err);
  __isset = std::move(other171.__isset);
}
configuration_balancer_response& configuration_balancer_response::operator=(const configuration_balancer_response& other172) {
  err = other172.err;
  __isset = other172.__isset;
  return *this;
}
configuration_balancer_response& configuration_balancer_response::operator=(configuration_balancer_response&& other173) {
  err = std::move(other173.err);
  __isset = std::move(other173.__isset);
  return *this;
}
void configuration_balancer_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_balancer_response(";
  out << "err=" << to_string(err);
  out << ")";
}

configuration_drop_app_response::~configuration_drop_app_response() throw() {
}

void configuration_drop_app_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

uint32_t configuration_drop_app_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

configuration_drop_app_response::configuration_drop_app_response(const configuration_drop_app_response& other174) {
  err = other174.err;
  __isset = other174.__isset;
}
configuration_drop_app_response::configuration_drop_app_response( configuration_drop_app_response&& other175) {
  err = std::move(other175.err);
  __isset = std::move(other175.__isset);
}
configuration_drop_app_response& configuration_drop_app_response::operator=(const configuration_drop_app_response& other176) {
  err = other176.err;
  __isset = other176.__isset;
  return *this;
}
configuration_drop_app_response& configuration_drop_app_response::operator=(configuration_drop_app_response&& other177) {
  err = std::move(other177.err);
  __isset = std::move(other177.__isset);
  return *this;
}
void configuration_drop_app_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_drop_app_response(";
  out << "err=" << to_string(err);
  out << ")";
}

configuration_list_apps_response::~configuration_list_apps_response() throw() {
}

void configuration_list_apps_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void configuration_list_apps_response::__set_infos(const std::vector< ::dsn::app_info> & val) {
  this->infos = val;
}

uint32_t configuration_list_apps_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->infos.clear();
            uint32_t _size178;
            ::apache::thrift::protocol::TType _etype181;
            xfer += iprot->readListBegin(_etype181, _size178);
            this->infos.resize(_size178);
            uint32_t _i182;
            for (_i182 = 0; _i182 < _size178; ++_i182)
            {
              xfer += this->infos[_i182].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.infos = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_list_apps_response &a, configuration_list_apps_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.infos, b.infos);
  swap(a.__isset, b.__isset);
}

configuration_list_apps_response::configuration_list_apps_response(const configuration_list_apps_response& other184) {
  err = other184.err;
  infos = other184.infos;
  __isset = other184.__isset;
}
configuration_list_apps_response::configuration_list_apps_response( configuration_list_apps_response&& other185) {
  err = std::move(other185.err);
  infos = std::move(other185.infos);
  __isset = std::move(other185.__isset);
}
configuration_list_apps_response& configuration_list_apps_response::operator=(const configuration_list_apps_response& other186) {
  err = other186.err;
  infos = other186.infos;
  __isset = other186.__isset;
  return *this;
}
configuration_list_apps_response& configuration_list_apps_response::operator=(configuration_list_apps_response&& other187) {
  err = std::move(other187.err);
  infos = std::move(other187.infos);
  __isset = std::move(other187.__isset);
  return *this;
}
void configuration_list_apps_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_list_apps_response(";
  out << "err=" << to_string(err);
  out << ", " << "infos=" << to_string(infos);
  out << ")";
}

configuration_list_nodes_response::~configuration_list_nodes_response() throw() {
}

void configuration_list_nodes_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void configuration_list_nodes_response::__set_infos(const std::vector<node_info> & val) {
  this->infos = val;
}

uint32_t configuration_list_nodes_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->infos.clear();
            uint32_t _size188;
            ::apache::thrift::protocol::TType _etype191;
            xfer += iprot->readListBegin(_etype191, _size188);
            this->infos.resize(_size188);
            uint32_t _i192;
            for (_i192 = 0; _i192 < _size188; ++_i192)
            {
              xfer += this->infos[_i192].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.infos = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.infos, b.infos);
  swap(a.__isset, b.__isset);
}

configuration_list_nodes_response::configuration_list_nodes_response(const configuration_list_nodes_response& other194) {
  err = other194.err;
  infos = other194.infos;
  __isset = other194.__isset;
}
configuration_list_nodes_response::configuration_list_nodes_response( configuration_list_nodes_response&& other195) {
  err = std::move(other195.err);
  infos = std::move(other195.infos);
  __isset = std::move(other195.__isset);
}
configuration_list_nodes_response& configuration_list_nodes_response::operator=(const configuration_list_nodes_response& other196) {
  err = other196.err;
  infos = other196.infos;
  __isset = other196.__isset;
  return *this;
}
configuration_list_nodes_response& configuration_list_nodes_response::operator=(configuration_list_nodes_response&& other197) {
  err = std::move(other197.err);
  infos = std::move(other197.infos);
  __isset = std::move(other197.__isset);
  return *this;
}
void configuration_list_nodes_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_list_nodes_response(";
  out << "err=" << to_string(err);
  out << ", " << "infos=" << to_string(infos);
  out << ")";
}

configuration_cluster_info_response::~configuration_cluster_info_response() throw() {
}

void configuration_cluster_info_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void configuration_cluster_info_response::__set_keys(const std::vector<std::string> & val) {
  this->keys = val;
}

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

uint32_t configuration_cluster_info_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->keys.clear();
            uint32_t _size198;
            ::apache::thrift::protocol::TType _etype201;
            xfer += iprot->readListBegin(_etype201, _size198);
            this->keys.resize(_size198);
            uint32_t _i202;
            for (_i202 = 0; _i202 < _size198; ++_i202)
            {
              xfer += iprot->readString(this->keys[_i202]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.keys = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->values.clear();
            uint32_t _size203;
            ::apache::thrift::protocol::TType _etype206;
            xfer += iprot->readListBegin(_etype206, _size203);
            this->values.resize(_size203);
            uint32_t _i207;
            for (_i207 = 0; _i207 < _size203; ++_i207)
            {
              xfer += iprot->readString(this->values[_i207]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.values = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.keys, b.keys);
  swap(a.values, b.values);
  swap(a.__isset, b.__isset);
}

configuration_cluster_info_response::configuration_cluster_info_response(const configuration_cluster_info_response& other210) {
  err = other210.err;
  keys = other210.keys;
  values = other210.values;
  __isset = other210.__isset;
}
configuration_cluster_info_response::configuration_cluster_info_response( configuration_cluster_info_response&& other211) {
  err = std::move(other211.err);
  keys = std::move(other211.keys);
  values = std::move(other211.values);
  __isset = std::move(other211.__isset);
}
configuration_cluster_info_response& configuration_cluster_info_response::operator=(const configuration_cluster_info_response& other212) {
  err = other212.err;
  keys = other212.keys;
  values = other212.values;
  __isset = other212.__isset;
  return *this;
}
configuration_cluster_info_response& configuration_cluster_info_response::operator=(configuration_cluster_info_response&& other213) {
  err = std::move(other213.err);
  keys = std::move(other213.keys);
  values = std::move(other213.values);
  __isset = std::move(other213.__isset);
  return *this;
}
void configuration_cluster_info_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "configuration_cluster_info_response(";
  out << "err=" << to_string(err);
  out << ", " << "keys=" << to_string(keys);
  out << ", " << "values=" << to_string(values);
  out << ")";
}

query_replica_decree_request::~query_replica_decree_request() throw() {
}

void query_replica_decree_request::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void query_replica_decree_request::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

uint32_t query_replica_decree_request::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(query_replica_decree_request &a, query_replica_decree_request &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.node, b.node);
  swap(a.__isset, b.__isset);
}

query_replica_decree_request::query_replica_decree_request(const query_replica_decree_request& other214) {
  pid = other214.pid;
  node = other214.node;
  __isset = other214.__isset;
}
query_replica_decree_request::query_replica_decree_request( query_replica_decree_request&& other215) {
  pid = std::move(other215.pid);
  node = std::move(other215.node);
  __isset = std::move(other215.__isset);
}
query_replica_decree_request& query_replica_decree_request::operator=(const query_replica_decree_request& other216) {
  pid = other216.pid;
  node = other216.node;
  __isset = other216.__isset;
  return *this;
}
query_replica_decree_request& query_replica_decree_request::operator=(query_replica_decree_request&& other217) {
  pid = std::move(other217.pid);
  node = std::move(other217.node);
  __isset = std::move(other217.__isset);
  return *this;
}
void query_replica_decree_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "query_replica_decree_request(";
  out << "pid=" << to_string(pid);
  out << ", " << "node=" << to_string(node);
  out << ")";
}

query_replica_decree_response::~query_replica_decree_response() throw() {
}

void query_replica_decree_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void query_replica_decree_response::__set_last_decree(const int64_t val) {
  this->last_decree = val;
}

uint32_t query_replica_decree_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_decree);
          this->__isset.last_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(query_replica_decree_response &a, query_replica_decree_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.last_decree, b.last_decree);
  swap(a.__isset, b.__isset);
}

query_replica_decree_response::query_replica_decree_response(const query_replica_decree_response& other218) {
  err = other218.err;
  last_decree = other218.last_decree;
  __isset = other218.__isset;
}
query_replica_decree_response::query_replica_decree_response( query_replica_decree_response&& other219) {
  err = std::move(other219.err);
  last_decree = std::move(other219.last_decree);
  __isset = std::move(other219.__isset);
}
query_replica_decree_response& query_replica_decree_response::operator=(const query_replica_decree_response& other220) {
  err = other220.err;
  last_decree = other220.last_decree;
  __isset = other220.__isset;
  return *this;
}
query_replica_decree_response& query_replica_decree_response::operator=(query_replica_decree_response&& other221) {
  err = std::move(other221.err);
  last_decree = std::move(other221.last_decree);
  __isset = std::move(other221.__isset);
  return *this;
}
void query_replica_decree_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "query_replica_decree_response(";
  out << "err=" << to_string(err);
  out << ", " << "last_decree=" << to_string(last_decree);
  out << ")";
}

replica_info::~replica_info() throw() {
}

void replica_info::__set_pid(const  ::dsn::gpid& val) {
  this->pid = val;
}

void replica_info::__set_ballot(const int64_t val) {
  this->ballot = val;
}

void replica_info::__set_status(const partition_status::type val) {
  this->status = val;
}

void replica_info::__set_last_committed_decree(const int64_t val) {
  this->last_committed_decree = val;
}

void replica_info::__set_last_prepared_decree(const int64_t val) {
  this->last_prepared_decree = val;
}

void replica_info::__set_last_durable_decree(const int64_t val) {
  this->last_durable_decree = val;
}

uint32_t replica_info::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->pid.read(iprot);
          this->__isset.pid = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->ballot);
          this->__isset.ballot = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast222;
          xfer += iprot->readI32(ecast222);
          this->status = (partition_status::type)ecast222;
          this->__isset.status = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_committed_decree);
          this->__isset.last_committed_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_prepared_decree);
          this->__isset.last_prepared_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->last_durable_decree);
          this->__isset.last_durable_decree = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

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

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

void swap(replica_info &a, replica_info &b) {
  using ::std::swap;
  swap(a.pid, b.pid);
  swap(a.ballot, b.ballot);
  swap(a.status, b.status);
  swap(a.last_committed_decree, b.last_committed_decree);
  swap(a.last_prepared_decree, b.last_prepared_decree);
  swap(a.last_durable_decree, b.last_durable_decree);
  swap(a.__isset, b.__isset);
}

replica_info::replica_info(const replica_info& other223) {
  pid = other223.pid;
  ballot = other223.ballot;
  status = other223.status;
  last_committed_decree = other223.last_committed_decree;
  last_prepared_decree = other223.last_prepared_decree;
  last_durable_decree = other223.last_durable_decree;
  __isset = other223.__isset;
}
replica_info::replica_info( replica_info&& other224) {
  pid = std::move(other224.pid);
  ballot = std::move(other224.ballot);
  status = std::move(other224.status);
  last_committed_decree = std::move(other224.last_committed_decree);
  last_prepared_decree = std::move(other224.last_prepared_decree);
  last_durable_decree = std::move(other224.last_durable_decree);
  __isset = std::move(other224.__isset);
}
replica_info& replica_info::operator=(const replica_info& other225) {
  pid = other225.pid;
  ballot = other225.ballot;
  status = other225.status;
  last_committed_decree = other225.last_committed_decree;
  last_prepared_decree = other225.last_prepared_decree;
  last_durable_decree = other225.last_durable_decree;
  __isset = other225.__isset;
  return *this;
}
replica_info& replica_info::operator=(replica_info&& other226) {
  pid = std::move(other226.pid);
  ballot = std::move(other226.ballot);
  status = std::move(other226.status);
  last_committed_decree = std::move(other226.last_committed_decree);
  last_prepared_decree = std::move(other226.last_prepared_decree);
  last_durable_decree = std::move(other226.last_durable_decree);
  __isset = std::move(other226.__isset);
  return *this;
}
void replica_info::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "replica_info(";
  out << "pid=" << to_string(pid);
  out << ", " << "ballot=" << to_string(ballot);
  out << ", " << "status=" << to_string(status);
  out << ", " << "last_committed_decree=" << to_string(last_committed_decree);
  out << ", " << "last_prepared_decree=" << to_string(last_prepared_decree);
  out << ", " << "last_durable_decree=" << to_string(last_durable_decree);
  out << ")";
}

query_replica_info_request::~query_replica_info_request() throw() {
}

void query_replica_info_request::__set_node(const  ::dsn::rpc_address& val) {
  this->node = val;
}

uint32_t query_replica_info_request::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->node.read(iprot);
          this->__isset.node = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

query_replica_info_request::query_replica_info_request(const query_replica_info_request& other227) {
  node = other227.node;
  __isset = other227.__isset;
}
query_replica_info_request::query_replica_info_request( query_replica_info_request&& other228) {
  node = std::move(other228.node);
  __isset = std::move(other228.__isset);
}
query_replica_info_request& query_replica_info_request::operator=(const query_replica_info_request& other229) {
  node = other229.node;
  __isset = other229.__isset;
  return *this;
}
query_replica_info_request& query_replica_info_request::operator=(query_replica_info_request&& other230) {
  node = std::move(other230.node);
  __isset = std::move(other230.__isset);
  return *this;
}
void query_replica_info_request::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "query_replica_info_request(";
  out << "node=" << to_string(node);
  out << ")";
}

query_replica_info_response::~query_replica_info_response() throw() {
}

void query_replica_info_response::__set_err(const  ::dsn::error_code& val) {
  this->err = val;
}

void query_replica_info_response::__set_replicas(const std::vector<replica_info> & val) {
  this->replicas = val;
}

uint32_t query_replica_info_response::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->err.read(iprot);
          this->__isset.err = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->replicas.clear();
            uint32_t _size231;
            ::apache::thrift::protocol::TType _etype234;
            xfer += iprot->readListBegin(_etype234, _size231);
            this->replicas.resize(_size231);
            uint32_t _i235;
            for (_i235 = 0; _i235 < _size231; ++_i235)
            {
              xfer += this->replicas[_i235].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.replicas = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

void swap(query_replica_info_response &a, query_replica_info_response &b) {
  using ::std::swap;
  swap(a.err, b.err);
  swap(a.replicas, b.replicas);
  swap(a.__isset, b.__isset);
}

query_replica_info_response::query_replica_info_response(const query_replica_info_response& other237) {
  err = other237.err;
  replicas = other237.replicas;
  __isset = other237.__isset;
}
query_replica_info_response::query_replica_info_response( query_replica_info_response&& other238) {
  err = std::move(other238.err);
  replicas = std::move(other238.replicas);
  __isset = std::move(other238.__isset);
}
query_replica_info_response& query_replica_info_response::operator=(const query_replica_info_response& other239) {
  err = other239.err;
  replicas = other239.replicas;
  __isset = other239.__isset;
  return *this;
}
query_replica_info_response& query_replica_info_response::operator=(query_replica_info_response&& other240) {
  err = std::move(other240.err);
  replicas = std::move(other240.replicas);
  __isset = std::move(other240.__isset);
  return *this;
}
void query_replica_info_response::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "query_replica_info_response(";
  out << "err=" << to_string(err);
  out << ", " << "replicas=" << to_string(replicas);
  out << ")";
}

node_state::~node_state() throw() {
}

void node_state::__set_is_alive(const bool val) {
  this->is_alive = val;
}

void node_state::__set_address(const  ::dsn::rpc_address& val) {
  this->address = val;
}

void node_state::__set_primaries(const std::set< ::dsn::gpid> & val) {
  this->primaries = val;
}

void node_state::__set_partitions(const std::set< ::dsn::gpid> & val) {
  this->partitions = val;
}

uint32_t node_state::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->is_alive);
          this->__isset.is_alive = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->address.read(iprot);
          this->__isset.address = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_SET) {
          {
            this->primaries.clear();
            uint32_t _size241;
            ::apache::thrift::protocol::TType _etype244;
            xfer += iprot->readSetBegin(_etype244, _size241);
            uint32_t _i245;
            for (_i245 = 0; _i245 < _size241; ++_i245)
            {
               ::dsn::gpid _elem246;
              xfer += _elem246.read(iprot);
              this->primaries.insert(_elem246);
            }
            xfer += iprot->readSetEnd();
          }
          this->__isset.primaries = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_SET) {
          {
            this->partitions.clear();
            uint32_t _size247;
            ::apache::thrift::protocol::TType _etype250;
            xfer += iprot->readSetBegin(_etype250, _size247);
            uint32_t _i251;
            for (_i251 = 0; _i251 < _size247; ++_i251)
            {
               ::dsn::gpid _elem252;
              xfer += _elem252.read(iprot);
              this->partitions.insert(_elem252);
            }
            xfer += iprot->readSetEnd();
          }
          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 node_state::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("node_state");

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

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

  xfer += oprot->writeFieldBegin("primaries", ::apache::thrift::protocol::T_SET, 3);
  {
    xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->primaries.size()));
    std::set< ::dsn::gpid> ::const_iterator _iter253;
    for (_iter253 = this->primaries.begin(); _iter253 != this->primaries.end(); ++_iter253)
    {
      xfer += (*_iter253).write(oprot);
    }
    xfer += oprot->writeSetEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_SET, 4);
  {
    xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
    std::set< ::dsn::gpid> ::const_iterator _iter254;
    for (_iter254 = this->partitions.begin(); _iter254 != this->partitions.end(); ++_iter254)
    {
      xfer += (*_iter254).write(oprot);
    }
    xfer += oprot->writeSetEnd();
  }
  xfer += oprot->writeFieldEnd();

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

void swap(node_state &a, node_state &b) {
  using ::std::swap;
  swap(a.is_alive, b.is_alive);
  swap(a.address, b.address);
  swap(a.primaries, b.primaries);
  swap(a.partitions, b.partitions);
  swap(a.__isset, b.__isset);
}

node_state::node_state(const node_state& other255) {
  is_alive = other255.is_alive;
  address = other255.address;
  primaries = other255.primaries;
  partitions = other255.partitions;
  __isset = other255.__isset;
}
node_state::node_state( node_state&& other256) {
  is_alive = std::move(other256.is_alive);
  address = std::move(other256.address);
  primaries = std::move(other256.primaries);
  partitions = std::move(other256.partitions);
  __isset = std::move(other256.__isset);
}
node_state& node_state::operator=(const node_state& other257) {
  is_alive = other257.is_alive;
  address = other257.address;
  primaries = other257.primaries;
  partitions = other257.partitions;
  __isset = other257.__isset;
  return *this;
}
node_state& node_state::operator=(node_state&& other258) {
  is_alive = std::move(other258.is_alive);
  address = std::move(other258.address);
  primaries = std::move(other258.primaries);
  partitions = std::move(other258.partitions);
  __isset = std::move(other258.__isset);
  return *this;
}
void node_state::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "node_state(";
  out << "is_alive=" << to_string(is_alive);
  out << ", " << "address=" << to_string(address);
  out << ", " << "primaries=" << to_string(primaries);
  out << ", " << "partitions=" << to_string(partitions);
  out << ")";
}

}} // namespace