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

#include "thrift/lib/thrift/gen-cpp2/standard_metadata.h"
#include <thrift/lib/cpp2/visitation/visit_union.h>

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitUnion<::apache::thrift::type::TypeUri> {

  template <typename F, typename T>
  decltype(auto) operator()(FOLLY_MAYBE_UNUSED F&& f, T&& t) const {
    using Union = std::remove_reference_t<T>;
    switch (t.getType()) {
    case Union::Type::uri:
      return f(0, *static_cast<T&&>(t).uri_ref());
    case Union::Type::typeHashPrefixSha2_256:
      return f(1, *static_cast<T&&>(t).typeHashPrefixSha2_256_ref());
    case Union::Type::scopedName:
      return f(2, *static_cast<T&&>(t).scopedName_ref());
    case Union::Type::__EMPTY__:
      return decltype(f(0, *static_cast<T&&>(t).uri_ref()))();
    }
  }
};
template <>
struct VisitUnion<::apache::thrift::type::TypeName> {

  template <typename F, typename T>
  decltype(auto) operator()(FOLLY_MAYBE_UNUSED F&& f, T&& t) const {
    using Union = std::remove_reference_t<T>;
    switch (t.getType()) {
    case Union::Type::boolType:
      return f(0, *static_cast<T&&>(t).boolType_ref());
    case Union::Type::byteType:
      return f(1, *static_cast<T&&>(t).byteType_ref());
    case Union::Type::i16Type:
      return f(2, *static_cast<T&&>(t).i16Type_ref());
    case Union::Type::i32Type:
      return f(3, *static_cast<T&&>(t).i32Type_ref());
    case Union::Type::i64Type:
      return f(4, *static_cast<T&&>(t).i64Type_ref());
    case Union::Type::floatType:
      return f(5, *static_cast<T&&>(t).floatType_ref());
    case Union::Type::doubleType:
      return f(6, *static_cast<T&&>(t).doubleType_ref());
    case Union::Type::stringType:
      return f(7, *static_cast<T&&>(t).stringType_ref());
    case Union::Type::binaryType:
      return f(8, *static_cast<T&&>(t).binaryType_ref());
    case Union::Type::enumType:
      return f(9, *static_cast<T&&>(t).enumType_ref());
    case Union::Type::typedefType:
      return f(10, *static_cast<T&&>(t).typedefType_ref());
    case Union::Type::structType:
      return f(11, *static_cast<T&&>(t).structType_ref());
    case Union::Type::unionType:
      return f(12, *static_cast<T&&>(t).unionType_ref());
    case Union::Type::exceptionType:
      return f(13, *static_cast<T&&>(t).exceptionType_ref());
    case Union::Type::listType:
      return f(14, *static_cast<T&&>(t).listType_ref());
    case Union::Type::setType:
      return f(15, *static_cast<T&&>(t).setType_ref());
    case Union::Type::mapType:
      return f(16, *static_cast<T&&>(t).mapType_ref());
    case Union::Type::__EMPTY__:
      return decltype(f(0, *static_cast<T&&>(t).boolType_ref()))();
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
