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

#include "enummessages.qpb.h"
#include <QtProtobuf/qprotobufregistration.h>
#include <cmath>

namespace qtprotobufnamespace::tests {
static QtProtobuf::ProtoTypeRegistrar ProtoTypeRegistrarTestEnumGadget(TestEnumGadget::registerTypes);
void TestEnumGadget::registerTypes()
{
    qRegisterMetaType<TestEnum>();
    qRegisterMetaType<qtprotobufnamespace::tests::TestEnumGadget::TestEnum>();
    qRegisterProtobufEnumType<qtprotobufnamespace::tests::TestEnumGadget::TestEnum>();
}

static QtProtobuf::ProtoTypeRegistrar ProtoTypeRegistrarTestEnumSecondInFileGadget(TestEnumSecondInFileGadget::registerTypes);
void TestEnumSecondInFileGadget::registerTypes()
{
    qRegisterMetaType<TestEnumSecondInFile>();
    qRegisterMetaType<qtprotobufnamespace::tests::TestEnumSecondInFileGadget::TestEnumSecondInFile>();
    qRegisterProtobufEnumType<qtprotobufnamespace::tests::TestEnumSecondInFileGadget::TestEnumSecondInFile>();
}


class SimpleEnumMessage_QtProtobufData : public QSharedData
{
public:
    SimpleEnumMessage_QtProtobufData()
        : QSharedData(),
          m_localEnum(SimpleEnumMessage_QtProtobufNested::LocalEnum::LOCAL_ENUM_VALUE0)
    {
    }

    SimpleEnumMessage_QtProtobufData(const SimpleEnumMessage_QtProtobufData &other)
        : QSharedData(other),
          m_localEnum(other.m_localEnum)
    {
    }

    SimpleEnumMessage_QtProtobufNested::LocalEnum m_localEnum;
};

SimpleEnumMessage::~SimpleEnumMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleEnumMessage_uint_data;
    const char qt_protobuf_SimpleEnumMessage_char_data[55];
} qt_protobuf_SimpleEnumMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        43, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        44, /* = localEnum */
        54, /* = end-of-string-marker */
        // Field numbers:
        1, /* = localEnum */
        // Property indices:
        0, /* = localEnum */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = localEnum */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleEnumMessage\0" /* = full message name */
    /* field char_data: */
    "localEnum\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleEnumMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleEnumMessage_metadata.data
};

