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

#include "thrift/annotation/gen-cpp2/api_types.h"

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


namespace apache {
namespace thrift {
namespace detail {

template <>
struct TccStructTraits<::facebook::thrift::annotation::api::OutputOnly> {
  static void translateFieldName(
      folly::StringPiece _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::facebook::thrift::annotation::api::Immutable> {
  static void translateFieldName(
      folly::StringPiece _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::facebook::thrift::annotation::api::Unique> {
  static void translateFieldName(
      folly::StringPiece _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};

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

namespace facebook { namespace thrift { namespace annotation { namespace api {

template <class Protocol_>
void OutputOnly::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;

_loop:
  _readState.afterAdvanceFailure(iprot);
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<OutputOnly>>();
  }

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

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

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

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

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


template <class Protocol_>
void Immutable::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;

_loop:
  _readState.afterAdvanceFailure(iprot);
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<Immutable>>();
  }

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

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

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

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

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


template <class Protocol_>
void Unique::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;

_loop:
  _readState.afterAdvanceFailure(iprot);
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<Unique>>();
  }

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

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

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

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

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


}}}} // facebook::thrift::annotation::api
