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


#include "basicmessages.qpb.h"

#include <QtProtobuf/qprotobufregistration.h>

#include <cmath>

namespace qtprotobufnamespace::tests {

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

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

};

EmptyMessage::~EmptyMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 1> qt_protobuf_EmptyMessage_uint_data;
    const char qt_protobuf_EmptyMessage_char_data[40];
} qt_protobuf_EmptyMessage_metadata {
    // data
    {
        0, /* = version */
        0, /* = num fields */
        1, /* = field number offset */
        1, /* = property index offset */
        1, /* = field flags offset */
        38, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        39, /* = end-of-string-marker */
        // Field numbers:
        // Property indices:
        // Field flags:
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.EmptyMessage\0" /* = full message name */
    /* field char_data: */
    ""
};

const QtProtobufPrivate::QProtobufPropertyOrdering EmptyMessage::staticPropertyOrdering = {
    &qt_protobuf_EmptyMessage_metadata.data
};

void EmptyMessage::registerTypes()
{
    qRegisterMetaType<EmptyMessage>();
    qRegisterMetaType<EmptyMessageRepeated>();
}

EmptyMessage::EmptyMessage()
    : QProtobufMessage(&EmptyMessage::staticMetaObject, &EmptyMessage::staticPropertyOrdering),
      dptr(new EmptyMessage_QtProtobufData)
{
}

EmptyMessage::EmptyMessage(const EmptyMessage &other)
    = default;
EmptyMessage &EmptyMessage::operator =(const EmptyMessage &other)
{
    EmptyMessage temp(other);
    swap(temp);
    return *this;
}
EmptyMessage::EmptyMessage(EmptyMessage &&other) noexcept
    = default;
bool comparesEqual(const EmptyMessage &lhs, const EmptyMessage &rhs) noexcept
{
    return operator ==(static_cast<const QProtobufMessage&>(lhs),
                       static_cast<const QProtobufMessage&>(rhs));
}


class SimpleBoolMessage_QtProtobufData : public QSharedData
{
public:
    SimpleBoolMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldBool(false)
    {
    }

    SimpleBoolMessage_QtProtobufData(const SimpleBoolMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldBool(other.m_testFieldBool)
    {
    }

    bool m_testFieldBool;
};

SimpleBoolMessage::~SimpleBoolMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleBoolMessage_uint_data;
    const char qt_protobuf_SimpleBoolMessage_char_data[59];
} qt_protobuf_SimpleBoolMessage_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, /* = testFieldBool */
        58, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldBool */
        // Property indices:
        0, /* = testFieldBool */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldBool */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleBoolMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldBool\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleBoolMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleBoolMessage_metadata.data
};

void SimpleBoolMessage::registerTypes()
{
    qRegisterMetaType<SimpleBoolMessage>();
    qRegisterMetaType<SimpleBoolMessageRepeated>();
}

SimpleBoolMessage::SimpleBoolMessage()
    : QProtobufMessage(&SimpleBoolMessage::staticMetaObject, &SimpleBoolMessage::staticPropertyOrdering),
      dptr(new SimpleBoolMessage_QtProtobufData)
{
}

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

bool SimpleBoolMessage::testFieldBool() const
{
    return dptr->m_testFieldBool;
}

void SimpleBoolMessage::setTestFieldBool(bool testFieldBool)
{
    if (dptr->m_testFieldBool != testFieldBool) {
        dptr.detach();
        dptr->m_testFieldBool = testFieldBool;
    }
}


class SimpleIntMessage_QtProtobufData : public QSharedData
{
public:
    SimpleIntMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleIntMessage_QtProtobufData(const SimpleIntMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::int32 m_testFieldInt;
};

SimpleIntMessage::~SimpleIntMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleIntMessage_uint_data;
    const char qt_protobuf_SimpleIntMessage_char_data[57];
} qt_protobuf_SimpleIntMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        42, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        43, /* = testFieldInt */
        56, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleIntMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleIntMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleIntMessage_metadata.data
};

void SimpleIntMessage::registerTypes()
{
    qRegisterMetaType<SimpleIntMessage>();
    qRegisterMetaType<SimpleIntMessageRepeated>();
}

