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

#include <algorithm>
#include <ostream>

#include <thrift/TToString.h>

namespace thrift_codegen {

int _kStyleValues[] = {
  Style::SOLID,
  Style::DOT,
  Style::DASH,
  Style::NONE
};
const char* _kStyleNames[] = {
  "SOLID",
  "DOT",
  "DASH",
  "NONE"
};
const std::map<int, const char*> _Style_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kStyleValues, _kStyleNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr));

std::ostream& operator<<(std::ostream& out, const Style::type& val) {
  std::map<int, const char*>::const_iterator it = _Style_VALUES_TO_NAMES.find(val);
  if (it != _Style_VALUES_TO_NAMES.end()) {
    out << it->second;
  } else {
    out << static_cast<int>(val);
  }
  return out;
}

std::string to_string(const Style::type& val) {
  std::map<int, const char*>::const_iterator it = _Style_VALUES_TO_NAMES.find(val);
  if (it != _Style_VALUES_TO_NAMES.end()) {
    return std::string(it->second);
  } else {
    return std::to_string(static_cast<int>(val));
  }
}


RObject::~RObject() noexcept {
}


void RObject::__set_isNull(const bool val) {
  this->isNull = val;
}

void RObject::__set_objId(const int32_t val) {
  this->objId = val;
}

void RObject::__set_flags(const int32_t val) {
  this->flags = val;
__isset.flags = true;
}

void RObject::__set_objInfo(const std::map<std::string, std::string> & val) {
  this->objInfo = val;
__isset.objInfo = true;
}
std::ostream& operator<<(std::ostream& out, const RObject& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_isNull = false;
  bool isset_objId = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isNull);
          isset_isNull = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->objId);
          isset_objId = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->flags);
          this->__isset.flags = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_MAP) {
          {
            this->objInfo.clear();
            uint32_t _size0;
            ::apache::thrift::protocol::TType _ktype1;
            ::apache::thrift::protocol::TType _vtype2;
            xfer += iprot->readMapBegin(_ktype1, _vtype2, _size0);
            uint32_t _i4;
            for (_i4 = 0; _i4 < _size0; ++_i4)
            {
              std::string _key5;
              xfer += iprot->readString(_key5);
              std::string& _val6 = this->objInfo[_key5];
              xfer += iprot->readString(_val6);
            }
            xfer += iprot->readMapEnd();
          }
          this->__isset.objInfo = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

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

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

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

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

  if (this->__isset.flags) {
    xfer += oprot->writeFieldBegin("flags", ::apache::thrift::protocol::T_I32, 3);
    xfer += oprot->writeI32(this->flags);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.objInfo) {
    xfer += oprot->writeFieldBegin("objInfo", ::apache::thrift::protocol::T_MAP, 4);
    {
      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->objInfo.size()));
      std::map<std::string, std::string> ::const_iterator _iter7;
      for (_iter7 = this->objInfo.begin(); _iter7 != this->objInfo.end(); ++_iter7)
      {
        xfer += oprot->writeString(_iter7->first);
        xfer += oprot->writeString(_iter7->second);
      }
      xfer += oprot->writeMapEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(RObject &a, RObject &b) {
  using ::std::swap;
  swap(a.isNull, b.isNull);
  swap(a.objId, b.objId);
  swap(a.flags, b.flags);
  swap(a.objInfo, b.objInfo);
  swap(a.__isset, b.__isset);
}

RObject::RObject(const RObject& other8) {
  isNull = other8.isNull;
  objId = other8.objId;
  flags = other8.flags;
  objInfo = other8.objInfo;
  __isset = other8.__isset;
}
RObject& RObject::operator=(const RObject& other9) {
  isNull = other9.isNull;
  objId = other9.objId;
  flags = other9.flags;
  objInfo = other9.objInfo;
  __isset = other9.__isset;
  return *this;
}
void RObject::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "RObject(";
  out << "isNull=" << to_string(isNull);
  out << ", " << "objId=" << to_string(objId);
  out << ", " << "flags="; (__isset.flags ? (out << to_string(flags)) : (out << "<null>"));
  out << ", " << "objInfo="; (__isset.objInfo ? (out << to_string(objInfo)) : (out << "<null>"));
  out << ")";
}


