/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/refs/src/module.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

#pragma once

#include <functional>
#include <folly/Range.h>

#include "thrift/compiler/test/fixtures/refs/gen-cpp2/module_data.h"
#include "thrift/compiler/test/fixtures/refs/gen-cpp2/module_types.h"
#include "thrift/compiler/test/fixtures/refs/gen-cpp2/module_metadata.h"
namespace thrift {
namespace py3 {



template<>
inline void reset_field<::cpp2::MyField>(
    ::cpp2::MyField& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.opt_value_ref().reset();
      return;
    case 1:
      obj.value_ref().reset();
      return;
    case 2:
      obj.req_value_ref().reset();
      return;
    case 3:
      obj.opt_enum_value_ref().reset();
      return;
    case 4:
      obj.enum_value_ref().reset();
      return;
    case 5:
      obj.req_enum_value_ref().reset();
      return;
    case 6:
      obj.opt_str_value_ref().reset();
      return;
    case 7:
      obj.str_value_ref().reset();
      return;
    case 8:
      obj.req_str_value_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::MyStruct>(
    ::cpp2::MyStruct& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.opt_ref_ref().reset();
      return;
    case 1:
      obj.ref_ref().reset();
      return;
    case 2:
      obj.req_ref_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithUnion>(
    ::cpp2::StructWithUnion& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.u_ref().reset();
      return;
    case 1:
      obj.aDouble_ref().reset();
      return;
    case 2:
      obj.f_ref().copy_from(default_inst<::cpp2::StructWithUnion>().f_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::RecursiveStruct>(
    ::cpp2::RecursiveStruct& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.mes_ref().copy_from(default_inst<::cpp2::RecursiveStruct>().mes_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithContainers>(
    ::cpp2::StructWithContainers& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.list_ref_ref().reset();
      return;
    case 1:
      obj.set_ref_ref().reset();
      return;
    case 2:
      obj.map_ref_ref().reset();
      return;
    case 3:
      obj.list_ref_unique_ref().reset();
      return;
    case 4:
      obj.set_ref_shared_ref().reset();
      return;
    case 5:
      obj.list_ref_shared_const_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithSharedConst>(
    ::cpp2::StructWithSharedConst& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.opt_shared_const_ref().reset();
      return;
    case 1:
      obj.shared_const_ref().reset();
      return;
    case 2:
      obj.req_shared_const_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::Empty>(
    ::cpp2::Empty& obj, uint16_t index) {
  switch (index) {
  }
}

template<>
inline void reset_field<::cpp2::StructWithRef>(
    ::cpp2::StructWithRef& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_field_ref().reset();
      return;
    case 1:
      obj.opt_field_ref().reset();
      return;
    case 2:
      obj.req_field_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithBox>(
    ::cpp2::StructWithBox& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.a_ref().copy_from(default_inst<::cpp2::StructWithBox>().a_ref());
      return;
    case 1:
      obj.b_ref().copy_from(default_inst<::cpp2::StructWithBox>().b_ref());
      return;
    case 2:
      obj.c_ref().copy_from(default_inst<::cpp2::StructWithBox>().c_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithInternBox>(
    ::cpp2::StructWithInternBox& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.field1_ref().copy_from(default_inst<::cpp2::StructWithInternBox>().field1_ref());
      return;
    case 1:
      obj.field2_ref().copy_from(default_inst<::cpp2::StructWithInternBox>().field2_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithTerseInternBox>(
    ::cpp2::StructWithTerseInternBox& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.field1_ref().copy_from(default_inst<::cpp2::StructWithTerseInternBox>().field1_ref());
      return;
    case 1:
      obj.field2_ref().copy_from(default_inst<::cpp2::StructWithTerseInternBox>().field2_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::AdaptedStructWithInternBox>(
    ::cpp2::AdaptedStructWithInternBox& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.field1_ref().copy_from(default_inst<::cpp2::AdaptedStructWithInternBox>().field1_ref());
      return;
    case 1:
      obj.field2_ref().copy_from(default_inst<::cpp2::AdaptedStructWithInternBox>().field2_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::AdaptedStructWithTerseInternBox>(
    ::cpp2::AdaptedStructWithTerseInternBox& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.field1_ref().copy_from(default_inst<::cpp2::AdaptedStructWithTerseInternBox>().field1_ref());
      return;
    case 1:
      obj.field2_ref().copy_from(default_inst<::cpp2::AdaptedStructWithTerseInternBox>().field2_ref());
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithRefTypeUnique>(
    ::cpp2::StructWithRefTypeUnique& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_field_ref().reset();
      return;
    case 1:
      obj.opt_field_ref().reset();
      return;
    case 2:
      obj.req_field_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithRefTypeShared>(
    ::cpp2::StructWithRefTypeShared& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_field_ref().reset();
      return;
    case 1:
      obj.opt_field_ref().reset();
      return;
    case 2:
      obj.req_field_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithRefTypeSharedConst>(
    ::cpp2::StructWithRefTypeSharedConst& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_field_ref().reset();
      return;
    case 1:
      obj.opt_field_ref().reset();
      return;
    case 2:
      obj.req_field_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithRefAndAnnotCppNoexceptMoveCtor>(
    ::cpp2::StructWithRefAndAnnotCppNoexceptMoveCtor& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_field_ref().reset();
      return;
  }
}

template<>
inline void reset_field<::cpp2::StructWithString>(
    ::cpp2::StructWithString& obj, uint16_t index) {
  switch (index) {
    case 0:
      obj.def_unique_string_ref_ref().reset();
      return;
    case 1:
      obj.def_shared_string_ref_ref().reset();
      return;
    case 2:
      obj.def_shared_string_const_ref_ref().reset();
      return;
    case 3:
      obj.unique_string_ref_ref().reset();
      return;
    case 4:
      obj.shared_string_ref_ref().reset();
      return;
  }
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::MyUnion>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::NonTriviallyDestructibleUnion>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::MyField>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::MyStruct>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithUnion>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::RecursiveStruct>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithContainers>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithSharedConst>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::Empty>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithRef>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithBox>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithInternBox>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithTerseInternBox>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::AdaptedStructWithInternBox>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::AdaptedStructWithTerseInternBox>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithRefTypeUnique>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithRefTypeShared>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithRefTypeSharedConst>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithRefAndAnnotCppNoexceptMoveCtor>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}

template<>
inline const std::unordered_map<std::string_view, std::string_view>& PyStructTraits<
    ::cpp2::StructWithString>::namesmap() {
  static const folly::Indestructible<NamesMap> map {
    {
    }
  };
  return *map;
}
} // namespace py3
} // namespace thrift
