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/lib/cpp2/gen/module_types_h.h>
  
  
  #include "thrift/compiler/test/fixtures/basic-structured-annotations/gen-cpp2/included_types.h"
  #include "thrift/compiler/test/fixtures/basic-structured-annotations/gen-cpp2/namespaced_types.h"
  
  namespace apache {
  namespace thrift {
  namespace tag {
  struct count;
  struct name;
  struct name;
  struct count;
  struct name;
  struct recurse;
  struct forward;
  struct name;
  struct nest;
  struct annotated_field;
  struct annotated_type;
  struct annotated_recursive;
  struct annotated_nested;
  struct context;
  struct first;
  struct second;
  } // namespace tag
  namespace detail {
  #ifndef APACHE_THRIFT_ACCESSOR_count
  #define APACHE_THRIFT_ACCESSOR_count
  APACHE_THRIFT_DEFINE_ACCESSOR(count);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_name
  #define APACHE_THRIFT_ACCESSOR_name
  APACHE_THRIFT_DEFINE_ACCESSOR(name);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_name
  #define APACHE_THRIFT_ACCESSOR_name
  APACHE_THRIFT_DEFINE_ACCESSOR(name);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_count
  #define APACHE_THRIFT_ACCESSOR_count
  APACHE_THRIFT_DEFINE_ACCESSOR(count);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_name
  #define APACHE_THRIFT_ACCESSOR_name
  APACHE_THRIFT_DEFINE_ACCESSOR(name);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_recurse
  #define APACHE_THRIFT_ACCESSOR_recurse
  APACHE_THRIFT_DEFINE_ACCESSOR(recurse);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_forward
  #define APACHE_THRIFT_ACCESSOR_forward
  APACHE_THRIFT_DEFINE_ACCESSOR(forward);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_name
  #define APACHE_THRIFT_ACCESSOR_name
  APACHE_THRIFT_DEFINE_ACCESSOR(name);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_nest
  #define APACHE_THRIFT_ACCESSOR_nest
  APACHE_THRIFT_DEFINE_ACCESSOR(nest);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_annotated_field
  #define APACHE_THRIFT_ACCESSOR_annotated_field
  APACHE_THRIFT_DEFINE_ACCESSOR(annotated_field);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_annotated_type
  #define APACHE_THRIFT_ACCESSOR_annotated_type
  APACHE_THRIFT_DEFINE_ACCESSOR(annotated_type);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_annotated_recursive
  #define APACHE_THRIFT_ACCESSOR_annotated_recursive
  APACHE_THRIFT_DEFINE_ACCESSOR(annotated_recursive);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_annotated_nested
  #define APACHE_THRIFT_ACCESSOR_annotated_nested
  APACHE_THRIFT_DEFINE_ACCESSOR(annotated_nested);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_context
  #define APACHE_THRIFT_ACCESSOR_context
  APACHE_THRIFT_DEFINE_ACCESSOR(context);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_first
  #define APACHE_THRIFT_ACCESSOR_first
  APACHE_THRIFT_DEFINE_ACCESSOR(first);
  #endif
  #ifndef APACHE_THRIFT_ACCESSOR_second
  #define APACHE_THRIFT_ACCESSOR_second
  APACHE_THRIFT_DEFINE_ACCESSOR(second);
  #endif
  } // namespace detail
  } // namespace thrift
  } // namespace apache
  
  // BEGIN declare_enums
  namespace cpp2 {
  
  enum class MyEnum {
    UNKNOWN = 0,
    ONE = 1,
  };
  
  
  
  
  } // cpp2
  
  namespace std {
  template<> struct hash<::cpp2::MyEnum> :
    ::apache::thrift::detail::enum_hash<::cpp2::MyEnum> {};
  } // std
  
  namespace apache { namespace thrift {
  
  
  template <> struct TEnumDataStorage<::cpp2::MyEnum>;
  
  template <> struct TEnumTraits<::cpp2::MyEnum> {
    using type = ::cpp2::MyEnum;
  
    static constexpr std::size_t const size = 2;
    static folly::Range<type const*> const values;
    static folly::Range<folly::StringPiece const*> const names;
  
    static char const* findName(type value);
    static bool findValue(char const* name, type* out);
  
    static constexpr type min() { return type::UNKNOWN; }
    static constexpr type max() { return type::ONE; }
  };
  
  
  }} // apache::thrift
  
  namespace cpp2 {
  
  using _MyEnum_EnumMapFactory = apache::thrift::detail::TEnumMapFactory<MyEnum>;
  [[deprecated("use apache::thrift::util::enumNameSafe, apache::thrift::util::enumName, or apache::thrift::TEnumTraits")]]
  extern const _MyEnum_EnumMapFactory::ValuesToNamesMapType _MyEnum_VALUES_TO_NAMES;
  [[deprecated("use apache::thrift::TEnumTraits")]]
  extern const _MyEnum_EnumMapFactory::NamesToValuesMapType _MyEnum_NAMES_TO_VALUES;
  
  } // cpp2
  
  // END declare_enums
  // BEGIN forward_declare
  namespace cpp2 {
  class structured_annotation_inline;
  class structured_annotation_with_default;
  class structured_annotation_forward;
  class structured_annotation_recursive;
  class structured_annotation_nested;
  class MyStruct;
  class MyException;
  class MyUnion;
  } // cpp2
  // END forward_declare
  // BEGIN typedefs
  namespace cpp2 {
  typedef ::std::string annotated_with_default_string;
  typedef ::std::string annotated_inline_string;
  typedef ::std::int64_t annotated_inline_i64;
  
  } // cpp2
  // END typedefs
  // BEGIN hash_and_equal_to
  // END hash_and_equal_to
  THRIFT_IGNORE_ISSET_USE_WARNING_BEGIN
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class structured_annotation_inline final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = structured_annotation_inline;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    structured_annotation_inline() :
        count(0),
        name(apache::thrift::StringTraits<std::string>::fromStringLiteral("abacaba")) {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    structured_annotation_inline(apache::thrift::FragileConstructor, ::std::int64_t count__arg, ::std::string name__arg);
  
    structured_annotation_inline(structured_annotation_inline&&) noexcept;
  
    structured_annotation_inline(const structured_annotation_inline& src);
  
  
    structured_annotation_inline& operator=(structured_annotation_inline&&) noexcept;
    structured_annotation_inline& operator=(const structured_annotation_inline& src);
    void __clear();
   private:
    ::std::int64_t count;
   private:
    ::std::string name;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool count;
      bool name;
    } __isset = {};
  
    bool operator==(const structured_annotation_inline&) const;
    bool operator<(const structured_annotation_inline&) const;
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> count_ref() const& {
      return {this->count, __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> count_ref() const&& {
      return {std::move(this->count), __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> count_ref() & {
      return {this->count, __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> count_ref() && {
      return {std::move(this->count), __isset.count};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
      return {std::move(this->name), __isset.name};
    }
  
    ::std::int64_t get_count() const {
      return count;
    }
  
    [[deprecated("Use `FOO.count_ref() = BAR;` instead of `FOO.set_count(BAR);`")]]
    ::std::int64_t& set_count(::std::int64_t count_) {
      count = count_;
      __isset.count = true;
      return count;
    }
  
    const ::std::string& get_name() const& {
      return name;
    }
  
    ::std::string get_name() && {
      return std::move(name);
    }
  
    template <typename T_structured_annotation_inline_name_struct_setter = ::std::string>
    [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
    ::std::string& set_name(T_structured_annotation_inline_name_struct_setter&& name_) {
      name = std::forward<T_structured_annotation_inline_name_struct_setter>(name_);
      __isset.name = true;
      return name;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<structured_annotation_inline>;
    friend void swap(structured_annotation_inline& a, structured_annotation_inline& b);
  };
  
  template <class Protocol_>
  uint32_t structured_annotation_inline::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class structured_annotation_with_default final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = structured_annotation_with_default;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    structured_annotation_with_default() :
        name(apache::thrift::StringTraits<std::string>::fromStringLiteral("abacabadabacaba")) {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    structured_annotation_with_default(apache::thrift::FragileConstructor, ::std::string name__arg);
  
    structured_annotation_with_default(structured_annotation_with_default&&) noexcept;
  
    structured_annotation_with_default(const structured_annotation_with_default& src);
  
  
    structured_annotation_with_default& operator=(structured_annotation_with_default&&) noexcept;
    structured_annotation_with_default& operator=(const structured_annotation_with_default& src);
    void __clear();
   private:
    ::std::string name;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool name;
    } __isset = {};
  
    bool operator==(const structured_annotation_with_default&) const;
    bool operator<(const structured_annotation_with_default&) const;
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
      return {std::move(this->name), __isset.name};
    }
  
    const ::std::string& get_name() const& {
      return name;
    }
  
    ::std::string get_name() && {
      return std::move(name);
    }
  
    template <typename T_structured_annotation_with_default_name_struct_setter = ::std::string>
    [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
    ::std::string& set_name(T_structured_annotation_with_default_name_struct_setter&& name_) {
      name = std::forward<T_structured_annotation_with_default_name_struct_setter>(name_);
      __isset.name = true;
      return name;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<structured_annotation_with_default>;
    friend void swap(structured_annotation_with_default& a, structured_annotation_with_default& b);
  };
  
  template <class Protocol_>
  uint32_t structured_annotation_with_default::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class structured_annotation_forward final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = structured_annotation_forward;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    structured_annotation_forward() :
        count(0) {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    structured_annotation_forward(apache::thrift::FragileConstructor, ::std::int64_t count__arg);
  
    structured_annotation_forward(structured_annotation_forward&&) = default;
  
    structured_annotation_forward(const structured_annotation_forward&) = default;
  
  
    structured_annotation_forward& operator=(structured_annotation_forward&&) = default;
  
    structured_annotation_forward& operator=(const structured_annotation_forward&) = default;
    void __clear();
   private:
    ::std::int64_t count;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool count;
    } __isset = {};
  
    bool operator==(const structured_annotation_forward&) const;
    bool operator<(const structured_annotation_forward&) const;
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> count_ref() const& {
      return {this->count, __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> count_ref() const&& {
      return {std::move(this->count), __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> count_ref() & {
      return {this->count, __isset.count};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> count_ref() && {
      return {std::move(this->count), __isset.count};
    }
  
    ::std::int64_t get_count() const {
      return count;
    }
  
    [[deprecated("Use `FOO.count_ref() = BAR;` instead of `FOO.set_count(BAR);`")]]
    ::std::int64_t& set_count(::std::int64_t count_) {
      count = count_;
      __isset.count = true;
      return count;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<structured_annotation_forward>;
    friend void swap(structured_annotation_forward& a, structured_annotation_forward& b);
  };
  
  template <class Protocol_>
  uint32_t structured_annotation_forward::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class structured_annotation_recursive final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = structured_annotation_recursive;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    structured_annotation_recursive() {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    structured_annotation_recursive(apache::thrift::FragileConstructor, ::std::string name__arg, ::cpp2::structured_annotation_recursive recurse__arg, ::cpp2::structured_annotation_forward forward__arg);
  
    structured_annotation_recursive(structured_annotation_recursive&&) noexcept;
  
    structured_annotation_recursive(const structured_annotation_recursive& src);
  
  
    structured_annotation_recursive& operator=(structured_annotation_recursive&&) noexcept;
    structured_annotation_recursive& operator=(const structured_annotation_recursive& src);
    void __clear();
   private:
    ::std::string name;
   private:
    ::cpp2::structured_annotation_recursive recurse;
   private:
    ::cpp2::structured_annotation_forward forward;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool name;
      bool recurse;
      bool forward;
    } __isset = {};
  
    bool operator==(const structured_annotation_recursive&) const;
    bool operator<(const structured_annotation_recursive&) const;
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_recursive>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> recurse_ref() const& {
      return {this->recurse, __isset.recurse};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_recursive>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> recurse_ref() const&& {
      return {std::move(this->recurse), __isset.recurse};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_recursive>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> recurse_ref() & {
      return {this->recurse, __isset.recurse};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_recursive>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> recurse_ref() && {
      return {std::move(this->recurse), __isset.recurse};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_forward>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> forward_ref() const& {
      return {this->forward, __isset.forward};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_forward>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> forward_ref() const&& {
      return {std::move(this->forward), __isset.forward};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_forward>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> forward_ref() & {
      return {this->forward, __isset.forward};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_forward>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> forward_ref() && {
      return {std::move(this->forward), __isset.forward};
    }
  
    const ::std::string& get_name() const& {
      return name;
    }
  
    ::std::string get_name() && {
      return std::move(name);
    }
  
    template <typename T_structured_annotation_recursive_name_struct_setter = ::std::string>
    [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
    ::std::string& set_name(T_structured_annotation_recursive_name_struct_setter&& name_) {
      name = std::forward<T_structured_annotation_recursive_name_struct_setter>(name_);
      __isset.name = true;
      return name;
    }
    const ::cpp2::structured_annotation_recursive& get_recurse() const&;
    ::cpp2::structured_annotation_recursive get_recurse() &&;
  
    template <typename T_structured_annotation_recursive_recurse_struct_setter = ::cpp2::structured_annotation_recursive>
    [[deprecated("Use `FOO.recurse_ref() = BAR;` instead of `FOO.set_recurse(BAR);`")]]
    ::cpp2::structured_annotation_recursive& set_recurse(T_structured_annotation_recursive_recurse_struct_setter&& recurse_) {
      recurse = std::forward<T_structured_annotation_recursive_recurse_struct_setter>(recurse_);
      __isset.recurse = true;
      return recurse;
    }
    const ::cpp2::structured_annotation_forward& get_forward() const&;
    ::cpp2::structured_annotation_forward get_forward() &&;
  
    template <typename T_structured_annotation_recursive_forward_struct_setter = ::cpp2::structured_annotation_forward>
    [[deprecated("Use `FOO.forward_ref() = BAR;` instead of `FOO.set_forward(BAR);`")]]
    ::cpp2::structured_annotation_forward& set_forward(T_structured_annotation_recursive_forward_struct_setter&& forward_) {
      forward = std::forward<T_structured_annotation_recursive_forward_struct_setter>(forward_);
      __isset.forward = true;
      return forward;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<structured_annotation_recursive>;
    friend void swap(structured_annotation_recursive& a, structured_annotation_recursive& b);
  };
  
  template <class Protocol_>
  uint32_t structured_annotation_recursive::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class structured_annotation_nested final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = structured_annotation_nested;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    structured_annotation_nested() {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    structured_annotation_nested(apache::thrift::FragileConstructor, ::std::string name__arg, ::cpp2::structured_annotation_with_default nest__arg);
  
    structured_annotation_nested(structured_annotation_nested&&) noexcept;
  
    structured_annotation_nested(const structured_annotation_nested& src);
  
  
    structured_annotation_nested& operator=(structured_annotation_nested&&) noexcept;
    structured_annotation_nested& operator=(const structured_annotation_nested& src);
    void __clear();
   private:
    ::std::string name;
   private:
    ::cpp2::structured_annotation_with_default nest;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool name;
      bool nest;
    } __isset = {};
  
    bool operator==(const structured_annotation_nested&) const;
    bool operator<(const structured_annotation_nested&) const;
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
      return {this->name, __isset.name};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
      return {std::move(this->name), __isset.name};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_with_default>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> nest_ref() const& {
      return {this->nest, __isset.nest};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_with_default>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> nest_ref() const&& {
      return {std::move(this->nest), __isset.nest};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_with_default>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> nest_ref() & {
      return {this->nest, __isset.nest};
    }
  
    template <typename..., typename T = ::cpp2::structured_annotation_with_default>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> nest_ref() && {
      return {std::move(this->nest), __isset.nest};
    }
  
    const ::std::string& get_name() const& {
      return name;
    }
  
    ::std::string get_name() && {
      return std::move(name);
    }
  
    template <typename T_structured_annotation_nested_name_struct_setter = ::std::string>
    [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
    ::std::string& set_name(T_structured_annotation_nested_name_struct_setter&& name_) {
      name = std::forward<T_structured_annotation_nested_name_struct_setter>(name_);
      __isset.name = true;
      return name;
    }
    const ::cpp2::structured_annotation_with_default& get_nest() const&;
    ::cpp2::structured_annotation_with_default get_nest() &&;
  
    template <typename T_structured_annotation_nested_nest_struct_setter = ::cpp2::structured_annotation_with_default>
    [[deprecated("Use `FOO.nest_ref() = BAR;` instead of `FOO.set_nest(BAR);`")]]
    ::cpp2::structured_annotation_with_default& set_nest(T_structured_annotation_nested_nest_struct_setter&& nest_) {
      nest = std::forward<T_structured_annotation_nested_nest_struct_setter>(nest_);
      __isset.nest = true;
      return nest;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<structured_annotation_nested>;
    friend void swap(structured_annotation_nested& a, structured_annotation_nested& b);
  };
  
  template <class Protocol_>
  uint32_t structured_annotation_nested::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class MyStruct final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = MyStruct;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    MyStruct() :
        annotated_field(0),
        annotated_nested(0) {
    }
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    MyStruct(apache::thrift::FragileConstructor, ::std::int64_t annotated_field__arg, ::cpp2::annotated_inline_string annotated_type__arg, ::std::string annotated_recursive__arg, ::std::int64_t annotated_nested__arg);
  
    MyStruct(MyStruct&&) noexcept;
  
    MyStruct(const MyStruct& src);
  
  
    MyStruct& operator=(MyStruct&&) noexcept;
    MyStruct& operator=(const MyStruct& src);
    void __clear();
   private:
    ::std::int64_t annotated_field;
   private:
    ::cpp2::annotated_inline_string annotated_type;
   private:
    ::std::string annotated_recursive;
   private:
    ::std::int64_t annotated_nested;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool annotated_field;
      bool annotated_type;
      bool annotated_recursive;
      bool annotated_nested;
    } __isset = {};
  
    bool operator==(const MyStruct&) const;
    bool operator<(const MyStruct&) const;
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> annotated_field_ref() const& {
      return {this->annotated_field, __isset.annotated_field};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> annotated_field_ref() const&& {
      return {std::move(this->annotated_field), __isset.annotated_field};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> annotated_field_ref() & {
      return {this->annotated_field, __isset.annotated_field};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> annotated_field_ref() && {
      return {std::move(this->annotated_field), __isset.annotated_field};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> annotated_type_ref() const& {
      return {this->annotated_type, __isset.annotated_type};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> annotated_type_ref() const&& {
      return {std::move(this->annotated_type), __isset.annotated_type};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> annotated_type_ref() & {
      return {this->annotated_type, __isset.annotated_type};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> annotated_type_ref() && {
      return {std::move(this->annotated_type), __isset.annotated_type};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> annotated_recursive_ref() const& {
      return {this->annotated_recursive, __isset.annotated_recursive};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> annotated_recursive_ref() const&& {
      return {std::move(this->annotated_recursive), __isset.annotated_recursive};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> annotated_recursive_ref() & {
      return {this->annotated_recursive, __isset.annotated_recursive};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> annotated_recursive_ref() && {
      return {std::move(this->annotated_recursive), __isset.annotated_recursive};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> annotated_nested_ref() const& {
      return {this->annotated_nested, __isset.annotated_nested};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> annotated_nested_ref() const&& {
      return {std::move(this->annotated_nested), __isset.annotated_nested};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> annotated_nested_ref() & {
      return {this->annotated_nested, __isset.annotated_nested};
    }
  
    template <typename..., typename T = ::std::int64_t>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> annotated_nested_ref() && {
      return {std::move(this->annotated_nested), __isset.annotated_nested};
    }
  
    ::std::int64_t get_annotated_field() const {
      return annotated_field;
    }
  
    [[deprecated("Use `FOO.annotated_field_ref() = BAR;` instead of `FOO.set_annotated_field(BAR);`")]]
    ::std::int64_t& set_annotated_field(::std::int64_t annotated_field_) {
      annotated_field = annotated_field_;
      __isset.annotated_field = true;
      return annotated_field;
    }
  
    const ::cpp2::annotated_inline_string& get_annotated_type() const& {
      return annotated_type;
    }
  
    ::cpp2::annotated_inline_string get_annotated_type() && {
      return std::move(annotated_type);
    }
  
    template <typename T_MyStruct_annotated_type_struct_setter = ::cpp2::annotated_inline_string>
    [[deprecated("Use `FOO.annotated_type_ref() = BAR;` instead of `FOO.set_annotated_type(BAR);`")]]
    ::cpp2::annotated_inline_string& set_annotated_type(T_MyStruct_annotated_type_struct_setter&& annotated_type_) {
      annotated_type = std::forward<T_MyStruct_annotated_type_struct_setter>(annotated_type_);
      __isset.annotated_type = true;
      return annotated_type;
    }
  
    const ::std::string& get_annotated_recursive() const& {
      return annotated_recursive;
    }
  
    ::std::string get_annotated_recursive() && {
      return std::move(annotated_recursive);
    }
  
    template <typename T_MyStruct_annotated_recursive_struct_setter = ::std::string>
    [[deprecated("Use `FOO.annotated_recursive_ref() = BAR;` instead of `FOO.set_annotated_recursive(BAR);`")]]
    ::std::string& set_annotated_recursive(T_MyStruct_annotated_recursive_struct_setter&& annotated_recursive_) {
      annotated_recursive = std::forward<T_MyStruct_annotated_recursive_struct_setter>(annotated_recursive_);
      __isset.annotated_recursive = true;
      return annotated_recursive;
    }
  
    ::std::int64_t get_annotated_nested() const {
      return annotated_nested;
    }
  
    [[deprecated("Use `FOO.annotated_nested_ref() = BAR;` instead of `FOO.set_annotated_nested(BAR);`")]]
    ::std::int64_t& set_annotated_nested(::std::int64_t annotated_nested_) {
      annotated_nested = annotated_nested_;
      __isset.annotated_nested = true;
      return annotated_nested;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<MyStruct>;
    friend void swap(MyStruct& a, MyStruct& b);
  };
  
  template <class Protocol_>
  uint32_t MyStruct::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class MyException final : public apache::thrift::TException {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
    static constexpr ::apache::thrift::ExceptionKind __fbthrift_cpp2_gen_exception_kind =
           ::apache::thrift::ExceptionKind::UNSPECIFIED;
    static constexpr ::apache::thrift::ExceptionSafety __fbthrift_cpp2_gen_exception_safety =
           ::apache::thrift::ExceptionSafety::UNSPECIFIED;
    static constexpr ::apache::thrift::ExceptionBlame __fbthrift_cpp2_gen_exception_blame =
           ::apache::thrift::ExceptionBlame::UNSPECIFIED;
  
   public:
    using __fbthrift_cpp2_type = MyException;
    static constexpr bool __fbthrift_cpp2_is_union =
      false;
  
  
   public:
  
    MyException();
  
    // FragileConstructor for use in initialization lists only.
    [[deprecated("This constructor is deprecated")]]
    MyException(apache::thrift::FragileConstructor, ::std::string context__arg);
  
    MyException(MyException&&) noexcept;
  
    MyException(const MyException& src);
  
  
    MyException& operator=(MyException&&) noexcept;
    MyException& operator=(const MyException& src);
    void __clear();
  
    ~MyException() override;
  
   private:
    ::std::string context;
  
   public:
    [[deprecated("__isset field is deprecated in Thrift struct. Use _ref() accessors instead.")]]
    struct __isset {
      bool context;
    } __isset = {};
  
    bool operator==(const MyException&) const;
    bool operator<(const MyException&) const;
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&> context_ref() const& {
      return {this->context, __isset.context};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<const T&&> context_ref() const&& {
      return {std::move(this->context), __isset.context};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&> context_ref() & {
      return {this->context, __isset.context};
    }
  
    template <typename..., typename T = ::std::string>
    FOLLY_ERASE ::apache::thrift::field_ref<T&&> context_ref() && {
      return {std::move(this->context), __isset.context};
    }
  
    const ::std::string& get_context() const& {
      return context;
    }
  
    ::std::string get_context() && {
      return std::move(context);
    }
  
    template <typename T_MyException_context_struct_setter = ::std::string>
    [[deprecated("Use `FOO.context_ref() = BAR;` instead of `FOO.set_context(BAR);`")]]
    ::std::string& set_context(T_MyException_context_struct_setter&& context_) {
      context = std::forward<T_MyException_context_struct_setter>(context_);
      __isset.context = true;
      return context;
    }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
  
    const char* what() const noexcept override {
      return "::cpp2::MyException";
    }
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<MyException>;
    friend void swap(MyException& a, MyException& b);
  };
  
  template <class Protocol_>
  uint32_t MyException::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  namespace cpp2 {
  #ifndef SWIG
  using ::apache::thrift::detail::operator!=;
  using ::apache::thrift::detail::operator>;
  using ::apache::thrift::detail::operator<=;
  using ::apache::thrift::detail::operator>=;
  #endif
  
  class MyUnion final  {
   private:
    friend struct ::apache::thrift::detail::st::struct_private_access;
  
    //  used by a static_assert in the corresponding source
    static constexpr bool __fbthrift_cpp2_gen_json = false;
    static constexpr bool __fbthrift_cpp2_gen_nimble = false;
    static constexpr bool __fbthrift_cpp2_gen_has_thrift_uri = false;
  
   public:
    using __fbthrift_cpp2_type = MyUnion;
    static constexpr bool __fbthrift_cpp2_is_union =
      true;
  
  
   public:
    enum Type : int {
      __EMPTY__ = 0,
      first = 1,
      second = 2,
    } ;
  
    MyUnion()
        : type_(Type::__EMPTY__) {}
  
    MyUnion(MyUnion&& rhs) noexcept
        : type_(Type::__EMPTY__) {
      if (this == &rhs) { return; }
      if (rhs.type_ == Type::__EMPTY__) { return; }
      switch (rhs.type_) {
        case Type::first:
        {
          set_first(std::move(rhs.value_.first));
          break;
        }
        case Type::second:
        {
          set_second(std::move(rhs.value_.second));
          break;
        }
        default:
        {
          assert(false);
          break;
        }
      }
      rhs.__clear();
    }
  
    MyUnion(const MyUnion& rhs)
        : type_(Type::__EMPTY__) {
      if (this == &rhs) { return; }
      if (rhs.type_ == Type::__EMPTY__) { return; }
      switch (rhs.type_) {
        case Type::first:
        {
          set_first(rhs.value_.first);
          break;
        }
        case Type::second:
        {
          set_second(rhs.value_.second);
          break;
        }
        default:
        {
          assert(false);
          break;
        }
      }
    }
  
    MyUnion& operator=(MyUnion&& rhs) noexcept {
      if (this == &rhs) { return *this; }
      __clear();
      if (rhs.type_ == Type::__EMPTY__) { return *this; }
      switch (rhs.type_) {
        case Type::first:
        {
          set_first(std::move(rhs.value_.first));
          break;
        }
        case Type::second:
        {
          set_second(std::move(rhs.value_.second));
          break;
        }
        default:
        {
          assert(false);
          break;
        }
      }
      rhs.__clear();
      return *this;
    }
  
    MyUnion& operator=(const MyUnion& rhs) {
      if (this == &rhs) { return *this; }
      __clear();
      if (rhs.type_ == Type::__EMPTY__) { return *this; }
      switch (rhs.type_) {
        case Type::first:
        {
          set_first(rhs.value_.first);
          break;
        }
        case Type::second:
        {
          set_second(rhs.value_.second);
          break;
        }
        default:
        {
          assert(false);
          break;
        }
      }
      return *this;
    }
    void __clear();
  
    ~MyUnion() {
      __clear();
    }
    union storage_type {
      ::cpp2::annotated_inline_string first;
      ::cpp2::annotated_inline_i64 second;
  
      storage_type() {}
      ~storage_type() {}
    } ;
  
    bool operator==(const MyUnion&) const;
    bool operator<(const MyUnion&) const;
  
    ::cpp2::annotated_inline_string& set_first(::cpp2::annotated_inline_string const &t) {
      __clear();
      type_ = Type::first;
      ::new (std::addressof(value_.first)) ::cpp2::annotated_inline_string(t);
      return value_.first;
    }
  
    ::cpp2::annotated_inline_string& set_first(::cpp2::annotated_inline_string&& t) {
      __clear();
      type_ = Type::first;
      ::new (std::addressof(value_.first)) ::cpp2::annotated_inline_string(std::move(t));
      return value_.first;
    }
  
    template<typename... T, typename = ::apache::thrift::safe_overload_t<::cpp2::annotated_inline_string, T...>> ::cpp2::annotated_inline_string& set_first(T&&... t) {
      __clear();
      type_ = Type::first;
      ::new (std::addressof(value_.first)) ::cpp2::annotated_inline_string(std::forward<T>(t)...);
      return value_.first;
    }
  
    ::cpp2::annotated_inline_i64& set_second(::cpp2::annotated_inline_i64 t = ::cpp2::annotated_inline_i64()) {
      __clear();
      type_ = Type::second;
      ::new (std::addressof(value_.second)) ::cpp2::annotated_inline_i64(t);
      return value_.second;
    }
  
    ::cpp2::annotated_inline_string const& get_first() const {
      if (type_ != Type::first) {
        ::apache::thrift::detail::throw_on_bad_field_access();
      }
      return value_.first;
    }
  
    ::cpp2::annotated_inline_i64 const& get_second() const {
      if (type_ != Type::second) {
        ::apache::thrift::detail::throw_on_bad_field_access();
      }
      return value_.second;
    }
  
    ::cpp2::annotated_inline_string& mutable_first() {
      assert(type_ == Type::first);
      return value_.first;
    }
  
    ::cpp2::annotated_inline_i64& mutable_second() {
      assert(type_ == Type::second);
      return value_.second;
    }
  
    ::cpp2::annotated_inline_string move_first() {
      assert(type_ == Type::first);
      return std::move(value_.first);
    }
  
    ::cpp2::annotated_inline_i64 move_second() {
      assert(type_ == Type::second);
      return std::move(value_.second);
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> first_ref() const& {
      return {value_.first, type_, first, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> first_ref() const&& {
      return {std::move(value_.first), type_, first, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::union_field_ref<T&> first_ref() & {
      return {value_.first, type_, first, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_string>
    FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> first_ref() && {
      return {std::move(value_.first), type_, first, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
    template <typename..., typename T = ::cpp2::annotated_inline_i64>
    FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> second_ref() const& {
      return {value_.second, type_, second, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_i64>
    FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> second_ref() const&& {
      return {std::move(value_.second), type_, second, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_i64>
    FOLLY_ERASE ::apache::thrift::union_field_ref<T&> second_ref() & {
      return {value_.second, type_, second, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
  
    template <typename..., typename T = ::cpp2::annotated_inline_i64>
    FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> second_ref() && {
      return {std::move(value_.second), type_, second, this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
    }
    Type getType() const { return static_cast<Type>(type_); }
  
    template <class Protocol_>
    uint32_t read(Protocol_* iprot);
    template <class Protocol_>
    uint32_t serializedSize(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t serializedSizeZC(Protocol_ const* prot_) const;
    template <class Protocol_>
    uint32_t write(Protocol_* prot_) const;
   protected:
    template <class T>
    void destruct(T &val) {
      (&val)->~T();
    }
  
    storage_type value_;
    std::underlying_type_t<Type> type_;
  
   private:
    template <class Protocol_>
    void readNoXfer(Protocol_* iprot);
  
    friend class ::apache::thrift::Cpp2Ops<MyUnion>;
    friend void swap(MyUnion& a, MyUnion& b);
  };
  
  template <class Protocol_>
  uint32_t MyUnion::read(Protocol_* iprot) {
    auto _xferStart = iprot->getCursorPosition();
    readNoXfer(iprot);
    return iprot->getCursorPosition() - _xferStart;
  }
  
  } // cpp2
  THRIFT_IGNORE_ISSET_USE_WARNING_END
  
  namespace apache { namespace thrift {
  
  template <> struct TEnumDataStorage<::cpp2::MyUnion::Type>;
  
  template <> struct TEnumTraits<::cpp2::MyUnion::Type> {
    using type = ::cpp2::MyUnion::Type;
  
    static constexpr std::size_t const size = 2;
    static folly::Range<type const*> const values;
    static folly::Range<folly::StringPiece const*> const names;
  
    static char const* findName(type value);
    static bool findValue(char const* name, type* out);
  
  };
  }} // apache::thrift
  