SimpleIntMessage::SimpleIntMessage()
    : QProtobufMessage(&SimpleIntMessage::staticMetaObject, &SimpleIntMessage::staticPropertyOrdering),
      dptr(new SimpleIntMessage_QtProtobufData)
{
}

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

QtProtobuf::int32 SimpleIntMessage::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleIntMessage::setTestFieldInt(QtProtobuf::int32 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


class SimpleSIntMessage_QtProtobufData : public QSharedData
{
public:
    SimpleSIntMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleSIntMessage_QtProtobufData(const SimpleSIntMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::sint32 m_testFieldInt;
};

SimpleSIntMessage::~SimpleSIntMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleSIntMessage_uint_data;
    const char qt_protobuf_SimpleSIntMessage_char_data[58];
} qt_protobuf_SimpleSIntMessage_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, /* = testFieldInt */
        57, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleSIntMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleSIntMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleSIntMessage_metadata.data
};

void SimpleSIntMessage::registerTypes()
{
    qRegisterMetaType<SimpleSIntMessage>();
    qRegisterMetaType<SimpleSIntMessageRepeated>();
}

SimpleSIntMessage::SimpleSIntMessage()
    : QProtobufMessage(&SimpleSIntMessage::staticMetaObject, &SimpleSIntMessage::staticPropertyOrdering),
      dptr(new SimpleSIntMessage_QtProtobufData)
{
}

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

QtProtobuf::sint32 SimpleSIntMessage::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleSIntMessage::setTestFieldInt(QtProtobuf::sint32 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


class SimpleUIntMessage_QtProtobufData : public QSharedData
{
public:
    SimpleUIntMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleUIntMessage_QtProtobufData(const SimpleUIntMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::uint32 m_testFieldInt;
};

SimpleUIntMessage::~SimpleUIntMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleUIntMessage_uint_data;
    const char qt_protobuf_SimpleUIntMessage_char_data[58];
} qt_protobuf_SimpleUIntMessage_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, /* = testFieldInt */
        57, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleUIntMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleUIntMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleUIntMessage_metadata.data
};

void SimpleUIntMessage::registerTypes()
{
    qRegisterMetaType<SimpleUIntMessage>();
    qRegisterMetaType<SimpleUIntMessageRepeated>();
}

SimpleUIntMessage::SimpleUIntMessage()
    : QProtobufMessage(&SimpleUIntMessage::staticMetaObject, &SimpleUIntMessage::staticPropertyOrdering),
      dptr(new SimpleUIntMessage_QtProtobufData)
{
}

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

QtProtobuf::uint32 SimpleUIntMessage::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleUIntMessage::setTestFieldInt(QtProtobuf::uint32 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


class SimpleInt64Message_QtProtobufData : public QSharedData
{
public:
    SimpleInt64Message_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleInt64Message_QtProtobufData(const SimpleInt64Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::int64 m_testFieldInt;
};

SimpleInt64Message::~SimpleInt64Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleInt64Message_uint_data;
    const char qt_protobuf_SimpleInt64Message_char_data[59];
} qt_protobuf_SimpleInt64Message_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        44, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        45, /* = testFieldInt */
        58, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleInt64Message\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleInt64Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleInt64Message_metadata.data
};

void SimpleInt64Message::registerTypes()
{
    qRegisterMetaType<SimpleInt64Message>();
    qRegisterMetaType<SimpleInt64MessageRepeated>();
}

SimpleInt64Message::SimpleInt64Message()
    : QProtobufMessage(&SimpleInt64Message::staticMetaObject, &SimpleInt64Message::staticPropertyOrdering),
      dptr(new SimpleInt64Message_QtProtobufData)
{
}

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

QtProtobuf::int64 SimpleInt64Message::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleInt64Message::setTestFieldInt(QtProtobuf::int64 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


class SimpleSInt64Message_QtProtobufData : public QSharedData
{
public:
    SimpleSInt64Message_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleSInt64Message_QtProtobufData(const SimpleSInt64Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::sint64 m_testFieldInt;
};

SimpleSInt64Message::~SimpleSInt64Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleSInt64Message_uint_data;
    const char qt_protobuf_SimpleSInt64Message_char_data[60];
} qt_protobuf_SimpleSInt64Message_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, /* = testFieldInt */
        59, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleSInt64Message\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleSInt64Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleSInt64Message_metadata.data
};

