/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/mcpp2-compare/src/extra_services.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/extra_services_types.h"
#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/extra_services_types.tcc"

#include <thrift/lib/cpp2/gen/module_types_cpp.h>

#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/extra_services_data.h"
[[maybe_unused]] static constexpr std::string_view kModuleName = "extra_services";


namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::extra::svc::containerStruct2>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::extra::svc::containerStruct2>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

} // namespace detail
} // namespace thrift
} // namespace apache

namespace extra::svc {

std::string_view containerStruct2::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<containerStruct2>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view containerStruct2::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<containerStruct2>::name;
}

containerStruct2::containerStruct2(const containerStruct2&) = default;
containerStruct2& containerStruct2::operator=(const containerStruct2&) = default;
containerStruct2::containerStruct2() :
    __fbthrift_field_fieldA(),
    __fbthrift_field_req_fieldA(),
    __fbthrift_field_opt_fieldA(),
    __fbthrift_field_fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    __fbthrift_field_req_fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    __fbthrift_field_opt_fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    __fbthrift_field_fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")),
    __fbthrift_field_req_fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")),
    __fbthrift_field_opt_fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")) {
}


containerStruct2::~containerStruct2() {}

containerStruct2::containerStruct2([[maybe_unused]] containerStruct2&& other) noexcept :
    __fbthrift_field_fieldA(std::move(other.__fbthrift_field_fieldA)),
    __fbthrift_field_req_fieldA(std::move(other.__fbthrift_field_req_fieldA)),
    __fbthrift_field_opt_fieldA(std::move(other.__fbthrift_field_opt_fieldA)),
    __fbthrift_field_fieldB(std::move(other.__fbthrift_field_fieldB)),
    __fbthrift_field_req_fieldB(std::move(other.__fbthrift_field_req_fieldB)),
    __fbthrift_field_opt_fieldB(std::move(other.__fbthrift_field_opt_fieldB)),
    __fbthrift_field_fieldC(std::move(other.__fbthrift_field_fieldC)),
    __fbthrift_field_req_fieldC(std::move(other.__fbthrift_field_req_fieldC)),
    __fbthrift_field_opt_fieldC(std::move(other.__fbthrift_field_opt_fieldC)),
    __fbthrift_field_fieldD(std::move(other.__fbthrift_field_fieldD)),
    __fbthrift_field_fieldE(std::move(other.__fbthrift_field_fieldE)),
    __fbthrift_field_req_fieldE(std::move(other.__fbthrift_field_req_fieldE)),
    __fbthrift_field_opt_fieldE(std::move(other.__fbthrift_field_opt_fieldE)),
    __isset(other.__isset) {
}

containerStruct2& containerStruct2::operator=([[maybe_unused]] containerStruct2&& other) noexcept {
    this->__fbthrift_field_fieldA = std::move(other.__fbthrift_field_fieldA);
    this->__fbthrift_field_req_fieldA = std::move(other.__fbthrift_field_req_fieldA);
    this->__fbthrift_field_opt_fieldA = std::move(other.__fbthrift_field_opt_fieldA);
    this->__fbthrift_field_fieldB = std::move(other.__fbthrift_field_fieldB);
    this->__fbthrift_field_req_fieldB = std::move(other.__fbthrift_field_req_fieldB);
    this->__fbthrift_field_opt_fieldB = std::move(other.__fbthrift_field_opt_fieldB);
    this->__fbthrift_field_fieldC = std::move(other.__fbthrift_field_fieldC);
    this->__fbthrift_field_req_fieldC = std::move(other.__fbthrift_field_req_fieldC);
    this->__fbthrift_field_opt_fieldC = std::move(other.__fbthrift_field_opt_fieldC);
    this->__fbthrift_field_fieldD = std::move(other.__fbthrift_field_fieldD);
    this->__fbthrift_field_fieldE = std::move(other.__fbthrift_field_fieldE);
    this->__fbthrift_field_req_fieldE = std::move(other.__fbthrift_field_req_fieldE);
    this->__fbthrift_field_opt_fieldE = std::move(other.__fbthrift_field_opt_fieldE);
    __isset = other.__isset;
    return *this;
}


containerStruct2::containerStruct2(apache::thrift::FragileConstructor, bool fieldA__arg, bool req_fieldA__arg, bool opt_fieldA__arg, ::std::map<::std::string, bool> fieldB__arg, ::std::map<::std::string, bool> req_fieldB__arg, ::std::map<::std::string, bool> opt_fieldB__arg, ::std::set<::std::int32_t> fieldC__arg, ::std::set<::std::int32_t> req_fieldC__arg, ::std::set<::std::int32_t> opt_fieldC__arg, ::std::string fieldD__arg, ::std::string fieldE__arg, ::std::string req_fieldE__arg, ::std::string opt_fieldE__arg) :
    __fbthrift_field_fieldA(std::move(fieldA__arg)),
    __fbthrift_field_req_fieldA(std::move(req_fieldA__arg)),
    __fbthrift_field_opt_fieldA(std::move(opt_fieldA__arg)),
    __fbthrift_field_fieldB(std::move(fieldB__arg)),
    __fbthrift_field_req_fieldB(std::move(req_fieldB__arg)),
    __fbthrift_field_opt_fieldB(std::move(opt_fieldB__arg)),
    __fbthrift_field_fieldC(std::move(fieldC__arg)),
    __fbthrift_field_req_fieldC(std::move(req_fieldC__arg)),
    __fbthrift_field_opt_fieldC(std::move(opt_fieldC__arg)),
    __fbthrift_field_fieldD(std::move(fieldD__arg)),
    __fbthrift_field_fieldE(std::move(fieldE__arg)),
    __fbthrift_field_req_fieldE(std::move(req_fieldE__arg)),
    __fbthrift_field_opt_fieldE(std::move(opt_fieldE__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
  __isset.set(folly::index_constant<2>(), true);
  __isset.set(folly::index_constant<3>(), true);
  __isset.set(folly::index_constant<4>(), true);
  __isset.set(folly::index_constant<5>(), true);
  __isset.set(folly::index_constant<6>(), true);
  __isset.set(folly::index_constant<7>(), true);
  __isset.set(folly::index_constant<8>(), true);
}


void containerStruct2::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_fieldA = bool();
  this->__fbthrift_field_req_fieldA = bool();
  this->__fbthrift_field_opt_fieldA = bool();
  this->__fbthrift_field_fieldB.clear();
  this->__fbthrift_field_req_fieldB.clear();
  this->__fbthrift_field_opt_fieldB.clear();
  this->__fbthrift_field_fieldC.clear();
  this->__fbthrift_field_req_fieldC.clear();
  this->__fbthrift_field_opt_fieldC.clear();
  this->__fbthrift_field_fieldD = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_req_fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_opt_fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  __isset = {};
}

