/**
 * 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/cpp2/visitation/visit_by_thrift_field_metadata.h>
#include "thrift/lib/thrift/gen-cpp2/field_mask_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

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

template <>
struct VisitByFieldId<::apache::thrift::protocol::Mask> {
  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).excludes_ref());
    case 2:
      return f(1, static_cast<T&&>(t).includes_ref());
    case 3:
      return f(2, static_cast<T&&>(t).excludes_map_ref());
    case 4:
      return f(3, static_cast<T&&>(t).includes_map_ref());
    case 5:
      return f(4, static_cast<T&&>(t).excludes_string_map_ref());
    case 6:
      return f(5, static_cast<T&&>(t).includes_string_map_ref());
    case 7:
      return f(6, static_cast<T&&>(t).excludes_type_ref());
    case 8:
      return f(7, static_cast<T&&>(t).includes_type_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::protocol::Mask");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