void SimpleSInt64Message::registerTypes()
{
    qRegisterMetaType<SimpleSInt64Message>();
    qRegisterMetaType<SimpleSInt64MessageRepeated>();
}

SimpleSInt64Message::SimpleSInt64Message()
    : QProtobufMessage(&SimpleSInt64Message::staticMetaObject, &SimpleSInt64Message::staticPropertyOrdering),
      dptr(new SimpleSInt64Message_QtProtobufData)
{
}

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

QtProtobuf::sint64 SimpleSInt64Message::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleSInt64Message::setTestFieldInt(QtProtobuf::sint64 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


class SimpleUInt64Message_QtProtobufData : public QSharedData
{
public:
    SimpleUInt64Message_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0)
    {
    }

    SimpleUInt64Message_QtProtobufData(const SimpleUInt64Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt)
    {
    }

    QtProtobuf::uint64 m_testFieldInt;
};

SimpleUInt64Message::~SimpleUInt64Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleUInt64Message_uint_data;
    const char qt_protobuf_SimpleUInt64Message_char_data[60];
} qt_protobuf_SimpleUInt64Message_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, /* = testFieldInt */
        59, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        // Property indices:
        0, /* = testFieldInt */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleUInt64Message\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleUInt64Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleUInt64Message_metadata.data
};

void SimpleUInt64Message::registerTypes()
{
    qRegisterMetaType<SimpleUInt64Message>();
    qRegisterMetaType<SimpleUInt64MessageRepeated>();
}

SimpleUInt64Message::SimpleUInt64Message()
    : QProtobufMessage(&SimpleUInt64Message::staticMetaObject, &SimpleUInt64Message::staticPropertyOrdering),
      dptr(new SimpleUInt64Message_QtProtobufData)
{
}

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

QtProtobuf::uint64 SimpleUInt64Message::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

void SimpleUInt64Message::setTestFieldInt(QtProtobuf::uint64 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}


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

    SimpleStringMessage_QtProtobufData(const SimpleStringMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldString(other.m_testFieldString)
    {
    }

    QString m_testFieldString;
};

SimpleStringMessage::~SimpleStringMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleStringMessage_uint_data;
    const char qt_protobuf_SimpleStringMessage_char_data[63];
} qt_protobuf_SimpleStringMessage_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, /* = testFieldString */
        62, /* = end-of-string-marker */
        // Field numbers:
        6, /* = testFieldString */
        // Property indices:
        0, /* = testFieldString */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldString */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleStringMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldString\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleStringMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleStringMessage_metadata.data
};

void SimpleStringMessage::registerTypes()
{
    qRegisterMetaType<SimpleStringMessage>();
    qRegisterMetaType<SimpleStringMessageRepeated>();
}

SimpleStringMessage::SimpleStringMessage()
    : QProtobufMessage(&SimpleStringMessage::staticMetaObject, &SimpleStringMessage::staticPropertyOrdering),
      dptr(new SimpleStringMessage_QtProtobufData)
{
}

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

const QString &SimpleStringMessage::testFieldString() const &
{
    return dptr->m_testFieldString;
}

void SimpleStringMessage::setTestFieldString(const QString &testFieldString)
{
    if (dptr->m_testFieldString != testFieldString) {
        dptr.detach();
        dptr->m_testFieldString = testFieldString;
    }
}

void SimpleStringMessage::setTestFieldString(QString &&testFieldString)
{
    if (dptr->m_testFieldString != testFieldString) {
        dptr.detach();
        dptr->m_testFieldString = std::move(testFieldString);
    }
}


class SimpleFloatMessage_QtProtobufData : public QSharedData
{
public:
    SimpleFloatMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldFloat(0.0)
    {
    }