ResponseHeaders::~ResponseHeaders() noexcept {
}


void ResponseHeaders::__set_length(const int32_t val) {
  this->length = val;
}

void ResponseHeaders::__set_redirectUrl(const std::string& val) {
  this->redirectUrl = val;
__isset.redirectUrl = true;
}
std::ostream& operator<<(std::ostream& out, const ResponseHeaders& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_length = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->length);
          isset_length = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->redirectUrl);
          this->__isset.redirectUrl = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

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

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

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

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

void swap(ResponseHeaders &a, ResponseHeaders &b) {
  using ::std::swap;
  swap(a.length, b.length);
  swap(a.redirectUrl, b.redirectUrl);
  swap(a.__isset, b.__isset);
}

ResponseHeaders::ResponseHeaders(const ResponseHeaders& other10) {
  length = other10.length;
  redirectUrl = other10.redirectUrl;
  __isset = other10.__isset;
}
ResponseHeaders& ResponseHeaders::operator=(const ResponseHeaders& other11) {
  length = other11.length;
  redirectUrl = other11.redirectUrl;
  __isset = other11.__isset;
  return *this;
}
void ResponseHeaders::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ResponseHeaders(";
  out << "length=" << to_string(length);
  out << ", " << "redirectUrl="; (__isset.redirectUrl ? (out << to_string(redirectUrl)) : (out << "<null>"));
  out << ")";
}


ResponseData::~ResponseData() noexcept {
}


void ResponseData::__set_continueRead(const bool val) {
  this->continueRead = val;
__isset.continueRead = true;
}

void ResponseData::__set_data(const std::string& val) {
  this->data = val;
__isset.data = true;
}

void ResponseData::__set_bytes_read(const int32_t val) {
  this->bytes_read = val;
__isset.bytes_read = true;
}
std::ostream& operator<<(std::ostream& out, const ResponseData& obj)
{
  obj.printTo(out);
  return out;
}


uint32_t ResponseData::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->continueRead);
          this->__isset.continueRead = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readBinary(this->data);
          this->__isset.data = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->bytes_read);
          this->__isset.bytes_read = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

  if (this->__isset.continueRead) {
    xfer += oprot->writeFieldBegin("continueRead", ::apache::thrift::protocol::T_BOOL, 1);
    xfer += oprot->writeBool(this->continueRead);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.data) {
    xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRING, 2);
    xfer += oprot->writeBinary(this->data);
    xfer += oprot->writeFieldEnd();
  }
  if (this->__isset.bytes_read) {
    xfer += oprot->writeFieldBegin("bytes_read", ::apache::thrift::protocol::T_I32, 3);
    xfer += oprot->writeI32(this->bytes_read);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ResponseData &a, ResponseData &b) {
  using ::std::swap;
  swap(a.continueRead, b.continueRead);
  swap(a.data, b.data);
  swap(a.bytes_read, b.bytes_read);
  swap(a.__isset, b.__isset);
}

ResponseData::ResponseData(const ResponseData& other12) {
  continueRead = other12.continueRead;
  data = other12.data;
  bytes_read = other12.bytes_read;
  __isset = other12.__isset;
}
ResponseData& ResponseData::operator=(const ResponseData& other13) {
  continueRead = other13.continueRead;
  data = other13.data;
  bytes_read = other13.bytes_read;
  __isset = other13.__isset;
  return *this;
}
void ResponseData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ResponseData(";
  out << "continueRead="; (__isset.continueRead ? (out << to_string(continueRead)) : (out << "<null>"));
  out << ", " << "data="; (__isset.data ? (out << to_string(data)) : (out << "<null>"));
  out << ", " << "bytes_read="; (__isset.bytes_read ? (out << to_string(bytes_read)) : (out << "<null>"));
  out << ")";
}


PostDataElement::~PostDataElement() noexcept {
}


void PostDataElement::__set_isReadOnly(const bool val) {
  this->isReadOnly = val;
}

void PostDataElement::__set_type(const int32_t val) {
  this->type = val;
}

void PostDataElement::__set_file(const std::string& val) {
  this->file = val;
__isset.file = true;
}