void SimpleEnumMessage::registerTypes()
{
    qRegisterMetaType<SimpleEnumMessage>();
    qRegisterMetaType<SimpleEnumMessageRepeated>();
    qRegisterProtobufEnumType<SimpleEnumMessage_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

SimpleEnumMessage::SimpleEnumMessage()
    : QProtobufMessage(&SimpleEnumMessage::staticMetaObject, &SimpleEnumMessage::staticPropertyOrdering),
      dptr(new SimpleEnumMessage_QtProtobufData)
{
}

SimpleEnumMessage::SimpleEnumMessage(const SimpleEnumMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
SimpleEnumMessage &SimpleEnumMessage::operator =(const SimpleEnumMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
SimpleEnumMessage::SimpleEnumMessage(SimpleEnumMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
SimpleEnumMessage &SimpleEnumMessage::operator =(SimpleEnumMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool SimpleEnumMessage::operator ==(const SimpleEnumMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_localEnum == other.dptr->m_localEnum;
}

bool SimpleEnumMessage::operator !=(const SimpleEnumMessage &other) const
{
    return !this->operator ==(other);
}

SimpleEnumMessage_QtProtobufNested::LocalEnum SimpleEnumMessage::localEnum() const
{
    return dptr->m_localEnum;
}

void SimpleEnumMessage::setLocalEnum(const SimpleEnumMessage_QtProtobufNested::LocalEnum &localEnum)
{
    if (dptr->m_localEnum != localEnum) {
        dptr.detach();
        dptr->m_localEnum = localEnum;
    }
}


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

    RepeatedEnumMessage_QtProtobufData(const RepeatedEnumMessage_QtProtobufData &other)
        : QSharedData(other),
          m_localEnumList(other.m_localEnumList)
    {
    }

    RepeatedEnumMessage_QtProtobufNested::LocalEnumRepeated m_localEnumList;
};

RepeatedEnumMessage::~RepeatedEnumMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_RepeatedEnumMessage_uint_data;
    const char qt_protobuf_RepeatedEnumMessage_char_data[61];
} qt_protobuf_RepeatedEnumMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        45, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        46, /* = localEnumList */
        60, /* = end-of-string-marker */
        // Field numbers:
        1, /* = localEnumList */
        // Property indices:
        0, /* = localEnumList */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = localEnumList */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.RepeatedEnumMessage\0" /* = full message name */
    /* field char_data: */
    "localEnumList\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering RepeatedEnumMessage::staticPropertyOrdering = {
    &qt_protobuf_RepeatedEnumMessage_metadata.data
};

void RepeatedEnumMessage::registerTypes()
{
    qRegisterMetaType<RepeatedEnumMessage>();
    qRegisterMetaType<RepeatedEnumMessageRepeated>();
    qRegisterProtobufEnumType<RepeatedEnumMessage_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

RepeatedEnumMessage::RepeatedEnumMessage()
    : QProtobufMessage(&RepeatedEnumMessage::staticMetaObject, &RepeatedEnumMessage::staticPropertyOrdering),
      dptr(new RepeatedEnumMessage_QtProtobufData)
{
}

RepeatedEnumMessage::RepeatedEnumMessage(const RepeatedEnumMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
RepeatedEnumMessage &RepeatedEnumMessage::operator =(const RepeatedEnumMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
RepeatedEnumMessage::RepeatedEnumMessage(RepeatedEnumMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
RepeatedEnumMessage &RepeatedEnumMessage::operator =(RepeatedEnumMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool RepeatedEnumMessage::operator ==(const RepeatedEnumMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_localEnumList == other.dptr->m_localEnumList;
}

bool RepeatedEnumMessage::operator !=(const RepeatedEnumMessage &other) const
{
    return !this->operator ==(other);
}

RepeatedEnumMessage_QtProtobufNested::LocalEnumRepeated RepeatedEnumMessage::localEnumList() const
{
    return dptr->m_localEnumList;
}

RepeatedEnumMessage_QtProtobufNested::LocalEnumRepeated &RepeatedEnumMessage::localEnumList()
{
    dptr.detach();
    return dptr->m_localEnumList;
}

void RepeatedEnumMessage::setLocalEnumList(const RepeatedEnumMessage_QtProtobufNested::LocalEnumRepeated &localEnumList)
{
    if (dptr->m_localEnumList != localEnumList) {
        dptr.detach();
        dptr->m_localEnumList = localEnumList;
    }
}

namespace MixedEnumUsageMessage_QtProtobufNested {

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

    NestedEnumHolder_QtProtobufData(const NestedEnumHolder_QtProtobufData &other)
        : QSharedData(other)
    {
    }

};

NestedEnumHolder::~NestedEnumHolder() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 1> qt_protobuf_NestedEnumHolder_uint_data;
    const char qt_protobuf_NestedEnumHolder_char_data[66];
} qt_protobuf_NestedEnumHolder_metadata {
    // data
    {
        0, /* = version */
        0, /* = num fields */
        1, /* = field number offset */
        1, /* = property index offset */
        1, /* = field flags offset */
        64, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        65, /* = end-of-string-marker */
        // Field numbers:
        // Property indices:
        // Field flags:
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.MixedEnumUsageMessage.NestedEnumHolder\0" /* = full message name */
    /* field char_data: */
    ""
};

const QtProtobufPrivate::QProtobufPropertyOrdering NestedEnumHolder::staticPropertyOrdering = {
    &qt_protobuf_NestedEnumHolder_metadata.data
};

void NestedEnumHolder::registerTypes()
{
    qRegisterMetaType<NestedEnumHolder>();
    qRegisterMetaType<NestedEnumHolderRepeated>();
    qRegisterProtobufEnumType<NestedEnumHolder_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

NestedEnumHolder::NestedEnumHolder()
    : QProtobufMessage(&NestedEnumHolder::staticMetaObject, &NestedEnumHolder::staticPropertyOrdering),
      dptr(new NestedEnumHolder_QtProtobufData)
{
}

NestedEnumHolder::NestedEnumHolder(const NestedEnumHolder &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
NestedEnumHolder &NestedEnumHolder::operator =(const NestedEnumHolder &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
NestedEnumHolder::NestedEnumHolder(NestedEnumHolder &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
NestedEnumHolder &NestedEnumHolder::operator =(NestedEnumHolder &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool NestedEnumHolder::operator ==(const NestedEnumHolder &other) const
{
    return QProtobufMessage::isEqual(*this, other);
}

bool NestedEnumHolder::operator !=(const NestedEnumHolder &other) const
{
    return !this->operator ==(other);
}

namespace NestedEnumHolderLevel1_QtProtobufNested {

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

    NestedEnumHolderLevel2_QtProtobufData(const NestedEnumHolderLevel2_QtProtobufData &other)
        : QSharedData(other)
    {
    }

};

NestedEnumHolderLevel2::~NestedEnumHolderLevel2() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 1> qt_protobuf_NestedEnumHolderLevel2_uint_data;
    const char qt_protobuf_NestedEnumHolderLevel2_char_data[95];
} qt_protobuf_NestedEnumHolderLevel2_metadata {
    // data
    {
        0, /* = version */
        0, /* = num fields */
        1, /* = field number offset */
        1, /* = property index offset */
        1, /* = field flags offset */
        93, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        94, /* = end-of-string-marker */
        // Field numbers:
        // Property indices:
        // Field flags:
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.MixedEnumUsageMessage.NestedEnumHolderLevel1.NestedEnumHolderLevel2\0" /* = full message name */
    /* field char_data: */
    ""
};

const QtProtobufPrivate::QProtobufPropertyOrdering NestedEnumHolderLevel2::staticPropertyOrdering = {
    &qt_protobuf_NestedEnumHolderLevel2_metadata.data
};

void NestedEnumHolderLevel2::registerTypes()
{
    qRegisterMetaType<NestedEnumHolderLevel2>();
    qRegisterMetaType<NestedEnumHolderLevel2Repeated>();
    qRegisterProtobufEnumType<NestedEnumHolderLevel2_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

NestedEnumHolderLevel2::NestedEnumHolderLevel2()
    : QProtobufMessage(&NestedEnumHolderLevel2::staticMetaObject, &NestedEnumHolderLevel2::staticPropertyOrdering),
      dptr(new NestedEnumHolderLevel2_QtProtobufData)
{
}

NestedEnumHolderLevel2::NestedEnumHolderLevel2(const NestedEnumHolderLevel2 &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
NestedEnumHolderLevel2 &NestedEnumHolderLevel2::operator =(const NestedEnumHolderLevel2 &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
NestedEnumHolderLevel2::NestedEnumHolderLevel2(NestedEnumHolderLevel2 &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
NestedEnumHolderLevel2 &NestedEnumHolderLevel2::operator =(NestedEnumHolderLevel2 &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool NestedEnumHolderLevel2::operator ==(const NestedEnumHolderLevel2 &other) const
{
    return QProtobufMessage::isEqual(*this, other);
}

bool NestedEnumHolderLevel2::operator !=(const NestedEnumHolderLevel2 &other) const
{
    return !this->operator ==(other);
}

} // namespace NestedEnumHolderLevel1_QtProtobufNested

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

    NestedEnumHolderLevel1_QtProtobufData(const NestedEnumHolderLevel1_QtProtobufData &other)
        : QSharedData(other)
    {
    }

};

NestedEnumHolderLevel1::~NestedEnumHolderLevel1() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 1> qt_protobuf_NestedEnumHolderLevel1_uint_data;
    const char qt_protobuf_NestedEnumHolderLevel1_char_data[72];
} qt_protobuf_NestedEnumHolderLevel1_metadata {
    // data
    {
        0, /* = version */
        0, /* = num fields */
        1, /* = field number offset */
        1, /* = property index offset */
        1, /* = field flags offset */
        70, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        71, /* = end-of-string-marker */
        // Field numbers:
        // Property indices:
        // Field flags:
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.MixedEnumUsageMessage.NestedEnumHolderLevel1\0" /* = full message name */
    /* field char_data: */
    ""
};

const QtProtobufPrivate::QProtobufPropertyOrdering NestedEnumHolderLevel1::staticPropertyOrdering = {
    &qt_protobuf_NestedEnumHolderLevel1_metadata.data
};

void NestedEnumHolderLevel1::registerTypes()
{
    qRegisterMetaType<NestedEnumHolderLevel1>();
    qRegisterMetaType<NestedEnumHolderLevel1Repeated>();
    qRegisterProtobufEnumType<NestedEnumHolderLevel1_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

NestedEnumHolderLevel1::NestedEnumHolderLevel1()
    : QProtobufMessage(&NestedEnumHolderLevel1::staticMetaObject, &NestedEnumHolderLevel1::staticPropertyOrdering),
      dptr(new NestedEnumHolderLevel1_QtProtobufData)
{
}

NestedEnumHolderLevel1::NestedEnumHolderLevel1(const NestedEnumHolderLevel1 &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
NestedEnumHolderLevel1 &NestedEnumHolderLevel1::operator =(const NestedEnumHolderLevel1 &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
NestedEnumHolderLevel1::NestedEnumHolderLevel1(NestedEnumHolderLevel1 &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
NestedEnumHolderLevel1 &NestedEnumHolderLevel1::operator =(NestedEnumHolderLevel1 &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool NestedEnumHolderLevel1::operator ==(const NestedEnumHolderLevel1 &other) const
{
    return QProtobufMessage::isEqual(*this, other);
}

bool NestedEnumHolderLevel1::operator !=(const NestedEnumHolderLevel1 &other) const
{
    return !this->operator ==(other);
}


class NestedEnumMessage_QtProtobufData : public QSharedData
{
public:
    NestedEnumMessage_QtProtobufData()
        : QSharedData(),
          m_localEnumField(MixedEnumUsageMessage_QtProtobufNested::LocalEnum::LOCAL_ENUM_VALUE0),
          m_localEnumField2(RepeatedEnumMessage_QtProtobufNested::LocalEnum::LOCAL_ENUM_VALUE0),
          m_localEnumField3(MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolder_QtProtobufNested::LocalEnum::NESTED_LOCAL_ENUM_VALUE0),
          m_localEnumField4(MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::LocalEnum::NESTED_LEVEL1_LOCAL_ENUM_VALUE0),
          m_localEnumField5(MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::NestedEnumHolderLevel2_QtProtobufNested::LocalEnum::NESTED_LEVEL2_LOCAL_ENUM_VALUE0)
    {
    }

    NestedEnumMessage_QtProtobufData(const NestedEnumMessage_QtProtobufData &other)
        : QSharedData(other),
          m_localEnumField(other.m_localEnumField),
          m_localEnumField2(other.m_localEnumField2),
          m_localEnumField3(other.m_localEnumField3),
          m_localEnumField4(other.m_localEnumField4),
          m_localEnumField5(other.m_localEnumField5)
    {
    }

    MixedEnumUsageMessage_QtProtobufNested::LocalEnum m_localEnumField;
    RepeatedEnumMessage_QtProtobufNested::LocalEnum m_localEnumField2;
    MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolder_QtProtobufNested::LocalEnum m_localEnumField3;
    MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::LocalEnum m_localEnumField4;
    MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::NestedEnumHolderLevel2_QtProtobufNested::LocalEnum m_localEnumField5;
};

NestedEnumMessage::~NestedEnumMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 21> qt_protobuf_NestedEnumMessage_uint_data;
    const char qt_protobuf_NestedEnumMessage_char_data[146];
} qt_protobuf_NestedEnumMessage_metadata {
    // data
    {
        0, /* = version */
        5, /* = num fields */
        6, /* = field number offset */
        11, /* = property index offset */
        16, /* = field flags offset */
        65, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        66, /* = localEnumField */
        81, /* = localEnumField2 */
        97, /* = localEnumField3 */
        113, /* = localEnumField4 */
        129, /* = localEnumField5 */
        145, /* = end-of-string-marker */
        // Field numbers:
        1, /* = localEnumField */
        2, /* = localEnumField2 */
        3, /* = localEnumField3 */
        4, /* = localEnumField4 */
        5, /* = localEnumField5 */
        // Property indices:
        0, /* = localEnumField */
        1, /* = localEnumField2 */
        2, /* = localEnumField3 */
        3, /* = localEnumField4 */
        4, /* = localEnumField5 */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = localEnumField */
        QtProtobufPrivate::NoFlags, /* = localEnumField2 */
        QtProtobufPrivate::NoFlags, /* = localEnumField3 */
        QtProtobufPrivate::NoFlags, /* = localEnumField4 */
        QtProtobufPrivate::NoFlags, /* = localEnumField5 */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.MixedEnumUsageMessage.NestedEnumMessage\0" /* = full message name */
    /* field char_data: */
    "localEnumField\0localEnumField2\0localEnumField3\0localEnumField4\0localEnumField5\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering NestedEnumMessage::staticPropertyOrdering = {
    &qt_protobuf_NestedEnumMessage_metadata.data
};

void NestedEnumMessage::registerTypes()
{
    qRegisterMetaType<NestedEnumMessage>();
    qRegisterMetaType<NestedEnumMessageRepeated>();
}

NestedEnumMessage::NestedEnumMessage()
    : QProtobufMessage(&NestedEnumMessage::staticMetaObject, &NestedEnumMessage::staticPropertyOrdering),
      dptr(new NestedEnumMessage_QtProtobufData)
{
}

NestedEnumMessage::NestedEnumMessage(const NestedEnumMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
NestedEnumMessage &NestedEnumMessage::operator =(const NestedEnumMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
NestedEnumMessage::NestedEnumMessage(NestedEnumMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
NestedEnumMessage &NestedEnumMessage::operator =(NestedEnumMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool NestedEnumMessage::operator ==(const NestedEnumMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_localEnumField == other.dptr->m_localEnumField
        && dptr->m_localEnumField2 == other.dptr->m_localEnumField2
        && dptr->m_localEnumField3 == other.dptr->m_localEnumField3
        && dptr->m_localEnumField4 == other.dptr->m_localEnumField4
        && dptr->m_localEnumField5 == other.dptr->m_localEnumField5;
}

bool NestedEnumMessage::operator !=(const NestedEnumMessage &other) const
{
    return !this->operator ==(other);
}

MixedEnumUsageMessage_QtProtobufNested::LocalEnum NestedEnumMessage::localEnumField() const
{
    return dptr->m_localEnumField;
}

RepeatedEnumMessage_QtProtobufNested::LocalEnum NestedEnumMessage::localEnumField2() const
{
    return dptr->m_localEnumField2;
}

MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolder_QtProtobufNested::LocalEnum NestedEnumMessage::localEnumField3() const
{
    return dptr->m_localEnumField3;
}

MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::LocalEnum NestedEnumMessage::localEnumField4() const
{
    return dptr->m_localEnumField4;
}

MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::NestedEnumHolderLevel2_QtProtobufNested::LocalEnum NestedEnumMessage::localEnumField5() const
{
    return dptr->m_localEnumField5;
}

void NestedEnumMessage::setLocalEnumField(const MixedEnumUsageMessage_QtProtobufNested::LocalEnum &localEnumField)
{
    if (dptr->m_localEnumField != localEnumField) {
        dptr.detach();
        dptr->m_localEnumField = localEnumField;
    }
}

void NestedEnumMessage::setLocalEnumField2(const RepeatedEnumMessage_QtProtobufNested::LocalEnum &localEnumField2)
{
    if (dptr->m_localEnumField2 != localEnumField2) {
        dptr.detach();
        dptr->m_localEnumField2 = localEnumField2;
    }
}

void NestedEnumMessage::setLocalEnumField3(const MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolder_QtProtobufNested::LocalEnum &localEnumField3)
{
    if (dptr->m_localEnumField3 != localEnumField3) {
        dptr.detach();
        dptr->m_localEnumField3 = localEnumField3;
    }
}

void NestedEnumMessage::setLocalEnumField4(const MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::LocalEnum &localEnumField4)
{
    if (dptr->m_localEnumField4 != localEnumField4) {
        dptr.detach();
        dptr->m_localEnumField4 = localEnumField4;
    }
}

void NestedEnumMessage::setLocalEnumField5(const MixedEnumUsageMessage_QtProtobufNested::NestedEnumHolderLevel1_QtProtobufNested::NestedEnumHolderLevel2_QtProtobufNested::LocalEnum &localEnumField5)
{
    if (dptr->m_localEnumField5 != localEnumField5) {
        dptr.detach();
        dptr->m_localEnumField5 = localEnumField5;
    }
}

} // namespace MixedEnumUsageMessage_QtProtobufNested

class MixedEnumUsageMessage_QtProtobufData : public QSharedData
{
public:
    MixedEnumUsageMessage_QtProtobufData()
        : QSharedData(),
          m_localEnum(MixedEnumUsageMessage_QtProtobufNested::LocalEnum::LOCAL_ENUM_VALUE0)
    {
    }

    MixedEnumUsageMessage_QtProtobufData(const MixedEnumUsageMessage_QtProtobufData &other)
        : QSharedData(other),
          m_localEnum(other.m_localEnum),
          m_localEnumList(other.m_localEnumList),
          m_localEnumMap(other.m_localEnumMap),
          m_msgList(other.m_msgList)
    {
    }

    MixedEnumUsageMessage_QtProtobufNested::LocalEnum m_localEnum;
    MixedEnumUsageMessage_QtProtobufNested::LocalEnumRepeated m_localEnumList;
    MixedEnumUsageMessage::LocalEnumMapEntry m_localEnumMap;
    MixedEnumUsageMessage_QtProtobufNested::NestedEnumMessageRepeated m_msgList;
};

MixedEnumUsageMessage::~MixedEnumUsageMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 17> qt_protobuf_MixedEnumUsageMessage_uint_data;
    const char qt_protobuf_MixedEnumUsageMessage_char_data[94];
} qt_protobuf_MixedEnumUsageMessage_metadata {
    // data
    {
        0, /* = version */
        4, /* = num fields */
        5, /* = field number offset */
        9, /* = property index offset */
        13, /* = field flags offset */
        47, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        48, /* = localEnum */
        58, /* = localEnumList */
        72, /* = localEnumMap */
        85, /* = msgList */
        93, /* = end-of-string-marker */
        // Field numbers:
        1, /* = localEnum */
        2, /* = localEnumList */
        3, /* = localEnumMap */
        4, /* = msgList */
        // Property indices:
        0, /* = localEnum */
        1, /* = localEnumList */
        2, /* = localEnumMap */
        3, /* = msgList */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = localEnum */
        QtProtobufPrivate::NoFlags, /* = localEnumList */
        QtProtobufPrivate::NoFlags, /* = localEnumMap */
        QtProtobufPrivate::NoFlags, /* = msgList */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.MixedEnumUsageMessage\0" /* = full message name */
    /* field char_data: */
    "localEnum\0localEnumList\0localEnumMap\0msgList\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering MixedEnumUsageMessage::staticPropertyOrdering = {
    &qt_protobuf_MixedEnumUsageMessage_metadata.data
};

void MixedEnumUsageMessage::registerTypes()
{
    qRegisterMetaType<MixedEnumUsageMessage>();
    qRegisterMetaType<MixedEnumUsageMessageRepeated>();
    qRegisterMetaType<MixedEnumUsageMessage::LocalEnumMapEntry>();
    qRegisterProtobufMapType<QString, MixedEnumUsageMessage_QtProtobufNested::LocalEnum>();
    qRegisterProtobufEnumType<MixedEnumUsageMessage_QtProtobufNested::LocalEnum>();
    qRegisterMetaType<LocalEnum>();
    qRegisterMetaType<LocalEnumRepeated>();
}

MixedEnumUsageMessage::MixedEnumUsageMessage()
    : QProtobufMessage(&MixedEnumUsageMessage::staticMetaObject, &MixedEnumUsageMessage::staticPropertyOrdering),
      dptr(new MixedEnumUsageMessage_QtProtobufData)
{
}

MixedEnumUsageMessage::MixedEnumUsageMessage(const MixedEnumUsageMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
MixedEnumUsageMessage &MixedEnumUsageMessage::operator =(const MixedEnumUsageMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
MixedEnumUsageMessage::MixedEnumUsageMessage(MixedEnumUsageMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
MixedEnumUsageMessage &MixedEnumUsageMessage::operator =(MixedEnumUsageMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool MixedEnumUsageMessage::operator ==(const MixedEnumUsageMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_localEnum == other.dptr->m_localEnum
        && dptr->m_localEnumList == other.dptr->m_localEnumList
        && QtProtobuf::repeatedValueCompare(dptr->m_localEnumMap, other.dptr->m_localEnumMap)
        && QtProtobuf::repeatedValueCompare(dptr->m_msgList, other.dptr->m_msgList);
}

bool MixedEnumUsageMessage::operator !=(const MixedEnumUsageMessage &other) const
{
    return !this->operator ==(other);
}

MixedEnumUsageMessage_QtProtobufNested::LocalEnum MixedEnumUsageMessage::localEnum() const
{
    return dptr->m_localEnum;
}

MixedEnumUsageMessage_QtProtobufNested::LocalEnumRepeated MixedEnumUsageMessage::localEnumList() const
{
    return dptr->m_localEnumList;
}

MixedEnumUsageMessage_QtProtobufNested::LocalEnumRepeated &MixedEnumUsageMessage::localEnumList()
{
    dptr.detach();
    return dptr->m_localEnumList;
}

MixedEnumUsageMessage::LocalEnumMapEntry MixedEnumUsageMessage::localEnumMap() const
{
    return dptr->m_localEnumMap;
}

MixedEnumUsageMessage::LocalEnumMapEntry &MixedEnumUsageMessage::localEnumMap()
{
    dptr.detach();
    return dptr->m_localEnumMap;
}

MixedEnumUsageMessage_QtProtobufNested::NestedEnumMessageRepeated MixedEnumUsageMessage::msgList() const
{
    return dptr->m_msgList;
}

MixedEnumUsageMessage_QtProtobufNested::NestedEnumMessageRepeated &MixedEnumUsageMessage::msgList()
{
    dptr.detach();
    return dptr->m_msgList;
}

void MixedEnumUsageMessage::setLocalEnum(const MixedEnumUsageMessage_QtProtobufNested::LocalEnum &localEnum)
{
    if (dptr->m_localEnum != localEnum) {
        dptr.detach();
        dptr->m_localEnum = localEnum;
    }
}

void MixedEnumUsageMessage::setLocalEnumList(const MixedEnumUsageMessage_QtProtobufNested::LocalEnumRepeated &localEnumList)
{
    if (dptr->m_localEnumList != localEnumList) {
        dptr.detach();
        dptr->m_localEnumList = localEnumList;
    }
}

void MixedEnumUsageMessage::setLocalEnumMap(const MixedEnumUsageMessage::LocalEnumMapEntry &localEnumMap)
{
    if (dptr->m_localEnumMap != localEnumMap) {
        dptr.detach();
        dptr->m_localEnumMap = localEnumMap;
    }
}

void MixedEnumUsageMessage::setMsgList(const MixedEnumUsageMessage_QtProtobufNested::NestedEnumMessageRepeated &msgList)
{
    if (dptr->m_msgList != msgList) {
        dptr.detach();
        dptr->m_msgList = msgList;
    }
}


class SimpleFileEnumMessage_QtProtobufData : public QSharedData
{
public:
    SimpleFileEnumMessage_QtProtobufData()
        : QSharedData(),
          m_globalEnum(TestEnumGadget::TestEnum::TEST_ENUM_VALUE0)
    {
    }

    SimpleFileEnumMessage_QtProtobufData(const SimpleFileEnumMessage_QtProtobufData &other)
        : QSharedData(other),
          m_globalEnum(other.m_globalEnum),
          m_globalEnumList(other.m_globalEnumList)
    {
    }

    TestEnumGadget::TestEnum m_globalEnum;
    TestEnumGadget::TestEnumRepeated m_globalEnumList;
};

SimpleFileEnumMessage::~SimpleFileEnumMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 9> qt_protobuf_SimpleFileEnumMessage_uint_data;
    const char qt_protobuf_SimpleFileEnumMessage_char_data[75];
} qt_protobuf_SimpleFileEnumMessage_metadata {
    // data
    {
        0, /* = version */
        2, /* = num fields */
        3, /* = field number offset */
        5, /* = property index offset */
        7, /* = field flags offset */
        47, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        48, /* = globalEnum */
        59, /* = globalEnumList */
        74, /* = end-of-string-marker */
        // Field numbers:
        1, /* = globalEnum */
        2, /* = globalEnumList */
        // Property indices:
        0, /* = globalEnum */
        1, /* = globalEnumList */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = globalEnum */
        QtProtobufPrivate::NoFlags, /* = globalEnumList */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleFileEnumMessage\0" /* = full message name */
    /* field char_data: */
    "globalEnum\0globalEnumList\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleFileEnumMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleFileEnumMessage_metadata.data
};

void SimpleFileEnumMessage::registerTypes()
{
    qRegisterMetaType<SimpleFileEnumMessage>();
    qRegisterMetaType<SimpleFileEnumMessageRepeated>();
}

SimpleFileEnumMessage::SimpleFileEnumMessage()
    : QProtobufMessage(&SimpleFileEnumMessage::staticMetaObject, &SimpleFileEnumMessage::staticPropertyOrdering),
      dptr(new SimpleFileEnumMessage_QtProtobufData)
{
}

SimpleFileEnumMessage::SimpleFileEnumMessage(const SimpleFileEnumMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
SimpleFileEnumMessage &SimpleFileEnumMessage::operator =(const SimpleFileEnumMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
SimpleFileEnumMessage::SimpleFileEnumMessage(SimpleFileEnumMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
SimpleFileEnumMessage &SimpleFileEnumMessage::operator =(SimpleFileEnumMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool SimpleFileEnumMessage::operator ==(const SimpleFileEnumMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_globalEnum == other.dptr->m_globalEnum
        && dptr->m_globalEnumList == other.dptr->m_globalEnumList;
}

bool SimpleFileEnumMessage::operator !=(const SimpleFileEnumMessage &other) const
{
    return !this->operator ==(other);
}

TestEnumGadget::TestEnum SimpleFileEnumMessage::globalEnum() const
{
    return dptr->m_globalEnum;
}

TestEnumGadget::TestEnumRepeated SimpleFileEnumMessage::globalEnumList() const
{
    return dptr->m_globalEnumList;
}

TestEnumGadget::TestEnumRepeated &SimpleFileEnumMessage::globalEnumList()
{
    dptr.detach();
    return dptr->m_globalEnumList;
}

void SimpleFileEnumMessage::setGlobalEnum(const TestEnumGadget::TestEnum &globalEnum)
{
    if (dptr->m_globalEnum != globalEnum) {
        dptr.detach();
        dptr->m_globalEnum = globalEnum;
    }
}

void SimpleFileEnumMessage::setGlobalEnumList(const TestEnumGadget::TestEnumRepeated &globalEnumList)
{
    if (dptr->m_globalEnumList != globalEnumList) {
        dptr.detach();
        dptr->m_globalEnumList = globalEnumList;
    }
}


class StepChildEnumMessage_QtProtobufData : public QSharedData
{
public:
    StepChildEnumMessage_QtProtobufData()
        : QSharedData(),
          m_localStepChildEnum(SimpleEnumMessage_QtProtobufNested::LocalEnum::LOCAL_ENUM_VALUE0)
    {
    }

    StepChildEnumMessage_QtProtobufData(const StepChildEnumMessage_QtProtobufData &other)
        : QSharedData(other),
          m_localStepChildEnum(other.m_localStepChildEnum),
          m_localStepChildList(other.m_localStepChildList)
    {
    }

    SimpleEnumMessage_QtProtobufNested::LocalEnum m_localStepChildEnum;
    SimpleEnumMessage_QtProtobufNested::LocalEnumRepeated m_localStepChildList;
};

StepChildEnumMessage::~StepChildEnumMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 9> qt_protobuf_StepChildEnumMessage_uint_data;
    const char qt_protobuf_StepChildEnumMessage_char_data[86];
} qt_protobuf_StepChildEnumMessage_metadata {
    // data
    {
        0, /* = version */
        2, /* = num fields */
        3, /* = field number offset */
        5, /* = property index offset */
        7, /* = field flags offset */
        46, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        47, /* = localStepChildEnum */
        66, /* = localStepChildList */
        85, /* = end-of-string-marker */
        // Field numbers:
        1, /* = localStepChildEnum */
        2, /* = localStepChildList */
        // Property indices:
        0, /* = localStepChildEnum */
        1, /* = localStepChildList */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = localStepChildEnum */
        QtProtobufPrivate::NoFlags, /* = localStepChildList */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.StepChildEnumMessage\0" /* = full message name */
    /* field char_data: */
    "localStepChildEnum\0localStepChildList\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering StepChildEnumMessage::staticPropertyOrdering = {
    &qt_protobuf_StepChildEnumMessage_metadata.data
};

void StepChildEnumMessage::registerTypes()
{
    qRegisterMetaType<StepChildEnumMessage>();
    qRegisterMetaType<StepChildEnumMessageRepeated>();
}

StepChildEnumMessage::StepChildEnumMessage()
    : QProtobufMessage(&StepChildEnumMessage::staticMetaObject, &StepChildEnumMessage::staticPropertyOrdering),
      dptr(new StepChildEnumMessage_QtProtobufData)
{
}

StepChildEnumMessage::StepChildEnumMessage(const StepChildEnumMessage &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
StepChildEnumMessage &StepChildEnumMessage::operator =(const StepChildEnumMessage &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
StepChildEnumMessage::StepChildEnumMessage(StepChildEnumMessage &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
StepChildEnumMessage &StepChildEnumMessage::operator =(StepChildEnumMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool StepChildEnumMessage::operator ==(const StepChildEnumMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_localStepChildEnum == other.dptr->m_localStepChildEnum
        && dptr->m_localStepChildList == other.dptr->m_localStepChildList;
}

bool StepChildEnumMessage::operator !=(const StepChildEnumMessage &other) const
{
    return !this->operator ==(other);
}

SimpleEnumMessage_QtProtobufNested::LocalEnum StepChildEnumMessage::localStepChildEnum() const
{
    return dptr->m_localStepChildEnum;
}

SimpleEnumMessage_QtProtobufNested::LocalEnumRepeated StepChildEnumMessage::localStepChildList() const
{
    return dptr->m_localStepChildList;
}

SimpleEnumMessage_QtProtobufNested::LocalEnumRepeated &StepChildEnumMessage::localStepChildList()
{
    dptr.detach();
    return dptr->m_localStepChildList;
}

void StepChildEnumMessage::setLocalStepChildEnum(const SimpleEnumMessage_QtProtobufNested::LocalEnum &localStepChildEnum)
{
    if (dptr->m_localStepChildEnum != localStepChildEnum) {
        dptr.detach();
        dptr->m_localStepChildEnum = localStepChildEnum;
    }
}

void StepChildEnumMessage::setLocalStepChildList(const SimpleEnumMessage_QtProtobufNested::LocalEnumRepeated &localStepChildList)
{
    if (dptr->m_localStepChildList != localStepChildList) {
        dptr.detach();
        dptr->m_localStepChildList = localStepChildList;
    }
}


class A_QtProtobufData : public QSharedData
{
public:
    A_QtProtobufData()
        : QSharedData(),
          m_val(B_QtProtobufNested::BEnum::BVal0)
    {
    }

    A_QtProtobufData(const A_QtProtobufData &other)
        : QSharedData(other),
          m_val(other.m_val)
    {
    }

    B_QtProtobufNested::BEnum m_val;
};

A::~A() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_A_uint_data;
    const char qt_protobuf_A_char_data[33];
} qt_protobuf_A_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        27, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        28, /* = val */
        32, /* = end-of-string-marker */
        // Field numbers:
        1, /* = val */
        // Property indices:
        0, /* = val */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = val */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.A\0" /* = full message name */
    /* field char_data: */
    "val\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering A::staticPropertyOrdering = {
    &qt_protobuf_A_metadata.data
};

void A::registerTypes()
{
    qRegisterMetaType<A>();
    qRegisterMetaType<ARepeated>();
    qRegisterProtobufEnumType<A_QtProtobufNested::AEnum>();
    qRegisterMetaType<AEnum>();
    qRegisterMetaType<AEnumRepeated>();
}

A::A()
    : QProtobufMessage(&A::staticMetaObject, &A::staticPropertyOrdering),
      dptr(new A_QtProtobufData)
{
}

A::A(const A &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
A &A::operator =(const A &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
A::A(A &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
A &A::operator =(A &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool A::operator ==(const A &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_val == other.dptr->m_val;
}

bool A::operator !=(const A &other) const
{
    return !this->operator ==(other);
}

B_QtProtobufNested::BEnum A::val() const
{
    return dptr->m_val;
}

void A::setVal(const B_QtProtobufNested::BEnum &val)
{
    if (dptr->m_val != val) {
        dptr.detach();
        dptr->m_val = val;
    }
}


class B_QtProtobufData : public QSharedData
{
public:
    B_QtProtobufData()
        : QSharedData(),
          m_val(A_QtProtobufNested::AEnum::AVal0)
    {
    }

    B_QtProtobufData(const B_QtProtobufData &other)
        : QSharedData(other),
          m_val(other.m_val)
    {
    }

    A_QtProtobufNested::AEnum m_val;
};

B::~B() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_B_uint_data;
    const char qt_protobuf_B_char_data[33];
} qt_protobuf_B_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        27, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        28, /* = val */
        32, /* = end-of-string-marker */
        // Field numbers:
        1, /* = val */
        // Property indices:
        0, /* = val */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = val */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.B\0" /* = full message name */
    /* field char_data: */
    "val\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering B::staticPropertyOrdering = {
    &qt_protobuf_B_metadata.data
};

void B::registerTypes()
{
    qRegisterMetaType<B>();
    qRegisterMetaType<BRepeated>();
    qRegisterProtobufEnumType<B_QtProtobufNested::BEnum>();
    qRegisterMetaType<BEnum>();
    qRegisterMetaType<BEnumRepeated>();
}

B::B()
    : QProtobufMessage(&B::staticMetaObject, &B::staticPropertyOrdering),
      dptr(new B_QtProtobufData)
{
}

B::B(const B &other)
    : QProtobufMessage(other),
      dptr(other.dptr)
{
}
B &B::operator =(const B &other)
{
    QProtobufMessage::operator=(other);
    dptr = other.dptr;
    return *this;
}
B::B(B &&other) noexcept
    : QProtobufMessage(std::move(other)),
      dptr(std::move(other.dptr))
{
}
B &B::operator =(B &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    dptr.swap(other.dptr);
    return *this;
}
bool B::operator ==(const B &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && dptr->m_val == other.dptr->m_val;
}

bool B::operator !=(const B &other) const
{
    return !this->operator ==(other);
}

A_QtProtobufNested::AEnum B::val() const
{
    return dptr->m_val;
}

void B::setVal(const A_QtProtobufNested::AEnum &val)
{
    if (dptr->m_val != val) {
        dptr.detach();
        dptr->m_val = val;
    }
}

} // namespace qtprotobufnamespace::tests

#include "moc_enummessages.qpb.cpp"