    SimpleFloatMessage_QtProtobufData(const SimpleFloatMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldFloat(other.m_testFieldFloat)
    {
    }

    float m_testFieldFloat;
};

SimpleFloatMessage::~SimpleFloatMessage() = default;

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

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleFloatMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleFloatMessage_metadata.data
};

void SimpleFloatMessage::registerTypes()
{
    qRegisterMetaType<SimpleFloatMessage>();
    qRegisterMetaType<SimpleFloatMessageRepeated>();
}

SimpleFloatMessage::SimpleFloatMessage()
    : QProtobufMessage(&SimpleFloatMessage::staticMetaObject, &SimpleFloatMessage::staticPropertyOrdering),
      dptr(new SimpleFloatMessage_QtProtobufData)
{
}

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

float SimpleFloatMessage::testFieldFloat() const
{
    return dptr->m_testFieldFloat;
}

void SimpleFloatMessage::setTestFieldFloat(float testFieldFloat)
{
    if (dptr->m_testFieldFloat != testFieldFloat ||
        std::signbit(dptr->m_testFieldFloat) != std::signbit(testFieldFloat)) {
        dptr.detach();
        dptr->m_testFieldFloat = testFieldFloat;
    }
}


class SimpleDoubleMessage_QtProtobufData : public QSharedData
{
public:
    SimpleDoubleMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldDouble(0.0)
    {
    }

    SimpleDoubleMessage_QtProtobufData(const SimpleDoubleMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldDouble(other.m_testFieldDouble)
    {
    }

    double m_testFieldDouble;
};

SimpleDoubleMessage::~SimpleDoubleMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleDoubleMessage_uint_data;
    const char qt_protobuf_SimpleDoubleMessage_char_data[63];
} qt_protobuf_SimpleDoubleMessage_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, /* = testFieldDouble */
        62, /* = end-of-string-marker */
        // Field numbers:
        8, /* = testFieldDouble */
        // Property indices:
        0, /* = testFieldDouble */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldDouble */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleDoubleMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldDouble\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleDoubleMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleDoubleMessage_metadata.data
};

void SimpleDoubleMessage::registerTypes()
{
    qRegisterMetaType<SimpleDoubleMessage>();
    qRegisterMetaType<SimpleDoubleMessageRepeated>();
}

SimpleDoubleMessage::SimpleDoubleMessage()
    : QProtobufMessage(&SimpleDoubleMessage::staticMetaObject, &SimpleDoubleMessage::staticPropertyOrdering),
      dptr(new SimpleDoubleMessage_QtProtobufData)
{
}

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

double SimpleDoubleMessage::testFieldDouble() const
{
    return dptr->m_testFieldDouble;
}

void SimpleDoubleMessage::setTestFieldDouble(double testFieldDouble)
{
    if (dptr->m_testFieldDouble != testFieldDouble ||
        std::signbit(dptr->m_testFieldDouble) != std::signbit(testFieldDouble)) {
        dptr.detach();
        dptr->m_testFieldDouble = testFieldDouble;
    }
}


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

    SimpleBytesMessage_QtProtobufData(const SimpleBytesMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldBytes(other.m_testFieldBytes)
    {
    }

    QByteArray m_testFieldBytes;
};

SimpleBytesMessage::~SimpleBytesMessage() = default;

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

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleBytesMessage::staticPropertyOrdering = {
    &qt_protobuf_SimpleBytesMessage_metadata.data
};

void SimpleBytesMessage::registerTypes()
{
    qRegisterMetaType<SimpleBytesMessage>();
    qRegisterMetaType<SimpleBytesMessageRepeated>();
}

SimpleBytesMessage::SimpleBytesMessage()
    : QProtobufMessage(&SimpleBytesMessage::staticMetaObject, &SimpleBytesMessage::staticPropertyOrdering),
      dptr(new SimpleBytesMessage_QtProtobufData)
{
}

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

const QByteArray &SimpleBytesMessage::testFieldBytes() const &
{
    return dptr->m_testFieldBytes;
}

void SimpleBytesMessage::setTestFieldBytes(const QByteArray &testFieldBytes)
{
    if (dptr->m_testFieldBytes != testFieldBytes) {
        dptr.detach();
        dptr->m_testFieldBytes = testFieldBytes;
    }
}