void PostDataElement::__set_bytes(const std::string& val) {
  this->bytes = val;
__isset.bytes = true;
}
std::ostream& operator<<(std::ostream& out, const PostDataElement& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_isReadOnly = false;
  bool isset_type = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isReadOnly);
          isset_isReadOnly = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->type);
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->file);
          this->__isset.file = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readBinary(this->bytes);
          this->__isset.bytes = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

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

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

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

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

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

void swap(PostDataElement &a, PostDataElement &b) {
  using ::std::swap;
  swap(a.isReadOnly, b.isReadOnly);
  swap(a.type, b.type);
  swap(a.file, b.file);
  swap(a.bytes, b.bytes);
  swap(a.__isset, b.__isset);
}

PostDataElement::PostDataElement(const PostDataElement& other14) {
  isReadOnly = other14.isReadOnly;
  type = other14.type;
  file = other14.file;
  bytes = other14.bytes;
  __isset = other14.__isset;
}
PostDataElement& PostDataElement::operator=(const PostDataElement& other15) {
  isReadOnly = other15.isReadOnly;
  type = other15.type;
  file = other15.file;
  bytes = other15.bytes;
  __isset = other15.__isset;
  return *this;
}
void PostDataElement::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PostDataElement(";
  out << "isReadOnly=" << to_string(isReadOnly);
  out << ", " << "type=" << to_string(type);
  out << ", " << "file="; (__isset.file ? (out << to_string(file)) : (out << "<null>"));
  out << ", " << "bytes="; (__isset.bytes ? (out << to_string(bytes)) : (out << "<null>"));
  out << ")";
}


PostData::~PostData() noexcept {
}


void PostData::__set_isNull(const bool val) {
  this->isNull = val;
}

void PostData::__set_isReadOnly(const bool val) {
  this->isReadOnly = val;
}

void PostData::__set_hasExcludedElements(const bool val) {
  this->hasExcludedElements = val;
}

void PostData::__set_elements(const std::vector<PostDataElement> & val) {
  this->elements = val;
__isset.elements = true;
}
std::ostream& operator<<(std::ostream& out, const PostData& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_isNull = false;
  bool isset_isReadOnly = false;
  bool isset_hasExcludedElements = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isNull);
          isset_isNull = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->isReadOnly);
          isset_isReadOnly = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->hasExcludedElements);
          isset_hasExcludedElements = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->elements.clear();
            uint32_t _size16;
            ::apache::thrift::protocol::TType _etype19;
            xfer += iprot->readListBegin(_etype19, _size16);
            this->elements.resize(_size16);
            uint32_t _i20;
            for (_i20 = 0; _i20 < _size16; ++_i20)
            {
              xfer += this->elements[_i20].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.elements = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_isNull)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_isReadOnly)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_hasExcludedElements)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

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

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

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

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

  if (this->__isset.elements) {
    xfer += oprot->writeFieldBegin("elements", ::apache::thrift::protocol::T_LIST, 4);
    {
      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->elements.size()));
      std::vector<PostDataElement> ::const_iterator _iter21;
      for (_iter21 = this->elements.begin(); _iter21 != this->elements.end(); ++_iter21)
      {
        xfer += (*_iter21).write(oprot);
      }
      xfer += oprot->writeListEnd();
    }
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(PostData &a, PostData &b) {
  using ::std::swap;
  swap(a.isNull, b.isNull);
  swap(a.isReadOnly, b.isReadOnly);
  swap(a.hasExcludedElements, b.hasExcludedElements);
  swap(a.elements, b.elements);
  swap(a.__isset, b.__isset);
}

PostData::PostData(const PostData& other22) {
  isNull = other22.isNull;
  isReadOnly = other22.isReadOnly;
  hasExcludedElements = other22.hasExcludedElements;
  elements = other22.elements;
  __isset = other22.__isset;
}
PostData& PostData::operator=(const PostData& other23) {
  isNull = other23.isNull;
  isReadOnly = other23.isReadOnly;
  hasExcludedElements = other23.hasExcludedElements;
  elements = other23.elements;
  __isset = other23.__isset;
  return *this;
}
void PostData::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "PostData(";
  out << "isNull=" << to_string(isNull);
  out << ", " << "isReadOnly=" << to_string(isReadOnly);
  out << ", " << "hasExcludedElements=" << to_string(hasExcludedElements);
  out << ", " << "elements="; (__isset.elements ? (out << to_string(elements)) : (out << "<null>"));
  out << ")";
}


