/**
 * Qt6 Common library
 *
 * Copyright (C) 2026 The Qt Company Ltd.
 * SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#ifndef QOAI_HTTP_FILE_ELEMENT_H
#define QOAI_HTTP_FILE_ELEMENT_H

#include "qoaicmakecommonlibgeneratedclientcommonexports.h"

#include <QtCore/qcontainerfwd.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qshareddata.h>

QT_BEGIN_NAMESPACE
class QJsonValue;
QT_END_NAMESPACE

QT_BEGIN_NAMESPACE

namespace QtOpenApiCommon {

class QOAIHttpFileElementPrivate;

class QOAIHttpFileElement
{
public:
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    QOAIHttpFileElement();
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    explicit QOAIHttpFileElement(const QString &localFilename);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    QOAIHttpFileElement(const QOAIHttpFileElement &other);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    QOAIHttpFileElement(QOAIHttpFileElement &&other) noexcept;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    QOAIHttpFileElement &operator=(const QOAIHttpFileElement &other);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    QOAIHttpFileElement &operator=(QOAIHttpFileElement &&other) noexcept;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    ~QOAIHttpFileElement();

    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT
    void swap(QOAIHttpFileElement &other) noexcept;

    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT void setMimeType(const QString &mime);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT void setVariableName(const QString &name);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT void setTemporary(bool temp);

    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QString mimeType() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QString filename() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QString variableName() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT bool isTemporary() const;

    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QString requestFilename() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT bool isSet() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT bool fromStringValue(const QString &instr);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT bool fromJsonValue(const QJsonValue &jval);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT bool saveToLocalFile(const QByteArray &bytes);
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QString asJson() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QJsonValue asJsonValue() const;
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT QByteArray loadFromLocalFile() const;

private:
    CMAKECOMMONLIBGENERATEDCLIENT_COMMON_EXPORT friend bool
    comparesEqual(const QOAIHttpFileElement &lhs, const QOAIHttpFileElement &rhs) noexcept;

    friend bool
    operator==(const QOAIHttpFileElement &lhs, const QOAIHttpFileElement &rhs) noexcept
    { return comparesEqual(lhs, rhs); }
    friend bool
    operator!=(const QOAIHttpFileElement &lhs, const QOAIHttpFileElement &rhs) noexcept
    { return !comparesEqual(lhs, rhs); }

    friend size_t qHash(const QOAIHttpFileElement &value) = delete;
    friend size_t qHash(const QOAIHttpFileElement &value, size_t seed) = delete;

    QExplicitlySharedDataPointer<QOAIHttpFileElementPrivate> d;
};

} // namespace QtOpenApiCommon

QT_END_NAMESPACE

Q_DECLARE_METATYPE(QtOpenApiCommon::QOAIHttpFileElement)

#endif // QOAI_HTTP_FILE_ELEMENT_H
