/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_fbthrift/fbthrift/work/fbthrift-2023.05.15.00/thrift/lib/thrift/type_rep.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_rep_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::apache::thrift::type::ProtocolUnion> {
  template <typename F, typename T>
  void operator()(FOLLY_MAYBE_UNUSED F&& f, int32_t fieldId, FOLLY_MAYBE_UNUSED T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).standard_ref());
    case 2:
      return f(1, static_cast<T&&>(t).custom_ref());
    case 3:
      return f(2, static_cast<T&&>(t).id_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::ProtocolUnion");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::TypeStruct> {
  template <typename F, typename T>
  void operator()(FOLLY_MAYBE_UNUSED F&& f, int32_t fieldId, FOLLY_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).params_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::TypeStruct");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
