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

#include "qtgrpc/tests/testservice.qpb.h"
#include <QProtobufSerializer>

namespace qtgrpc::tests {
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[50];
} qt_protobuf_SimpleStringMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        32, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        33, /* = testFieldString */
        49, /* = end-of-string-marker */
        // Field numbers:
        6, /* = testFieldString */
        // Property indices:
        0, /* = testFieldString */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = testFieldString */
    },
    // char_data
    /* metadata char_data: */
    "qtgrpc.tests.SimpleStringMessage\0" /* = full message name */
    /* field char_data: */
    "testFieldString\0"
};

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

void SimpleStringMessage::registerTypes()
{
    qRegisterMetaType<SimpleStringMessage>();
    qRegisterMetaType<SimpleStringMessageRepeated>();
}
SimpleStringMessage::SimpleStringMessage() : QProtobufMessage(&SimpleStringMessage::staticMetaObject)
{
}
SimpleStringMessage::SimpleStringMessage(const SimpleStringMessage &other) : QProtobufMessage(other),
    m_testFieldString(other.m_testFieldString)
{
}
SimpleStringMessage &SimpleStringMessage::operator =(const SimpleStringMessage &other)
{
    QProtobufMessage::operator=(other);
    setTestFieldString(other.m_testFieldString);
    return *this;
}
SimpleStringMessage::SimpleStringMessage(SimpleStringMessage &&other) noexcept : QProtobufMessage(std::move(other))
{
    m_testFieldString = std::move(other.m_testFieldString);
}
SimpleStringMessage &SimpleStringMessage::operator =(SimpleStringMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    if (m_testFieldString != other.m_testFieldString)
        m_testFieldString = std::move(other.m_testFieldString);
    return *this;
}
bool SimpleStringMessage::operator ==(const SimpleStringMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && m_testFieldString == other.m_testFieldString;
}
bool SimpleStringMessage::operator !=(const SimpleStringMessage &other) const
{
    return !this->operator ==(other);
}

void SimpleStringMessage::setTestFieldString(const QString &testFieldString)
{
    if (m_testFieldString != testFieldString)
        m_testFieldString = testFieldString;
}

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[41];
} qt_protobuf_SimpleIntMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        29, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        30, /* = testField */
        40, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testField */
        // Property indices:
        0, /* = testField */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = testField */
    },
    // char_data
    /* metadata char_data: */
    "qtgrpc.tests.SimpleIntMessage\0" /* = full message name */
    /* field char_data: */
    "testField\0"
};

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

void SimpleIntMessage::registerTypes()
{
    qRegisterMetaType<SimpleIntMessage>();
    qRegisterMetaType<SimpleIntMessageRepeated>();
}
SimpleIntMessage::SimpleIntMessage() : QProtobufMessage(&SimpleIntMessage::staticMetaObject),
    m_testField(0)
{
}
SimpleIntMessage::SimpleIntMessage(const SimpleIntMessage &other) : QProtobufMessage(other),
    m_testField(other.m_testField)
{
}
SimpleIntMessage &SimpleIntMessage::operator =(const SimpleIntMessage &other)
{
    QProtobufMessage::operator=(other);
    setTestField(other.m_testField);
    return *this;
}
SimpleIntMessage::SimpleIntMessage(SimpleIntMessage &&other) noexcept : QProtobufMessage(std::move(other))
{
    setTestField(std::exchange(other.m_testField, 0));
}
SimpleIntMessage &SimpleIntMessage::operator =(SimpleIntMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    setTestField(std::exchange(other.m_testField, 0));
    return *this;
}
bool SimpleIntMessage::operator ==(const SimpleIntMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && m_testField == other.m_testField;
}
bool SimpleIntMessage::operator !=(const SimpleIntMessage &other) const
{
    return !this->operator ==(other);
}

BlobMessage::~BlobMessage() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_BlobMessage_uint_data;
    const char qt_protobuf_BlobMessage_char_data[36];
} qt_protobuf_BlobMessage_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        24, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        25, /* = testBytes */
        35, /* = end-of-string-marker */
        // Field numbers:
        1, /* = testBytes */
        // Property indices:
        0, /* = testBytes */
        // Field flags:
        QtProtobufPrivate::NoFlags, /* = testBytes */
    },
    // char_data
    /* metadata char_data: */
    "qtgrpc.tests.BlobMessage\0" /* = full message name */
    /* field char_data: */
    "testBytes\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering BlobMessage::propertyOrdering = {
    &qt_protobuf_BlobMessage_metadata.data
};

void BlobMessage::registerTypes()
{
    qRegisterMetaType<BlobMessage>();
    qRegisterMetaType<BlobMessageRepeated>();
}
BlobMessage::BlobMessage() : QProtobufMessage(&BlobMessage::staticMetaObject)
{
}
BlobMessage::BlobMessage(const BlobMessage &other) : QProtobufMessage(other),
    m_testBytes(other.m_testBytes)
{
}
BlobMessage &BlobMessage::operator =(const BlobMessage &other)
{
    QProtobufMessage::operator=(other);
    setTestBytes(other.m_testBytes);
    return *this;
}
BlobMessage::BlobMessage(BlobMessage &&other) noexcept : QProtobufMessage(std::move(other))
{
    m_testBytes = std::move(other.m_testBytes);
}
BlobMessage &BlobMessage::operator =(BlobMessage &&other) noexcept
{
    QProtobufMessage::operator=(std::move(other));
    if (m_testBytes != other.m_testBytes)
        m_testBytes = std::move(other.m_testBytes);
    return *this;
}
bool BlobMessage::operator ==(const BlobMessage &other) const
{
    return QProtobufMessage::isEqual(*this, other)
        && m_testBytes == other.m_testBytes;
}
bool BlobMessage::operator !=(const BlobMessage &other) const
{
    return !this->operator ==(other);
}

void BlobMessage::setTestBytes(const QByteArray &testBytes)
{
    if (m_testBytes != testBytes)
        m_testBytes = testBytes;
}

} // namespace qtgrpc::tests

#include "moc_testservice.qpb.cpp"
