/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.08.26.00/thrift/lib/thrift/RpcMetadata.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once

#include "thrift/lib/thrift/gen-cpp2/RpcMetadata_types.h"

#include <thrift/lib/cpp2/gen/module_types_tcc.h>


namespace apache {
namespace thrift {
namespace detail {

template <>
struct TccStructTraits<::apache::thrift::ZlibCompressionCodecConfig> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ZstdCompressionCodecConfig> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::CodecConfig> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::CompressionConfig> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::NegotiationParameters> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::InteractionCreate> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::InteractionTerminate> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::FdMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::LoggingContext> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::RequestRpcMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ErrorClassification> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadResponseMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadDeclaredExceptionMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadProxyExceptionMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadProxiedExceptionMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadAppUnknownExceptionMetdata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadAnyExceptionMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadExceptionMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadExceptionMetadataBase> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::PayloadMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ProxiedPayloadMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::QueueMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ResponseRpcMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ResponseRpcError> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::StreamRpcError> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::StreamPayloadMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ClientMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::RequestSetupMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::SetupResponse> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::StreamHeadersPush> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::TransportMetadataPush> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::DrainCompletePush> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ServerPushMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::ClientPushMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::HeadersPayloadContent> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::HeadersPayloadMetadata> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};

} // namespace detail
} // namespace thrift
} // namespace apache

