/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.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/field_mask_metadata.h"
#include <thrift/lib/cpp2/visitation/visit_union.h>

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitUnion<::apache::thrift::protocol::Mask> {

  template <typename F, typename T>
  decltype(auto) operator()([[maybe_unused]] F&& f, T&& t) const {
    using Union = std::remove_reference_t<T>;
    switch (t.getType()) {
    case Union::Type::excludes:
      return f(0, *static_cast<T&&>(t).excludes_ref());
    case Union::Type::includes:
      return f(1, *static_cast<T&&>(t).includes_ref());
    case Union::Type::excludes_map:
      return f(2, *static_cast<T&&>(t).excludes_map_ref());
    case Union::Type::includes_map:
      return f(3, *static_cast<T&&>(t).includes_map_ref());
    case Union::Type::excludes_string_map:
      return f(4, *static_cast<T&&>(t).excludes_string_map_ref());
    case Union::Type::includes_string_map:
      return f(5, *static_cast<T&&>(t).includes_string_map_ref());
    case Union::Type::excludes_type:
      return f(6, *static_cast<T&&>(t).excludes_type_ref());
    case Union::Type::includes_type:
      return f(7, *static_cast<T&&>(t).includes_type_ref());
    case Union::Type::__EMPTY__:
      return decltype(f(0, *static_cast<T&&>(t).excludes_ref()))();
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