void SimpleBytesMessage::setTestFieldBytes(QByteArray &&testFieldBytes)
{
    if (dptr->m_testFieldBytes != testFieldBytes) {
        dptr.detach();
        dptr->m_testFieldBytes = std::move(testFieldBytes);
    }
}


class SimpleFixedInt32Message_QtProtobufData : public QSharedData
{
public:
    SimpleFixedInt32Message_QtProtobufData()
        : QSharedData(),
          m_testFieldFixedInt32(0)
    {
    }

    SimpleFixedInt32Message_QtProtobufData(const SimpleFixedInt32Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldFixedInt32(other.m_testFieldFixedInt32)
    {
    }

    QtProtobuf::fixed32 m_testFieldFixedInt32;
};

SimpleFixedInt32Message::~SimpleFixedInt32Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleFixedInt32Message_uint_data;
    const char qt_protobuf_SimpleFixedInt32Message_char_data[71];
} qt_protobuf_SimpleFixedInt32Message_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        49, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        50, /* = testFieldFixedInt32 */
        70, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldFixedInt32 */
        // Property indices:
        0, /* = testFieldFixedInt32 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldFixedInt32 */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleFixedInt32Message\0" /* = full message name */
    /* field char_data: */
    "testFieldFixedInt32\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleFixedInt32Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleFixedInt32Message_metadata.data
};

void SimpleFixedInt32Message::registerTypes()
{
    qRegisterMetaType<SimpleFixedInt32Message>();
    qRegisterMetaType<SimpleFixedInt32MessageRepeated>();
}

SimpleFixedInt32Message::SimpleFixedInt32Message()
    : QProtobufMessage(&SimpleFixedInt32Message::staticMetaObject, &SimpleFixedInt32Message::staticPropertyOrdering),
      dptr(new SimpleFixedInt32Message_QtProtobufData)
{
}

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

QtProtobuf::fixed32 SimpleFixedInt32Message::testFieldFixedInt32() const
{
    return dptr->m_testFieldFixedInt32;
}

void SimpleFixedInt32Message::setTestFieldFixedInt32(QtProtobuf::fixed32 testFieldFixedInt32)
{
    if (dptr->m_testFieldFixedInt32 != testFieldFixedInt32) {
        dptr.detach();
        dptr->m_testFieldFixedInt32 = testFieldFixedInt32;
    }
}


class SimpleFixedInt64Message_QtProtobufData : public QSharedData
{
public:
    SimpleFixedInt64Message_QtProtobufData()
        : QSharedData(),
          m_testFieldFixedInt64(0)
    {
    }

    SimpleFixedInt64Message_QtProtobufData(const SimpleFixedInt64Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldFixedInt64(other.m_testFieldFixedInt64)
    {
    }

    QtProtobuf::fixed64 m_testFieldFixedInt64;
};

SimpleFixedInt64Message::~SimpleFixedInt64Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleFixedInt64Message_uint_data;
    const char qt_protobuf_SimpleFixedInt64Message_char_data[71];
} qt_protobuf_SimpleFixedInt64Message_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        49, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        50, /* = testFieldFixedInt64 */
        70, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldFixedInt64 */
        // Property indices:
        0, /* = testFieldFixedInt64 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldFixedInt64 */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleFixedInt64Message\0" /* = full message name */
    /* field char_data: */
    "testFieldFixedInt64\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleFixedInt64Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleFixedInt64Message_metadata.data
};

void SimpleFixedInt64Message::registerTypes()
{
    qRegisterMetaType<SimpleFixedInt64Message>();
    qRegisterMetaType<SimpleFixedInt64MessageRepeated>();
}

SimpleFixedInt64Message::SimpleFixedInt64Message()
    : QProtobufMessage(&SimpleFixedInt64Message::staticMetaObject, &SimpleFixedInt64Message::staticPropertyOrdering),
      dptr(new SimpleFixedInt64Message_QtProtobufData)
{
}

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

QtProtobuf::fixed64 SimpleFixedInt64Message::testFieldFixedInt64() const
{
    return dptr->m_testFieldFixedInt64;
}

