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


#include "google/protobuf/field_mask.qpb.h"

#include <QtProtobuf/qprotobufregistration.h>

#include <cmath>

namespace google::protobuf {

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

    FieldMask_QtProtobufData(const FieldMask_QtProtobufData &other)
        : QSharedData(other),
          m_paths(other.m_paths)
    {
    }

    QStringList m_paths;
};

FieldMask::~FieldMask() = default;

static constexpr struct {
    QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
    const std::array<uint, 5> qt_protobuf_FieldMask_uint_data;
    const char qt_protobuf_FieldMask_char_data[33];
} qt_protobuf_FieldMask_metadata {
    // data
    {
        0, /* = version */
        1, /* = num fields */
        2, /* = field number offset */
        3, /* = property index offset */
        4, /* = field flags offset */
        25, /* = message full name length */
    },
    // uint_data
    {
        // JSON name offsets:
        26, /* = paths */
        32, /* = end-of-string-marker */
        // Field numbers:
        1, /* = paths */
        // Property indices:
        0, /* = paths */
        // Field flags:
        uint(QtProtobufPrivate::FieldFlag::Repeated), /* = paths */
    },
    // char_data
    /* metadata char_data: */
    "google.protobuf.FieldMask\0" /* = full message name */
    /* field char_data: */
    "paths\0"
};

const QtProtobufPrivate::QProtobufPropertyOrdering FieldMask::staticPropertyOrdering = {
    &qt_protobuf_FieldMask_metadata.data
};

void FieldMask::registerTypes()
{
    qRegisterMetaType<FieldMask>();
    qRegisterMetaType<QList<FieldMask>>();
}

FieldMask::FieldMask()
    : QProtobufMessage(&FieldMask::staticMetaObject, &FieldMask::staticPropertyOrdering),
      dptr(new FieldMask_QtProtobufData)
{
}

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

const QStringList &FieldMask::paths() const &
{
    return dptr->m_paths;
}

void FieldMask::setPaths(const QStringList &paths)
{
    if (dptr->m_paths != paths) {
        dptr.detach();
        dptr->m_paths = paths;
    }
}

void FieldMask::setPaths(QStringList &&paths)
{
    if (dptr->m_paths != paths) {
        dptr.detach();
        dptr->m_paths = std::move(paths);
    }
}

} // namespace google::protobuf

#include "moc_field_mask.qpb.cpp"