KeyEvent::~KeyEvent() noexcept {
}


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

void KeyEvent::__set_modifiers(const int32_t val) {
  this->modifiers = val;
}

void KeyEvent::__set_windows_key_code(const int32_t val) {
  this->windows_key_code = val;
}

void KeyEvent::__set_native_key_code(const int32_t val) {
  this->native_key_code = val;
}

void KeyEvent::__set_is_system_key(const bool val) {
  this->is_system_key = val;
}

void KeyEvent::__set_character(const int16_t val) {
  this->character = val;
}

void KeyEvent::__set_unmodified_character(const int16_t val) {
  this->unmodified_character = val;
}

void KeyEvent::__set_focus_on_editable_field(const bool val) {
  this->focus_on_editable_field = val;
}
std::ostream& operator<<(std::ostream& out, const KeyEvent& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_type = false;
  bool isset_modifiers = false;
  bool isset_windows_key_code = false;
  bool isset_native_key_code = false;
  bool isset_is_system_key = false;
  bool isset_character = false;
  bool isset_unmodified_character = false;
  bool isset_focus_on_editable_field = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->type);
          isset_type = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->modifiers);
          isset_modifiers = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->windows_key_code);
          isset_windows_key_code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->native_key_code);
          isset_native_key_code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->is_system_key);
          isset_is_system_key = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_I16) {
          xfer += iprot->readI16(this->character);
          isset_character = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I16) {
          xfer += iprot->readI16(this->unmodified_character);
          isset_unmodified_character = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->focus_on_editable_field);
          isset_focus_on_editable_field = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_type)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_modifiers)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_windows_key_code)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_native_key_code)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_is_system_key)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_character)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_unmodified_character)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_focus_on_editable_field)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

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

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

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

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

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

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

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

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

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

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

void swap(KeyEvent &a, KeyEvent &b) {
  using ::std::swap;
  swap(a.type, b.type);
  swap(a.modifiers, b.modifiers);
  swap(a.windows_key_code, b.windows_key_code);
  swap(a.native_key_code, b.native_key_code);
  swap(a.is_system_key, b.is_system_key);
  swap(a.character, b.character);
  swap(a.unmodified_character, b.unmodified_character);
  swap(a.focus_on_editable_field, b.focus_on_editable_field);
}

KeyEvent::KeyEvent(const KeyEvent& other24) {
  type = other24.type;
  modifiers = other24.modifiers;
  windows_key_code = other24.windows_key_code;
  native_key_code = other24.native_key_code;
  is_system_key = other24.is_system_key;
  character = other24.character;
  unmodified_character = other24.unmodified_character;
  focus_on_editable_field = other24.focus_on_editable_field;
}
KeyEvent& KeyEvent::operator=(const KeyEvent& other25) {
  type = other25.type;
  modifiers = other25.modifiers;
  windows_key_code = other25.windows_key_code;
  native_key_code = other25.native_key_code;
  is_system_key = other25.is_system_key;
  character = other25.character;
  unmodified_character = other25.unmodified_character;
  focus_on_editable_field = other25.focus_on_editable_field;
  return *this;
}
void KeyEvent::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "KeyEvent(";
  out << "type=" << to_string(type);
  out << ", " << "modifiers=" << to_string(modifiers);
  out << ", " << "windows_key_code=" << to_string(windows_key_code);
  out << ", " << "native_key_code=" << to_string(native_key_code);
  out << ", " << "is_system_key=" << to_string(is_system_key);
  out << ", " << "character=" << to_string(character);
  out << ", " << "unmodified_character=" << to_string(unmodified_character);
  out << ", " << "focus_on_editable_field=" << to_string(focus_on_editable_field);
  out << ")";
}


Cookie::~Cookie() noexcept {
}


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

void Cookie::__set_value(const std::string& val) {
  this->value = val;
}

void Cookie::__set_domain(const std::string& val) {
  this->domain = val;
}

void Cookie::__set_path(const std::string& val) {
  this->path = val;
}

