// SPDX-License-Identifier: GPL-3.0-or-later

// This file is auto-generated by scripts/generate_nymea_api.py
// Any changes made here will be lost when the files are regenerated.
// Do not edit manually.

#include "configurationgetbackupfilesresponse.h"

namespace nymea::api {

ConfigurationGetBackupFilesResponse ConfigurationGetBackupFilesResponse::fromJson(const QJsonObject &object) {
    ConfigurationGetBackupFilesResponse value;
    if (object.contains(QStringLiteral("backupFiles"))) {
        value.backupFiles = ([&]() { QList<BackupFile> list; for (const QJsonValue &item : (object.value(QStringLiteral("backupFiles"))).toArray()) { list.append(BackupFile::fromJson((item).toObject())); } return list; }());
    }
    return value;
}

QJsonObject ConfigurationGetBackupFilesResponse::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("backupFiles"), ([&]() { QJsonArray array; for (const auto &item : backupFiles) { array.append(QJsonValue((item).toJson())); } return QJsonValue(array); }()));
    return object;
}

} // namespace nymea::api
