/**
 * 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/lib/thrift/frozen.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/frozen_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::apache::thrift::frozen::schema::Field> {
  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).layoutId_ref());
    case 2:
      return f(1, static_cast<T&&>(t).offset_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::frozen::schema::Field");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::frozen::schema::Layout> {
  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).size_ref());
    case 2:
      return f(1, static_cast<T&&>(t).bits_ref());
    case 3:
      return f(2, static_cast<T&&>(t).fields_ref());
    case 4:
      return f(3, static_cast<T&&>(t).typeName_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::frozen::schema::Layout");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::frozen::schema::Schema> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 4:
      return f(0, static_cast<T&&>(t).fileVersion_ref());
    case 1:
      return f(1, static_cast<T&&>(t).relaxTypeChecks_ref());
    case 2:
      return f(2, static_cast<T&&>(t).layouts_ref());
    case 3:
      return f(3, static_cast<T&&>(t).rootLayout_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::frozen::schema::Schema");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
