/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_id.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/lib/thrift/gen-cpp2/type_id_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::apache::thrift::type_system::ListTypeIdStruct> {
  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).elementType_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type_system::ListTypeIdStruct");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type_system::SetTypeIdStruct> {
  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).elementType_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type_system::SetTypeIdStruct");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type_system::MapTypeIdStruct> {
  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).keyType_ref());
    case 2:
      return f(1, static_cast<T&&>(t).valueType_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type_system::MapTypeIdStruct");
    }
  }
};

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

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

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

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

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

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

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

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

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

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

template <>
struct VisitByFieldId<::apache::thrift::type_system::TypeIdUnion> {
  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).boolType_ref());
    case 2:
      return f(1, static_cast<T&&>(t).byteType_ref());
    case 3:
      return f(2, static_cast<T&&>(t).i16Type_ref());
    case 4:
      return f(3, static_cast<T&&>(t).i32Type_ref());
    case 5:
      return f(4, static_cast<T&&>(t).i64Type_ref());
    case 6:
      return f(5, static_cast<T&&>(t).floatType_ref());
    case 7:
      return f(6, static_cast<T&&>(t).doubleType_ref());
    case 8:
      return f(7, static_cast<T&&>(t).stringType_ref());
    case 9:
      return f(8, static_cast<T&&>(t).binaryType_ref());
    case 10:
      return f(9, static_cast<T&&>(t).anyType_ref());
    case 11:
      return f(10, static_cast<T&&>(t).userDefinedType_ref());
    case 12:
      return f(11, static_cast<T&&>(t).listType_ref());
    case 13:
      return f(12, static_cast<T&&>(t).setType_ref());
    case 14:
      return f(13, static_cast<T&&>(t).mapType_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type_system::TypeIdUnion");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