namespace apache::thrift {

template <class Protocol_>
void ZlibCompressionCodecConfig::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ZlibCompressionCodecConfig>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ZlibCompressionCodecConfig::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ZlibCompressionCodecConfig");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ZlibCompressionCodecConfig::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ZlibCompressionCodecConfig");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ZlibCompressionCodecConfig::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ZlibCompressionCodecConfig");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ZlibCompressionCodecConfig::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ZlibCompressionCodecConfig::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ZlibCompressionCodecConfig::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ZlibCompressionCodecConfig::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ZlibCompressionCodecConfig::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ZlibCompressionCodecConfig::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ZlibCompressionCodecConfig::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ZstdCompressionCodecConfig::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ZstdCompressionCodecConfig>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ZstdCompressionCodecConfig::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ZstdCompressionCodecConfig");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ZstdCompressionCodecConfig::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ZstdCompressionCodecConfig");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ZstdCompressionCodecConfig::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ZstdCompressionCodecConfig");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ZstdCompressionCodecConfig::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ZstdCompressionCodecConfig::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ZstdCompressionCodecConfig::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ZstdCompressionCodecConfig::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ZstdCompressionCodecConfig::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ZstdCompressionCodecConfig::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ZstdCompressionCodecConfig::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void CodecConfig::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<CodecConfig>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->zlibConfig_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZlibCompressionCodecConfig>::readWithContext(*iprot, value_.zlibConfig, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->zstdConfig_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZstdCompressionCodecConfig>::readWithContext(*iprot, value_.zstdConfig, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t CodecConfig::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CodecConfig");
  switch(this->getType()) {
    case CodecConfig::Type::zlibConfig:
    {
      xfer += prot_->serializedFieldSize("zlibConfig", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZlibCompressionCodecConfig>::serializedSize<false>(*prot_, value_.zlibConfig);
      break;
    }
    case CodecConfig::Type::zstdConfig:
    {
      xfer += prot_->serializedFieldSize("zstdConfig", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZstdCompressionCodecConfig>::serializedSize<false>(*prot_, value_.zstdConfig);
      break;
    }
    case CodecConfig::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CodecConfig::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CodecConfig");
  switch(this->getType()) {
    case CodecConfig::Type::zlibConfig:
    {
      xfer += prot_->serializedFieldSize("zlibConfig", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZlibCompressionCodecConfig>::serializedSize<true>(*prot_, value_.zlibConfig);
      break;
    }
    case CodecConfig::Type::zstdConfig:
    {
      xfer += prot_->serializedFieldSize("zstdConfig", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZstdCompressionCodecConfig>::serializedSize<true>(*prot_, value_.zstdConfig);
      break;
    }
    case CodecConfig::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CodecConfig::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("CodecConfig");
  switch(this->getType()) {
    case CodecConfig::Type::zlibConfig:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "zlibConfig", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZlibCompressionCodecConfig>::write(*prot_, value_.zlibConfig);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case CodecConfig::Type::zstdConfig:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "zstdConfig", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ZstdCompressionCodecConfig>::write(*prot_, value_.zstdConfig);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case CodecConfig::Type::__EMPTY__:;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void CodecConfig::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t CodecConfig::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t CodecConfig::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t CodecConfig::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void CodecConfig::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t CodecConfig::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t CodecConfig::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t CodecConfig::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void CodecConfig::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t CodecConfig::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t CodecConfig::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t CodecConfig::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void CompressionConfig::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_codecConfig:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::CodecConfig>::readWithContext(*iprot, this->__fbthrift_field_codecConfig, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_compressionSizeLimit:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_compressionSizeLimit, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<CompressionConfig>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_codecConfig;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_compressionSizeLimit;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t CompressionConfig::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CompressionConfig");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("codecConfig", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::CodecConfig>::serializedSize<false>(*prot_, this->__fbthrift_field_codecConfig);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("compressionSizeLimit", apache::thrift::protocol::T_I64, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_compressionSizeLimit);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CompressionConfig::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CompressionConfig");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("codecConfig", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::CodecConfig>::serializedSize<true>(*prot_, this->__fbthrift_field_codecConfig);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("compressionSizeLimit", apache::thrift::protocol::T_I64, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_compressionSizeLimit);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CompressionConfig::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("CompressionConfig");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "codecConfig", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::CodecConfig>::write(*prot_, this->__fbthrift_field_codecConfig);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 2, kPrevFieldId>(*prot_, "compressionSizeLimit", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_compressionSizeLimit);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void CompressionConfig::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t CompressionConfig::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t CompressionConfig::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t CompressionConfig::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void CompressionConfig::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t CompressionConfig::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t CompressionConfig::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t CompressionConfig::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void CompressionConfig::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t CompressionConfig::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t CompressionConfig::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t CompressionConfig::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void NegotiationParameters::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_compressionAlgos:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint64_t>::readWithContext(*iprot, this->__fbthrift_field_compressionAlgos, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_BOOL))) {
    goto _advance_failure;
  }
_readField_useStopTLS:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_useStopTLS, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<NegotiationParameters>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_compressionAlgos;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
        goto _readField_useStopTLS;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t NegotiationParameters::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("NegotiationParameters");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compressionAlgos", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_compressionAlgos);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("useStopTLS", apache::thrift::protocol::T_BOOL, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_useStopTLS);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t NegotiationParameters::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("NegotiationParameters");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compressionAlgos", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_compressionAlgos);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("useStopTLS", apache::thrift::protocol::T_BOOL, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_useStopTLS);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t NegotiationParameters::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("NegotiationParameters");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 1, kPrevFieldId>(*prot_, "compressionAlgos", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint64_t>::write(*prot_, this->__fbthrift_field_compressionAlgos);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 2, kPrevFieldId>(*prot_, "useStopTLS", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_useStopTLS);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void NegotiationParameters::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t NegotiationParameters::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t NegotiationParameters::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t NegotiationParameters::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void NegotiationParameters::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t NegotiationParameters::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t NegotiationParameters::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t NegotiationParameters::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void NegotiationParameters::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t NegotiationParameters::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t NegotiationParameters::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t NegotiationParameters::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void InteractionCreate::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_interactionId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_interactionId, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_interactionName:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::readWithContext(*iprot, this->__fbthrift_field_interactionName, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<InteractionCreate>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_interactionId;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_interactionName;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t InteractionCreate::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("InteractionCreate");
  {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  {
    xfer += prot_->serializedFieldSize("interactionName", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionName);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t InteractionCreate::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("InteractionCreate");
  {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  {
    xfer += prot_->serializedFieldSize("interactionName", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionName);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t InteractionCreate::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("InteractionCreate");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 1, kPrevFieldId>(*prot_, "interactionId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_interactionId);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "interactionName", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::write(*prot_, this->__fbthrift_field_interactionName);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void InteractionCreate::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t InteractionCreate::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t InteractionCreate::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t InteractionCreate::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void InteractionCreate::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t InteractionCreate::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t InteractionCreate::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t InteractionCreate::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void InteractionCreate::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t InteractionCreate::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t InteractionCreate::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t InteractionCreate::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void InteractionTerminate::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_interactionId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_interactionId, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<InteractionTerminate>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_interactionId;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t InteractionTerminate::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("InteractionTerminate");
  {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t InteractionTerminate::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("InteractionTerminate");
  {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t InteractionTerminate::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("InteractionTerminate");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 1, kPrevFieldId>(*prot_, "interactionId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_interactionId);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void InteractionTerminate::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t InteractionTerminate::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t InteractionTerminate::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t InteractionTerminate::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void InteractionTerminate::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t InteractionTerminate::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t InteractionTerminate::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t InteractionTerminate::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void InteractionTerminate::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t InteractionTerminate::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t InteractionTerminate::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t InteractionTerminate::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void FdMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_fdSeqNum:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_fdSeqNum, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_numFds:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_numFds, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<FdMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_fdSeqNum;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_numFds;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t FdMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("FdMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("fdSeqNum", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_fdSeqNum);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("numFds", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_numFds);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t FdMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("FdMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("fdSeqNum", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_fdSeqNum);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("numFds", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_numFds);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t FdMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("FdMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 1, kPrevFieldId>(*prot_, "fdSeqNum", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_fdSeqNum);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "numFds", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_numFds);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void FdMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t FdMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t FdMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t FdMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void FdMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t FdMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t FdMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t FdMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void FdMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t FdMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t FdMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t FdMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void LoggingContext::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_logSampleRatio:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_logSampleRatio, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_logErrorSampleRatio:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_logErrorSampleRatio, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_requestId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_requestId, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_routingTarget:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_routingTarget, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_requestAttemptId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_requestAttemptId, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<LoggingContext>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_logSampleRatio;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_logErrorSampleRatio;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_requestId;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_routingTarget;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_requestAttemptId;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t LoggingContext::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("LoggingContext");
  {
    xfer += prot_->serializedFieldSize("logSampleRatio", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_logSampleRatio);
  }
  {
    xfer += prot_->serializedFieldSize("logErrorSampleRatio", apache::thrift::protocol::T_I64, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_logErrorSampleRatio);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("requestId", apache::thrift::protocol::T_STRING, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_requestId);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("routingTarget", apache::thrift::protocol::T_STRING, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_routingTarget);
  }
  {
    xfer += prot_->serializedFieldSize("requestAttemptId", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_requestAttemptId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t LoggingContext::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("LoggingContext");
  {
    xfer += prot_->serializedFieldSize("logSampleRatio", apache::thrift::protocol::T_I64, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_logSampleRatio);
  }
  {
    xfer += prot_->serializedFieldSize("logErrorSampleRatio", apache::thrift::protocol::T_I64, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_logErrorSampleRatio);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("requestId", apache::thrift::protocol::T_STRING, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_requestId);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("routingTarget", apache::thrift::protocol::T_STRING, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_routingTarget);
  }
  {
    xfer += prot_->serializedFieldSize("requestAttemptId", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_requestAttemptId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t LoggingContext::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("LoggingContext");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 1, kPrevFieldId>(*prot_, "logSampleRatio", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_logSampleRatio);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 2, kPrevFieldId>(*prot_, "logErrorSampleRatio", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_logErrorSampleRatio);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 3, kPrevFieldId>(*prot_, "requestId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_requestId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 4, kPrevFieldId>(*prot_, "routingTarget", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_routingTarget);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 5, kPrevFieldId>(*prot_, "requestAttemptId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_requestAttemptId);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void LoggingContext::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t LoggingContext::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t LoggingContext::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t LoggingContext::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void LoggingContext::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t LoggingContext::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t LoggingContext::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t LoggingContext::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void LoggingContext::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t LoggingContext::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t LoggingContext::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t LoggingContext::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void RequestRpcMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_protocol:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ProtocolId>::readWithContext(*iprot, this->__fbthrift_field_protocol, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::readWithContext(*iprot, this->__fbthrift_field_name, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_kind:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcKind>::readWithContext(*iprot, this->__fbthrift_field_kind, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          5,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_clientTimeoutMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_clientTimeoutMs, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          6,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_queueTimeoutMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_queueTimeoutMs, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          6,
          7,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_priority:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcPriority>::readWithContext(*iprot, this->__fbthrift_field_priority, _readState);
    
  }
 this->__isset.set(5, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          7,
          8,
          apache::thrift::protocol::T_MAP))) {
    goto _advance_failure;
  }
_readField_otherMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_otherMetadata = folly::F14NodeMap<::std::string, ::std::string>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::readWithContext(*iprot, this->__fbthrift_field_otherMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(6, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          8,
          11,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_crc32c:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::readWithContext(*iprot, this->__fbthrift_field_crc32c, _readState);
    
  }
 this->__isset.set(7, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          11,
          13,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_loadMetric:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_loadMetric, _readState);
    
  }
 this->__isset.set(8, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          13,
          14,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_compression:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::readWithContext(*iprot, this->__fbthrift_field_compression, _readState);
    
  }
 this->__isset.set(9, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          14,
          15,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_compressionConfig:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::CompressionConfig>::readWithContext(*iprot, this->__fbthrift_field_compressionConfig, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(10, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          15,
          16,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_interactionId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_interactionId, _readState);
    
  }
 this->__isset.set(11, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          16,
          17,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_interactionCreate:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionCreate>::readWithContext(*iprot, this->__fbthrift_field_interactionCreate, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(12, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          17,
          18,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_clientId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_clientId, _readState);
    
  }
 this->__isset.set(13, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          18,
          19,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_serviceTraceMeta:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_serviceTraceMeta, _readState);
    
  }
 this->__isset.set(14, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          19,
          20,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_frameworkMetadata:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::readWithContext(*iprot, this->__fbthrift_field_frameworkMetadata, _readState);
    
  }
 this->__isset.set(15, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          20,
          22,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_fdMetadata:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::FdMetadata>>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::readWithContext(*iprot, *ptr, _readState);
    this->__fbthrift_field_fdMetadata = std::move(ptr);
    _readState.afterSubobject(iprot);
    
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          22,
          23,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_loggingContext:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::LoggingContext>::readWithContext(*iprot, this->__fbthrift_field_loggingContext, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(16, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          23,
          24,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_tenantId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_tenantId, _readState);
    
  }
 this->__isset.set(17, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          24,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<RequestRpcMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_protocol;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_kind;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_clientTimeoutMs;
      } else {
        goto _skip;
      }
    }
    case 6:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_queueTimeoutMs;
      } else {
        goto _skip;
      }
    }
    case 7:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_priority;
      } else {
        goto _skip;
      }
    }
    case 8:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_otherMetadata;
      } else {
        goto _skip;
      }
    }
    case 11:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_crc32c;
      } else {
        goto _skip;
      }
    }
    case 13:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_loadMetric;
      } else {
        goto _skip;
      }
    }
    case 14:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_compression;
      } else {
        goto _skip;
      }
    }
    case 15:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_compressionConfig;
      } else {
        goto _skip;
      }
    }
    case 16:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_interactionId;
      } else {
        goto _skip;
      }
    }
    case 17:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_interactionCreate;
      } else {
        goto _skip;
      }
    }
    case 18:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_clientId;
      } else {
        goto _skip;
      }
    }
    case 19:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_serviceTraceMeta;
      } else {
        goto _skip;
      }
    }
    case 20:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_frameworkMetadata;
      } else {
        goto _skip;
      }
    }
    case 22:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_fdMetadata;
      } else {
        goto _skip;
      }
    }
    case 23:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_loggingContext;
      } else {
        goto _skip;
      }
    }
    case 24:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_tenantId;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t RequestRpcMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestRpcMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("protocol", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ProtocolId>::serializedSize<false>(*prot_, this->__fbthrift_field_protocol);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("kind", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcKind>::serializedSize<false>(*prot_, this->__fbthrift_field_kind);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("clientTimeoutMs", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_clientTimeoutMs);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("queueTimeoutMs", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueTimeoutMs);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("priority", apache::thrift::protocol::T_I32, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcPriority>::serializedSize<false>(*prot_, this->__fbthrift_field_priority);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("crc32c", apache::thrift::protocol::T_I32, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_crc32c);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("loadMetric", apache::thrift::protocol::T_STRING, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_loadMetric);
  }
  if (this->__isset.get(9)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 14);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(10)) {
    xfer += prot_->serializedFieldSize("compressionConfig", apache::thrift::protocol::T_STRUCT, 15);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::CompressionConfig>::serializedSize<false>(*prot_, this->__fbthrift_field_compressionConfig);
  }
  if (this->__isset.get(11)) {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 16);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  if (this->__isset.get(12)) {
    xfer += prot_->serializedFieldSize("interactionCreate", apache::thrift::protocol::T_STRUCT, 17);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionCreate>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionCreate);
  }
  if (this->__isset.get(13)) {
    xfer += prot_->serializedFieldSize("clientId", apache::thrift::protocol::T_STRING, 18);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_clientId);
  }
  if (this->__isset.get(14)) {
    xfer += prot_->serializedFieldSize("serviceTraceMeta", apache::thrift::protocol::T_STRING, 19);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_serviceTraceMeta);
  }
  if (this->__isset.get(15)) {
    xfer += prot_->serializedFieldSize("frameworkMetadata", apache::thrift::protocol::T_STRING, 20);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::serializedSize<false>(*prot_, this->__fbthrift_field_frameworkMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 22);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<false>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  if (this->__isset.get(16)) {
    xfer += prot_->serializedFieldSize("loggingContext", apache::thrift::protocol::T_STRUCT, 23);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::LoggingContext>::serializedSize<false>(*prot_, this->__fbthrift_field_loggingContext);
  }
  if (this->__isset.get(17)) {
    xfer += prot_->serializedFieldSize("tenantId", apache::thrift::protocol::T_STRING, 24);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_tenantId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestRpcMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestRpcMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("protocol", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ProtocolId>::serializedSize<false>(*prot_, this->__fbthrift_field_protocol);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("kind", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcKind>::serializedSize<false>(*prot_, this->__fbthrift_field_kind);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("clientTimeoutMs", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_clientTimeoutMs);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("queueTimeoutMs", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueTimeoutMs);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("priority", apache::thrift::protocol::T_I32, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcPriority>::serializedSize<false>(*prot_, this->__fbthrift_field_priority);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("crc32c", apache::thrift::protocol::T_I32, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_crc32c);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("loadMetric", apache::thrift::protocol::T_STRING, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_loadMetric);
  }
  if (this->__isset.get(9)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 14);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(10)) {
    xfer += prot_->serializedFieldSize("compressionConfig", apache::thrift::protocol::T_STRUCT, 15);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::CompressionConfig>::serializedSize<true>(*prot_, this->__fbthrift_field_compressionConfig);
  }
  if (this->__isset.get(11)) {
    xfer += prot_->serializedFieldSize("interactionId", apache::thrift::protocol::T_I64, 16);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_interactionId);
  }
  if (this->__isset.get(12)) {
    xfer += prot_->serializedFieldSize("interactionCreate", apache::thrift::protocol::T_STRUCT, 17);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionCreate>::serializedSize<true>(*prot_, this->__fbthrift_field_interactionCreate);
  }
  if (this->__isset.get(13)) {
    xfer += prot_->serializedFieldSize("clientId", apache::thrift::protocol::T_STRING, 18);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_clientId);
  }
  if (this->__isset.get(14)) {
    xfer += prot_->serializedFieldSize("serviceTraceMeta", apache::thrift::protocol::T_STRING, 19);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_serviceTraceMeta);
  }
  if (this->__isset.get(15)) {
    xfer += prot_->serializedFieldSize("frameworkMetadata", apache::thrift::protocol::T_STRING, 20);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::serializedSize<true>(*prot_, this->__fbthrift_field_frameworkMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 22);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<true>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  if (this->__isset.get(16)) {
    xfer += prot_->serializedFieldSize("loggingContext", apache::thrift::protocol::T_STRUCT, 23);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::LoggingContext>::serializedSize<true>(*prot_, this->__fbthrift_field_loggingContext);
  }
  if (this->__isset.get(17)) {
    xfer += prot_->serializedFieldSize("tenantId", apache::thrift::protocol::T_STRING, 24);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_tenantId);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestRpcMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("RequestRpcMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "protocol", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ProtocolId>::write(*prot_, this->__fbthrift_field_protocol);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "name", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::ManagedStringViewField>::write(*prot_, this->__fbthrift_field_name);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 3, kPrevFieldId>(*prot_, "kind", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcKind>::write(*prot_, this->__fbthrift_field_kind);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 5, kPrevFieldId>(*prot_, "clientTimeoutMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_clientTimeoutMs);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(4)) {
    constexpr int16_t kPrevFieldId = 5;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 6, kPrevFieldId>(*prot_, "queueTimeoutMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_queueTimeoutMs);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(5)) {
    constexpr int16_t kPrevFieldId = 6;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 7, kPrevFieldId>(*prot_, "priority", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::RpcPriority>::write(*prot_, this->__fbthrift_field_priority);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(6)) {
    constexpr int16_t kPrevFieldId = 7;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 8, kPrevFieldId>(*prot_, "otherMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::write(*prot_, this->__fbthrift_field_otherMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(7)) {
    constexpr int16_t kPrevFieldId = 8;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 11, kPrevFieldId>(*prot_, "crc32c", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::write(*prot_, this->__fbthrift_field_crc32c);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(8)) {
    constexpr int16_t kPrevFieldId = 11;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 13, kPrevFieldId>(*prot_, "loadMetric", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_loadMetric);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(9)) {
    constexpr int16_t kPrevFieldId = 13;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 14, kPrevFieldId>(*prot_, "compression", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::write(*prot_, this->__fbthrift_field_compression);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(10)) {
    constexpr int16_t kPrevFieldId = 14;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 15, kPrevFieldId>(*prot_, "compressionConfig", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::CompressionConfig>::write(*prot_, this->__fbthrift_field_compressionConfig);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(11)) {
    constexpr int16_t kPrevFieldId = 15;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 16, kPrevFieldId>(*prot_, "interactionId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_interactionId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(12)) {
    constexpr int16_t kPrevFieldId = 16;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 17, kPrevFieldId>(*prot_, "interactionCreate", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionCreate>::write(*prot_, this->__fbthrift_field_interactionCreate);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(13)) {
    constexpr int16_t kPrevFieldId = 17;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 18, kPrevFieldId>(*prot_, "clientId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_clientId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(14)) {
    constexpr int16_t kPrevFieldId = 18;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 19, kPrevFieldId>(*prot_, "serviceTraceMeta", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_serviceTraceMeta);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(15)) {
    constexpr int16_t kPrevFieldId = 19;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 20, kPrevFieldId>(*prot_, "frameworkMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::write(*prot_, this->__fbthrift_field_frameworkMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__fbthrift_field_fdMetadata) {
    constexpr int16_t kPrevFieldId = 20;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 22, kPrevFieldId>(*prot_, "fdMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::write(*prot_, *this->__fbthrift_field_fdMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(16)) {
    constexpr int16_t kPrevFieldId = 22;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 23, kPrevFieldId>(*prot_, "loggingContext", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::LoggingContext>::write(*prot_, this->__fbthrift_field_loggingContext);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(17)) {
    constexpr int16_t kPrevFieldId = 23;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 24, kPrevFieldId>(*prot_, "tenantId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_tenantId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void RequestRpcMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t RequestRpcMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t RequestRpcMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t RequestRpcMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void RequestRpcMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t RequestRpcMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t RequestRpcMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t RequestRpcMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void RequestRpcMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t RequestRpcMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t RequestRpcMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t RequestRpcMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ErrorClassification::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_kind:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorKind>::readWithContext(*iprot, this->__fbthrift_field_kind, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_blame:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorBlame>::readWithContext(*iprot, this->__fbthrift_field_blame, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_safety:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorSafety>::readWithContext(*iprot, this->__fbthrift_field_safety, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ErrorClassification>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_kind;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_blame;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_safety;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ErrorClassification::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ErrorClassification");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("kind", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorKind>::serializedSize<false>(*prot_, this->__fbthrift_field_kind);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("blame", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorBlame>::serializedSize<false>(*prot_, this->__fbthrift_field_blame);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("safety", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorSafety>::serializedSize<false>(*prot_, this->__fbthrift_field_safety);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ErrorClassification::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ErrorClassification");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("kind", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorKind>::serializedSize<false>(*prot_, this->__fbthrift_field_kind);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("blame", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorBlame>::serializedSize<false>(*prot_, this->__fbthrift_field_blame);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("safety", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorSafety>::serializedSize<false>(*prot_, this->__fbthrift_field_safety);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ErrorClassification::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ErrorClassification");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "kind", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorKind>::write(*prot_, this->__fbthrift_field_kind);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "blame", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorBlame>::write(*prot_, this->__fbthrift_field_blame);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 3, kPrevFieldId>(*prot_, "safety", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ErrorSafety>::write(*prot_, this->__fbthrift_field_safety);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ErrorClassification::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ErrorClassification::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ErrorClassification::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ErrorClassification::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ErrorClassification::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ErrorClassification::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ErrorClassification::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ErrorClassification::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ErrorClassification::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ErrorClassification::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ErrorClassification::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ErrorClassification::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadResponseMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadResponseMetadata>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadResponseMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadResponseMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadResponseMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadResponseMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadResponseMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadResponseMetadata");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadResponseMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadResponseMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadResponseMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadResponseMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadResponseMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadResponseMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadResponseMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadResponseMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadResponseMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadResponseMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadResponseMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadResponseMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadDeclaredExceptionMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_errorClassification:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::readWithContext(*iprot, this->__fbthrift_field_errorClassification, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadDeclaredExceptionMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_errorClassification;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadDeclaredExceptionMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadDeclaredExceptionMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("errorClassification", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::serializedSize<false>(*prot_, this->__fbthrift_field_errorClassification);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadDeclaredExceptionMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadDeclaredExceptionMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("errorClassification", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::serializedSize<true>(*prot_, this->__fbthrift_field_errorClassification);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadDeclaredExceptionMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadDeclaredExceptionMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "errorClassification", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::write(*prot_, this->__fbthrift_field_errorClassification);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadDeclaredExceptionMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadDeclaredExceptionMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadDeclaredExceptionMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadDeclaredExceptionMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadDeclaredExceptionMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadDeclaredExceptionMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadDeclaredExceptionMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadProxyExceptionMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadProxyExceptionMetadata>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadProxyExceptionMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadProxyExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadProxyExceptionMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadProxyExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadProxyExceptionMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadProxyExceptionMetadata");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadProxyExceptionMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadProxyExceptionMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadProxyExceptionMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadProxyExceptionMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadProxyExceptionMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadProxyExceptionMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadProxyExceptionMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadProxiedExceptionMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadProxiedExceptionMetadata>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadProxiedExceptionMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadProxiedExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadProxiedExceptionMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadProxiedExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadProxiedExceptionMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadProxiedExceptionMetadata");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadProxiedExceptionMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadProxiedExceptionMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadProxiedExceptionMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadProxiedExceptionMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadProxiedExceptionMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadProxiedExceptionMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadProxiedExceptionMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadAppUnknownExceptionMetdata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_errorClassification:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::readWithContext(*iprot, this->__fbthrift_field_errorClassification, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadAppUnknownExceptionMetdata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_errorClassification;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadAppUnknownExceptionMetdata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadAppUnknownExceptionMetdata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("errorClassification", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::serializedSize<false>(*prot_, this->__fbthrift_field_errorClassification);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadAppUnknownExceptionMetdata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadAppUnknownExceptionMetdata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("errorClassification", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::serializedSize<true>(*prot_, this->__fbthrift_field_errorClassification);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadAppUnknownExceptionMetdata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadAppUnknownExceptionMetdata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "errorClassification", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ErrorClassification>::write(*prot_, this->__fbthrift_field_errorClassification);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadAppUnknownExceptionMetdata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadAppUnknownExceptionMetdata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadAppUnknownExceptionMetdata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadAppUnknownExceptionMetdata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadAppUnknownExceptionMetdata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadAppUnknownExceptionMetdata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadAppUnknownExceptionMetdata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadAnyExceptionMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadAnyExceptionMetadata>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadAnyExceptionMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadAnyExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadAnyExceptionMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadAnyExceptionMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadAnyExceptionMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadAnyExceptionMetadata");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadAnyExceptionMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadAnyExceptionMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadAnyExceptionMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadAnyExceptionMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadAnyExceptionMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadAnyExceptionMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadAnyExceptionMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadExceptionMetadata::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadExceptionMetadata>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->declaredException_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadDeclaredExceptionMetadata>::readWithContext(*iprot, value_.declaredException, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->DEPRECATED_proxyException_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadProxyExceptionMetadata>::readWithContext(*iprot, value_.DEPRECATED_proxyException, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 6:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->appUnknownException_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAppUnknownExceptionMetdata>::readWithContext(*iprot, value_.appUnknownException, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 7:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->anyException_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAnyExceptionMetadata>::readWithContext(*iprot, value_.anyException, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t PayloadExceptionMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadExceptionMetadata");
  switch(this->getType()) {
    case PayloadExceptionMetadata::Type::declaredException:
    {
      xfer += prot_->serializedFieldSize("declaredException", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadDeclaredExceptionMetadata>::serializedSize<false>(*prot_, value_.declaredException);
      break;
    }
    case PayloadExceptionMetadata::Type::DEPRECATED_proxyException:
    {
      xfer += prot_->serializedFieldSize("DEPRECATED_proxyException", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadProxyExceptionMetadata>::serializedSize<false>(*prot_, value_.DEPRECATED_proxyException);
      break;
    }
    case PayloadExceptionMetadata::Type::appUnknownException:
    {
      xfer += prot_->serializedFieldSize("appUnknownException", apache::thrift::protocol::T_STRUCT, 6);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAppUnknownExceptionMetdata>::serializedSize<false>(*prot_, value_.appUnknownException);
      break;
    }
    case PayloadExceptionMetadata::Type::anyException:
    {
      xfer += prot_->serializedFieldSize("anyException", apache::thrift::protocol::T_STRUCT, 7);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAnyExceptionMetadata>::serializedSize<false>(*prot_, value_.anyException);
      break;
    }
    case PayloadExceptionMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadExceptionMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadExceptionMetadata");
  switch(this->getType()) {
    case PayloadExceptionMetadata::Type::declaredException:
    {
      xfer += prot_->serializedFieldSize("declaredException", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadDeclaredExceptionMetadata>::serializedSize<true>(*prot_, value_.declaredException);
      break;
    }
    case PayloadExceptionMetadata::Type::DEPRECATED_proxyException:
    {
      xfer += prot_->serializedFieldSize("DEPRECATED_proxyException", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadProxyExceptionMetadata>::serializedSize<true>(*prot_, value_.DEPRECATED_proxyException);
      break;
    }
    case PayloadExceptionMetadata::Type::appUnknownException:
    {
      xfer += prot_->serializedFieldSize("appUnknownException", apache::thrift::protocol::T_STRUCT, 6);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAppUnknownExceptionMetdata>::serializedSize<true>(*prot_, value_.appUnknownException);
      break;
    }
    case PayloadExceptionMetadata::Type::anyException:
    {
      xfer += prot_->serializedFieldSize("anyException", apache::thrift::protocol::T_STRUCT, 7);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAnyExceptionMetadata>::serializedSize<true>(*prot_, value_.anyException);
      break;
    }
    case PayloadExceptionMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadExceptionMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadExceptionMetadata");
  switch(this->getType()) {
    case PayloadExceptionMetadata::Type::declaredException:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "declaredException", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadDeclaredExceptionMetadata>::write(*prot_, value_.declaredException);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadExceptionMetadata::Type::DEPRECATED_proxyException:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "DEPRECATED_proxyException", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadProxyExceptionMetadata>::write(*prot_, value_.DEPRECATED_proxyException);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadExceptionMetadata::Type::appUnknownException:
    {
      constexpr int16_t kPrevFieldId = 2;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 6, kPrevFieldId>(*prot_, "appUnknownException", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAppUnknownExceptionMetdata>::write(*prot_, value_.appUnknownException);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadExceptionMetadata::Type::anyException:
    {
      constexpr int16_t kPrevFieldId = 6;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 7, kPrevFieldId>(*prot_, "anyException", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadAnyExceptionMetadata>::write(*prot_, value_.anyException);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadExceptionMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadExceptionMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadExceptionMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadExceptionMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadExceptionMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadExceptionMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadExceptionMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadExceptionMetadataBase::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name_utf8, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_what_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_what_utf8, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_metadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadExceptionMetadata>::readWithContext(*iprot, this->__fbthrift_field_metadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadExceptionMetadataBase>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name_utf8;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_what_utf8;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_metadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t PayloadExceptionMetadataBase::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadExceptionMetadataBase");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("metadata", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadExceptionMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_metadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadExceptionMetadataBase::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadExceptionMetadataBase");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("metadata", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadExceptionMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_metadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadExceptionMetadataBase::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadExceptionMetadataBase");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "what_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_what_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "metadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadExceptionMetadata>::write(*prot_, this->__fbthrift_field_metadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadExceptionMetadataBase::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadExceptionMetadataBase::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadExceptionMetadataBase::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadExceptionMetadataBase::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadExceptionMetadataBase::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadExceptionMetadataBase::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadExceptionMetadataBase::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void PayloadMetadata::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<PayloadMetadata>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->responseMetadata_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadResponseMetadata>::readWithContext(*iprot, value_.responseMetadata, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->exceptionMetadata_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadExceptionMetadataBase>::readWithContext(*iprot, value_.exceptionMetadata, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t PayloadMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadMetadata");
  switch(this->getType()) {
    case PayloadMetadata::Type::responseMetadata:
    {
      xfer += prot_->serializedFieldSize("responseMetadata", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadResponseMetadata>::serializedSize<false>(*prot_, value_.responseMetadata);
      break;
    }
    case PayloadMetadata::Type::exceptionMetadata:
    {
      xfer += prot_->serializedFieldSize("exceptionMetadata", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadExceptionMetadataBase>::serializedSize<false>(*prot_, value_.exceptionMetadata);
      break;
    }
    case PayloadMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("PayloadMetadata");
  switch(this->getType()) {
    case PayloadMetadata::Type::responseMetadata:
    {
      xfer += prot_->serializedFieldSize("responseMetadata", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadResponseMetadata>::serializedSize<true>(*prot_, value_.responseMetadata);
      break;
    }
    case PayloadMetadata::Type::exceptionMetadata:
    {
      xfer += prot_->serializedFieldSize("exceptionMetadata", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadExceptionMetadataBase>::serializedSize<true>(*prot_, value_.exceptionMetadata);
      break;
    }
    case PayloadMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t PayloadMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("PayloadMetadata");
  switch(this->getType()) {
    case PayloadMetadata::Type::responseMetadata:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "responseMetadata", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadResponseMetadata>::write(*prot_, value_.responseMetadata);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadMetadata::Type::exceptionMetadata:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "exceptionMetadata", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::PayloadExceptionMetadataBase>::write(*prot_, value_.exceptionMetadata);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case PayloadMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void PayloadMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t PayloadMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t PayloadMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t PayloadMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void PayloadMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t PayloadMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t PayloadMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t PayloadMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void PayloadMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t PayloadMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t PayloadMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t PayloadMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ProxiedPayloadMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ProxiedPayloadMetadata>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ProxiedPayloadMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ProxiedPayloadMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ProxiedPayloadMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ProxiedPayloadMetadata");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ProxiedPayloadMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ProxiedPayloadMetadata");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ProxiedPayloadMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ProxiedPayloadMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ProxiedPayloadMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ProxiedPayloadMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ProxiedPayloadMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ProxiedPayloadMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ProxiedPayloadMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void QueueMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_queueingTimeMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_queueingTimeMs, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_queueTimeoutMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_queueTimeoutMs, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<QueueMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_queueingTimeMs;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_queueTimeoutMs;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t QueueMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("QueueMetadata");
  {
    xfer += prot_->serializedFieldSize("queueingTimeMs", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueingTimeMs);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("queueTimeoutMs", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueTimeoutMs);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t QueueMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("QueueMetadata");
  {
    xfer += prot_->serializedFieldSize("queueingTimeMs", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueingTimeMs);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("queueTimeoutMs", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queueTimeoutMs);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t QueueMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("QueueMetadata");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "queueingTimeMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_queueingTimeMs);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "queueTimeoutMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_queueTimeoutMs);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void QueueMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t QueueMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t QueueMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t QueueMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void QueueMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t QueueMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t QueueMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t QueueMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void QueueMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t QueueMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t QueueMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t QueueMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ResponseRpcMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          3,
          apache::thrift::protocol::T_MAP))) {
    goto _advance_failure;
  }
_readField_otherMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_otherMetadata = folly::F14NodeMap<::std::string, ::std::string>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::readWithContext(*iprot, this->__fbthrift_field_otherMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_load:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_load, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_crc32c:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::readWithContext(*iprot, this->__fbthrift_field_crc32c, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          6,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_compression:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::readWithContext(*iprot, this->__fbthrift_field_compression, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          6,
          7,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_payloadMetadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::readWithContext(*iprot, this->__fbthrift_field_payloadMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          7,
          8,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_proxiedPayloadMetadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ProxiedPayloadMetadata>::readWithContext(*iprot, this->__fbthrift_field_proxiedPayloadMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(5, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          8,
          9,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_streamId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_streamId, _readState);
    
  }
 this->__isset.set(6, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          9,
          10,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_queueMetadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::QueueMetadata>::readWithContext(*iprot, this->__fbthrift_field_queueMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(7, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          10,
          12,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_fdMetadata:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::FdMetadata>>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::readWithContext(*iprot, *ptr, _readState);
    this->__fbthrift_field_fdMetadata = std::move(ptr);
    _readState.afterSubobject(iprot);
    
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          12,
          13,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_frameworkMetadata:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::readWithContext(*iprot, this->__fbthrift_field_frameworkMetadata, _readState);
    
  }
 this->__isset.set(8, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          13,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ResponseRpcMetadata>>();
  }

  switch (_readState.fieldId) {
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_otherMetadata;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_load;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_crc32c;
      } else {
        goto _skip;
      }
    }
    case 6:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_compression;
      } else {
        goto _skip;
      }
    }
    case 7:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_payloadMetadata;
      } else {
        goto _skip;
      }
    }
    case 8:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_proxiedPayloadMetadata;
      } else {
        goto _skip;
      }
    }
    case 9:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_streamId;
      } else {
        goto _skip;
      }
    }
    case 10:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_queueMetadata;
      } else {
        goto _skip;
      }
    }
    case 12:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_fdMetadata;
      } else {
        goto _skip;
      }
    }
    case 13:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_frameworkMetadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ResponseRpcMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResponseRpcMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("load", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_load);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("crc32c", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_crc32c);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("payloadMetadata", apache::thrift::protocol::T_STRUCT, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_payloadMetadata);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("proxiedPayloadMetadata", apache::thrift::protocol::T_STRUCT, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ProxiedPayloadMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_proxiedPayloadMetadata);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("streamId", apache::thrift::protocol::T_I32, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_streamId);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("queueMetadata", apache::thrift::protocol::T_STRUCT, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::QueueMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_queueMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<false>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("frameworkMetadata", apache::thrift::protocol::T_STRING, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::serializedSize<false>(*prot_, this->__fbthrift_field_frameworkMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResponseRpcMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResponseRpcMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("load", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_load);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("crc32c", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_crc32c);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("payloadMetadata", apache::thrift::protocol::T_STRUCT, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_payloadMetadata);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("proxiedPayloadMetadata", apache::thrift::protocol::T_STRUCT, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ProxiedPayloadMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_proxiedPayloadMetadata);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("streamId", apache::thrift::protocol::T_I32, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_streamId);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("queueMetadata", apache::thrift::protocol::T_STRUCT, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::QueueMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_queueMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<true>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("frameworkMetadata", apache::thrift::protocol::T_STRING, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::serializedSize<true>(*prot_, this->__fbthrift_field_frameworkMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResponseRpcMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ResponseRpcMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 3, kPrevFieldId>(*prot_, "otherMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::write(*prot_, this->__fbthrift_field_otherMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 4, kPrevFieldId>(*prot_, "load", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_load);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 5, kPrevFieldId>(*prot_, "crc32c", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, std::uint32_t>::write(*prot_, this->__fbthrift_field_crc32c);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 5;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 6, kPrevFieldId>(*prot_, "compression", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::write(*prot_, this->__fbthrift_field_compression);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(4)) {
    constexpr int16_t kPrevFieldId = 6;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 7, kPrevFieldId>(*prot_, "payloadMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::write(*prot_, this->__fbthrift_field_payloadMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(5)) {
    constexpr int16_t kPrevFieldId = 7;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 8, kPrevFieldId>(*prot_, "proxiedPayloadMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ProxiedPayloadMetadata>::write(*prot_, this->__fbthrift_field_proxiedPayloadMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(6)) {
    constexpr int16_t kPrevFieldId = 8;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 9, kPrevFieldId>(*prot_, "streamId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_streamId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(7)) {
    constexpr int16_t kPrevFieldId = 9;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 10, kPrevFieldId>(*prot_, "queueMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::QueueMetadata>::write(*prot_, this->__fbthrift_field_queueMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__fbthrift_field_fdMetadata) {
    constexpr int16_t kPrevFieldId = 10;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 12, kPrevFieldId>(*prot_, "fdMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::write(*prot_, *this->__fbthrift_field_fdMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(8)) {
    constexpr int16_t kPrevFieldId = 12;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 13, kPrevFieldId>(*prot_, "frameworkMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::binary, ::apache::thrift::IOBufPtr>::write(*prot_, this->__fbthrift_field_frameworkMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ResponseRpcMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ResponseRpcMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ResponseRpcMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ResponseRpcMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ResponseRpcMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ResponseRpcMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ResponseRpcMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ResponseRpcMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ResponseRpcMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ResponseRpcMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ResponseRpcMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ResponseRpcMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ResponseRpcError::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name_utf8, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_what_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_what_utf8, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_category:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCategory>::readWithContext(*iprot, this->__fbthrift_field_category, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_code:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCode>::readWithContext(*iprot, this->__fbthrift_field_code, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_load:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_load, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ResponseRpcError>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name_utf8;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_what_utf8;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_category;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_code;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_load;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ResponseRpcError::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResponseRpcError");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("category", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCategory>::serializedSize<false>(*prot_, this->__fbthrift_field_category);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("code", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCode>::serializedSize<false>(*prot_, this->__fbthrift_field_code);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("load", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_load);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResponseRpcError::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResponseRpcError");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("category", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCategory>::serializedSize<false>(*prot_, this->__fbthrift_field_category);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("code", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCode>::serializedSize<false>(*prot_, this->__fbthrift_field_code);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("load", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_load);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResponseRpcError::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ResponseRpcError");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "what_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_what_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 3, kPrevFieldId>(*prot_, "category", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCategory>::write(*prot_, this->__fbthrift_field_category);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 4, kPrevFieldId>(*prot_, "code", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::ResponseRpcErrorCode>::write(*prot_, this->__fbthrift_field_code);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(4)) {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 5, kPrevFieldId>(*prot_, "load", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_load);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ResponseRpcError::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ResponseRpcError::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ResponseRpcError::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ResponseRpcError::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ResponseRpcError::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ResponseRpcError::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ResponseRpcError::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ResponseRpcError::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ResponseRpcError::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ResponseRpcError::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ResponseRpcError::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ResponseRpcError::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void StreamRpcError::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name_utf8, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_what_utf8:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_what_utf8, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          4,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_code:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::StreamRpcErrorCode>::readWithContext(*iprot, this->__fbthrift_field_code, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<StreamRpcError>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name_utf8;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_what_utf8;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_code;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t StreamRpcError::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamRpcError");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("code", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::StreamRpcErrorCode>::serializedSize<false>(*prot_, this->__fbthrift_field_code);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamRpcError::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamRpcError");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("name_utf8", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name_utf8);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("what_utf8", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_what_utf8);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("code", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::StreamRpcErrorCode>::serializedSize<false>(*prot_, this->__fbthrift_field_code);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamRpcError::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("StreamRpcError");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "what_utf8", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_what_utf8);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 4, kPrevFieldId>(*prot_, "code", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::StreamRpcErrorCode>::write(*prot_, this->__fbthrift_field_code);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void StreamRpcError::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t StreamRpcError::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t StreamRpcError::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t StreamRpcError::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void StreamRpcError::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t StreamRpcError::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t StreamRpcError::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t StreamRpcError::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void StreamRpcError::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t StreamRpcError::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t StreamRpcError::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t StreamRpcError::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void StreamPayloadMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_compression:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::readWithContext(*iprot, this->__fbthrift_field_compression, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_MAP))) {
    goto _advance_failure;
  }
_readField_otherMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_otherMetadata = folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::readWithContext(*iprot, this->__fbthrift_field_otherMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_payloadMetadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::readWithContext(*iprot, this->__fbthrift_field_payloadMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          5,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_fdMetadata:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::FdMetadata>>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::readWithContext(*iprot, *ptr, _readState);
    this->__fbthrift_field_fdMetadata = std::move(ptr);
    _readState.afterSubobject(iprot);
    
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<StreamPayloadMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_compression;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_otherMetadata;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_payloadMetadata;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_fdMetadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t StreamPayloadMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamPayloadMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("payloadMetadata", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_payloadMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<false>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamPayloadMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamPayloadMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("payloadMetadata", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_payloadMetadata);
  }
  if (this->__fbthrift_field_fdMetadata) {
    xfer += prot_->serializedFieldSize("fdMetadata", apache::thrift::protocol::T_STRUCT, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::serializedSize<true>(*prot_, *this->__fbthrift_field_fdMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamPayloadMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("StreamPayloadMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "compression", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::write(*prot_, this->__fbthrift_field_compression);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 2, kPrevFieldId>(*prot_, "otherMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::write(*prot_, this->__fbthrift_field_otherMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "payloadMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::variant, ::apache::thrift::PayloadMetadata>::write(*prot_, this->__fbthrift_field_payloadMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__fbthrift_field_fdMetadata) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 5, kPrevFieldId>(*prot_, "fdMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::FdMetadata>::write(*prot_, *this->__fbthrift_field_fdMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void StreamPayloadMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t StreamPayloadMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t StreamPayloadMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t StreamPayloadMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void StreamPayloadMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t StreamPayloadMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t StreamPayloadMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t StreamPayloadMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void StreamPayloadMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t StreamPayloadMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t StreamPayloadMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t StreamPayloadMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ClientMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_agent:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_agent, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_hostname:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_hostname, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_MAP))) {
    goto _advance_failure;
  }
_readField_otherMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_otherMetadata = folly::F14NodeMap<::std::string, ::std::string>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::readWithContext(*iprot, this->__fbthrift_field_otherMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ClientMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_agent;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_hostname;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_otherMetadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ClientMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ClientMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("agent", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_agent);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("hostname", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_hostname);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ClientMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ClientMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("agent", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_agent);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("hostname", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_hostname);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ClientMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ClientMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "agent", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_agent);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "hostname", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_hostname);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 3, kPrevFieldId>(*prot_, "otherMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::write(*prot_, this->__fbthrift_field_otherMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ClientMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ClientMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ClientMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ClientMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ClientMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ClientMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ClientMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ClientMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ClientMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ClientMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ClientMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ClientMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void RequestSetupMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_opaque:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_opaque = apache::thrift::MetadataOpaqueMap<::std::string, ::std::string>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::binary>, apache::thrift::MetadataOpaqueMap<::std::string, ::std::string>>::readWithContext(*iprot, this->__fbthrift_field_opaque, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_interfaceKind:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::InterfaceKind>::readWithContext(*iprot, this->__fbthrift_field_interfaceKind, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_minVersion:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_minVersion, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_maxVersion:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_maxVersion, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_dscpToReflect:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_dscpToReflect, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          6,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_markToReflect:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_markToReflect, _readState);
    
  }
 this->__isset.set(5, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          6,
          10,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_qosUseCaseId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_qosUseCaseId, _readState);
    
  }
 this->__isset.set(6, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          10,
          11,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_qosPolicyId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_qosPolicyId, _readState);
    
  }
 this->__isset.set(7, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          11,
          9,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_clientMetadata:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ClientMetadata>::readWithContext(*iprot, this->__fbthrift_field_clientMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(8, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          9,
          12,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_keepAliveTimeoutMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_keepAliveTimeoutMs, _readState);
    
  }
 this->__isset.set(9, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          12,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<RequestSetupMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_opaque;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_interfaceKind;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_minVersion;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_maxVersion;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_dscpToReflect;
      } else {
        goto _skip;
      }
    }
    case 6:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_markToReflect;
      } else {
        goto _skip;
      }
    }
    case 10:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_qosUseCaseId;
      } else {
        goto _skip;
      }
    }
    case 11:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_qosPolicyId;
      } else {
        goto _skip;
      }
    }
    case 9:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_clientMetadata;
      } else {
        goto _skip;
      }
    }
    case 12:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_keepAliveTimeoutMs;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t RequestSetupMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestSetupMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("opaque", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::binary>, apache::thrift::MetadataOpaqueMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_opaque);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("interfaceKind", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::InterfaceKind>::serializedSize<false>(*prot_, this->__fbthrift_field_interfaceKind);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("minVersion", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_minVersion);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("maxVersion", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_maxVersion);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("dscpToReflect", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_dscpToReflect);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("markToReflect", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_markToReflect);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("qosUseCaseId", apache::thrift::protocol::T_I32, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qosUseCaseId);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("qosPolicyId", apache::thrift::protocol::T_I32, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qosPolicyId);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("clientMetadata", apache::thrift::protocol::T_STRUCT, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ClientMetadata>::serializedSize<false>(*prot_, this->__fbthrift_field_clientMetadata);
  }
  if (this->__isset.get(9)) {
    xfer += prot_->serializedFieldSize("keepAliveTimeoutMs", apache::thrift::protocol::T_I32, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_keepAliveTimeoutMs);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestSetupMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestSetupMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("opaque", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::binary>, apache::thrift::MetadataOpaqueMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_opaque);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("interfaceKind", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::InterfaceKind>::serializedSize<false>(*prot_, this->__fbthrift_field_interfaceKind);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("minVersion", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_minVersion);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("maxVersion", apache::thrift::protocol::T_I32, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_maxVersion);
  }
  if (this->__isset.get(4)) {
    xfer += prot_->serializedFieldSize("dscpToReflect", apache::thrift::protocol::T_I32, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_dscpToReflect);
  }
  if (this->__isset.get(5)) {
    xfer += prot_->serializedFieldSize("markToReflect", apache::thrift::protocol::T_I32, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_markToReflect);
  }
  if (this->__isset.get(6)) {
    xfer += prot_->serializedFieldSize("qosUseCaseId", apache::thrift::protocol::T_I32, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qosUseCaseId);
  }
  if (this->__isset.get(7)) {
    xfer += prot_->serializedFieldSize("qosPolicyId", apache::thrift::protocol::T_I32, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qosPolicyId);
  }
  if (this->__isset.get(8)) {
    xfer += prot_->serializedFieldSize("clientMetadata", apache::thrift::protocol::T_STRUCT, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ClientMetadata>::serializedSize<true>(*prot_, this->__fbthrift_field_clientMetadata);
  }
  if (this->__isset.get(9)) {
    xfer += prot_->serializedFieldSize("keepAliveTimeoutMs", apache::thrift::protocol::T_I32, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_keepAliveTimeoutMs);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestSetupMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("RequestSetupMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 1, kPrevFieldId>(*prot_, "opaque", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::binary>, apache::thrift::MetadataOpaqueMap<::std::string, ::std::string>>::write(*prot_, this->__fbthrift_field_opaque);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "interfaceKind", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::InterfaceKind>::write(*prot_, this->__fbthrift_field_interfaceKind);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 3, kPrevFieldId>(*prot_, "minVersion", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_minVersion);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 4, kPrevFieldId>(*prot_, "maxVersion", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_maxVersion);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(4)) {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 5, kPrevFieldId>(*prot_, "dscpToReflect", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_dscpToReflect);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(5)) {
    constexpr int16_t kPrevFieldId = 5;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 6, kPrevFieldId>(*prot_, "markToReflect", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_markToReflect);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(6)) {
    constexpr int16_t kPrevFieldId = 6;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 10, kPrevFieldId>(*prot_, "qosUseCaseId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_qosUseCaseId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(7)) {
    constexpr int16_t kPrevFieldId = 10;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 11, kPrevFieldId>(*prot_, "qosPolicyId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_qosPolicyId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(8)) {
    constexpr int16_t kPrevFieldId = 11;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 9, kPrevFieldId>(*prot_, "clientMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::ClientMetadata>::write(*prot_, this->__fbthrift_field_clientMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(9)) {
    constexpr int16_t kPrevFieldId = 9;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 12, kPrevFieldId>(*prot_, "keepAliveTimeoutMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_keepAliveTimeoutMs);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void RequestSetupMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t RequestSetupMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t RequestSetupMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t RequestSetupMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void RequestSetupMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t RequestSetupMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t RequestSetupMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t RequestSetupMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void RequestSetupMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t RequestSetupMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t RequestSetupMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t RequestSetupMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void SetupResponse::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_version:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_version, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_BOOL))) {
    goto _advance_failure;
  }
_readField_zstdSupported:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_zstdSupported, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<SetupResponse>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_version;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
        goto _readField_zstdSupported;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t SetupResponse::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("SetupResponse");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("version", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_version);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("zstdSupported", apache::thrift::protocol::T_BOOL, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_zstdSupported);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t SetupResponse::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("SetupResponse");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("version", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_version);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("zstdSupported", apache::thrift::protocol::T_BOOL, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_zstdSupported);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t SetupResponse::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("SetupResponse");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "version", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_version);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 2, kPrevFieldId>(*prot_, "zstdSupported", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_zstdSupported);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void SetupResponse::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t SetupResponse::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t SetupResponse::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t SetupResponse::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void SetupResponse::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t SetupResponse::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t SetupResponse::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t SetupResponse::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void SetupResponse::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t SetupResponse::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t SetupResponse::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t SetupResponse::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void StreamHeadersPush::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_streamId:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_streamId, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_headersPayloadContent:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::HeadersPayloadContent>::readWithContext(*iprot, this->__fbthrift_field_headersPayloadContent, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<StreamHeadersPush>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_streamId;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_headersPayloadContent;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t StreamHeadersPush::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamHeadersPush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("streamId", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_streamId);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("headersPayloadContent", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::HeadersPayloadContent>::serializedSize<false>(*prot_, this->__fbthrift_field_headersPayloadContent);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamHeadersPush::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StreamHeadersPush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("streamId", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_streamId);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("headersPayloadContent", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::HeadersPayloadContent>::serializedSize<true>(*prot_, this->__fbthrift_field_headersPayloadContent);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StreamHeadersPush::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("StreamHeadersPush");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "streamId", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_streamId);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "headersPayloadContent", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::HeadersPayloadContent>::write(*prot_, this->__fbthrift_field_headersPayloadContent);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void StreamHeadersPush::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t StreamHeadersPush::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t StreamHeadersPush::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t StreamHeadersPush::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void StreamHeadersPush::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t StreamHeadersPush::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t StreamHeadersPush::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t StreamHeadersPush::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void StreamHeadersPush::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t StreamHeadersPush::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t StreamHeadersPush::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t StreamHeadersPush::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void TransportMetadataPush::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_transportMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_transportMetadata = folly::F14NodeMap<::std::string, ::std::string>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::readWithContext(*iprot, this->__fbthrift_field_transportMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<TransportMetadataPush>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_transportMetadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t TransportMetadataPush::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("TransportMetadataPush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("transportMetadata", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_transportMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t TransportMetadataPush::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("TransportMetadataPush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("transportMetadata", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::serializedSize<false>(*prot_, this->__fbthrift_field_transportMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t TransportMetadataPush::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("TransportMetadataPush");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 1, kPrevFieldId>(*prot_, "transportMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::std::string>>::write(*prot_, this->__fbthrift_field_transportMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void TransportMetadataPush::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t TransportMetadataPush::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t TransportMetadataPush::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t TransportMetadataPush::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void TransportMetadataPush::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t TransportMetadataPush::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t TransportMetadataPush::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t TransportMetadataPush::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void TransportMetadataPush::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t TransportMetadataPush::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t TransportMetadataPush::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t TransportMetadataPush::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void DrainCompletePush::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_drainCompleteCode:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::DrainCompleteCode>::readWithContext(*iprot, this->__fbthrift_field_drainCompleteCode, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<DrainCompletePush>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_drainCompleteCode;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t DrainCompletePush::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("DrainCompletePush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("drainCompleteCode", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::DrainCompleteCode>::serializedSize<false>(*prot_, this->__fbthrift_field_drainCompleteCode);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t DrainCompletePush::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("DrainCompletePush");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("drainCompleteCode", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::DrainCompleteCode>::serializedSize<false>(*prot_, this->__fbthrift_field_drainCompleteCode);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t DrainCompletePush::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("DrainCompletePush");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "drainCompleteCode", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::DrainCompleteCode>::write(*prot_, this->__fbthrift_field_drainCompleteCode);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void DrainCompletePush::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t DrainCompletePush::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t DrainCompletePush::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t DrainCompletePush::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void DrainCompletePush::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t DrainCompletePush::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t DrainCompletePush::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t DrainCompletePush::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void DrainCompletePush::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t DrainCompletePush::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t DrainCompletePush::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t DrainCompletePush::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ServerPushMetadata::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ServerPushMetadata>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->setupResponse_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::SetupResponse>::readWithContext(*iprot, value_.setupResponse, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->streamHeadersPush_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::readWithContext(*iprot, value_.streamHeadersPush, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 3:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->drainCompletePush_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::DrainCompletePush>::readWithContext(*iprot, value_.drainCompletePush, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t ServerPushMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ServerPushMetadata");
  switch(this->getType()) {
    case ServerPushMetadata::Type::setupResponse:
    {
      xfer += prot_->serializedFieldSize("setupResponse", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::SetupResponse>::serializedSize<false>(*prot_, value_.setupResponse);
      break;
    }
    case ServerPushMetadata::Type::streamHeadersPush:
    {
      xfer += prot_->serializedFieldSize("streamHeadersPush", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::serializedSize<false>(*prot_, value_.streamHeadersPush);
      break;
    }
    case ServerPushMetadata::Type::drainCompletePush:
    {
      xfer += prot_->serializedFieldSize("drainCompletePush", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::DrainCompletePush>::serializedSize<false>(*prot_, value_.drainCompletePush);
      break;
    }
    case ServerPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ServerPushMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ServerPushMetadata");
  switch(this->getType()) {
    case ServerPushMetadata::Type::setupResponse:
    {
      xfer += prot_->serializedFieldSize("setupResponse", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::SetupResponse>::serializedSize<true>(*prot_, value_.setupResponse);
      break;
    }
    case ServerPushMetadata::Type::streamHeadersPush:
    {
      xfer += prot_->serializedFieldSize("streamHeadersPush", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::serializedSize<true>(*prot_, value_.streamHeadersPush);
      break;
    }
    case ServerPushMetadata::Type::drainCompletePush:
    {
      xfer += prot_->serializedFieldSize("drainCompletePush", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::DrainCompletePush>::serializedSize<true>(*prot_, value_.drainCompletePush);
      break;
    }
    case ServerPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ServerPushMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ServerPushMetadata");
  switch(this->getType()) {
    case ServerPushMetadata::Type::setupResponse:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "setupResponse", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::SetupResponse>::write(*prot_, value_.setupResponse);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ServerPushMetadata::Type::streamHeadersPush:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "streamHeadersPush", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::write(*prot_, value_.streamHeadersPush);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ServerPushMetadata::Type::drainCompletePush:
    {
      constexpr int16_t kPrevFieldId = 2;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "drainCompletePush", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::DrainCompletePush>::write(*prot_, value_.drainCompletePush);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ServerPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ServerPushMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ServerPushMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ServerPushMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ServerPushMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ServerPushMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ServerPushMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ServerPushMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ServerPushMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ServerPushMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ServerPushMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ServerPushMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ServerPushMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ClientPushMetadata::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ClientPushMetadata>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->interactionTerminate_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionTerminate>::readWithContext(*iprot, value_.interactionTerminate, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->streamHeadersPush_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::readWithContext(*iprot, value_.streamHeadersPush, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 3:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->transportMetadataPush_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::TransportMetadataPush>::readWithContext(*iprot, value_.transportMetadataPush, _readState);
          _readState.afterSubobject(iprot);
          
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t ClientPushMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ClientPushMetadata");
  switch(this->getType()) {
    case ClientPushMetadata::Type::interactionTerminate:
    {
      xfer += prot_->serializedFieldSize("interactionTerminate", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionTerminate>::serializedSize<false>(*prot_, value_.interactionTerminate);
      break;
    }
    case ClientPushMetadata::Type::streamHeadersPush:
    {
      xfer += prot_->serializedFieldSize("streamHeadersPush", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::serializedSize<false>(*prot_, value_.streamHeadersPush);
      break;
    }
    case ClientPushMetadata::Type::transportMetadataPush:
    {
      xfer += prot_->serializedFieldSize("transportMetadataPush", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::TransportMetadataPush>::serializedSize<false>(*prot_, value_.transportMetadataPush);
      break;
    }
    case ClientPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ClientPushMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ClientPushMetadata");
  switch(this->getType()) {
    case ClientPushMetadata::Type::interactionTerminate:
    {
      xfer += prot_->serializedFieldSize("interactionTerminate", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionTerminate>::serializedSize<true>(*prot_, value_.interactionTerminate);
      break;
    }
    case ClientPushMetadata::Type::streamHeadersPush:
    {
      xfer += prot_->serializedFieldSize("streamHeadersPush", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::serializedSize<true>(*prot_, value_.streamHeadersPush);
      break;
    }
    case ClientPushMetadata::Type::transportMetadataPush:
    {
      xfer += prot_->serializedFieldSize("transportMetadataPush", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::TransportMetadataPush>::serializedSize<true>(*prot_, value_.transportMetadataPush);
      break;
    }
    case ClientPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ClientPushMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ClientPushMetadata");
  switch(this->getType()) {
    case ClientPushMetadata::Type::interactionTerminate:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "interactionTerminate", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::InteractionTerminate>::write(*prot_, value_.interactionTerminate);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ClientPushMetadata::Type::streamHeadersPush:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "streamHeadersPush", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::StreamHeadersPush>::write(*prot_, value_.streamHeadersPush);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ClientPushMetadata::Type::transportMetadataPush:
    {
      constexpr int16_t kPrevFieldId = 2;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "transportMetadataPush", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::TransportMetadataPush>::write(*prot_, value_.transportMetadataPush);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case ClientPushMetadata::Type::__EMPTY__:;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ClientPushMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ClientPushMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ClientPushMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ClientPushMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ClientPushMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ClientPushMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ClientPushMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ClientPushMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ClientPushMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ClientPushMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ClientPushMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ClientPushMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void HeadersPayloadContent::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  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 _advance_failure;
  }
_readField_otherMetadata:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_otherMetadata = folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::readWithContext(*iprot, this->__fbthrift_field_otherMetadata, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<HeadersPayloadContent>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
        goto _readField_otherMetadata;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t HeadersPayloadContent::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("HeadersPayloadContent");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t HeadersPayloadContent::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("HeadersPayloadContent");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("otherMetadata", apache::thrift::protocol::T_MAP, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::serializedSize<false>(*prot_, this->__fbthrift_field_otherMetadata);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t HeadersPayloadContent::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("HeadersPayloadContent");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 1, kPrevFieldId>(*prot_, "otherMetadata", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, folly::F14NodeMap<::std::string, ::apache::thrift::string_4852>>::write(*prot_, this->__fbthrift_field_otherMetadata);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void HeadersPayloadContent::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t HeadersPayloadContent::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t HeadersPayloadContent::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t HeadersPayloadContent::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void HeadersPayloadContent::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t HeadersPayloadContent::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t HeadersPayloadContent::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t HeadersPayloadContent::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void HeadersPayloadContent::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t HeadersPayloadContent::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t HeadersPayloadContent::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t HeadersPayloadContent::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void HeadersPayloadMetadata::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_compression:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::readWithContext(*iprot, this->__fbthrift_field_compression, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<HeadersPayloadMetadata>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_compression;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t HeadersPayloadMetadata::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("HeadersPayloadMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t HeadersPayloadMetadata::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("HeadersPayloadMetadata");
  if (this->__isset.get(0)) {
    xfer += prot_->serializedFieldSize("compression", apache::thrift::protocol::T_I32, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::serializedSize<false>(*prot_, this->__fbthrift_field_compression);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t HeadersPayloadMetadata::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("HeadersPayloadMetadata");
  bool previousFieldHasValue = true;
  if (this->__isset.get(0)) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 1, kPrevFieldId>(*prot_, "compression", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::apache::thrift::CompressionAlgorithm>::write(*prot_, this->__fbthrift_field_compression);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void HeadersPayloadMetadata::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t HeadersPayloadMetadata::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void HeadersPayloadMetadata::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t HeadersPayloadMetadata::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void HeadersPayloadMetadata::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t HeadersPayloadMetadata::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t HeadersPayloadMetadata::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


} // namespace apache::thrift