void Cookie::__set_secure(const bool val) {
  this->secure = val;
}

void Cookie::__set_httponly(const bool val) {
  this->httponly = val;
}

void Cookie::__set_creation(const int64_t val) {
  this->creation = val;
}

void Cookie::__set_lastAccess(const int64_t val) {
  this->lastAccess = val;
}

void Cookie::__set_expires(const int64_t val) {
  this->expires = val;
__isset.expires = true;
}
std::ostream& operator<<(std::ostream& out, const Cookie& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_name = false;
  bool isset_value = false;
  bool isset_domain = false;
  bool isset_path = false;
  bool isset_secure = false;
  bool isset_httponly = false;
  bool isset_creation = false;
  bool isset_lastAccess = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->name);
          isset_name = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->value);
          isset_value = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->domain);
          isset_domain = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->path);
          isset_path = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->secure);
          isset_secure = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 6:
        if (ftype == ::apache::thrift::protocol::T_BOOL) {
          xfer += iprot->readBool(this->httponly);
          isset_httponly = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 7:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->creation);
          isset_creation = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 8:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->lastAccess);
          isset_lastAccess = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 9:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->expires);
          this->__isset.expires = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_name)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_value)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_domain)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_path)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_secure)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_httponly)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_creation)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_lastAccess)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

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

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

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

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

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

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

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

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

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

  if (this->__isset.expires) {
    xfer += oprot->writeFieldBegin("expires", ::apache::thrift::protocol::T_I64, 9);
    xfer += oprot->writeI64(this->expires);
    xfer += oprot->writeFieldEnd();
  }
  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(Cookie &a, Cookie &b) {
  using ::std::swap;
  swap(a.name, b.name);
  swap(a.value, b.value);
  swap(a.domain, b.domain);
  swap(a.path, b.path);
  swap(a.secure, b.secure);
  swap(a.httponly, b.httponly);
  swap(a.creation, b.creation);
  swap(a.lastAccess, b.lastAccess);
  swap(a.expires, b.expires);
  swap(a.__isset, b.__isset);
}

Cookie::Cookie(const Cookie& other26) {
  name = other26.name;
  value = other26.value;
  domain = other26.domain;
  path = other26.path;
  secure = other26.secure;
  httponly = other26.httponly;
  creation = other26.creation;
  lastAccess = other26.lastAccess;
  expires = other26.expires;
  __isset = other26.__isset;
}
Cookie& Cookie::operator=(const Cookie& other27) {
  name = other27.name;
  value = other27.value;
  domain = other27.domain;
  path = other27.path;
  secure = other27.secure;
  httponly = other27.httponly;
  creation = other27.creation;
  lastAccess = other27.lastAccess;
  expires = other27.expires;
  __isset = other27.__isset;
  return *this;
}
void Cookie::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Cookie(";
  out << "name=" << to_string(name);
  out << ", " << "value=" << to_string(value);
  out << ", " << "domain=" << to_string(domain);
  out << ", " << "path=" << to_string(path);
  out << ", " << "secure=" << to_string(secure);
  out << ", " << "httponly=" << to_string(httponly);
  out << ", " << "creation=" << to_string(creation);
  out << ", " << "lastAccess=" << to_string(lastAccess);
  out << ", " << "expires="; (__isset.expires ? (out << to_string(expires)) : (out << "<null>"));
  out << ")";
}


Range::~Range() noexcept {
}


void Range::__set_from(const int64_t val) {
  this->from = val;
}

void Range::__set_to(const int64_t val) {
  this->to = val;
}
std::ostream& operator<<(std::ostream& out, const Range& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_from = false;
  bool isset_to = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->from);
          isset_from = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I64) {
          xfer += iprot->readI64(this->to);
          isset_to = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

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

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

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

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

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

void swap(Range &a, Range &b) {
  using ::std::swap;
  swap(a.from, b.from);
  swap(a.to, b.to);
}

Range::Range(const Range& other28) noexcept {
  from = other28.from;
  to = other28.to;
}
Range& Range::operator=(const Range& other29) noexcept {
  from = other29.from;
  to = other29.to;
  return *this;
}
void Range::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Range(";
  out << "from=" << to_string(from);
  out << ", " << "to=" << to_string(to);
  out << ")";
}


Color::~Color() noexcept {
}


void Color::__set_red(const int32_t val) {
  this->red = val;
}

void Color::__set_green(const int32_t val) {
  this->green = val;
}

void Color::__set_blue(const int32_t val) {
  this->blue = val;
}

void Color::__set_alpha(const int32_t val) {
  this->alpha = val;
}
std::ostream& operator<<(std::ostream& out, const Color& obj)
{
  obj.printTo(out);
  return out;
}


uint32_t Color::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->red);
          this->__isset.red = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->green);
          this->__isset.green = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->blue);
          this->__isset.blue = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->alpha);
          this->__isset.alpha = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

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

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

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

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

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

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

