text: /**
   * Autogenerated by Thrift for src/module.thrift
   *
   * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
   *  @generated
   */
  #pragma once
  
  #include "thrift/compiler/test/fixtures/optionals/gen-cpp2/module_metadata.h"
  #include <thrift/lib/cpp2/visitation/for_each.h>
  
  namespace apache {
  namespace thrift {
  namespace detail {
  
  template <>
  struct ForEachField<::cpp2::Color> {
    template <typename F, typename... T>
    void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
      FOLLY_MAYBE_UNUSED constexpr auto get_metadata =
          get_field_metadata<::cpp2::Color>;
  
      f(get_metadata(0), static_cast<T&&>(t).red_ref()...);
      f(get_metadata(1), static_cast<T&&>(t).green_ref()...);
      f(get_metadata(2), static_cast<T&&>(t).blue_ref()...);
      f(get_metadata(3), static_cast<T&&>(t).alpha_ref()...);
    }
  };
  
  template <>
  struct ForEachField<::cpp2::Vehicle> {
    template <typename F, typename... T>
    void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
      FOLLY_MAYBE_UNUSED constexpr auto get_metadata =
          get_field_metadata<::cpp2::Vehicle>;
  
      f(get_metadata(0), static_cast<T&&>(t).color_ref()...);
      f(get_metadata(1), static_cast<T&&>(t).licensePlate_ref()...);
      f(get_metadata(2), static_cast<T&&>(t).description_ref()...);
      f(get_metadata(3), static_cast<T&&>(t).name_ref()...);
      f(get_metadata(4), static_cast<T&&>(t).hasAC_ref()...);
    }
  };
  
  template <>
  struct ForEachField<::cpp2::Person> {
    template <typename F, typename... T>
    void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
      FOLLY_MAYBE_UNUSED constexpr auto get_metadata =
          get_field_metadata<::cpp2::Person>;
  
      f(get_metadata(0), static_cast<T&&>(t).id_ref()...);
      f(get_metadata(1), static_cast<T&&>(t).name_ref()...);
      f(get_metadata(2), static_cast<T&&>(t).age_ref()...);
      f(get_metadata(3), static_cast<T&&>(t).address_ref()...);
      f(get_metadata(4), static_cast<T&&>(t).favoriteColor_ref()...);
      f(get_metadata(5), static_cast<T&&>(t).friends_ref()...);
      f(get_metadata(6), static_cast<T&&>(t).bestFriend_ref()...);
      f(get_metadata(7), static_cast<T&&>(t).petNames_ref()...);
      f(get_metadata(8), static_cast<T&&>(t).afraidOfAnimal_ref()...);
      f(get_metadata(9), static_cast<T&&>(t).vehicles_ref()...);
    }
  };
  } // namespace detail
  } // namespace thrift
  } // namespace apache
  