text: /**
   * Autogenerated by Thrift
   *
   * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
   *  @generated
   */
  #pragma once
  
  #include "src/gen-cpp2/forward_compatibility_types.h"
  
  #include <thrift/lib/cpp2/GeneratedSerializationCodeHelper.h>
  
  #include <thrift/lib/cpp2/protocol/BinaryProtocol.h>
  #include <thrift/lib/cpp2/protocol/CompactProtocol.h>
  #include <thrift/lib/cpp2/protocol/ProtocolReaderStructReadState.h>
  #include <thrift/lib/cpp2/protocol/SimpleJSONProtocol.h>
  
  namespace cpp2 {
  
  template <class Protocol_>
  void OldStructure::readNoXfer(Protocol_* iprot) {
    apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  
    _readState.readStructBegin(iprot);
  
    using apache::thrift::TProtocolException;
  
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            0,
            1,
            apache::thrift::protocol::T_MAP))) {
      goto _loop;
    }
  _readField_features:
    {
      this->features = std::map<int16_t, double>();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::read(*iprot, this->features);
      this->__isset.features = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            1,
            0,
            apache::thrift::protocol::T_STOP))) {
      goto _loop;
    }
  
  _end:
    _readState.readStructEnd(iprot);
  
    return;
  
  _loop:
    if (_readState.fieldType == apache::thrift::protocol::T_STOP) {
      goto _end;
    }
    if (iprot->kUsesFieldNames()) {
      this->translateFieldName(_readState.fieldName(), _readState.fieldId, _readState.fieldType);
    }
  
    switch (_readState.fieldId) {
      case 1:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_MAP)) {
          goto _readField_features;
        } else {
          goto _skip;
        }
      }
      default:
      {
  _skip:
        iprot->skip(_readState.fieldType);
        _readState.readFieldEnd(iprot);
        _readState.readFieldBeginNoInline(iprot);
        goto _loop;
      }
    }
  }
  
  template <class Protocol_>
  uint32_t OldStructure::serializedSize(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("OldStructure");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t OldStructure::serializedSizeZC(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("OldStructure");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t OldStructure::write(Protocol_* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->writeStructBegin("OldStructure");
    xfer += prot_->writeFieldBegin("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::write(*prot_, this->features);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldStop();
    xfer += prot_->writeStructEnd();
    return xfer;
  }
  
  } // cpp2
  namespace cpp2 {
  
  template <class Protocol_>
  void NewStructure::readNoXfer(Protocol_* iprot) {
    apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  
    _readState.readStructBegin(iprot);
  
    using apache::thrift::TProtocolException;
  
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            0,
            1,
            apache::thrift::protocol::T_MAP))) {
      goto _loop;
    }
  _readField_features:
    {
      this->features = std::map<int16_t, double>();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::read(*iprot, this->features);
      this->__isset.features = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            1,
            0,
            apache::thrift::protocol::T_STOP))) {
      goto _loop;
    }
  
  _end:
    _readState.readStructEnd(iprot);
  
    return;
  
  _loop:
    if (_readState.fieldType == apache::thrift::protocol::T_STOP) {
      goto _end;
    }
    if (iprot->kUsesFieldNames()) {
      this->translateFieldName(_readState.fieldName(), _readState.fieldId, _readState.fieldType);
    }
  
    switch (_readState.fieldId) {
      case 1:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_MAP)) {
          goto _readField_features;
        } else {
          goto _skip;
        }
      }
      default:
      {
  _skip:
        iprot->skip(_readState.fieldType);
        _readState.readFieldEnd(iprot);
        _readState.readFieldBeginNoInline(iprot);
        goto _loop;
      }
    }
  }
  
  template <class Protocol_>
  uint32_t NewStructure::serializedSize(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructure");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructure::serializedSizeZC(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructure");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructure::write(Protocol_* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->writeStructBegin("NewStructure");
    xfer += prot_->writeFieldBegin("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>, std::map<int16_t, double>>::write(*prot_, this->features);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldStop();
    xfer += prot_->writeStructEnd();
    return xfer;
  }
  
  } // cpp2
  namespace cpp2 {
  
  template <class Protocol_>
  void NewStructure2::readNoXfer(Protocol_* iprot) {
    apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  
    _readState.readStructBegin(iprot);
  
    using apache::thrift::TProtocolException;
  
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            0,
            1,
            apache::thrift::protocol::T_MAP))) {
      goto _loop;
    }
  _readField_features:
    {
      this->features =  ::cpp2::FloatFeatures();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>,  ::cpp2::FloatFeatures>::read(*iprot, this->features);
      this->__isset.features = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            1,
            0,
            apache::thrift::protocol::T_STOP))) {
      goto _loop;
    }
  
  _end:
    _readState.readStructEnd(iprot);
  
    return;
  
  _loop:
    if (_readState.fieldType == apache::thrift::protocol::T_STOP) {
      goto _end;
    }
    if (iprot->kUsesFieldNames()) {
      this->translateFieldName(_readState.fieldName(), _readState.fieldId, _readState.fieldType);
    }
  
    switch (_readState.fieldId) {
      case 1:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_MAP)) {
          goto _readField_features;
        } else {
          goto _skip;
        }
      }
      default:
      {
  _skip:
        iprot->skip(_readState.fieldType);
        _readState.readFieldEnd(iprot);
        _readState.readFieldBeginNoInline(iprot);
        goto _loop;
      }
    }
  }
  
  template <class Protocol_>
  uint32_t NewStructure2::serializedSize(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructure2");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>,  ::cpp2::FloatFeatures>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructure2::serializedSizeZC(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructure2");
    xfer += prot_->serializedFieldSize("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>,  ::cpp2::FloatFeatures>::serializedSize<false>(*prot_, this->features);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructure2::write(Protocol_* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->writeStructBegin("NewStructure2");
    xfer += prot_->writeFieldBegin("features", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>,  ::cpp2::FloatFeatures>::write(*prot_, this->features);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldStop();
    xfer += prot_->writeStructEnd();
    return xfer;
  }
  
  } // cpp2
  namespace cpp2 {
  
  template <class Protocol_>
  void NewStructureNested::readNoXfer(Protocol_* iprot) {
    apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  
    _readState.readStructBegin(iprot);
  
    using apache::thrift::TProtocolException;
  
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            0,
            1,
            apache::thrift::protocol::T_LIST))) {
      goto _loop;
    }
  _readField_lst:
    {
      this->lst = std::vector< ::cpp2::FloatFeatures>();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::list<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::vector< ::cpp2::FloatFeatures>>::read(*iprot, this->lst);
      this->__isset.lst = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            1,
            2,
            apache::thrift::protocol::T_MAP))) {
      goto _loop;
    }
  _readField_mp:
    {
      this->mp = std::map<int16_t,  ::cpp2::FloatFeatures>();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::map<int16_t,  ::cpp2::FloatFeatures>>::read(*iprot, this->mp);
      this->__isset.mp = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            2,
            3,
            apache::thrift::protocol::T_SET))) {
      goto _loop;
    }
  _readField_s:
    {
      this->s = std::set< ::cpp2::FloatFeatures>();
      ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::set<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::set< ::cpp2::FloatFeatures>>::read(*iprot, this->s);
      this->__isset.s = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            3,
            0,
            apache::thrift::protocol::T_STOP))) {
      goto _loop;
    }
  
  _end:
    _readState.readStructEnd(iprot);
  
    return;
  
  _loop:
    if (_readState.fieldType == apache::thrift::protocol::T_STOP) {
      goto _end;
    }
    if (iprot->kUsesFieldNames()) {
      this->translateFieldName(_readState.fieldName(), _readState.fieldId, _readState.fieldType);
    }
  
    switch (_readState.fieldId) {
      case 1:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_LIST)) {
          goto _readField_lst;
        } else {
          goto _skip;
        }
      }
      case 2:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_MAP)) {
          goto _readField_mp;
        } else {
          goto _skip;
        }
      }
      case 3:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_SET)) {
          goto _readField_s;
        } else {
          goto _skip;
        }
      }
      default:
      {
  _skip:
        iprot->skip(_readState.fieldType);
        _readState.readFieldEnd(iprot);
        _readState.readFieldBeginNoInline(iprot);
        goto _loop;
      }
    }
  }
  
  template <class Protocol_>
  uint32_t NewStructureNested::serializedSize(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructureNested");
    xfer += prot_->serializedFieldSize("lst", apache::thrift::protocol::T_LIST, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::list<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::vector< ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->lst);
    xfer += prot_->serializedFieldSize("mp", apache::thrift::protocol::T_MAP, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::map<int16_t,  ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->mp);
    xfer += prot_->serializedFieldSize("s", apache::thrift::protocol::T_SET, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::set<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::set< ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->s);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructureNested::serializedSizeZC(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructureNested");
    xfer += prot_->serializedFieldSize("lst", apache::thrift::protocol::T_LIST, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::list<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::vector< ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->lst);
    xfer += prot_->serializedFieldSize("mp", apache::thrift::protocol::T_MAP, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::map<int16_t,  ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->mp);
    xfer += prot_->serializedFieldSize("s", apache::thrift::protocol::T_SET, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::set<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::set< ::cpp2::FloatFeatures>>::serializedSize<false>(*prot_, this->s);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructureNested::write(Protocol_* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->writeStructBegin("NewStructureNested");
    xfer += prot_->writeFieldBegin("lst", apache::thrift::protocol::T_LIST, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::list<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::vector< ::cpp2::FloatFeatures>>::write(*prot_, this->lst);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldBegin("mp", apache::thrift::protocol::T_MAP, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::map<int16_t,  ::cpp2::FloatFeatures>>::write(*prot_, this->mp);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldBegin("s", apache::thrift::protocol::T_SET, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods< ::apache::thrift::type_class::set<::apache::thrift::type_class::map_forward_compatibility<::apache::thrift::type_class::integral, ::apache::thrift::type_class::floating_point>>, std::set< ::cpp2::FloatFeatures>>::write(*prot_, this->s);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldStop();
    xfer += prot_->writeStructEnd();
    return xfer;
  }
  
  } // cpp2
  namespace cpp2 {
  
  template <class Protocol_>
  void NewStructureNestedField::readNoXfer(Protocol_* iprot) {
    apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  
    _readState.readStructBegin(iprot);
  
    using apache::thrift::TProtocolException;
  
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            0,
            1,
            apache::thrift::protocol::T_STRUCT))) {
      goto _loop;
    }
  _readField_f:
    {
      ::apache::thrift::Cpp2Ops<  ::cpp2::NewStructureNested>::read(iprot, &this->f);
      this->__isset.f = true;
    }
  
    if (UNLIKELY(!_readState.advanceToNextField(
            iprot,
            1,
            0,
            apache::thrift::protocol::T_STOP))) {
      goto _loop;
    }
  
  _end:
    _readState.readStructEnd(iprot);
  
    return;
  
  _loop:
    if (_readState.fieldType == apache::thrift::protocol::T_STOP) {
      goto _end;
    }
    if (iprot->kUsesFieldNames()) {
      this->translateFieldName(_readState.fieldName(), _readState.fieldId, _readState.fieldType);
    }
  
    switch (_readState.fieldId) {
      case 1:
      {
        if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_STRUCT)) {
          goto _readField_f;
        } else {
          goto _skip;
        }
      }
      default:
      {
  _skip:
        iprot->skip(_readState.fieldType);
        _readState.readFieldEnd(iprot);
        _readState.readFieldBeginNoInline(iprot);
        goto _loop;
      }
    }
  }
  
  template <class Protocol_>
  uint32_t NewStructureNestedField::serializedSize(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructureNestedField");
    xfer += prot_->serializedFieldSize("f", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::Cpp2Ops<  ::cpp2::NewStructureNested>::serializedSize(prot_, &this->f);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructureNestedField::serializedSizeZC(Protocol_ const* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->serializedStructSize("NewStructureNestedField");
    xfer += prot_->serializedFieldSize("f", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::Cpp2Ops<  ::cpp2::NewStructureNested>::serializedSizeZC(prot_, &this->f);
    xfer += prot_->serializedSizeStop();
    return xfer;
  }
  
  template <class Protocol_>
  uint32_t NewStructureNestedField::write(Protocol_* prot_) const {
    uint32_t xfer = 0;
    xfer += prot_->writeStructBegin("NewStructureNestedField");
    xfer += prot_->writeFieldBegin("f", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::Cpp2Ops<  ::cpp2::NewStructureNested>::write(prot_, &this->f);
    xfer += prot_->writeFieldEnd();
    xfer += prot_->writeFieldStop();
    xfer += prot_->writeStructEnd();
    return xfer;
  }
  
  } // cpp2
  