void swap(Color &a, Color &b) {
  using ::std::swap;
  swap(a.red, b.red);
  swap(a.green, b.green);
  swap(a.blue, b.blue);
  swap(a.alpha, b.alpha);
  swap(a.__isset, b.__isset);
}

Color::Color(const Color& other30) noexcept {
  red = other30.red;
  green = other30.green;
  blue = other30.blue;
  alpha = other30.alpha;
  __isset = other30.__isset;
}
Color& Color::operator=(const Color& other31) noexcept {
  red = other31.red;
  green = other31.green;
  blue = other31.blue;
  alpha = other31.alpha;
  __isset = other31.__isset;
  return *this;
}
void Color::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "Color(";
  out << "red=" << to_string(red);
  out << ", " << "green=" << to_string(green);
  out << ", " << "blue=" << to_string(blue);
  out << ", " << "alpha=" << to_string(alpha);
  out << ")";
}


CompositionUnderline::~CompositionUnderline() noexcept {
}


void CompositionUnderline::__set_range(const Range& val) {
  this->range = val;
}

void CompositionUnderline::__set_color(const Color& val) {
  this->color = val;
}

void CompositionUnderline::__set_backgroundColor(const Color& val) {
  this->backgroundColor = val;
}

void CompositionUnderline::__set_thick(const int32_t val) {
  this->thick = val;
}

void CompositionUnderline::__set_style(const Style::type val) {
  this->style = val;
}
std::ostream& operator<<(std::ostream& out, const CompositionUnderline& obj)
{
  obj.printTo(out);
  return out;
}


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

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  bool isset_range = false;
  bool isset_color = false;
  bool isset_backgroundColor = false;
  bool isset_thick = false;
  bool isset_style = false;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->range.read(iprot);
          isset_range = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->color.read(iprot);
          isset_color = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 3:
        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
          xfer += this->backgroundColor.read(iprot);
          isset_backgroundColor = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 4:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          xfer += iprot->readI32(this->thick);
          isset_thick = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 5:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast32;
          xfer += iprot->readI32(ecast32);
          this->style = static_cast<Style::type>(ecast32);
          isset_style = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  if (!isset_range)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_color)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_backgroundColor)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_thick)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  if (!isset_style)
    throw TProtocolException(TProtocolException::INVALID_DATA);
  return xfer;
}

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

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

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

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

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

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

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

void swap(CompositionUnderline &a, CompositionUnderline &b) {
  using ::std::swap;
  swap(a.range, b.range);
  swap(a.color, b.color);
  swap(a.backgroundColor, b.backgroundColor);
  swap(a.thick, b.thick);
  swap(a.style, b.style);
}

CompositionUnderline::CompositionUnderline(const CompositionUnderline& other33) noexcept {
  range = other33.range;
  color = other33.color;
  backgroundColor = other33.backgroundColor;
  thick = other33.thick;
  style = other33.style;
}
CompositionUnderline& CompositionUnderline::operator=(const CompositionUnderline& other34) noexcept {
  range = other34.range;
  color = other34.color;
  backgroundColor = other34.backgroundColor;
  thick = other34.thick;
  style = other34.style;
  return *this;
}
void CompositionUnderline::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "CompositionUnderline(";
  out << "range=" << to_string(range);
  out << ", " << "color=" << to_string(color);
  out << ", " << "backgroundColor=" << to_string(backgroundColor);
  out << ", " << "thick=" << to_string(thick);
  out << ", " << "style=" << to_string(style);
  out << ")";
}

} // namespace
