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

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

#include "thrift/compiler/test/fixtures/int_limits/gen-cpp2/module_data.h"
[[maybe_unused]] static constexpr std::string_view kModuleName = "module";


namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::cpp2::Limits>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::cpp2::Limits>;
  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 cpp2 {

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

Limits::Limits(const Limits&) = default;
Limits& Limits::operator=(const Limits&) = default;
Limits::Limits([[maybe_unused]] Limits&& other) noexcept :
    __fbthrift_field_max_i64_field(std::move(other.__fbthrift_field_max_i64_field)),
    __fbthrift_field_min_i64_field(std::move(other.__fbthrift_field_min_i64_field)),
    __fbthrift_field_max_i32_field(std::move(other.__fbthrift_field_max_i32_field)),
    __fbthrift_field_min_i32_field(std::move(other.__fbthrift_field_min_i32_field)),
    __fbthrift_field_max_i16_field(std::move(other.__fbthrift_field_max_i16_field)),
    __fbthrift_field_min_i16_field(std::move(other.__fbthrift_field_min_i16_field)),
    __fbthrift_field_max_byte_field(std::move(other.__fbthrift_field_max_byte_field)),
    __fbthrift_field_min_byte_field(std::move(other.__fbthrift_field_min_byte_field)),
    __isset(other.__isset) {
}

Limits& Limits::operator=([[maybe_unused]] Limits&& other) noexcept {
    this->__fbthrift_field_max_i64_field = std::move(other.__fbthrift_field_max_i64_field);
    this->__fbthrift_field_min_i64_field = std::move(other.__fbthrift_field_min_i64_field);
    this->__fbthrift_field_max_i32_field = std::move(other.__fbthrift_field_max_i32_field);
    this->__fbthrift_field_min_i32_field = std::move(other.__fbthrift_field_min_i32_field);
    this->__fbthrift_field_max_i16_field = std::move(other.__fbthrift_field_max_i16_field);
    this->__fbthrift_field_min_i16_field = std::move(other.__fbthrift_field_min_i16_field);
    this->__fbthrift_field_max_byte_field = std::move(other.__fbthrift_field_max_byte_field);
    this->__fbthrift_field_min_byte_field = std::move(other.__fbthrift_field_min_byte_field);
    __isset = other.__isset;
    return *this;
}


Limits::Limits(apache::thrift::FragileConstructor, ::std::int64_t max_i64_field__arg, ::std::int64_t min_i64_field__arg, ::std::int32_t max_i32_field__arg, ::std::int32_t min_i32_field__arg, ::std::int16_t max_i16_field__arg, ::std::int16_t min_i16_field__arg, ::std::int8_t max_byte_field__arg, ::std::int8_t min_byte_field__arg) :
    __fbthrift_field_max_i64_field(std::move(max_i64_field__arg)),
    __fbthrift_field_min_i64_field(std::move(min_i64_field__arg)),
    __fbthrift_field_max_i32_field(std::move(max_i32_field__arg)),
    __fbthrift_field_min_i32_field(std::move(min_i32_field__arg)),
    __fbthrift_field_max_i16_field(std::move(max_i16_field__arg)),
    __fbthrift_field_min_i16_field(std::move(min_i16_field__arg)),
    __fbthrift_field_max_byte_field(std::move(max_byte_field__arg)),
    __fbthrift_field_min_byte_field(std::move(min_byte_field__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);
}


void Limits::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_max_i64_field = ::std::int64_t();
  this->__fbthrift_field_min_i64_field = ::std::int64_t();
  this->__fbthrift_field_max_i32_field = ::std::int32_t();
  this->__fbthrift_field_min_i32_field = ::std::int32_t();
  this->__fbthrift_field_max_i16_field = ::std::int16_t();
  this->__fbthrift_field_min_i16_field = ::std::int16_t();
  this->__fbthrift_field_max_byte_field = ::std::int8_t();
  this->__fbthrift_field_min_byte_field = ::std::int8_t();
  __isset = {};
}

void Limits::__fbthrift_clear_terse_fields() {
}

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

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

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


void swap([[maybe_unused]] Limits& a, [[maybe_unused]] Limits& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_max_i64_field, b.__fbthrift_field_max_i64_field);
  swap(a.__fbthrift_field_min_i64_field, b.__fbthrift_field_min_i64_field);
  swap(a.__fbthrift_field_max_i32_field, b.__fbthrift_field_max_i32_field);
  swap(a.__fbthrift_field_min_i32_field, b.__fbthrift_field_min_i32_field);
  swap(a.__fbthrift_field_max_i16_field, b.__fbthrift_field_max_i16_field);
  swap(a.__fbthrift_field_min_i16_field, b.__fbthrift_field_min_i16_field);
  swap(a.__fbthrift_field_max_byte_field, b.__fbthrift_field_max_byte_field);
  swap(a.__fbthrift_field_min_byte_field, b.__fbthrift_field_min_byte_field);
  swap(a.__isset, b.__isset);
}

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


} // namespace cpp2

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