/**
 * Qt6 Common library
 *
 * The Qt6 Common library is auto-generated and available to users under the same license as the Qt which it is used with or built with. See available licenses below. 
 * 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 "qoaiopenapicommoncommonexports.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:
    OPENAPICOMMON_COMMON_EXPORT
    QOAIHttpFileElement();
    OPENAPICOMMON_COMMON_EXPORT
    explicit QOAIHttpFileElement(const QString &localFilename);
    OPENAPICOMMON_COMMON_EXPORT
    QOAIHttpFileElement(const QOAIHttpFileElement &other);
    OPENAPICOMMON_COMMON_EXPORT
    QOAIHttpFileElement(QOAIHttpFileElement &&other) noexcept;
    OPENAPICOMMON_COMMON_EXPORT
    QOAIHttpFileElement &operator=(const QOAIHttpFileElement &other);
    OPENAPICOMMON_COMMON_EXPORT
    QOAIHttpFileElement &operator=(QOAIHttpFileElement &&other) noexcept;
    OPENAPICOMMON_COMMON_EXPORT
    ~QOAIHttpFileElement();

    OPENAPICOMMON_COMMON_EXPORT
    void swap(QOAIHttpFileElement &other) noexcept;

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

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

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

private:
    OPENAPICOMMON_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
