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

namespace nymea::api {

class StateType {
public:
    // wire: 'defaultValue' (field)
    QJsonValue defaultValue{};
    // wire: 'displayName' (field)
    QString displayName{};
    // wire: 'index' (field)
    qint64 index{};
    // wire: 'name' (field)
    QString name{};
    // wire: 'ioType' (optional)
    std::optional<IOType> ioType;
    // wire: 'maxValue' (optional)
    std::optional<QJsonValue> maxValue;
    // wire: 'minValue' (optional)
    std::optional<QJsonValue> minValue;
    // wire: 'possibleValues' (optional)
    std::optional<QList<QJsonValue>> possibleValues;
    // wire: 'possibleValuesDisplayNames' (optional)
    std::optional<QStringList> possibleValuesDisplayNames;
    // wire: 'stepSize' (optional)
    std::optional<double> stepSize;
    // wire: 'unit' (optional)
    std::optional<Unit> unit;
    // wire: 'id' (required)
    QUuid id{};
    // wire: 'type' (field)
    BasicType type{};

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

} // namespace nymea::api