void SimpleFixedInt64Message::setTestFieldFixedInt64(QtProtobuf::fixed64 testFieldFixedInt64)
{
    if (dptr->m_testFieldFixedInt64 != testFieldFixedInt64) {
        dptr.detach();
        dptr->m_testFieldFixedInt64 = testFieldFixedInt64;
    }
}


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

    SimpleSFixedInt32Message_QtProtobufData(const SimpleSFixedInt32Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldFixedInt32(other.m_testFieldFixedInt32)
    {
    }

    QtProtobuf::sfixed32 m_testFieldFixedInt32;
};

SimpleSFixedInt32Message::~SimpleSFixedInt32Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleSFixedInt32Message_uint_data;
    const char qt_protobuf_SimpleSFixedInt32Message_char_data[72];
} qt_protobuf_SimpleSFixedInt32Message_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        50, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        51, /* = testFieldFixedInt32 */
        71, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldFixedInt32 */
        // Property indices:
        0, /* = testFieldFixedInt32 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldFixedInt32 */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleSFixedInt32Message\0" /* = full message name */
    /* field char_data: */
    "testFieldFixedInt32\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleSFixedInt32Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleSFixedInt32Message_metadata.data
};

void SimpleSFixedInt32Message::registerTypes()
{
    qRegisterMetaType<SimpleSFixedInt32Message>();
    qRegisterMetaType<SimpleSFixedInt32MessageRepeated>();
}

SimpleSFixedInt32Message::SimpleSFixedInt32Message()
    : QProtobufMessage(&SimpleSFixedInt32Message::staticMetaObject, &SimpleSFixedInt32Message::staticPropertyOrdering),
      dptr(new SimpleSFixedInt32Message_QtProtobufData)
{
}

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

QtProtobuf::sfixed32 SimpleSFixedInt32Message::testFieldFixedInt32() const
{
    return dptr->m_testFieldFixedInt32;
}

void SimpleSFixedInt32Message::setTestFieldFixedInt32(QtProtobuf::sfixed32 testFieldFixedInt32)
{
    if (dptr->m_testFieldFixedInt32 != testFieldFixedInt32) {
        dptr.detach();
        dptr->m_testFieldFixedInt32 = testFieldFixedInt32;
    }
}


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

    SimpleSFixedInt64Message_QtProtobufData(const SimpleSFixedInt64Message_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldFixedInt64(other.m_testFieldFixedInt64)
    {
    }

    QtProtobuf::sfixed64 m_testFieldFixedInt64;
};

SimpleSFixedInt64Message::~SimpleSFixedInt64Message() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_SimpleSFixedInt64Message_uint_data;
    const char qt_protobuf_SimpleSFixedInt64Message_char_data[72];
} qt_protobuf_SimpleSFixedInt64Message_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        50, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        51, /* = testFieldFixedInt64 */
        71, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldFixedInt64 */
        // Property indices:
        0, /* = testFieldFixedInt64 */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldFixedInt64 */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.SimpleSFixedInt64Message\0" /* = full message name */
    /* field char_data: */
    "testFieldFixedInt64\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering SimpleSFixedInt64Message::staticPropertyOrdering = {
    &qt_protobuf_SimpleSFixedInt64Message_metadata.data
};

void SimpleSFixedInt64Message::registerTypes()
{
    qRegisterMetaType<SimpleSFixedInt64Message>();
    qRegisterMetaType<SimpleSFixedInt64MessageRepeated>();
}

SimpleSFixedInt64Message::SimpleSFixedInt64Message()
    : QProtobufMessage(&SimpleSFixedInt64Message::staticMetaObject, &SimpleSFixedInt64Message::staticPropertyOrdering),
      dptr(new SimpleSFixedInt64Message_QtProtobufData)
{
}

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

QtProtobuf::sfixed64 SimpleSFixedInt64Message::testFieldFixedInt64() const
{
    return dptr->m_testFieldFixedInt64;
}

