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

#ifndef NON_FINAL_PROPERTIES_QPB_H
#define NON_FINAL_PROPERTIES_QPB_H

#include <QtProtobuf/qprotobuflazymessagepointer.h>
#include <QtProtobuf/qprotobufmessage.h>
#include <QtProtobuf/qprotobufobject.h>
#include <QtProtobuf/qprotobufoneof.h>
#include <QtProtobuf/qtprotobuftypes.h>

#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qstring.h>

#include <optional>

class TestMessages;
namespace TestMessages_QtProtobufNested {
enum class QtProtobufFieldEnum;
enum class FieldOneOfFields;
} // namespace TestMessages_QtProtobufNested

#ifdef QT_USE_PROTOBUF_LIST_ALIASES
using TestMessagesRepeated = QList<TestMessages>;
#endif // QT_USE_PROTOBUF_LIST_ALIASES

class TestMessages_QtProtobufData;
class TestMessages final : public QProtobufMessage
{
    Q_PROTOBUF_OBJECT
    Q_PROPERTY(QtProtobuf::int32 field1 READ field1 WRITE setField1 SCRIPTABLE true)
    Q_PROPERTY(QtProtobuf::uint32List field2 READ field2 WRITE setField2 SCRIPTABLE true)
    Q_PROPERTY(QtProtobuf::sint32 field3 READ field3_p WRITE setField3_p)
    Q_PROPERTY(bool hasField3 READ hasField3)
    Q_PROPERTY(::TestMessages::Field4Entry field4 READ field4 WRITE setField4 SCRIPTABLE true)
    Q_PROPERTY(QtProtobuf::uint64 field5 READ field5_p WRITE setField5_p)
    Q_PROPERTY(bool hasField5 READ hasField5)
    Q_PROPERTY(float field6 READ field6_p WRITE setField6_p)
    Q_PROPERTY(bool hasField6 READ hasField6)

public:
    using QtProtobufFieldEnum = TestMessages_QtProtobufNested::QtProtobufFieldEnum;
    using FieldOneOfFields = TestMessages_QtProtobufNested::FieldOneOfFields;
    using Field4Entry = QHash<QtProtobuf::sint64, QtProtobuf::uint32>;
    TestMessages();
    ~TestMessages();
    TestMessages(const TestMessages &other);
    TestMessages &operator =(const TestMessages &other);
    TestMessages(TestMessages &&other) noexcept;
    TestMessages &operator =(TestMessages &&other) noexcept
    {
        swap(other);
        return *this;
    }
    void swap(TestMessages &other) noexcept
    {
        QProtobufMessage::swap(other);
        dptr.swap(other.dptr);
    }
    Q_IMPLICIT operator QVariant() const;

    QtProtobuf::int32 field1() const;

    const QtProtobuf::uint32List &field2() const &;

    bool hasField3() const;
    QtProtobuf::sint32 field3() const;

    const TestMessages::Field4Entry &field4() const &;

    bool hasField5() const;
    QtProtobuf::uint64 field5() const;

    bool hasField6() const;
    float field6() const;
    FieldOneOfFields fieldOneOfField() const;
    void setField1(QtProtobuf::int32 field1);
    void setField2(const QtProtobuf::uint32List &field2);
    void setField2(QtProtobuf::uint32List &&field2);
    void setField3(QtProtobuf::sint32 field3);
    void clearField3();
    void setField4(const TestMessages::Field4Entry &field4);
    void setField4(TestMessages::Field4Entry &&field4);
    void setField5(QtProtobuf::uint64 field5);
    void setField6(float field6);
    void clearFieldOneOf();
    static void registerTypes();

private:
    friend bool comparesEqual(const TestMessages &lhs, const TestMessages &rhs) noexcept;
    friend bool operator==(const TestMessages &lhs, const TestMessages &rhs) noexcept
    {
        return comparesEqual(lhs, rhs);
    }
    friend bool operator!=(const TestMessages &lhs, const TestMessages &rhs) noexcept
    {
        return !comparesEqual(lhs, rhs);
    }
    QtProtobuf::sint32 field3_p() const;
    QtProtobuf::uint64 field5_p() const;
    float field6_p() const;
    void setField3_p(QtProtobuf::sint32 field3);
    void setField5_p(QtProtobuf::uint64 field5);
    void setField6_p(float field6);
    QExplicitlySharedDataPointer<TestMessages_QtProtobufData> dptr;
};
namespace TestMessages_QtProtobufNested {
Q_NAMESPACE

enum class QtProtobufFieldEnum {
    Field1ProtoFieldNumber = 1,
    Field2ProtoFieldNumber = 2,
    Field3ProtoFieldNumber = 3,
    Field4ProtoFieldNumber = 4,
    Field5ProtoFieldNumber = 5,
    Field6ProtoFieldNumber = 6,
};
Q_ENUM_NS(QtProtobufFieldEnum)

enum class FieldOneOfFields : int32_t {
    UninitializedField = QtProtobuf::InvalidFieldNumber,
    Field5 = 5,
    Field6 = 6,
};
Q_ENUM_NS(FieldOneOfFields)

} // namespace TestMessages_QtProtobufNested

#endif // NON_FINAL_PROPERTIES_QPB_H
