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

#ifndef DURATION_QPB_H
#define DURATION_QPB_H

#include <QtProtobuf/qprotobuflazymessagepointer.h>
#include <QtProtobuf/qprotobufmessage.h>
#include <QtProtobuf/qprotobufobject.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>

namespace google::protobuf {
class Duration;
namespace Duration_QtProtobufNested {
enum class QtProtobufFieldEnum;
} // namespace Duration_QtProtobufNested

#ifdef QT_USE_PROTOBUF_LIST_ALIASES
using DurationRepeated = QList<Duration>;
#endif // QT_USE_PROTOBUF_LIST_ALIASES

class Duration_QtProtobufData;
class Duration : public QProtobufMessage
{
    Q_PROTOBUF_OBJECT
    Q_PROPERTY(QtProtobuf::int64 seconds READ seconds WRITE setSeconds SCRIPTABLE false)
    Q_PROPERTY(QtProtobuf::int32 nanos READ nanos WRITE setNanos SCRIPTABLE true)

public:
    using QtProtobufFieldEnum = Duration_QtProtobufNested::QtProtobufFieldEnum;
    Duration();
    ~Duration();
    Duration(const Duration &other);
    Duration &operator =(const Duration &other);
    Duration(Duration &&other) noexcept;
    Duration &operator =(Duration &&other) noexcept
    {
        swap(other);
        return *this;
    }
    void swap(Duration &other) noexcept
    {
        QProtobufMessage::swap(other);
        dptr.swap(other.dptr);
    }
    Q_IMPLICIT operator QVariant() const;

    QtProtobuf::int64 seconds() const;

    QtProtobuf::int32 nanos() const;
    void setSeconds(QtProtobuf::int64 seconds);
    void setNanos(QtProtobuf::int32 nanos);
    static void registerTypes();

    static bool isValid(QtProtobuf::int64 seconds, QtProtobuf::int32 nanos);
    bool isValid() const { return isValid(seconds(), nanos()); }

private:
    friend bool comparesEqual(const Duration &lhs, const Duration &rhs) noexcept;
    friend bool operator==(const Duration &lhs, const Duration &rhs) noexcept
    {
        return comparesEqual(lhs, rhs);
    }
    friend bool operator!=(const Duration &lhs, const Duration &rhs) noexcept
    {
        return !comparesEqual(lhs, rhs);
    }
    QExplicitlySharedDataPointer<Duration_QtProtobufData> dptr;
};
namespace Duration_QtProtobufNested {
Q_NAMESPACE

enum class QtProtobufFieldEnum {
    SecondsProtoFieldNumber = 1,
    NanosProtoFieldNumber = 2,
};
Q_ENUM_NS(QtProtobufFieldEnum)

} // namespace Duration_QtProtobufNested
} // namespace google::protobuf

#endif // DURATION_QPB_H