void SimpleSFixedInt64Message::setTestFieldFixedInt64(QtProtobuf::sfixed64 testFieldFixedInt64)
{
    if (dptr->m_testFieldFixedInt64 != testFieldFixedInt64) {
        dptr.detach();
        dptr->m_testFieldFixedInt64 = testFieldFixedInt64;
    }
}


class ComplexMessage_QtProtobufData : public QSharedData
{
public:
    ComplexMessage_QtProtobufData()
        : QSharedData(),
          m_testFieldInt(0),
          m_testComplexField(nullptr)
    {
    }

    ComplexMessage_QtProtobufData(const ComplexMessage_QtProtobufData &other)
        : QSharedData(other),
          m_testFieldInt(other.m_testFieldInt),
          m_testComplexField(other.m_testComplexField
                                               ? new SimpleStringMessage(*other.m_testComplexField)
                                               : nullptr)
    {
    }

    QtProtobuf::int32 m_testFieldInt;
    QtProtobufPrivate::QProtobufLazyMessagePointer<SimpleStringMessage> m_testComplexField;
};

ComplexMessage::~ComplexMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 9> qt_protobuf_ComplexMessage_uint_data;
    const char qt_protobuf_ComplexMessage_char_data[72];
} qt_protobuf_ComplexMessage_metadata {
    // data
    {
        0, /* = version */
        2, /* = num fields */
        3, /* = field number offset */
        5, /* = property index offset */
        7, /* = field flags offset */
        40, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        41, /* = testFieldInt */
        54, /* = testComplexField */
        71, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testFieldInt */
        2, /* = testComplexField */
        // Property indices:
        0, /* = testFieldInt */
        1, /* = testComplexField */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = testFieldInt */
        uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = testComplexField */
    },
    // char_data
    /* metadata char_data: */
    "qtprotobufnamespace.tests.ComplexMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldInt\0testComplexField\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering ComplexMessage::staticPropertyOrdering = {
    &qt_protobuf_ComplexMessage_metadata.data
};

void ComplexMessage::registerTypes()
{
    qRegisterMetaType<ComplexMessage>();
    qRegisterMetaType<ComplexMessageRepeated>();
}

ComplexMessage::ComplexMessage()
    : QProtobufMessage(&ComplexMessage::staticMetaObject, &ComplexMessage::staticPropertyOrdering),
      dptr(new ComplexMessage_QtProtobufData)
{
}

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

QtProtobuf::int32 ComplexMessage::testFieldInt() const
{
    return dptr->m_testFieldInt;
}

SimpleStringMessage *ComplexMessage::testComplexField_p()
{
    if (!dptr->m_testComplexField)
        dptr.detach();
    return dptr->m_testComplexField.get();
}

bool ComplexMessage::hasTestComplexField() const
{
    return dptr->m_testComplexField.operator bool();
}

const SimpleStringMessage &ComplexMessage::testComplexField() const &
{
    return *dptr->m_testComplexField;
}

void ComplexMessage::clearTestComplexField()
{
    if (dptr->m_testComplexField) {
        dptr.detach();
        dptr->m_testComplexField.reset();
    }
}

void ComplexMessage::setTestFieldInt(QtProtobuf::int32 testFieldInt)
{
    if (dptr->m_testFieldInt != testFieldInt) {
        dptr.detach();
        dptr->m_testFieldInt = testFieldInt;
    }
}

void ComplexMessage::setTestComplexField_p(SimpleStringMessage *testComplexField)
{
    if (dptr->m_testComplexField.get() != testComplexField) {
        dptr.detach();
        dptr->m_testComplexField.reset(testComplexField);
    }
}

void ComplexMessage::setTestComplexField(const SimpleStringMessage &testComplexField)
{
    if (*dptr->m_testComplexField != testComplexField) {
        dptr.detach();
        *dptr->m_testComplexField = testComplexField;
    }
}

void ComplexMessage::setTestComplexField(SimpleStringMessage &&testComplexField)
{
    if (*dptr->m_testComplexField != testComplexField) {
        dptr.detach();
        *dptr->m_testComplexField = std::move(testComplexField);
    }
}

} // namespace qtprotobufnamespace::tests

#include "moc_basicmessages.qpb.cpp"
