Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
createplaylistdto.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19/*
20 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_CREATEPLAYLISTDTO_H
31#define JELLYFIN_DTO_CREATEPLAYLISTDTO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
43
44namespace Jellyfin {
45// Forward declaration
46class ApiClient;
47}
48namespace Jellyfin {
49namespace DTO {
50
51
53public:
55 QString name,
56 QStringList ids,
59 bool isPublic
60 );
61
63
67 void replaceData(CreatePlaylistDto &other);
68
69 static CreatePlaylistDto fromJson(QJsonObject source);
70 void setFromJson(QJsonObject source);
71 QJsonObject toJson() const;
72
73 // Properties
77 QString name() const;
81 void setName(QString newName);
82
86 QStringList ids() const;
90 void setIds(QStringList newIds);
91
95 QString userId() const;
99 void setUserId(QString newUserId);
100 bool userIdNull() const;
101 void setUserIdNull();
102
103
104 MediaType mediaType() const;
105
106 void setMediaType(MediaType newMediaType);
107
116
120 bool isPublic() const;
124 void setIsPublic(bool newIsPublic);
125
126
127protected:
128 QString m_name;
129 QStringList m_ids;
130 QString m_userId;
134
135private:
136 // Private constructor which generates an invalid object, for use withing CreatePlaylistDto::fromJson();
138};
139
140
141} // NS DTO
142
143namespace Support {
144
146
147template <>
149
150template<>
152
153} // NS DTO
154} // NS Jellyfin
155
156#endif // JELLYFIN_DTO_CREATEPLAYLISTDTO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition createplaylistdto.h:52
QList< PlaylistUserPermissions > users() const
Gets or sets the playlist users.
Definition createplaylistdto.cpp:134
void setUsers(QList< PlaylistUserPermissions > newUsers)
Gets or sets the playlist users.
Definition createplaylistdto.cpp:136
QList< PlaylistUserPermissions > m_users
Definition createplaylistdto.h:132
QStringList m_ids
Definition createplaylistdto.h:129
QString name() const
Gets or sets the name of the new playlist.
Definition createplaylistdto.cpp:103
static CreatePlaylistDto fromJson(QJsonObject source)
Definition createplaylistdto.cpp:70
void replaceData(CreatePlaylistDto &other)
Definition createplaylistdto.cpp:61
void setUserId(QString newUserId)
Gets or sets the user id.
Definition createplaylistdto.cpp:117
void setIsPublic(bool newIsPublic)
Gets or sets a value indicating whether the playlist is public.
Definition createplaylistdto.cpp:142
CreatePlaylistDto(QString name, QStringList ids, MediaType mediaType, QList< PlaylistUserPermissions > users, bool isPublic)
Definition createplaylistdto.cpp:36
void setMediaType(MediaType newMediaType)
Definition createplaylistdto.cpp:130
QStringList ids() const
Gets or sets item ids to add to the playlist.
Definition createplaylistdto.cpp:109
bool m_isPublic
Definition createplaylistdto.h:133
QString userId() const
Gets or sets the user id.
Definition createplaylistdto.cpp:115
MediaType mediaType() const
Definition createplaylistdto.cpp:128
void setIds(QStringList newIds)
Gets or sets item ids to add to the playlist.
Definition createplaylistdto.cpp:111
QJsonObject toJson() const
Definition createplaylistdto.cpp:87
QString m_userId
Definition createplaylistdto.h:130
bool userIdNull() const
Definition createplaylistdto.cpp:120
MediaType m_mediaType
Definition createplaylistdto.h:131
QString m_name
Definition createplaylistdto.h:128
void setUserIdNull()
Definition createplaylistdto.cpp:124
bool isPublic() const
Gets or sets a value indicating whether the playlist is public.
Definition createplaylistdto.cpp:140
void setFromJson(QJsonObject source)
Definition createplaylistdto.cpp:77
void setName(QString newName)
Gets or sets the name of the new playlist.
Definition createplaylistdto.cpp:105
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
MediaTypeClass::Value MediaType
Definition mediatype.h:62
Definition accessschedule.h:128
Jellyfin::DTO::CreatePlaylistDto CreatePlaylistDto
Definition createplaylistdto.h:145
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45