void containerStruct2::__fbthrift_clear_terse_fields() {
}

bool containerStruct2::__fbthrift_is_empty() const {
  return false;
}

bool containerStruct2::operator==([[maybe_unused]] const containerStruct2& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool containerStruct2::operator<([[maybe_unused]] const containerStruct2& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::std::map<::std::string, bool>& containerStruct2::get_fieldB() const& {
  return __fbthrift_field_fieldB;
}

::std::map<::std::string, bool> containerStruct2::get_fieldB() && {
  return std::move(__fbthrift_field_fieldB);
}

const ::std::map<::std::string, bool>& containerStruct2::get_req_fieldB() const& {
  return __fbthrift_field_req_fieldB;
}

::std::map<::std::string, bool> containerStruct2::get_req_fieldB() && {
  return std::move(__fbthrift_field_req_fieldB);
}

const ::std::map<::std::string, bool>* containerStruct2::get_opt_fieldB() const& {
  return opt_fieldB_ref().has_value() ? std::addressof(__fbthrift_field_opt_fieldB) : nullptr;
}

::std::map<::std::string, bool>* containerStruct2::get_opt_fieldB() & {
  return opt_fieldB_ref().has_value() ? std::addressof(__fbthrift_field_opt_fieldB) : nullptr;
}

const ::std::set<::std::int32_t>& containerStruct2::get_fieldC() const& {
  return __fbthrift_field_fieldC;
}

::std::set<::std::int32_t> containerStruct2::get_fieldC() && {
  return std::move(__fbthrift_field_fieldC);
}

const ::std::set<::std::int32_t>& containerStruct2::get_req_fieldC() const& {
  return __fbthrift_field_req_fieldC;
}

::std::set<::std::int32_t> containerStruct2::get_req_fieldC() && {
  return std::move(__fbthrift_field_req_fieldC);
}

const ::std::set<::std::int32_t>* containerStruct2::get_opt_fieldC() const& {
  return opt_fieldC_ref().has_value() ? std::addressof(__fbthrift_field_opt_fieldC) : nullptr;
}

::std::set<::std::int32_t>* containerStruct2::get_opt_fieldC() & {
  return opt_fieldC_ref().has_value() ? std::addressof(__fbthrift_field_opt_fieldC) : nullptr;
}


void swap([[maybe_unused]] containerStruct2& a, [[maybe_unused]] containerStruct2& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_fieldA, b.__fbthrift_field_fieldA);
  swap(a.__fbthrift_field_req_fieldA, b.__fbthrift_field_req_fieldA);
  swap(a.__fbthrift_field_opt_fieldA, b.__fbthrift_field_opt_fieldA);
  swap(a.__fbthrift_field_fieldB, b.__fbthrift_field_fieldB);
  swap(a.__fbthrift_field_req_fieldB, b.__fbthrift_field_req_fieldB);
  swap(a.__fbthrift_field_opt_fieldB, b.__fbthrift_field_opt_fieldB);
  swap(a.__fbthrift_field_fieldC, b.__fbthrift_field_fieldC);
  swap(a.__fbthrift_field_req_fieldC, b.__fbthrift_field_req_fieldC);
  swap(a.__fbthrift_field_opt_fieldC, b.__fbthrift_field_opt_fieldC);
  swap(a.__fbthrift_field_fieldD, b.__fbthrift_field_fieldD);
  swap(a.__fbthrift_field_fieldE, b.__fbthrift_field_fieldE);
  swap(a.__fbthrift_field_req_fieldE, b.__fbthrift_field_req_fieldE);
  swap(a.__fbthrift_field_opt_fieldE, b.__fbthrift_field_opt_fieldE);
  swap(a.__isset, b.__isset);
}

template void containerStruct2::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
template uint32_t containerStruct2::write<>(apache::thrift::BinaryProtocolWriter*) const;
template uint32_t containerStruct2::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
template uint32_t containerStruct2::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
template void containerStruct2::readNoXfer<>(apache::thrift::CompactProtocolReader*);
template uint32_t containerStruct2::write<>(apache::thrift::CompactProtocolWriter*) const;
template uint32_t containerStruct2::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
template uint32_t containerStruct2::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
template void containerStruct2::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
template uint32_t containerStruct2::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
template uint32_t containerStruct2::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
template uint32_t containerStruct2::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


} // namespace extra::svc

namespace extra::svc { namespace {
[[maybe_unused]] FOLLY_ERASE void validateAdapters() {
}
}} // namespace extra::svc
namespace apache::thrift::detail::annotation {
}
