// 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.

#pragma once

#include "apiutils.h"
#include "eventdescriptor.h"
#include "ruleaction.h"
#include "stateevaluator.h"
#include "timedescriptor.h"

namespace nymea::api {

class RulesAddRuleParams {
public:
    // wire: 'actions' (field)
    QList<RuleAction> actions{};
    // wire: 'name' (field)
    QString name{};
    // wire: 'enabled' (optional)
    std::optional<bool> enabled;
    // wire: 'eventDescriptors' (optional)
    std::optional<QList<EventDescriptor>> eventDescriptors;
    // wire: 'executable' (optional)
    std::optional<bool> executable;
    // wire: 'exitActions' (optional)
    std::optional<QList<RuleAction>> exitActions;
    // wire: 'stateEvaluator' (optional)
    std::optional<StateEvaluator> stateEvaluator;
    // wire: 'timeDescriptor' (optional)
    std::optional<TimeDescriptor> timeDescriptor;

    static RulesAddRuleParams fromJson(const QJsonObject &object);
    QJsonObject toJson() const;
};

} // namespace nymea::api
