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

#include <thrift/lib/cpp2/visitation/visit_by_thrift_field_metadata.h>
#include "thrift/annotation/gen-cpp2/hack_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::FieldWrapper> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::FieldWrapper");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::Wrapper> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).underlyingName_ref());
    case 3:
      return f(2, static_cast<T&&>(t).extraNamespace_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::Wrapper");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::Adapter> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::Adapter");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::SkipCodegen> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).reason_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::SkipCodegen");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::Name> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).reason_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::Name");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::UnionEnumAttributes> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).attributes_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::UnionEnumAttributes");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::StructTrait> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::StructTrait");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::Attributes> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).attributes_ref());
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::Attributes");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::StructAsTrait> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::StructAsTrait");
    }
  }
};

template <>
struct VisitByFieldId<::facebook::thrift::annotation::hack::ModuleInternal> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    default:
      throwInvalidThriftId(fieldId, "::facebook::thrift::annotation::hack::ModuleInternal");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
