/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */


#include "qtprotobufgen.qpb.h"

#include <QtProtobuf/qprotobufregistration.h>

#include <cmath>

namespace qt::protobuf {
static QtProtobuf::ProtoTypeRegistrar ProtoTypeRegistrarGlobalEnumGadget(GlobalEnumGadget::registerTypes);
void GlobalEnumGadget::registerTypes()
{
    qRegisterMetaType<GlobalEnum>();
    qRegisterMetaType<qt::protobuf::GlobalEnumGadget::GlobalEnum>();
    qRegisterProtobufEnumType<qt::protobuf::GlobalEnumGadget::GlobalEnum>();
}


class EnumTypes_QtProtobufData : public QSharedData
{
public:
    EnumTypes_QtProtobufData()
        : QSharedData(),
          m_field1(GlobalEnumGadget::GlobalEnum::EnumValue1),
          m_field2(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1)
    {
    }

    EnumTypes_QtProtobufData(const EnumTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_fieldOneOf(other.m_fieldOneOf)
    {
    }

    GlobalEnumGadget::GlobalEnum m_field1;
    EnumTypes_QtProtobufNested::NestedEnum m_field2;
    QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
};

EnumTypes::~EnumTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 17> qt_protobuf_EnumTypes_uint_data;
    const char qt_protobuf_EnumTypes_char_data[51];
} qt_protobuf_EnumTypes_metadata {
    // data
    {
        0, /* = version */
        4, /* = num fields */
        5, /* = field number offset */
        9, /* = property index offset */
        13, /* = field flags offset */
        21, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        22, /* = field1 */
        29, /* = field2 */
        36, /* = field3 */
        43, /* = field4 */
        50, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        2, /* = field3 */
        4, /* = field4 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Enum), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Enum), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Enum), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Enum), /* = field4 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.EnumTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering EnumTypes::staticPropertyOrdering = {
    &qt_protobuf_EnumTypes_metadata.data
};

void EnumTypes::registerTypes()
{
    qRegisterMetaType<EnumTypes>();
    qRegisterMetaType<QList<EnumTypes>>();
    qRegisterProtobufEnumType<EnumTypes_QtProtobufNested::NestedEnum>();
    qRegisterMetaType<NestedEnum>();
    qRegisterMetaType<QList<NestedEnum>>();
}

EnumTypes::EnumTypes()
    : QProtobufMessage(&EnumTypes::staticMetaObject, &EnumTypes::staticPropertyOrdering),
      dptr(new EnumTypes_QtProtobufData)
{
}

EnumTypes::EnumTypes(const EnumTypes &other)
    = default;
EnumTypes &EnumTypes::operator =(const EnumTypes &other)
{
    EnumTypes temp(other);
    swap(temp);
    return *this;
}
EnumTypes::EnumTypes(EnumTypes &&other) noexcept
    = default;
EnumTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const EnumTypes &lhs, const EnumTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
}

GlobalEnumGadget::GlobalEnum EnumTypes::field1() const
{
    return dptr->m_field1;
}

EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field2() const
{
    return dptr->m_field2;
}

GlobalEnumGadget::GlobalEnum EnumTypes::field3_p() const
{
    return dptr->m_fieldOneOf.holdsField(3) ?
        dptr->m_fieldOneOf.value<GlobalEnumGadget::GlobalEnum>() : GlobalEnumGadget::GlobalEnum(GlobalEnumGadget::GlobalEnum::EnumValue1);
}

bool EnumTypes::hasField3() const
{
    return dptr->m_fieldOneOf.holdsField(3);
}
GlobalEnumGadget::GlobalEnum EnumTypes::field3() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(3));
    return dptr->m_fieldOneOf.value<GlobalEnumGadget::GlobalEnum>();
}

EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field4_p() const
{
    return dptr->m_fieldOneOf.holdsField(4) ?
        dptr->m_fieldOneOf.value<EnumTypes_QtProtobufNested::NestedEnum>() : EnumTypes_QtProtobufNested::NestedEnum(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1);
}

bool EnumTypes::hasField4() const
{
    return dptr->m_fieldOneOf.holdsField(4);
}
EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field4() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(4));
    return dptr->m_fieldOneOf.value<EnumTypes_QtProtobufNested::NestedEnum>();
}

void EnumTypes::setField1(GlobalEnumGadget::GlobalEnum field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void EnumTypes::setField2(EnumTypes_QtProtobufNested::NestedEnum field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void EnumTypes::setField3(GlobalEnumGadget::GlobalEnum field3)
{
    if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field3, 3);
    }
}

void EnumTypes::setField3_p(GlobalEnumGadget::GlobalEnum field3)
{
    if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field3, 3);
    }
}

void EnumTypes::setField4(EnumTypes_QtProtobufNested::NestedEnum field4)
{
    if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field4, 4);
    }
}

void EnumTypes::setField4_p(EnumTypes_QtProtobufNested::NestedEnum field4)
{
    if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field4, 4);
    }
}

EnumTypes::FieldOneOfFields EnumTypes::fieldOneOfField() const
{
    return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
}
void EnumTypes::clearFieldOneOf()
{
    if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
        dptr.detach();
        dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
    }
}

class ScalarTypes_QtProtobufData : public QSharedData
{
public:
    ScalarTypes_QtProtobufData()
        : QSharedData(),
          m_field1(0),
          m_field2(0),
          m_field3(0),
          m_field4(0),
          m_field6(0),
          m_field7(0),
          m_field8(0),
          m_field9(0),
          m_field11(0.0),
          m_field12(0.0)
    {
    }

    ScalarTypes_QtProtobufData(const ScalarTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_field3(other.m_field3),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_field6(other.m_field6),
          m_field7(other.m_field7),
          m_field8(other.m_field8),
          m_field9(other.m_field9),
          m_field10(other.m_field10),
          m_field11(other.m_field11),
          m_field12(other.m_field12),
          m_field13(other.m_field13),
          m_field14(other.m_field14)
    {
    }

    QtProtobuf::int32 m_field1;
    QtProtobuf::uint32 m_field2;
    QtProtobuf::sint32 m_field3;
    QtProtobuf::fixed32 m_field4;
    QtProtobuf::sfixed32 m_field5;
    QtProtobuf::int64 m_field6;
    QtProtobuf::uint64 m_field7;
    QtProtobuf::sint64 m_field8;
    QtProtobuf::fixed64 m_field9;
    QtProtobuf::sfixed64 m_field10;
    float m_field11;
    double m_field12;
    QString m_field13;
    QByteArray m_field14;
};

ScalarTypes::~ScalarTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 57> qt_protobuf_ScalarTypes_uint_data;
    const char qt_protobuf_ScalarTypes_char_data[128];
} qt_protobuf_ScalarTypes_metadata {
    // data
    {
        0, /* = version */
        14, /* = num fields */
        15, /* = field number offset */
        29, /* = property index offset */
        43, /* = field flags offset */
        23, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        24, /* = field1 */
        31, /* = field2 */
        38, /* = field3 */
        45, /* = field4 */
        52, /* = field5 */
        59, /* = field6 */
        66, /* = field7 */
        73, /* = field8 */
        80, /* = field9 */
        87, /* = field10 */
        95, /* = field11 */
        103, /* = field12 */
        111, /* = field13 */
        119, /* = field14 */
        127, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        12, /* = field12 */
        13, /* = field13 */
        14, /* = field14 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        2, /* = field3 */
        3, /* = field4 */
        4, /* = field5 */
        5, /* = field6 */
        6, /* = field7 */
        7, /* = field8 */
        8, /* = field9 */
        9, /* = field10 */
        10, /* = field11 */
        11, /* = field12 */
        12, /* = field13 */
        13, /* = field14 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field11 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field12 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field13 */
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field14 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.ScalarTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0field12\0field13\0field14\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ScalarTypes::staticPropertyOrdering = {
    &qt_protobuf_ScalarTypes_metadata.data
};

void ScalarTypes::registerTypes()
{
    qRegisterMetaType<ScalarTypes>();
    qRegisterMetaType<QList<ScalarTypes>>();
}

ScalarTypes::ScalarTypes()
    : QProtobufMessage(&ScalarTypes::staticMetaObject, &ScalarTypes::staticPropertyOrdering),
      dptr(new ScalarTypes_QtProtobufData)
{
}

ScalarTypes::ScalarTypes(const ScalarTypes &other)
    = default;
ScalarTypes &ScalarTypes::operator =(const ScalarTypes &other)
{
    ScalarTypes temp(other);
    swap(temp);
    return *this;
}
ScalarTypes::ScalarTypes(ScalarTypes &&other) noexcept
    = default;
ScalarTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const ScalarTypes &lhs, const ScalarTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_field3 == rhs.dptr->m_field3
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_field6 == rhs.dptr->m_field6
        && lhs.dptr->m_field7 == rhs.dptr->m_field7
        && lhs.dptr->m_field8 == rhs.dptr->m_field8
        && lhs.dptr->m_field9 == rhs.dptr->m_field9
        && lhs.dptr->m_field10 == rhs.dptr->m_field10
        && lhs.dptr->m_field11 == rhs.dptr->m_field11
        && lhs.dptr->m_field12 == rhs.dptr->m_field12
        && lhs.dptr->m_field13 == rhs.dptr->m_field13
        && lhs.dptr->m_field14 == rhs.dptr->m_field14;
}

QtProtobuf::int32 ScalarTypes::field1() const
{
    return dptr->m_field1;
}

QtProtobuf::uint32 ScalarTypes::field2() const
{
    return dptr->m_field2;
}

QtProtobuf::sint32 ScalarTypes::field3() const
{
    return dptr->m_field3;
}

QtProtobuf::fixed32 ScalarTypes::field4() const
{
    return dptr->m_field4;
}

QtProtobuf::sfixed32 ScalarTypes::field5() const
{
    return dptr->m_field5;
}

QtProtobuf::int64 ScalarTypes::field6() const
{
    return dptr->m_field6;
}

QtProtobuf::uint64 ScalarTypes::field7() const
{
    return dptr->m_field7;
}

QtProtobuf::sint64 ScalarTypes::field8() const
{
    return dptr->m_field8;
}

QtProtobuf::fixed64 ScalarTypes::field9() const
{
    return dptr->m_field9;
}

QtProtobuf::sfixed64 ScalarTypes::field10() const
{
    return dptr->m_field10;
}

float ScalarTypes::field11() const
{
    return dptr->m_field11;
}

double ScalarTypes::field12() const
{
    return dptr->m_field12;
}

const QString &ScalarTypes::field13() const &
{
    return dptr->m_field13;
}

const QByteArray &ScalarTypes::field14() const &
{
    return dptr->m_field14;
}

void ScalarTypes::setField1(QtProtobuf::int32 field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void ScalarTypes::setField2(QtProtobuf::uint32 field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void ScalarTypes::setField3(QtProtobuf::sint32 field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void ScalarTypes::setField4(QtProtobuf::fixed32 field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void ScalarTypes::setField5(QtProtobuf::sfixed32 field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void ScalarTypes::setField6(QtProtobuf::int64 field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void ScalarTypes::setField7(QtProtobuf::uint64 field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void ScalarTypes::setField8(QtProtobuf::sint64 field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void ScalarTypes::setField9(QtProtobuf::fixed64 field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void ScalarTypes::setField10(QtProtobuf::sfixed64 field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void ScalarTypes::setField11(float field11)
{
    if (dptr->m_field11 != field11 ||
        std::signbit(dptr->m_field11) != std::signbit(field11)) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void ScalarTypes::setField12(double field12)
{
    if (dptr->m_field12 != field12 ||
        std::signbit(dptr->m_field12) != std::signbit(field12)) {
        dptr.detach();
        dptr->m_field12 = field12;
    }
}

void ScalarTypes::setField13(const QString &field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = field13;
    }
}

void ScalarTypes::setField13(QString &&field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = std::move(field13);
    }
}

void ScalarTypes::setField14(const QByteArray &field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = field14;
    }
}

void ScalarTypes::setField14(QByteArray &&field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = std::move(field14);
    }
}


class ScalarRepeatedTypes_QtProtobufData : public QSharedData
{
public:
    ScalarRepeatedTypes_QtProtobufData()
        : QSharedData()
    {
    }

    ScalarRepeatedTypes_QtProtobufData(const ScalarRepeatedTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_field3(other.m_field3),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_field6(other.m_field6),
          m_field7(other.m_field7),
          m_field8(other.m_field8),
          m_field9(other.m_field9),
          m_field10(other.m_field10),
          m_field11(other.m_field11),
          m_field12(other.m_field12),
          m_field13(other.m_field13),
          m_field14(other.m_field14)
    {
    }

    QtProtobuf::int32List m_field1;
    QtProtobuf::uint32List m_field2;
    QtProtobuf::sint32List m_field3;
    QtProtobuf::fixed32List m_field4;
    QtProtobuf::sfixed32List m_field5;
    QtProtobuf::int64List m_field6;
    QtProtobuf::uint64List m_field7;
    QtProtobuf::sint64List m_field8;
    QtProtobuf::fixed64List m_field9;
    QtProtobuf::sfixed64List m_field10;
    QtProtobuf::floatList m_field11;
    QtProtobuf::doubleList m_field12;
    QStringList m_field13;
    QByteArrayList m_field14;
};

ScalarRepeatedTypes::~ScalarRepeatedTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 57> qt_protobuf_ScalarRepeatedTypes_uint_data;
    const char qt_protobuf_ScalarRepeatedTypes_char_data[136];
} qt_protobuf_ScalarRepeatedTypes_metadata {
    // data
    {
        0, /* = version */
        14, /* = num fields */
        15, /* = field number offset */
        29, /* = property index offset */
        43, /* = field flags offset */
        31, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        32, /* = field1 */
        39, /* = field2 */
        46, /* = field3 */
        53, /* = field4 */
        60, /* = field5 */
        67, /* = field6 */
        74, /* = field7 */
        81, /* = field8 */
        88, /* = field9 */
        95, /* = field10 */
        103, /* = field11 */
        111, /* = field12 */
        119, /* = field13 */
        127, /* = field14 */
        135, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        12, /* = field12 */
        13, /* = field13 */
        14, /* = field14 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        2, /* = field3 */
        3, /* = field4 */
        4, /* = field5 */
        5, /* = field6 */
        6, /* = field7 */
        7, /* = field8 */
        8, /* = field9 */
        9, /* = field10 */
        10, /* = field11 */
        11, /* = field12 */
        12, /* = field13 */
        13, /* = field14 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field11 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field12 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field13 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field14 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.ScalarRepeatedTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0field12\0field13\0field14\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ScalarRepeatedTypes::staticPropertyOrdering = {
    &qt_protobuf_ScalarRepeatedTypes_metadata.data
};

void ScalarRepeatedTypes::registerTypes()
{
    qRegisterMetaType<ScalarRepeatedTypes>();
    qRegisterMetaType<QList<ScalarRepeatedTypes>>();
}

ScalarRepeatedTypes::ScalarRepeatedTypes()
    : QProtobufMessage(&ScalarRepeatedTypes::staticMetaObject, &ScalarRepeatedTypes::staticPropertyOrdering),
      dptr(new ScalarRepeatedTypes_QtProtobufData)
{
}

ScalarRepeatedTypes::ScalarRepeatedTypes(const ScalarRepeatedTypes &other)
    = default;
ScalarRepeatedTypes &ScalarRepeatedTypes::operator =(const ScalarRepeatedTypes &other)
{
    ScalarRepeatedTypes temp(other);
    swap(temp);
    return *this;
}
ScalarRepeatedTypes::ScalarRepeatedTypes(ScalarRepeatedTypes &&other) noexcept
    = default;
ScalarRepeatedTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const ScalarRepeatedTypes &lhs, const ScalarRepeatedTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_field3 == rhs.dptr->m_field3
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_field6 == rhs.dptr->m_field6
        && lhs.dptr->m_field7 == rhs.dptr->m_field7
        && lhs.dptr->m_field8 == rhs.dptr->m_field8
        && lhs.dptr->m_field9 == rhs.dptr->m_field9
        && lhs.dptr->m_field10 == rhs.dptr->m_field10
        && lhs.dptr->m_field11 == rhs.dptr->m_field11
        && lhs.dptr->m_field12 == rhs.dptr->m_field12
        && lhs.dptr->m_field13 == rhs.dptr->m_field13
        && lhs.dptr->m_field14 == rhs.dptr->m_field14;
}

const QtProtobuf::int32List &ScalarRepeatedTypes::field1() const &
{
    return dptr->m_field1;
}

const QtProtobuf::uint32List &ScalarRepeatedTypes::field2() const &
{
    return dptr->m_field2;
}

const QtProtobuf::sint32List &ScalarRepeatedTypes::field3() const &
{
    return dptr->m_field3;
}

const QtProtobuf::fixed32List &ScalarRepeatedTypes::field4() const &
{
    return dptr->m_field4;
}

const QtProtobuf::sfixed32List &ScalarRepeatedTypes::field5() const &
{
    return dptr->m_field5;
}

const QtProtobuf::int64List &ScalarRepeatedTypes::field6() const &
{
    return dptr->m_field6;
}

const QtProtobuf::uint64List &ScalarRepeatedTypes::field7() const &
{
    return dptr->m_field7;
}

const QtProtobuf::sint64List &ScalarRepeatedTypes::field8() const &
{
    return dptr->m_field8;
}

const QtProtobuf::fixed64List &ScalarRepeatedTypes::field9() const &
{
    return dptr->m_field9;
}

const QtProtobuf::sfixed64List &ScalarRepeatedTypes::field10() const &
{
    return dptr->m_field10;
}

const QtProtobuf::floatList &ScalarRepeatedTypes::field11() const &
{
    return dptr->m_field11;
}

const QtProtobuf::doubleList &ScalarRepeatedTypes::field12() const &
{
    return dptr->m_field12;
}

const QStringList &ScalarRepeatedTypes::field13() const &
{
    return dptr->m_field13;
}

const QByteArrayList &ScalarRepeatedTypes::field14() const &
{
    return dptr->m_field14;
}

void ScalarRepeatedTypes::setField1(const QtProtobuf::int32List &field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void ScalarRepeatedTypes::setField1(QtProtobuf::int32List &&field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = std::move(field1);
    }
}

void ScalarRepeatedTypes::setField2(const QtProtobuf::uint32List &field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void ScalarRepeatedTypes::setField2(QtProtobuf::uint32List &&field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = std::move(field2);
    }
}

void ScalarRepeatedTypes::setField3(const QtProtobuf::sint32List &field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void ScalarRepeatedTypes::setField3(QtProtobuf::sint32List &&field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = std::move(field3);
    }
}

void ScalarRepeatedTypes::setField4(const QtProtobuf::fixed32List &field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void ScalarRepeatedTypes::setField4(QtProtobuf::fixed32List &&field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = std::move(field4);
    }
}

void ScalarRepeatedTypes::setField5(const QtProtobuf::sfixed32List &field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void ScalarRepeatedTypes::setField5(QtProtobuf::sfixed32List &&field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = std::move(field5);
    }
}

void ScalarRepeatedTypes::setField6(const QtProtobuf::int64List &field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void ScalarRepeatedTypes::setField6(QtProtobuf::int64List &&field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = std::move(field6);
    }
}

void ScalarRepeatedTypes::setField7(const QtProtobuf::uint64List &field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void ScalarRepeatedTypes::setField7(QtProtobuf::uint64List &&field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = std::move(field7);
    }
}

void ScalarRepeatedTypes::setField8(const QtProtobuf::sint64List &field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void ScalarRepeatedTypes::setField8(QtProtobuf::sint64List &&field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = std::move(field8);
    }
}

void ScalarRepeatedTypes::setField9(const QtProtobuf::fixed64List &field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void ScalarRepeatedTypes::setField9(QtProtobuf::fixed64List &&field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = std::move(field9);
    }
}

void ScalarRepeatedTypes::setField10(const QtProtobuf::sfixed64List &field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void ScalarRepeatedTypes::setField10(QtProtobuf::sfixed64List &&field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = std::move(field10);
    }
}

void ScalarRepeatedTypes::setField11(const QtProtobuf::floatList &field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void ScalarRepeatedTypes::setField11(QtProtobuf::floatList &&field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = std::move(field11);
    }
}

void ScalarRepeatedTypes::setField12(const QtProtobuf::doubleList &field12)
{
    if (dptr->m_field12 != field12) {
        dptr.detach();
        dptr->m_field12 = field12;
    }
}

void ScalarRepeatedTypes::setField12(QtProtobuf::doubleList &&field12)
{
    if (dptr->m_field12 != field12) {
        dptr.detach();
        dptr->m_field12 = std::move(field12);
    }
}

void ScalarRepeatedTypes::setField13(const QStringList &field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = field13;
    }
}

void ScalarRepeatedTypes::setField13(QStringList &&field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = std::move(field13);
    }
}

void ScalarRepeatedTypes::setField14(const QByteArrayList &field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = field14;
    }
}

void ScalarRepeatedTypes::setField14(QByteArrayList &&field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = std::move(field14);
    }
}


class ScalarRepeatedNoPackedTypes_QtProtobufData : public QSharedData
{
public:
    ScalarRepeatedNoPackedTypes_QtProtobufData()
        : QSharedData()
    {
    }

    ScalarRepeatedNoPackedTypes_QtProtobufData(const ScalarRepeatedNoPackedTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_field3(other.m_field3),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_field6(other.m_field6),
          m_field7(other.m_field7),
          m_field8(other.m_field8),
          m_field9(other.m_field9),
          m_field10(other.m_field10),
          m_field11(other.m_field11),
          m_field12(other.m_field12),
          m_field13(other.m_field13),
          m_field14(other.m_field14),
          m_field15(other.m_field15)
    {
    }

    QtProtobuf::int32List m_field1;
    QtProtobuf::uint32List m_field2;
    QtProtobuf::sint32List m_field3;
    QtProtobuf::fixed32List m_field4;
    QtProtobuf::sfixed32List m_field5;
    QtProtobuf::int64List m_field6;
    QtProtobuf::uint64List m_field7;
    QtProtobuf::sint64List m_field8;
    QtProtobuf::fixed64List m_field9;
    QtProtobuf::sfixed64List m_field10;
    QtProtobuf::floatList m_field11;
    QtProtobuf::doubleList m_field12;
    QStringList m_field13;
    QByteArrayList m_field14;
    QList<GlobalEnumGadget::GlobalEnum> m_field15;
};

ScalarRepeatedNoPackedTypes::~ScalarRepeatedNoPackedTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 61> qt_protobuf_ScalarRepeatedNoPackedTypes_uint_data;
    const char qt_protobuf_ScalarRepeatedNoPackedTypes_char_data[152];
} qt_protobuf_ScalarRepeatedNoPackedTypes_metadata {
    // data
    {
        0, /* = version */
        15, /* = num fields */
        16, /* = field number offset */
        31, /* = property index offset */
        46, /* = field flags offset */
        39, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        40, /* = field1 */
        47, /* = field2 */
        54, /* = field3 */
        61, /* = field4 */
        68, /* = field5 */
        75, /* = field6 */
        82, /* = field7 */
        89, /* = field8 */
        96, /* = field9 */
        103, /* = field10 */
        111, /* = field11 */
        119, /* = field12 */
        127, /* = field13 */
        135, /* = field14 */
        143, /* = field15 */
        151, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        12, /* = field12 */
        13, /* = field13 */
        14, /* = field14 */
        15, /* = field15 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        2, /* = field3 */
        3, /* = field4 */
        4, /* = field5 */
        5, /* = field6 */
        6, /* = field7 */
        7, /* = field8 */
        8, /* = field9 */
        9, /* = field10 */
        10, /* = field11 */
        11, /* = field12 */
        12, /* = field13 */
        13, /* = field14 */
        14, /* = field15 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field11 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field12 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field13 */
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field14 */
        uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated | QtProtobufPrivate::FieldFlag::Enum), /* = field15 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.ScalarRepeatedNoPackedTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0field12\0field13\0field14\0field15\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ScalarRepeatedNoPackedTypes::staticPropertyOrdering = {
    &qt_protobuf_ScalarRepeatedNoPackedTypes_metadata.data
};

void ScalarRepeatedNoPackedTypes::registerTypes()
{
    qRegisterMetaType<ScalarRepeatedNoPackedTypes>();
    qRegisterMetaType<QList<ScalarRepeatedNoPackedTypes>>();
}

ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes()
    : QProtobufMessage(&ScalarRepeatedNoPackedTypes::staticMetaObject, &ScalarRepeatedNoPackedTypes::staticPropertyOrdering),
      dptr(new ScalarRepeatedNoPackedTypes_QtProtobufData)
{
}

ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes(const ScalarRepeatedNoPackedTypes &other)
    = default;
ScalarRepeatedNoPackedTypes &ScalarRepeatedNoPackedTypes::operator =(const ScalarRepeatedNoPackedTypes &other)
{
    ScalarRepeatedNoPackedTypes temp(other);
    swap(temp);
    return *this;
}
ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes(ScalarRepeatedNoPackedTypes &&other) noexcept
    = default;
ScalarRepeatedNoPackedTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const ScalarRepeatedNoPackedTypes &lhs, const ScalarRepeatedNoPackedTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_field3 == rhs.dptr->m_field3
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_field6 == rhs.dptr->m_field6
        && lhs.dptr->m_field7 == rhs.dptr->m_field7
        && lhs.dptr->m_field8 == rhs.dptr->m_field8
        && lhs.dptr->m_field9 == rhs.dptr->m_field9
        && lhs.dptr->m_field10 == rhs.dptr->m_field10
        && lhs.dptr->m_field11 == rhs.dptr->m_field11
        && lhs.dptr->m_field12 == rhs.dptr->m_field12
        && lhs.dptr->m_field13 == rhs.dptr->m_field13
        && lhs.dptr->m_field14 == rhs.dptr->m_field14
        && lhs.dptr->m_field15 == rhs.dptr->m_field15;
}

const QtProtobuf::int32List &ScalarRepeatedNoPackedTypes::field1() const &
{
    return dptr->m_field1;
}

const QtProtobuf::uint32List &ScalarRepeatedNoPackedTypes::field2() const &
{
    return dptr->m_field2;
}

const QtProtobuf::sint32List &ScalarRepeatedNoPackedTypes::field3() const &
{
    return dptr->m_field3;
}

const QtProtobuf::fixed32List &ScalarRepeatedNoPackedTypes::field4() const &
{
    return dptr->m_field4;
}

const QtProtobuf::sfixed32List &ScalarRepeatedNoPackedTypes::field5() const &
{
    return dptr->m_field5;
}

const QtProtobuf::int64List &ScalarRepeatedNoPackedTypes::field6() const &
{
    return dptr->m_field6;
}

const QtProtobuf::uint64List &ScalarRepeatedNoPackedTypes::field7() const &
{
    return dptr->m_field7;
}

const QtProtobuf::sint64List &ScalarRepeatedNoPackedTypes::field8() const &
{
    return dptr->m_field8;
}

const QtProtobuf::fixed64List &ScalarRepeatedNoPackedTypes::field9() const &
{
    return dptr->m_field9;
}

const QtProtobuf::sfixed64List &ScalarRepeatedNoPackedTypes::field10() const &
{
    return dptr->m_field10;
}

const QtProtobuf::floatList &ScalarRepeatedNoPackedTypes::field11() const &
{
    return dptr->m_field11;
}

const QtProtobuf::doubleList &ScalarRepeatedNoPackedTypes::field12() const &
{
    return dptr->m_field12;
}

const QStringList &ScalarRepeatedNoPackedTypes::field13() const &
{
    return dptr->m_field13;
}

const QByteArrayList &ScalarRepeatedNoPackedTypes::field14() const &
{
    return dptr->m_field14;
}

const QList<GlobalEnumGadget::GlobalEnum> &ScalarRepeatedNoPackedTypes::field15() const &
{
    return dptr->m_field15;
}

void ScalarRepeatedNoPackedTypes::setField1(const QtProtobuf::int32List &field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void ScalarRepeatedNoPackedTypes::setField1(QtProtobuf::int32List &&field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = std::move(field1);
    }
}

void ScalarRepeatedNoPackedTypes::setField2(const QtProtobuf::uint32List &field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void ScalarRepeatedNoPackedTypes::setField2(QtProtobuf::uint32List &&field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = std::move(field2);
    }
}

void ScalarRepeatedNoPackedTypes::setField3(const QtProtobuf::sint32List &field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void ScalarRepeatedNoPackedTypes::setField3(QtProtobuf::sint32List &&field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = std::move(field3);
    }
}

void ScalarRepeatedNoPackedTypes::setField4(const QtProtobuf::fixed32List &field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void ScalarRepeatedNoPackedTypes::setField4(QtProtobuf::fixed32List &&field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = std::move(field4);
    }
}

void ScalarRepeatedNoPackedTypes::setField5(const QtProtobuf::sfixed32List &field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void ScalarRepeatedNoPackedTypes::setField5(QtProtobuf::sfixed32List &&field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = std::move(field5);
    }
}

void ScalarRepeatedNoPackedTypes::setField6(const QtProtobuf::int64List &field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void ScalarRepeatedNoPackedTypes::setField6(QtProtobuf::int64List &&field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = std::move(field6);
    }
}

void ScalarRepeatedNoPackedTypes::setField7(const QtProtobuf::uint64List &field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void ScalarRepeatedNoPackedTypes::setField7(QtProtobuf::uint64List &&field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = std::move(field7);
    }
}

void ScalarRepeatedNoPackedTypes::setField8(const QtProtobuf::sint64List &field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void ScalarRepeatedNoPackedTypes::setField8(QtProtobuf::sint64List &&field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = std::move(field8);
    }
}

void ScalarRepeatedNoPackedTypes::setField9(const QtProtobuf::fixed64List &field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void ScalarRepeatedNoPackedTypes::setField9(QtProtobuf::fixed64List &&field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = std::move(field9);
    }
}

void ScalarRepeatedNoPackedTypes::setField10(const QtProtobuf::sfixed64List &field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void ScalarRepeatedNoPackedTypes::setField10(QtProtobuf::sfixed64List &&field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = std::move(field10);
    }
}

void ScalarRepeatedNoPackedTypes::setField11(const QtProtobuf::floatList &field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void ScalarRepeatedNoPackedTypes::setField11(QtProtobuf::floatList &&field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = std::move(field11);
    }
}

void ScalarRepeatedNoPackedTypes::setField12(const QtProtobuf::doubleList &field12)
{
    if (dptr->m_field12 != field12) {
        dptr.detach();
        dptr->m_field12 = field12;
    }
}

void ScalarRepeatedNoPackedTypes::setField12(QtProtobuf::doubleList &&field12)
{
    if (dptr->m_field12 != field12) {
        dptr.detach();
        dptr->m_field12 = std::move(field12);
    }
}

void ScalarRepeatedNoPackedTypes::setField13(const QStringList &field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = field13;
    }
}

void ScalarRepeatedNoPackedTypes::setField13(QStringList &&field13)
{
    if (dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = std::move(field13);
    }
}

void ScalarRepeatedNoPackedTypes::setField14(const QByteArrayList &field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = field14;
    }
}

void ScalarRepeatedNoPackedTypes::setField14(QByteArrayList &&field14)
{
    if (dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = std::move(field14);
    }
}

void ScalarRepeatedNoPackedTypes::setField15(const QList<GlobalEnumGadget::GlobalEnum> &field15)
{
    if (dptr->m_field15 != field15) {
        dptr.detach();
        dptr->m_field15 = field15;
    }
}

void ScalarRepeatedNoPackedTypes::setField15(QList<GlobalEnumGadget::GlobalEnum> &&field15)
{
    if (dptr->m_field15 != field15) {
        dptr.detach();
        dptr->m_field15 = std::move(field15);
    }
}


class ScalarOneOfTypes_QtProtobufData : public QSharedData
{
public:
    ScalarOneOfTypes_QtProtobufData()
        : QSharedData()
    {
    }

    ScalarOneOfTypes_QtProtobufData(const ScalarOneOfTypes_QtProtobufData &other)
        : QSharedData(other),
          m_fieldOneOf(other.m_fieldOneOf)
    {
    }

    QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
};

ScalarOneOfTypes::~ScalarOneOfTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 57> qt_protobuf_ScalarOneOfTypes_uint_data;
    const char qt_protobuf_ScalarOneOfTypes_char_data[133];
} qt_protobuf_ScalarOneOfTypes_metadata {
    // data
    {
        0, /* = version */
        14, /* = num fields */
        15, /* = field number offset */
        29, /* = property index offset */
        43, /* = field flags offset */
        28, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        29, /* = field1 */
        36, /* = field2 */
        43, /* = field3 */
        50, /* = field4 */
        57, /* = field5 */
        64, /* = field6 */
        71, /* = field7 */
        78, /* = field8 */
        85, /* = field9 */
        92, /* = field10 */
        100, /* = field11 */
        108, /* = field12 */
        116, /* = field13 */
        124, /* = field14 */
        132, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        12, /* = field12 */
        13, /* = field13 */
        14, /* = field14 */
        // Property indices:
        0, /* = field1 */
        2, /* = field2 */
        4, /* = field3 */
        6, /* = field4 */
        8, /* = field5 */
        10, /* = field6 */
        12, /* = field7 */
        14, /* = field8 */
        16, /* = field9 */
        18, /* = field10 */
        20, /* = field11 */
        22, /* = field12 */
        24, /* = field13 */
        26, /* = field14 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field11 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field12 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field13 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field14 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.ScalarOneOfTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0field12\0field13\0field14\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ScalarOneOfTypes::staticPropertyOrdering = {
    &qt_protobuf_ScalarOneOfTypes_metadata.data
};

void ScalarOneOfTypes::registerTypes()
{
    qRegisterMetaType<ScalarOneOfTypes>();
    qRegisterMetaType<QList<ScalarOneOfTypes>>();
}

ScalarOneOfTypes::ScalarOneOfTypes()
    : QProtobufMessage(&ScalarOneOfTypes::staticMetaObject, &ScalarOneOfTypes::staticPropertyOrdering),
      dptr(new ScalarOneOfTypes_QtProtobufData)
{
}

ScalarOneOfTypes::ScalarOneOfTypes(const ScalarOneOfTypes &other)
    = default;
ScalarOneOfTypes &ScalarOneOfTypes::operator =(const ScalarOneOfTypes &other)
{
    ScalarOneOfTypes temp(other);
    swap(temp);
    return *this;
}
ScalarOneOfTypes::ScalarOneOfTypes(ScalarOneOfTypes &&other) noexcept
    = default;
ScalarOneOfTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const ScalarOneOfTypes &lhs, const ScalarOneOfTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
}

QtProtobuf::int32 ScalarOneOfTypes::field1_p() const
{
    return dptr->m_fieldOneOf.holdsField(1) ?
        dptr->m_fieldOneOf.value<QtProtobuf::int32>() : QtProtobuf::int32(0);
}

bool ScalarOneOfTypes::hasField1() const
{
    return dptr->m_fieldOneOf.holdsField(1);
}
QtProtobuf::int32 ScalarOneOfTypes::field1() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(1));
    return dptr->m_fieldOneOf.value<QtProtobuf::int32>();
}

QtProtobuf::uint32 ScalarOneOfTypes::field2_p() const
{
    return dptr->m_fieldOneOf.holdsField(2) ?
        dptr->m_fieldOneOf.value<QtProtobuf::uint32>() : QtProtobuf::uint32(0);
}

bool ScalarOneOfTypes::hasField2() const
{
    return dptr->m_fieldOneOf.holdsField(2);
}
QtProtobuf::uint32 ScalarOneOfTypes::field2() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(2));
    return dptr->m_fieldOneOf.value<QtProtobuf::uint32>();
}

QtProtobuf::sint32 ScalarOneOfTypes::field3_p() const
{
    return dptr->m_fieldOneOf.holdsField(3) ?
        dptr->m_fieldOneOf.value<QtProtobuf::sint32>() : QtProtobuf::sint32(0);
}

bool ScalarOneOfTypes::hasField3() const
{
    return dptr->m_fieldOneOf.holdsField(3);
}
QtProtobuf::sint32 ScalarOneOfTypes::field3() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(3));
    return dptr->m_fieldOneOf.value<QtProtobuf::sint32>();
}

QtProtobuf::fixed32 ScalarOneOfTypes::field4_p() const
{
    return dptr->m_fieldOneOf.holdsField(4) ?
        dptr->m_fieldOneOf.value<QtProtobuf::fixed32>() : QtProtobuf::fixed32(0);
}

bool ScalarOneOfTypes::hasField4() const
{
    return dptr->m_fieldOneOf.holdsField(4);
}
QtProtobuf::fixed32 ScalarOneOfTypes::field4() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(4));
    return dptr->m_fieldOneOf.value<QtProtobuf::fixed32>();
}

QtProtobuf::sfixed32 ScalarOneOfTypes::field5_p() const
{
    return dptr->m_fieldOneOf.holdsField(5) ?
        dptr->m_fieldOneOf.value<QtProtobuf::sfixed32>() : QtProtobuf::sfixed32();
}

bool ScalarOneOfTypes::hasField5() const
{
    return dptr->m_fieldOneOf.holdsField(5);
}
QtProtobuf::sfixed32 ScalarOneOfTypes::field5() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(5));
    return dptr->m_fieldOneOf.value<QtProtobuf::sfixed32>();
}

QtProtobuf::int64 ScalarOneOfTypes::field6_p() const
{
    return dptr->m_fieldOneOf.holdsField(6) ?
        dptr->m_fieldOneOf.value<QtProtobuf::int64>() : QtProtobuf::int64(0);
}

bool ScalarOneOfTypes::hasField6() const
{
    return dptr->m_fieldOneOf.holdsField(6);
}
QtProtobuf::int64 ScalarOneOfTypes::field6() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(6));
    return dptr->m_fieldOneOf.value<QtProtobuf::int64>();
}

QtProtobuf::uint64 ScalarOneOfTypes::field7_p() const
{
    return dptr->m_fieldOneOf.holdsField(7) ?
        dptr->m_fieldOneOf.value<QtProtobuf::uint64>() : QtProtobuf::uint64(0);
}

bool ScalarOneOfTypes::hasField7() const
{
    return dptr->m_fieldOneOf.holdsField(7);
}
QtProtobuf::uint64 ScalarOneOfTypes::field7() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(7));
    return dptr->m_fieldOneOf.value<QtProtobuf::uint64>();
}

QtProtobuf::sint64 ScalarOneOfTypes::field8_p() const
{
    return dptr->m_fieldOneOf.holdsField(8) ?
        dptr->m_fieldOneOf.value<QtProtobuf::sint64>() : QtProtobuf::sint64(0);
}

bool ScalarOneOfTypes::hasField8() const
{
    return dptr->m_fieldOneOf.holdsField(8);
}
QtProtobuf::sint64 ScalarOneOfTypes::field8() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(8));
    return dptr->m_fieldOneOf.value<QtProtobuf::sint64>();
}

QtProtobuf::fixed64 ScalarOneOfTypes::field9_p() const
{
    return dptr->m_fieldOneOf.holdsField(9) ?
        dptr->m_fieldOneOf.value<QtProtobuf::fixed64>() : QtProtobuf::fixed64(0);
}

bool ScalarOneOfTypes::hasField9() const
{
    return dptr->m_fieldOneOf.holdsField(9);
}
QtProtobuf::fixed64 ScalarOneOfTypes::field9() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(9));
    return dptr->m_fieldOneOf.value<QtProtobuf::fixed64>();
}

QtProtobuf::sfixed64 ScalarOneOfTypes::field10_p() const
{
    return dptr->m_fieldOneOf.holdsField(10) ?
        dptr->m_fieldOneOf.value<QtProtobuf::sfixed64>() : QtProtobuf::sfixed64();
}

bool ScalarOneOfTypes::hasField10() const
{
    return dptr->m_fieldOneOf.holdsField(10);
}
QtProtobuf::sfixed64 ScalarOneOfTypes::field10() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(10));
    return dptr->m_fieldOneOf.value<QtProtobuf::sfixed64>();
}

float ScalarOneOfTypes::field11_p() const
{
    return dptr->m_fieldOneOf.holdsField(11) ?
        dptr->m_fieldOneOf.value<float>() : float(0.0);
}

bool ScalarOneOfTypes::hasField11() const
{
    return dptr->m_fieldOneOf.holdsField(11);
}
float ScalarOneOfTypes::field11() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(11));
    return dptr->m_fieldOneOf.value<float>();
}

double ScalarOneOfTypes::field12_p() const
{
    return dptr->m_fieldOneOf.holdsField(12) ?
        dptr->m_fieldOneOf.value<double>() : double(0.0);
}

bool ScalarOneOfTypes::hasField12() const
{
    return dptr->m_fieldOneOf.holdsField(12);
}
double ScalarOneOfTypes::field12() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(12));
    return dptr->m_fieldOneOf.value<double>();
}

QString ScalarOneOfTypes::field13_p() const
{
    return dptr->m_fieldOneOf.holdsField(13) ?
        dptr->m_fieldOneOf.value<QString>() : QString();
}

bool ScalarOneOfTypes::hasField13() const
{
    return dptr->m_fieldOneOf.holdsField(13);
}
QString ScalarOneOfTypes::field13() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(13));
    return dptr->m_fieldOneOf.value<QString>();
}

QByteArray ScalarOneOfTypes::field14_p() const
{
    return dptr->m_fieldOneOf.holdsField(14) ?
        dptr->m_fieldOneOf.value<QByteArray>() : QByteArray();
}

bool ScalarOneOfTypes::hasField14() const
{
    return dptr->m_fieldOneOf.holdsField(14);
}
QByteArray ScalarOneOfTypes::field14() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(14));
    return dptr->m_fieldOneOf.value<QByteArray>();
}

void ScalarOneOfTypes::setField1(QtProtobuf::int32 field1)
{
    if (!dptr->m_fieldOneOf.isEqual(field1, 1)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field1, 1);
    }
}

void ScalarOneOfTypes::setField1_p(QtProtobuf::int32 field1)
{
    if (!dptr->m_fieldOneOf.isEqual(field1, 1)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field1, 1);
    }
}

void ScalarOneOfTypes::setField2(QtProtobuf::uint32 field2)
{
    if (!dptr->m_fieldOneOf.isEqual(field2, 2)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field2, 2);
    }
}

void ScalarOneOfTypes::setField2_p(QtProtobuf::uint32 field2)
{
    if (!dptr->m_fieldOneOf.isEqual(field2, 2)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field2, 2);
    }
}

void ScalarOneOfTypes::setField3(QtProtobuf::sint32 field3)
{
    if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field3, 3);
    }
}

void ScalarOneOfTypes::setField3_p(QtProtobuf::sint32 field3)
{
    if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field3, 3);
    }
}

void ScalarOneOfTypes::setField4(QtProtobuf::fixed32 field4)
{
    if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field4, 4);
    }
}

void ScalarOneOfTypes::setField4_p(QtProtobuf::fixed32 field4)
{
    if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field4, 4);
    }
}

void ScalarOneOfTypes::setField5(QtProtobuf::sfixed32 field5)
{
    if (!dptr->m_fieldOneOf.isEqual(field5, 5)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field5, 5);
    }
}

void ScalarOneOfTypes::setField5_p(QtProtobuf::sfixed32 field5)
{
    if (!dptr->m_fieldOneOf.isEqual(field5, 5)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field5, 5);
    }
}

void ScalarOneOfTypes::setField6(QtProtobuf::int64 field6)
{
    if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field6, 6);
    }
}

void ScalarOneOfTypes::setField6_p(QtProtobuf::int64 field6)
{
    if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field6, 6);
    }
}

void ScalarOneOfTypes::setField7(QtProtobuf::uint64 field7)
{
    if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field7, 7);
    }
}

void ScalarOneOfTypes::setField7_p(QtProtobuf::uint64 field7)
{
    if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field7, 7);
    }
}

void ScalarOneOfTypes::setField8(QtProtobuf::sint64 field8)
{
    if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field8, 8);
    }
}

void ScalarOneOfTypes::setField8_p(QtProtobuf::sint64 field8)
{
    if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field8, 8);
    }
}

void ScalarOneOfTypes::setField9(QtProtobuf::fixed64 field9)
{
    if (!dptr->m_fieldOneOf.isEqual(field9, 9)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field9, 9);
    }
}

void ScalarOneOfTypes::setField9_p(QtProtobuf::fixed64 field9)
{
    if (!dptr->m_fieldOneOf.isEqual(field9, 9)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field9, 9);
    }
}

void ScalarOneOfTypes::setField10(QtProtobuf::sfixed64 field10)
{
    if (!dptr->m_fieldOneOf.isEqual(field10, 10)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field10, 10);
    }
}

void ScalarOneOfTypes::setField10_p(QtProtobuf::sfixed64 field10)
{
    if (!dptr->m_fieldOneOf.isEqual(field10, 10)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field10, 10);
    }
}

void ScalarOneOfTypes::setField11(float field11)
{
    if (!dptr->m_fieldOneOf.isEqual(field11, 11)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field11, 11);
    }
}

void ScalarOneOfTypes::setField11_p(float field11)
{
    if (!dptr->m_fieldOneOf.isEqual(field11, 11)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field11, 11);
    }
}

void ScalarOneOfTypes::setField12(double field12)
{
    if (!dptr->m_fieldOneOf.isEqual(field12, 12)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field12, 12);
    }
}

void ScalarOneOfTypes::setField12_p(double field12)
{
    if (!dptr->m_fieldOneOf.isEqual(field12, 12)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field12, 12);
    }
}

void ScalarOneOfTypes::setField13(const QString &field13)
{
    if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field13, 13);
    }
}

void ScalarOneOfTypes::setField13(QString &&field13)
{
    if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(std::move(field13), 13);
    }
}

void ScalarOneOfTypes::setField13_p(QString field13)
{
    if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field13, 13);
    }
}

void ScalarOneOfTypes::setField14(const QByteArray &field14)
{
    if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field14, 14);
    }
}

void ScalarOneOfTypes::setField14(QByteArray &&field14)
{
    if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(std::move(field14), 14);
    }
}

void ScalarOneOfTypes::setField14_p(QByteArray field14)
{
    if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field14, 14);
    }
}

ScalarOneOfTypes::FieldOneOfFields ScalarOneOfTypes::fieldOneOfField() const
{
    return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
}
void ScalarOneOfTypes::clearFieldOneOf()
{
    if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
        dptr.detach();
        dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
    }
}

class ScalarOptionalTypes_QtProtobufData : public QSharedData
{
public:
    ScalarOptionalTypes_QtProtobufData()
        : QSharedData()
    {
    }

    ScalarOptionalTypes_QtProtobufData(const ScalarOptionalTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_field3(other.m_field3),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_field6(other.m_field6),
          m_field7(other.m_field7),
          m_field8(other.m_field8),
          m_field9(other.m_field9),
          m_field10(other.m_field10),
          m_field11(other.m_field11),
          m_field12(other.m_field12),
          m_field13(other.m_field13),
          m_field14(other.m_field14)
    {
    }

    std::optional<QtProtobuf::int32> m_field1;
    std::optional<QtProtobuf::uint32> m_field2;
    std::optional<QtProtobuf::sint32> m_field3;
    std::optional<QtProtobuf::fixed32> m_field4;
    std::optional<QtProtobuf::sfixed32> m_field5;
    std::optional<QtProtobuf::int64> m_field6;
    std::optional<QtProtobuf::uint64> m_field7;
    std::optional<QtProtobuf::sint64> m_field8;
    std::optional<QtProtobuf::fixed64> m_field9;
    std::optional<QtProtobuf::sfixed64> m_field10;
    std::optional<float> m_field11;
    std::optional<double> m_field12;
    std::optional<QString> m_field13;
    std::optional<QByteArray> m_field14;
};

ScalarOptionalTypes::~ScalarOptionalTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 57> qt_protobuf_ScalarOptionalTypes_uint_data;
    const char qt_protobuf_ScalarOptionalTypes_char_data[136];
} qt_protobuf_ScalarOptionalTypes_metadata {
    // data
    {
        0, /* = version */
        14, /* = num fields */
        15, /* = field number offset */
        29, /* = property index offset */
        43, /* = field flags offset */
        31, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        32, /* = field1 */
        39, /* = field2 */
        46, /* = field3 */
        53, /* = field4 */
        60, /* = field5 */
        67, /* = field6 */
        74, /* = field7 */
        81, /* = field8 */
        88, /* = field9 */
        95, /* = field10 */
        103, /* = field11 */
        111, /* = field12 */
        119, /* = field13 */
        127, /* = field14 */
        135, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        12, /* = field12 */
        13, /* = field13 */
        14, /* = field14 */
        // Property indices:
        0, /* = field1 */
        2, /* = field2 */
        4, /* = field3 */
        6, /* = field4 */
        8, /* = field5 */
        10, /* = field6 */
        12, /* = field7 */
        14, /* = field8 */
        16, /* = field9 */
        18, /* = field10 */
        20, /* = field11 */
        22, /* = field12 */
        24, /* = field13 */
        26, /* = field14 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field11 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field12 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field13 */
        uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field14 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.ScalarOptionalTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0field12\0field13\0field14\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ScalarOptionalTypes::staticPropertyOrdering = {
    &qt_protobuf_ScalarOptionalTypes_metadata.data
};

void ScalarOptionalTypes::registerTypes()
{
    qRegisterMetaType<ScalarOptionalTypes>();
    qRegisterMetaType<QList<ScalarOptionalTypes>>();
}

ScalarOptionalTypes::ScalarOptionalTypes()
    : QProtobufMessage(&ScalarOptionalTypes::staticMetaObject, &ScalarOptionalTypes::staticPropertyOrdering),
      dptr(new ScalarOptionalTypes_QtProtobufData)
{
}

ScalarOptionalTypes::ScalarOptionalTypes(const ScalarOptionalTypes &other)
    = default;
ScalarOptionalTypes &ScalarOptionalTypes::operator =(const ScalarOptionalTypes &other)
{
    ScalarOptionalTypes temp(other);
    swap(temp);
    return *this;
}
ScalarOptionalTypes::ScalarOptionalTypes(ScalarOptionalTypes &&other) noexcept
    = default;
ScalarOptionalTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const ScalarOptionalTypes &lhs, const ScalarOptionalTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_field3 == rhs.dptr->m_field3
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_field6 == rhs.dptr->m_field6
        && lhs.dptr->m_field7 == rhs.dptr->m_field7
        && lhs.dptr->m_field8 == rhs.dptr->m_field8
        && lhs.dptr->m_field9 == rhs.dptr->m_field9
        && lhs.dptr->m_field10 == rhs.dptr->m_field10
        && lhs.dptr->m_field11 == rhs.dptr->m_field11
        && lhs.dptr->m_field12 == rhs.dptr->m_field12
        && lhs.dptr->m_field13 == rhs.dptr->m_field13
        && lhs.dptr->m_field14 == rhs.dptr->m_field14;
}

QtProtobuf::int32 ScalarOptionalTypes::field1_p() const
{
    return dptr->m_field1 ?
        dptr->m_field1.value() : QtProtobuf::int32();
}

bool ScalarOptionalTypes::hasField1() const
{
    return dptr->m_field1.has_value();
}
QtProtobuf::int32 ScalarOptionalTypes::field1() const
{
    Q_ASSERT(dptr->m_field1.has_value());
    return dptr->m_field1.value();
}

QtProtobuf::uint32 ScalarOptionalTypes::field2_p() const
{
    return dptr->m_field2 ?
        dptr->m_field2.value() : QtProtobuf::uint32();
}

bool ScalarOptionalTypes::hasField2() const
{
    return dptr->m_field2.has_value();
}
QtProtobuf::uint32 ScalarOptionalTypes::field2() const
{
    Q_ASSERT(dptr->m_field2.has_value());
    return dptr->m_field2.value();
}

QtProtobuf::sint32 ScalarOptionalTypes::field3_p() const
{
    return dptr->m_field3 ?
        dptr->m_field3.value() : QtProtobuf::sint32();
}

bool ScalarOptionalTypes::hasField3() const
{
    return dptr->m_field3.has_value();
}
QtProtobuf::sint32 ScalarOptionalTypes::field3() const
{
    Q_ASSERT(dptr->m_field3.has_value());
    return dptr->m_field3.value();
}

QtProtobuf::fixed32 ScalarOptionalTypes::field4_p() const
{
    return dptr->m_field4 ?
        dptr->m_field4.value() : QtProtobuf::fixed32();
}

bool ScalarOptionalTypes::hasField4() const
{
    return dptr->m_field4.has_value();
}
QtProtobuf::fixed32 ScalarOptionalTypes::field4() const
{
    Q_ASSERT(dptr->m_field4.has_value());
    return dptr->m_field4.value();
}

QtProtobuf::sfixed32 ScalarOptionalTypes::field5_p() const
{
    return dptr->m_field5 ?
        dptr->m_field5.value() : QtProtobuf::sfixed32();
}

bool ScalarOptionalTypes::hasField5() const
{
    return dptr->m_field5.has_value();
}
QtProtobuf::sfixed32 ScalarOptionalTypes::field5() const
{
    Q_ASSERT(dptr->m_field5.has_value());
    return dptr->m_field5.value();
}

QtProtobuf::int64 ScalarOptionalTypes::field6_p() const
{
    return dptr->m_field6 ?
        dptr->m_field6.value() : QtProtobuf::int64();
}

bool ScalarOptionalTypes::hasField6() const
{
    return dptr->m_field6.has_value();
}
QtProtobuf::int64 ScalarOptionalTypes::field6() const
{
    Q_ASSERT(dptr->m_field6.has_value());
    return dptr->m_field6.value();
}

QtProtobuf::uint64 ScalarOptionalTypes::field7_p() const
{
    return dptr->m_field7 ?
        dptr->m_field7.value() : QtProtobuf::uint64();
}

bool ScalarOptionalTypes::hasField7() const
{
    return dptr->m_field7.has_value();
}
QtProtobuf::uint64 ScalarOptionalTypes::field7() const
{
    Q_ASSERT(dptr->m_field7.has_value());
    return dptr->m_field7.value();
}

QtProtobuf::sint64 ScalarOptionalTypes::field8_p() const
{
    return dptr->m_field8 ?
        dptr->m_field8.value() : QtProtobuf::sint64();
}

bool ScalarOptionalTypes::hasField8() const
{
    return dptr->m_field8.has_value();
}
QtProtobuf::sint64 ScalarOptionalTypes::field8() const
{
    Q_ASSERT(dptr->m_field8.has_value());
    return dptr->m_field8.value();
}

QtProtobuf::fixed64 ScalarOptionalTypes::field9_p() const
{
    return dptr->m_field9 ?
        dptr->m_field9.value() : QtProtobuf::fixed64();
}

bool ScalarOptionalTypes::hasField9() const
{
    return dptr->m_field9.has_value();
}
QtProtobuf::fixed64 ScalarOptionalTypes::field9() const
{
    Q_ASSERT(dptr->m_field9.has_value());
    return dptr->m_field9.value();
}

QtProtobuf::sfixed64 ScalarOptionalTypes::field10_p() const
{
    return dptr->m_field10 ?
        dptr->m_field10.value() : QtProtobuf::sfixed64();
}

bool ScalarOptionalTypes::hasField10() const
{
    return dptr->m_field10.has_value();
}
QtProtobuf::sfixed64 ScalarOptionalTypes::field10() const
{
    Q_ASSERT(dptr->m_field10.has_value());
    return dptr->m_field10.value();
}

float ScalarOptionalTypes::field11_p() const
{
    return dptr->m_field11 ?
        dptr->m_field11.value() : float();
}

bool ScalarOptionalTypes::hasField11() const
{
    return dptr->m_field11.has_value();
}
float ScalarOptionalTypes::field11() const
{
    Q_ASSERT(dptr->m_field11.has_value());
    return dptr->m_field11.value();
}

double ScalarOptionalTypes::field12_p() const
{
    return dptr->m_field12 ?
        dptr->m_field12.value() : double();
}

bool ScalarOptionalTypes::hasField12() const
{
    return dptr->m_field12.has_value();
}
double ScalarOptionalTypes::field12() const
{
    Q_ASSERT(dptr->m_field12.has_value());
    return dptr->m_field12.value();
}

QString ScalarOptionalTypes::field13_p() const
{
    return dptr->m_field13 ?
        dptr->m_field13.value() : QString();
}

bool ScalarOptionalTypes::hasField13() const
{
    return dptr->m_field13.has_value();
}
QString ScalarOptionalTypes::field13() const
{
    Q_ASSERT(dptr->m_field13.has_value());
    return dptr->m_field13.value();
}

QByteArray ScalarOptionalTypes::field14_p() const
{
    return dptr->m_field14 ?
        dptr->m_field14.value() : QByteArray();
}

bool ScalarOptionalTypes::hasField14() const
{
    return dptr->m_field14.has_value();
}
QByteArray ScalarOptionalTypes::field14() const
{
    Q_ASSERT(dptr->m_field14.has_value());
    return dptr->m_field14.value();
}

void ScalarOptionalTypes::setField1(QtProtobuf::int32 field1)
{
    if (!dptr->m_field1 || dptr->m_field1.value() != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void ScalarOptionalTypes::setField1_p(QtProtobuf::int32 field1)
{
    if (!dptr->m_field1 || dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void ScalarOptionalTypes::clearField1()
{
    if (dptr->m_field1.has_value()) {
        dptr.detach();
        dptr->m_field1.reset();
    }
}
void ScalarOptionalTypes::setField2(QtProtobuf::uint32 field2)
{
    if (!dptr->m_field2 || dptr->m_field2.value() != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void ScalarOptionalTypes::setField2_p(QtProtobuf::uint32 field2)
{
    if (!dptr->m_field2 || dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void ScalarOptionalTypes::clearField2()
{
    if (dptr->m_field2.has_value()) {
        dptr.detach();
        dptr->m_field2.reset();
    }
}
void ScalarOptionalTypes::setField3(QtProtobuf::sint32 field3)
{
    if (!dptr->m_field3 || dptr->m_field3.value() != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void ScalarOptionalTypes::setField3_p(QtProtobuf::sint32 field3)
{
    if (!dptr->m_field3 || dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void ScalarOptionalTypes::clearField3()
{
    if (dptr->m_field3.has_value()) {
        dptr.detach();
        dptr->m_field3.reset();
    }
}
void ScalarOptionalTypes::setField4(QtProtobuf::fixed32 field4)
{
    if (!dptr->m_field4 || dptr->m_field4.value() != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void ScalarOptionalTypes::setField4_p(QtProtobuf::fixed32 field4)
{
    if (!dptr->m_field4 || dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void ScalarOptionalTypes::clearField4()
{
    if (dptr->m_field4.has_value()) {
        dptr.detach();
        dptr->m_field4.reset();
    }
}
void ScalarOptionalTypes::setField5(QtProtobuf::sfixed32 field5)
{
    if (!dptr->m_field5 || dptr->m_field5.value() != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void ScalarOptionalTypes::setField5_p(QtProtobuf::sfixed32 field5)
{
    if (!dptr->m_field5 || dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void ScalarOptionalTypes::clearField5()
{
    if (dptr->m_field5.has_value()) {
        dptr.detach();
        dptr->m_field5.reset();
    }
}
void ScalarOptionalTypes::setField6(QtProtobuf::int64 field6)
{
    if (!dptr->m_field6 || dptr->m_field6.value() != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void ScalarOptionalTypes::setField6_p(QtProtobuf::int64 field6)
{
    if (!dptr->m_field6 || dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void ScalarOptionalTypes::clearField6()
{
    if (dptr->m_field6.has_value()) {
        dptr.detach();
        dptr->m_field6.reset();
    }
}
void ScalarOptionalTypes::setField7(QtProtobuf::uint64 field7)
{
    if (!dptr->m_field7 || dptr->m_field7.value() != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void ScalarOptionalTypes::setField7_p(QtProtobuf::uint64 field7)
{
    if (!dptr->m_field7 || dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void ScalarOptionalTypes::clearField7()
{
    if (dptr->m_field7.has_value()) {
        dptr.detach();
        dptr->m_field7.reset();
    }
}
void ScalarOptionalTypes::setField8(QtProtobuf::sint64 field8)
{
    if (!dptr->m_field8 || dptr->m_field8.value() != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void ScalarOptionalTypes::setField8_p(QtProtobuf::sint64 field8)
{
    if (!dptr->m_field8 || dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void ScalarOptionalTypes::clearField8()
{
    if (dptr->m_field8.has_value()) {
        dptr.detach();
        dptr->m_field8.reset();
    }
}
void ScalarOptionalTypes::setField9(QtProtobuf::fixed64 field9)
{
    if (!dptr->m_field9 || dptr->m_field9.value() != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void ScalarOptionalTypes::setField9_p(QtProtobuf::fixed64 field9)
{
    if (!dptr->m_field9 || dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void ScalarOptionalTypes::clearField9()
{
    if (dptr->m_field9.has_value()) {
        dptr.detach();
        dptr->m_field9.reset();
    }
}
void ScalarOptionalTypes::setField10(QtProtobuf::sfixed64 field10)
{
    if (!dptr->m_field10 || dptr->m_field10.value() != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void ScalarOptionalTypes::setField10_p(QtProtobuf::sfixed64 field10)
{
    if (!dptr->m_field10 || dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void ScalarOptionalTypes::clearField10()
{
    if (dptr->m_field10.has_value()) {
        dptr.detach();
        dptr->m_field10.reset();
    }
}
void ScalarOptionalTypes::setField11(float field11)
{
    if (!dptr->m_field11 || dptr->m_field11.value() != field11) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void ScalarOptionalTypes::setField11_p(float field11)
{
    if (!dptr->m_field11 || dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void ScalarOptionalTypes::clearField11()
{
    if (dptr->m_field11.has_value()) {
        dptr.detach();
        dptr->m_field11.reset();
    }
}
void ScalarOptionalTypes::setField12(double field12)
{
    if (!dptr->m_field12 || dptr->m_field12.value() != field12) {
        dptr.detach();
        dptr->m_field12 = field12;
    }
}

void ScalarOptionalTypes::setField12_p(double field12)
{
    if (!dptr->m_field12 || dptr->m_field12 != field12) {
        dptr.detach();
        dptr->m_field12 = field12;
    }
}

void ScalarOptionalTypes::clearField12()
{
    if (dptr->m_field12.has_value()) {
        dptr.detach();
        dptr->m_field12.reset();
    }
}
void ScalarOptionalTypes::setField13(const QString &field13)
{
    if (!dptr->m_field13 || dptr->m_field13.value() != field13) {
        dptr.detach();
        dptr->m_field13 = field13;
    }
}

void ScalarOptionalTypes::setField13(QString &&field13)
{
    if (!dptr->m_field13 || dptr->m_field13.value() != field13) {
        dptr.detach();
        dptr->m_field13 = std::move(field13);
    }
}

void ScalarOptionalTypes::setField13_p(QString field13)
{
    if (!dptr->m_field13 || dptr->m_field13 != field13) {
        dptr.detach();
        dptr->m_field13 = field13;
    }
}

void ScalarOptionalTypes::clearField13()
{
    if (dptr->m_field13.has_value()) {
        dptr.detach();
        dptr->m_field13.reset();
    }
}
void ScalarOptionalTypes::setField14(const QByteArray &field14)
{
    if (!dptr->m_field14 || dptr->m_field14.value() != field14) {
        dptr.detach();
        dptr->m_field14 = field14;
    }
}

void ScalarOptionalTypes::setField14(QByteArray &&field14)
{
    if (!dptr->m_field14 || dptr->m_field14.value() != field14) {
        dptr.detach();
        dptr->m_field14 = std::move(field14);
    }
}

void ScalarOptionalTypes::setField14_p(QByteArray field14)
{
    if (!dptr->m_field14 || dptr->m_field14 != field14) {
        dptr.detach();
        dptr->m_field14 = field14;
    }
}

void ScalarOptionalTypes::clearField14()
{
    if (dptr->m_field14.has_value()) {
        dptr.detach();
        dptr->m_field14.reset();
    }
}

class MapScalarTypes_QtProtobufData : public QSharedData
{
public:
    MapScalarTypes_QtProtobufData()
        : QSharedData()
    {
    }

    MapScalarTypes_QtProtobufData(const MapScalarTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2),
          m_field3(other.m_field3),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_field6(other.m_field6),
          m_field7(other.m_field7),
          m_field8(other.m_field8),
          m_field9(other.m_field9),
          m_field10(other.m_field10),
          m_field11(other.m_field11)
    {
    }

    MapScalarTypes::Field1Entry m_field1;
    MapScalarTypes::Field2Entry m_field2;
    MapScalarTypes::Field3Entry m_field3;
    MapScalarTypes::Field4Entry m_field4;
    MapScalarTypes::Field5Entry m_field5;
    MapScalarTypes::Field6Entry m_field6;
    MapScalarTypes::Field7Entry m_field7;
    MapScalarTypes::Field8Entry m_field8;
    MapScalarTypes::Field9Entry m_field9;
    MapScalarTypes::Field10Entry m_field10;
    MapScalarTypes::Field11Entry m_field11;
};

MapScalarTypes::~MapScalarTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 45> qt_protobuf_MapScalarTypes_uint_data;
    const char qt_protobuf_MapScalarTypes_char_data[107];
} qt_protobuf_MapScalarTypes_metadata {
    // data
    {
        0, /* = version */
        11, /* = num fields */
        12, /* = field number offset */
        23, /* = property index offset */
        34, /* = field flags offset */
        26, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        27, /* = field1 */
        34, /* = field2 */
        41, /* = field3 */
        48, /* = field4 */
        55, /* = field5 */
        62, /* = field6 */
        69, /* = field7 */
        76, /* = field8 */
        83, /* = field9 */
        90, /* = field10 */
        98, /* = field11 */
        106, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        9, /* = field9 */
        10, /* = field10 */
        11, /* = field11 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        2, /* = field3 */
        3, /* = field4 */
        4, /* = field5 */
        5, /* = field6 */
        6, /* = field7 */
        7, /* = field8 */
        8, /* = field9 */
        9, /* = field10 */
        10, /* = field11 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field8 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field9 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field10 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field11 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.MapScalarTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0field9\0field10\0"
    "field11\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering MapScalarTypes::staticPropertyOrdering = {
    &qt_protobuf_MapScalarTypes_metadata.data
};

void MapScalarTypes::registerTypes()
{
    qRegisterMetaType<MapScalarTypes>();
    qRegisterMetaType<QList<MapScalarTypes>>();
    qRegisterMetaType<MapScalarTypes::Field1Entry>();
    qRegisterProtobufMapType<QtProtobuf::int32, QtProtobuf::int64>();
    qRegisterMetaType<MapScalarTypes::Field2Entry>();
    qRegisterProtobufMapType<QtProtobuf::int64, QtProtobuf::sint32>();
    qRegisterMetaType<MapScalarTypes::Field3Entry>();
    qRegisterProtobufMapType<QtProtobuf::sint32, QtProtobuf::sint64>();
    qRegisterMetaType<MapScalarTypes::Field4Entry>();
    qRegisterProtobufMapType<QtProtobuf::sint64, QtProtobuf::uint32>();
    qRegisterMetaType<MapScalarTypes::Field5Entry>();
    qRegisterProtobufMapType<QtProtobuf::uint32, QtProtobuf::uint64>();
    qRegisterMetaType<MapScalarTypes::Field6Entry>();
    qRegisterProtobufMapType<QtProtobuf::uint64, QtProtobuf::fixed32>();
    qRegisterMetaType<MapScalarTypes::Field7Entry>();
    qRegisterProtobufMapType<QtProtobuf::fixed32, QtProtobuf::fixed64>();
    qRegisterMetaType<MapScalarTypes::Field8Entry>();
    qRegisterProtobufMapType<QtProtobuf::fixed64, QtProtobuf::sfixed32>();
    qRegisterMetaType<MapScalarTypes::Field9Entry>();
    qRegisterProtobufMapType<QtProtobuf::sfixed32, QtProtobuf::sfixed64>();
    qRegisterMetaType<MapScalarTypes::Field10Entry>();
    qRegisterProtobufMapType<QtProtobuf::sfixed64, QString>();
    qRegisterMetaType<MapScalarTypes::Field11Entry>();
    qRegisterProtobufMapType<QString, QtProtobuf::int32>();
}

MapScalarTypes::MapScalarTypes()
    : QProtobufMessage(&MapScalarTypes::staticMetaObject, &MapScalarTypes::staticPropertyOrdering),
      dptr(new MapScalarTypes_QtProtobufData)
{
}

MapScalarTypes::MapScalarTypes(const MapScalarTypes &other)
    = default;
MapScalarTypes &MapScalarTypes::operator =(const MapScalarTypes &other)
{
    MapScalarTypes temp(other);
    swap(temp);
    return *this;
}
MapScalarTypes::MapScalarTypes(MapScalarTypes &&other) noexcept
    = default;
MapScalarTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const MapScalarTypes &lhs, const MapScalarTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && lhs.dptr->m_field3 == rhs.dptr->m_field3
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_field6 == rhs.dptr->m_field6
        && lhs.dptr->m_field7 == rhs.dptr->m_field7
        && lhs.dptr->m_field8 == rhs.dptr->m_field8
        && lhs.dptr->m_field9 == rhs.dptr->m_field9
        && lhs.dptr->m_field10 == rhs.dptr->m_field10
        && lhs.dptr->m_field11 == rhs.dptr->m_field11;
}

const MapScalarTypes::Field1Entry &MapScalarTypes::field1() const &
{
    return dptr->m_field1;
}

const MapScalarTypes::Field2Entry &MapScalarTypes::field2() const &
{
    return dptr->m_field2;
}

const MapScalarTypes::Field3Entry &MapScalarTypes::field3() const &
{
    return dptr->m_field3;
}

const MapScalarTypes::Field4Entry &MapScalarTypes::field4() const &
{
    return dptr->m_field4;
}

const MapScalarTypes::Field5Entry &MapScalarTypes::field5() const &
{
    return dptr->m_field5;
}

const MapScalarTypes::Field6Entry &MapScalarTypes::field6() const &
{
    return dptr->m_field6;
}

const MapScalarTypes::Field7Entry &MapScalarTypes::field7() const &
{
    return dptr->m_field7;
}

const MapScalarTypes::Field8Entry &MapScalarTypes::field8() const &
{
    return dptr->m_field8;
}

const MapScalarTypes::Field9Entry &MapScalarTypes::field9() const &
{
    return dptr->m_field9;
}

const MapScalarTypes::Field10Entry &MapScalarTypes::field10() const &
{
    return dptr->m_field10;
}

const MapScalarTypes::Field11Entry &MapScalarTypes::field11() const &
{
    return dptr->m_field11;
}

void MapScalarTypes::setField1(const MapScalarTypes::Field1Entry &field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void MapScalarTypes::setField1(MapScalarTypes::Field1Entry &&field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = std::move(field1);
    }
}

void MapScalarTypes::setField2(const MapScalarTypes::Field2Entry &field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void MapScalarTypes::setField2(MapScalarTypes::Field2Entry &&field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = std::move(field2);
    }
}

void MapScalarTypes::setField3(const MapScalarTypes::Field3Entry &field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = field3;
    }
}

void MapScalarTypes::setField3(MapScalarTypes::Field3Entry &&field3)
{
    if (dptr->m_field3 != field3) {
        dptr.detach();
        dptr->m_field3 = std::move(field3);
    }
}

void MapScalarTypes::setField4(const MapScalarTypes::Field4Entry &field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void MapScalarTypes::setField4(MapScalarTypes::Field4Entry &&field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = std::move(field4);
    }
}

void MapScalarTypes::setField5(const MapScalarTypes::Field5Entry &field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void MapScalarTypes::setField5(MapScalarTypes::Field5Entry &&field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = std::move(field5);
    }
}

void MapScalarTypes::setField6(const MapScalarTypes::Field6Entry &field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = field6;
    }
}

void MapScalarTypes::setField6(MapScalarTypes::Field6Entry &&field6)
{
    if (dptr->m_field6 != field6) {
        dptr.detach();
        dptr->m_field6 = std::move(field6);
    }
}

void MapScalarTypes::setField7(const MapScalarTypes::Field7Entry &field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = field7;
    }
}

void MapScalarTypes::setField7(MapScalarTypes::Field7Entry &&field7)
{
    if (dptr->m_field7 != field7) {
        dptr.detach();
        dptr->m_field7 = std::move(field7);
    }
}

void MapScalarTypes::setField8(const MapScalarTypes::Field8Entry &field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = field8;
    }
}

void MapScalarTypes::setField8(MapScalarTypes::Field8Entry &&field8)
{
    if (dptr->m_field8 != field8) {
        dptr.detach();
        dptr->m_field8 = std::move(field8);
    }
}

void MapScalarTypes::setField9(const MapScalarTypes::Field9Entry &field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = field9;
    }
}

void MapScalarTypes::setField9(MapScalarTypes::Field9Entry &&field9)
{
    if (dptr->m_field9 != field9) {
        dptr.detach();
        dptr->m_field9 = std::move(field9);
    }
}

void MapScalarTypes::setField10(const MapScalarTypes::Field10Entry &field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = field10;
    }
}

void MapScalarTypes::setField10(MapScalarTypes::Field10Entry &&field10)
{
    if (dptr->m_field10 != field10) {
        dptr.detach();
        dptr->m_field10 = std::move(field10);
    }
}

void MapScalarTypes::setField11(const MapScalarTypes::Field11Entry &field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = field11;
    }
}

void MapScalarTypes::setField11(MapScalarTypes::Field11Entry &&field11)
{
    if (dptr->m_field11 != field11) {
        dptr.detach();
        dptr->m_field11 = std::move(field11);
    }
}


class MessageTypes_QtProtobufData : public QSharedData
{
public:
    MessageTypes_QtProtobufData()
        : QSharedData(),
          m_field1(nullptr),
          m_field3(nullptr),
          m_field4(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1)
    {
    }

    MessageTypes_QtProtobufData(const MessageTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1
                                               ? new ScalarTypes(*other.m_field1)
                                               : nullptr),
          m_field2(other.m_field2),
          m_field3(other.m_field3
                                               ? new ScalarTypes(*other.m_field3)
                                               : nullptr),
          m_field4(other.m_field4),
          m_field5(other.m_field5),
          m_fieldOneOf(other.m_fieldOneOf)
    {
    }

    QtProtobufPrivate::QProtobufLazyMessagePointer<ScalarTypes> m_field1;
    QList<ScalarTypes> m_field2;
    QtProtobufPrivate::QProtobufLazyMessagePointer<ScalarTypes> m_field3;
    EnumTypes_QtProtobufNested::NestedEnum m_field4;
    MessageTypes::Field5Entry m_field5;
    QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
};

MessageTypes::~MessageTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 33> qt_protobuf_MessageTypes_uint_data;
    const char qt_protobuf_MessageTypes_char_data[82];
} qt_protobuf_MessageTypes_metadata {
    // data
    {
        0, /* = version */
        8, /* = num fields */
        9, /* = field number offset */
        17, /* = property index offset */
        25, /* = field flags offset */
        24, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        25, /* = field1 */
        32, /* = field2 */
        39, /* = field3 */
        46, /* = field4 */
        53, /* = field5 */
        60, /* = field6 */
        67, /* = field7 */
        74, /* = field8 */
        81, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        4, /* = field4 */
        5, /* = field5 */
        6, /* = field6 */
        7, /* = field7 */
        8, /* = field8 */
        // Property indices:
        0, /* = field1 */
        2, /* = field2 */
        3, /* = field3 */
        5, /* = field4 */
        6, /* = field5 */
        7, /* = field6 */
        9, /* = field7 */
        11, /* = field8 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::Repeated | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
        uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field3 */
        uint(QtProtobufPrivate::FieldFlag::Enum), /* = field4 */
        uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field5 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field6 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field7 */
        uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field8 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.MessageTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0field3\0field4\0field5\0"
    "field6\0field7\0field8\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering MessageTypes::staticPropertyOrdering = {
    &qt_protobuf_MessageTypes_metadata.data
};

void MessageTypes::registerTypes()
{
    qRegisterMetaType<MessageTypes>();
    qRegisterMetaType<QList<MessageTypes>>();
    qRegisterMetaType<MessageTypes::Field5Entry>();
    qRegisterProtobufMapType<QtProtobuf::int32, ScalarTypes>();
}

MessageTypes::MessageTypes()
    : QProtobufMessage(&MessageTypes::staticMetaObject, &MessageTypes::staticPropertyOrdering),
      dptr(new MessageTypes_QtProtobufData)
{
}

MessageTypes::MessageTypes(const MessageTypes &other)
    = default;
MessageTypes &MessageTypes::operator =(const MessageTypes &other)
{
    MessageTypes temp(other);
    swap(temp);
    return *this;
}
MessageTypes::MessageTypes(MessageTypes &&other) noexcept
    = default;
MessageTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const MessageTypes &lhs, const MessageTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && (lhs.dptr->m_field1 == rhs.dptr->m_field1
            || *lhs.dptr->m_field1 == *rhs.dptr->m_field1)
        && lhs.dptr->m_field2 == rhs.dptr->m_field2
        && (lhs.dptr->m_field3 == rhs.dptr->m_field3
            || *lhs.dptr->m_field3 == *rhs.dptr->m_field3)
        && lhs.dptr->m_field4 == rhs.dptr->m_field4
        && lhs.dptr->m_field5 == rhs.dptr->m_field5
        && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
}

ScalarTypes *MessageTypes::field1_p()
{
    if (!dptr->m_field1)
        dptr.detach();
    return dptr->m_field1.get();
}

bool MessageTypes::hasField1() const
{
    return dptr->m_field1.operator bool();
}

const ScalarTypes &MessageTypes::field1() const &
{
    return *dptr->m_field1;
}

ScalarTypes &MessageTypes::mutField1() &
{
    dptr.detach();
    return *dptr->m_field1;
}

void MessageTypes::clearField1()
{
    if (dptr->m_field1) {
        dptr.detach();
        dptr->m_field1.reset();
    }
}

const QList<ScalarTypes> &MessageTypes::field2() const &
{
    return dptr->m_field2;
}

ScalarTypes *MessageTypes::field3_p()
{
    if (!dptr->m_field3)
        dptr.detach();
    return dptr->m_field3.get();
}

bool MessageTypes::hasField3() const
{
    return dptr->m_field3.operator bool();
}

const ScalarTypes &MessageTypes::field3() const &
{
    return *dptr->m_field3;
}

ScalarTypes &MessageTypes::mutField3() &
{
    dptr.detach();
    return *dptr->m_field3;
}

void MessageTypes::clearField3()
{
    if (dptr->m_field3) {
        dptr.detach();
        dptr->m_field3.reset();
    }
}

EnumTypes_QtProtobufNested::NestedEnum MessageTypes::field4() const
{
    return dptr->m_field4;
}

const MessageTypes::Field5Entry &MessageTypes::field5() const &
{
    return dptr->m_field5;
}

ScalarTypes *MessageTypes::field6_p()
{
    if (!dptr->m_fieldOneOf.holdsField(6))
        dptr.detach();
    return dptr->m_fieldOneOf.message<ScalarTypes>();
}

bool MessageTypes::hasField6() const
{
    return dptr->m_fieldOneOf.holdsField(6);
}
ScalarTypes &MessageTypes::field6() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(6));
    return *(dptr->m_fieldOneOf.message<ScalarTypes>());
}

ScalarRepeatedTypes *MessageTypes::field7_p()
{
    if (!dptr->m_fieldOneOf.holdsField(7))
        dptr.detach();
    return dptr->m_fieldOneOf.message<ScalarRepeatedTypes>();
}

bool MessageTypes::hasField7() const
{
    return dptr->m_fieldOneOf.holdsField(7);
}
ScalarRepeatedTypes &MessageTypes::field7() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(7));
    return *(dptr->m_fieldOneOf.message<ScalarRepeatedTypes>());
}

ScalarOneOfTypes *MessageTypes::field8_p()
{
    if (!dptr->m_fieldOneOf.holdsField(8))
        dptr.detach();
    return dptr->m_fieldOneOf.message<ScalarOneOfTypes>();
}

bool MessageTypes::hasField8() const
{
    return dptr->m_fieldOneOf.holdsField(8);
}
ScalarOneOfTypes &MessageTypes::field8() const
{
    Q_ASSERT(dptr->m_fieldOneOf.holdsField(8));
    return *(dptr->m_fieldOneOf.message<ScalarOneOfTypes>());
}

void MessageTypes::setField1_p(ScalarTypes *field1)
{
    if (dptr->m_field1.get() != field1) {
        dptr.detach();
        dptr->m_field1.reset(field1);
    }
}

void MessageTypes::setField1(const ScalarTypes &field1)
{
    if (*dptr->m_field1 != field1) {
        dptr.detach();
        *dptr->m_field1 = field1;
    }
}

void MessageTypes::setField1(ScalarTypes &&field1)
{
    if (*dptr->m_field1 != field1) {
        dptr.detach();
        *dptr->m_field1 = std::move(field1);
    }
}

void MessageTypes::setField2(const QList<ScalarTypes> &field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = field2;
    }
}

void MessageTypes::setField2(QList<ScalarTypes> &&field2)
{
    if (dptr->m_field2 != field2) {
        dptr.detach();
        dptr->m_field2 = std::move(field2);
    }
}

void MessageTypes::setField3_p(ScalarTypes *field3)
{
    if (dptr->m_field3.get() != field3) {
        dptr.detach();
        dptr->m_field3.reset(field3);
    }
}

void MessageTypes::setField3(const ScalarTypes &field3)
{
    if (*dptr->m_field3 != field3) {
        dptr.detach();
        *dptr->m_field3 = field3;
    }
}

void MessageTypes::setField3(ScalarTypes &&field3)
{
    if (*dptr->m_field3 != field3) {
        dptr.detach();
        *dptr->m_field3 = std::move(field3);
    }
}

void MessageTypes::setField4(EnumTypes_QtProtobufNested::NestedEnum field4)
{
    if (dptr->m_field4 != field4) {
        dptr.detach();
        dptr->m_field4 = field4;
    }
}

void MessageTypes::setField5(const MessageTypes::Field5Entry &field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = field5;
    }
}

void MessageTypes::setField5(MessageTypes::Field5Entry &&field5)
{
    if (dptr->m_field5 != field5) {
        dptr.detach();
        dptr->m_field5 = std::move(field5);
    }
}

void MessageTypes::setField6(const ScalarTypes &field6)
{
    if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field6, 6);
    }
}

void MessageTypes::setField6(ScalarTypes &&field6)
{
    if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(std::move(field6), 6);
    }
}

void MessageTypes::setField6_p(ScalarTypes *field6)
{
    const ScalarTypes &value = *field6;
    if (!dptr->m_fieldOneOf.isEqual(value, 6)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(value, 6);
    }
}

void MessageTypes::setField7(const ScalarRepeatedTypes &field7)
{
    if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field7, 7);
    }
}

void MessageTypes::setField7(ScalarRepeatedTypes &&field7)
{
    if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(std::move(field7), 7);
    }
}

void MessageTypes::setField7_p(ScalarRepeatedTypes *field7)
{
    const ScalarRepeatedTypes &value = *field7;
    if (!dptr->m_fieldOneOf.isEqual(value, 7)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(value, 7);
    }
}

void MessageTypes::setField8(const ScalarOneOfTypes &field8)
{
    if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(field8, 8);
    }
}

void MessageTypes::setField8(ScalarOneOfTypes &&field8)
{
    if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(std::move(field8), 8);
    }
}

void MessageTypes::setField8_p(ScalarOneOfTypes *field8)
{
    const ScalarOneOfTypes &value = *field8;
    if (!dptr->m_fieldOneOf.isEqual(value, 8)) {
        dptr.detach();
        dptr->m_fieldOneOf.setValue(value, 8);
    }
}

MessageTypes::FieldOneOfFields MessageTypes::fieldOneOfField() const
{
    return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
}
void MessageTypes::clearFieldOneOf()
{
    if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
        dptr.detach();
        dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
    }
}
namespace MessageNestedTypes_QtProtobufNested {

class NestedMessage_QtProtobufData : public QSharedData
{
public:
    NestedMessage_QtProtobufData()
        : QSharedData(),
          m_field1(0),
          m_field2(nullptr)
    {
    }

    NestedMessage_QtProtobufData(const NestedMessage_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1),
          m_field2(other.m_field2
                                               ? new MessageTypes(*other.m_field2)
                                               : nullptr)
    {
    }

    QtProtobuf::int32 m_field1;
    QtProtobufPrivate::QProtobufLazyMessagePointer<MessageTypes> m_field2;
};

NestedMessage::~NestedMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 9> qt_protobuf_NestedMessage_uint_data;
    const char qt_protobuf_NestedMessage_char_data[60];
} qt_protobuf_NestedMessage_metadata {
    // data
    {
        0, /* = version */
        2, /* = num fields */
        3, /* = field number offset */
        5, /* = property index offset */
        7, /* = field flags offset */
        44, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        45, /* = field1 */
        52, /* = field2 */
        59, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        2, /* = field2 */
        // Property indices:
        0, /* = field1 */
        1, /* = field2 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field1 */
        uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.MessageNestedTypes.NestedMessage\0" /* = full message name */
    /* field char_data: */
    "field1\0field2\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering NestedMessage::staticPropertyOrdering = {
    &qt_protobuf_NestedMessage_metadata.data
};

void NestedMessage::registerTypes()
{
    qRegisterMetaType<NestedMessage>();
    qRegisterMetaType<QList<NestedMessage>>();
}

NestedMessage::NestedMessage()
    : QProtobufMessage(&NestedMessage::staticMetaObject, &NestedMessage::staticPropertyOrdering),
      dptr(new NestedMessage_QtProtobufData)
{
}

NestedMessage::NestedMessage(const NestedMessage &other)
    = default;
NestedMessage &NestedMessage::operator =(const NestedMessage &other)
{
    NestedMessage temp(other);
    swap(temp);
    return *this;
}
NestedMessage::NestedMessage(NestedMessage &&other) noexcept
    = default;
NestedMessage::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const NestedMessage &lhs, const NestedMessage &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && lhs.dptr->m_field1 == rhs.dptr->m_field1
        && (lhs.dptr->m_field2 == rhs.dptr->m_field2
            || *lhs.dptr->m_field2 == *rhs.dptr->m_field2);
}

QtProtobuf::int32 NestedMessage::field1() const
{
    return dptr->m_field1;
}

MessageTypes *NestedMessage::field2_p()
{
    if (!dptr->m_field2)
        dptr.detach();
    return dptr->m_field2.get();
}

bool NestedMessage::hasField2() const
{
    return dptr->m_field2.operator bool();
}

const MessageTypes &NestedMessage::field2() const &
{
    return *dptr->m_field2;
}

MessageTypes &NestedMessage::mutField2() &
{
    dptr.detach();
    return *dptr->m_field2;
}

void NestedMessage::clearField2()
{
    if (dptr->m_field2) {
        dptr.detach();
        dptr->m_field2.reset();
    }
}

void NestedMessage::setField1(QtProtobuf::int32 field1)
{
    if (dptr->m_field1 != field1) {
        dptr.detach();
        dptr->m_field1 = field1;
    }
}

void NestedMessage::setField2_p(MessageTypes *field2)
{
    if (dptr->m_field2.get() != field2) {
        dptr.detach();
        dptr->m_field2.reset(field2);
    }
}

void NestedMessage::setField2(const MessageTypes &field2)
{
    if (*dptr->m_field2 != field2) {
        dptr.detach();
        *dptr->m_field2 = field2;
    }
}

void NestedMessage::setField2(MessageTypes &&field2)
{
    if (*dptr->m_field2 != field2) {
        dptr.detach();
        *dptr->m_field2 = std::move(field2);
    }
}

} // namespace MessageNestedTypes_QtProtobufNested

class MessageNestedTypes_QtProtobufData : public QSharedData
{
public:
    MessageNestedTypes_QtProtobufData()
        : QSharedData(),
          m_field1(nullptr)
    {
    }

    MessageNestedTypes_QtProtobufData(const MessageNestedTypes_QtProtobufData &other)
        : QSharedData(other),
          m_field1(other.m_field1
                                               ? new MessageNestedTypes_QtProtobufNested::NestedMessage(*other.m_field1)
                                               : nullptr)
    {
    }

    QtProtobufPrivate::QProtobufLazyMessagePointer<MessageNestedTypes_QtProtobufNested::NestedMessage> m_field1;
};

MessageNestedTypes::~MessageNestedTypes() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_MessageNestedTypes_uint_data;
    const char qt_protobuf_MessageNestedTypes_char_data[39];
} qt_protobuf_MessageNestedTypes_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        30, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        31, /* = field1 */
        38, /* = end-of-string-marker */
        // Field numbers:
        1, /* = field1 */
        // Property indices:
        0, /* = field1 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
    },
    // char_data
    /* metadata char_data: */
    "qt.protobuf.MessageNestedTypes\0" /* = full message name */
    /* field char_data: */
    "field1\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering MessageNestedTypes::staticPropertyOrdering = {
    &qt_protobuf_MessageNestedTypes_metadata.data
};

void MessageNestedTypes::registerTypes()
{
    qRegisterMetaType<MessageNestedTypes>();
    qRegisterMetaType<QList<MessageNestedTypes>>();
}

MessageNestedTypes::MessageNestedTypes()
    : QProtobufMessage(&MessageNestedTypes::staticMetaObject, &MessageNestedTypes::staticPropertyOrdering),
      dptr(new MessageNestedTypes_QtProtobufData)
{
}

MessageNestedTypes::MessageNestedTypes(const MessageNestedTypes &other)
    = default;
MessageNestedTypes &MessageNestedTypes::operator =(const MessageNestedTypes &other)
{
    MessageNestedTypes temp(other);
    swap(temp);
    return *this;
}
MessageNestedTypes::MessageNestedTypes(MessageNestedTypes &&other) noexcept
    = default;
MessageNestedTypes::operator QVariant() const
{
    return QVariant::fromValue(*this);
}
bool comparesEqual(const MessageNestedTypes &lhs, const MessageNestedTypes &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs))
        && (lhs.dptr->m_field1 == rhs.dptr->m_field1
            || *lhs.dptr->m_field1 == *rhs.dptr->m_field1);
}

MessageNestedTypes_QtProtobufNested::NestedMessage *MessageNestedTypes::field1_p()
{
    if (!dptr->m_field1)
        dptr.detach();
    return dptr->m_field1.get();
}

bool MessageNestedTypes::hasField1() const
{
    return dptr->m_field1.operator bool();
}

const MessageNestedTypes_QtProtobufNested::NestedMessage &MessageNestedTypes::field1() const &
{
    return *dptr->m_field1;
}

MessageNestedTypes_QtProtobufNested::NestedMessage &MessageNestedTypes::mutField1() &
{
    dptr.detach();
    return *dptr->m_field1;
}

void MessageNestedTypes::clearField1()
{
    if (dptr->m_field1) {
        dptr.detach();
        dptr->m_field1.reset();
    }
}

void MessageNestedTypes::setField1_p(MessageNestedTypes_QtProtobufNested::NestedMessage *field1)
{
    if (dptr->m_field1.get() != field1) {
        dptr.detach();
        dptr->m_field1.reset(field1);
    }
}

void MessageNestedTypes::setField1(const MessageNestedTypes_QtProtobufNested::NestedMessage &field1)
{
    if (*dptr->m_field1 != field1) {
        dptr.detach();
        *dptr->m_field1 = field1;
    }
}

void MessageNestedTypes::setField1(MessageNestedTypes_QtProtobufNested::NestedMessage &&field1)
{
    if (*dptr->m_field1 != field1) {
        dptr.detach();
        *dptr->m_field1 = std::move(field1);
    }
}

} // namespace qt::protobuf

#include "moc_qtprotobufgen.qpb.cpp"
