Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
userpolicy.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_USERPOLICY_H
31#define JELLYFIN_DTO_USERPOLICY_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
44
45namespace Jellyfin {
46// Forward declaration
47class ApiClient;
48}
49namespace Jellyfin {
50namespace DTO {
51
52
54public:
56 bool isAdministrator,
57 bool isHidden,
58 bool isDisabled,
74 bool enableAllDevices,
76 bool enableAllFolders,
79 qint32 maxActiveSessions,
83 );
84
85 UserPolicy(const UserPolicy &other);
86
90 void replaceData(UserPolicy &other);
91
92 static UserPolicy fromJson(QJsonObject source);
93 void setFromJson(QJsonObject source);
94 QJsonObject toJson() const;
95
96 // Properties
100 bool isAdministrator() const;
104 void setIsAdministrator(bool newIsAdministrator);
105
109 bool isHidden() const;
113 void setIsHidden(bool newIsHidden);
114
118 bool isDisabled() const;
122 void setIsDisabled(bool newIsDisabled);
123
127 std::optional<qint32> maxParentalRating() const;
131 void setMaxParentalRating(std::optional<qint32> newMaxParentalRating);
132 bool maxParentalRatingNull() const;
134
135
136 QStringList blockedTags() const;
137
138 void setBlockedTags(QStringList newBlockedTags);
139 bool blockedTagsNull() const;
140 void setBlockedTagsNull();
141
142
143 bool enableUserPreferenceAccess() const;
144
145 void setEnableUserPreferenceAccess(bool newEnableUserPreferenceAccess);
146
147
149
150 void setAccessSchedules(QList<AccessSchedule> newAccessSchedules);
151 bool accessSchedulesNull() const;
153
154
156
157 void setBlockUnratedItems(QList<UnratedItem> newBlockUnratedItems);
158 bool blockUnratedItemsNull() const;
160
161
163
164 void setEnableRemoteControlOfOtherUsers(bool newEnableRemoteControlOfOtherUsers);
165
166
167 bool enableSharedDeviceControl() const;
168
169 void setEnableSharedDeviceControl(bool newEnableSharedDeviceControl);
170
171
172 bool enableRemoteAccess() const;
173
174 void setEnableRemoteAccess(bool newEnableRemoteAccess);
175
176
177 bool enableLiveTvManagement() const;
178
179 void setEnableLiveTvManagement(bool newEnableLiveTvManagement);
180
181
182 bool enableLiveTvAccess() const;
183
184 void setEnableLiveTvAccess(bool newEnableLiveTvAccess);
185
186
187 bool enableMediaPlayback() const;
188
189 void setEnableMediaPlayback(bool newEnableMediaPlayback);
190
191
193
194 void setEnableAudioPlaybackTranscoding(bool newEnableAudioPlaybackTranscoding);
195
196
198
199 void setEnableVideoPlaybackTranscoding(bool newEnableVideoPlaybackTranscoding);
200
201
202 bool enablePlaybackRemuxing() const;
203
204 void setEnablePlaybackRemuxing(bool newEnablePlaybackRemuxing);
205
206
207 bool forceRemoteSourceTranscoding() const;
208
209 void setForceRemoteSourceTranscoding(bool newForceRemoteSourceTranscoding);
210
211
212 bool enableContentDeletion() const;
213
214 void setEnableContentDeletion(bool newEnableContentDeletion);
215
216
217 QStringList enableContentDeletionFromFolders() const;
218
219 void setEnableContentDeletionFromFolders(QStringList newEnableContentDeletionFromFolders);
222
223
224 bool enableContentDownloading() const;
225
226 void setEnableContentDownloading(bool newEnableContentDownloading);
227
231 bool enableSyncTranscoding() const;
235 void setEnableSyncTranscoding(bool newEnableSyncTranscoding);
236
237
238 bool enableMediaConversion() const;
239
240 void setEnableMediaConversion(bool newEnableMediaConversion);
241
242
243 QStringList enabledDevices() const;
244
245 void setEnabledDevices(QStringList newEnabledDevices);
246 bool enabledDevicesNull() const;
248
249
250 bool enableAllDevices() const;
251
252 void setEnableAllDevices(bool newEnableAllDevices);
253
254
255 QStringList enabledChannels() const;
256
257 void setEnabledChannels(QStringList newEnabledChannels);
258 bool enabledChannelsNull() const;
260
261
262 bool enableAllChannels() const;
263
264 void setEnableAllChannels(bool newEnableAllChannels);
265
266
267 QStringList enabledFolders() const;
268
269 void setEnabledFolders(QStringList newEnabledFolders);
270 bool enabledFoldersNull() const;
272
273
274 bool enableAllFolders() const;
275
276 void setEnableAllFolders(bool newEnableAllFolders);
277
278
279 qint32 invalidLoginAttemptCount() const;
280
281 void setInvalidLoginAttemptCount(qint32 newInvalidLoginAttemptCount);
282
283
284 qint32 loginAttemptsBeforeLockout() const;
285
286 void setLoginAttemptsBeforeLockout(qint32 newLoginAttemptsBeforeLockout);
287
288
289 qint32 maxActiveSessions() const;
290
291 void setMaxActiveSessions(qint32 newMaxActiveSessions);
292
293
294 bool enablePublicSharing() const;
295
296 void setEnablePublicSharing(bool newEnablePublicSharing);
297
298
299 QStringList blockedMediaFolders() const;
300
301 void setBlockedMediaFolders(QStringList newBlockedMediaFolders);
302 bool blockedMediaFoldersNull() const;
304
305
306 QStringList blockedChannels() const;
307
308 void setBlockedChannels(QStringList newBlockedChannels);
309 bool blockedChannelsNull() const;
311
312
313 qint32 remoteClientBitrateLimit() const;
314
315 void setRemoteClientBitrateLimit(qint32 newRemoteClientBitrateLimit);
316
317
318 QString authenticationProviderId() const;
319
320 void setAuthenticationProviderId(QString newAuthenticationProviderId);
321 bool authenticationProviderIdNull() const;
323
324
325 QString passwordResetProviderId() const;
326
327 void setPasswordResetProviderId(QString newPasswordResetProviderId);
328 bool passwordResetProviderIdNull() const;
330
331
333
334 void setSyncPlayAccess(SyncPlayUserAccessType newSyncPlayAccess);
335
336
337protected:
341 std::optional<qint32> m_maxParentalRating = std::nullopt;
342 QStringList m_blockedTags;
361 QStringList m_enabledDevices;
363 QStringList m_enabledChannels;
365 QStringList m_enabledFolders;
372 QStringList m_blockedChannels;
377
378private:
379 // Private constructor which generates an invalid object, for use withing UserPolicy::fromJson();
380 UserPolicy();
381};
382
383
384} // NS DTO
385
386namespace Support {
387
389
390template <>
391UserPolicy fromJsonValue(const QJsonValue &source, convertType<UserPolicy>);
392
393template<>
394QJsonValue toJsonValue(const UserPolicy &source, convertType<UserPolicy>);
395
396} // NS DTO
397} // NS Jellyfin
398
399#endif // JELLYFIN_DTO_USERPOLICY_H
Value
Definition syncplayuseraccesstype.h:49
Definition userpolicy.h:53
bool enablePublicSharing() const
Definition userpolicy.cpp:571
bool isDisabled() const
Gets or sets a value indicating whether this instance is disabled.
Definition userpolicy.cpp:335
bool m_enableAudioPlaybackTranscoding
Definition userpolicy.h:352
QString m_authenticationProviderId
Definition userpolicy.h:374
void setAuthenticationProviderId(QString newAuthenticationProviderId)
Definition userpolicy.cpp:611
QString m_passwordResetProviderId
Definition userpolicy.h:375
bool enablePlaybackRemuxing() const
Definition userpolicy.cpp:447
bool enableContentDeletion() const
Definition userpolicy.cpp:459
void setEnableContentDeletion(bool newEnableContentDeletion)
Definition userpolicy.cpp:461
bool authenticationProviderIdNull() const
Definition userpolicy.cpp:614
QStringList enabledFolders() const
Definition userpolicy.cpp:534
std::optional< qint32 > m_maxParentalRating
Definition userpolicy.h:341
void setEnableRemoteAccess(bool newEnableRemoteAccess)
Definition userpolicy.cpp:413
QStringList enabledDevices() const
Definition userpolicy.cpp:496
bool m_enableMediaPlayback
Definition userpolicy.h:351
QList< AccessSchedule > m_accessSchedules
Definition userpolicy.h:344
void setMaxParentalRating(std::optional< qint32 > newMaxParentalRating)
Gets or sets the max parental rating.
Definition userpolicy.cpp:343
QStringList enabledChannels() const
Definition userpolicy.cpp:515
qint32 m_loginAttemptsBeforeLockout
Definition userpolicy.h:368
bool m_enableSharedDeviceControl
Definition userpolicy.h:347
bool enableSyncTranscoding() const
Gets or sets a value indicating whether [enable synchronize].
Definition userpolicy.cpp:484
bool m_enableRemoteControlOfOtherUsers
Definition userpolicy.h:346
bool m_enableContentDeletion
Definition userpolicy.h:356
qint32 invalidLoginAttemptCount() const
Definition userpolicy.cpp:553
void setMaxParentalRatingNull()
Definition userpolicy.cpp:350
void setBlockedMediaFolders(QStringList newBlockedMediaFolders)
Definition userpolicy.cpp:579
bool forceRemoteSourceTranscoding() const
Definition userpolicy.cpp:453
bool accessSchedulesNull() const
Definition userpolicy.cpp:378
void setEnableAllFolders(bool newEnableAllFolders)
Definition userpolicy.cpp:549
SyncPlayUserAccessType syncPlayAccess() const
Definition userpolicy.cpp:635
void setEnableVideoPlaybackTranscoding(bool newEnableVideoPlaybackTranscoding)
Definition userpolicy.cpp:443
bool m_enableMediaConversion
Definition userpolicy.h:360
bool enableContentDeletionFromFoldersNull() const
Definition userpolicy.cpp:470
void setIsDisabled(bool newIsDisabled)
Gets or sets a value indicating whether this instance is disabled.
Definition userpolicy.cpp:337
void setLoginAttemptsBeforeLockout(qint32 newLoginAttemptsBeforeLockout)
Definition userpolicy.cpp:561
bool blockedChannelsNull() const
Definition userpolicy.cpp:595
bool enableUserPreferenceAccess() const
Definition userpolicy.cpp:367
bool m_enableRemoteAccess
Definition userpolicy.h:348
bool blockedTagsNull() const
Definition userpolicy.cpp:359
bool enableAllChannels() const
Definition userpolicy.cpp:528
bool enableRemoteControlOfOtherUsers() const
Definition userpolicy.cpp:399
void setEnableMediaConversion(bool newEnableMediaConversion)
Definition userpolicy.cpp:492
bool m_enableContentDownloading
Definition userpolicy.h:358
void setBlockedChannelsNull()
Definition userpolicy.cpp:599
QStringList m_blockedTags
Definition userpolicy.h:342
bool m_enablePublicSharing
Definition userpolicy.h:370
bool enableLiveTvManagement() const
Definition userpolicy.cpp:417
bool maxParentalRatingNull() const
Definition userpolicy.cpp:346
qint32 m_invalidLoginAttemptCount
Definition userpolicy.h:367
bool m_enableAllDevices
Definition userpolicy.h:362
void setFromJson(QJsonObject source)
Definition userpolicy.cpp:187
void setSyncPlayAccess(SyncPlayUserAccessType newSyncPlayAccess)
Definition userpolicy.cpp:637
QStringList m_enableContentDeletionFromFolders
Definition userpolicy.h:357
qint32 m_remoteClientBitrateLimit
Definition userpolicy.h:373
QStringList blockedMediaFolders() const
Definition userpolicy.cpp:577
void setEnabledChannelsNull()
Definition userpolicy.cpp:524
QStringList enableContentDeletionFromFolders() const
Definition userpolicy.cpp:465
void setIsHidden(bool newIsHidden)
Gets or sets a value indicating whether this instance is hidden.
Definition userpolicy.cpp:331
bool enableRemoteAccess() const
Definition userpolicy.cpp:411
bool enableMediaPlayback() const
Definition userpolicy.cpp:429
void setInvalidLoginAttemptCount(qint32 newInvalidLoginAttemptCount)
Definition userpolicy.cpp:555
void setEnabledDevicesNull()
Definition userpolicy.cpp:505
bool enableContentDownloading() const
Definition userpolicy.cpp:478
bool m_forceRemoteSourceTranscoding
Definition userpolicy.h:355
bool enableAllDevices() const
Definition userpolicy.cpp:509
bool isAdministrator() const
Gets or sets a value indicating whether this instance is administrator.
Definition userpolicy.cpp:323
QStringList blockedChannels() const
Definition userpolicy.cpp:590
bool m_enableLiveTvManagement
Definition userpolicy.h:349
void setEnableUserPreferenceAccess(bool newEnableUserPreferenceAccess)
Definition userpolicy.cpp:369
static UserPolicy fromJson(QJsonObject source)
Definition userpolicy.cpp:180
void setEnableAudioPlaybackTranscoding(bool newEnableAudioPlaybackTranscoding)
Definition userpolicy.cpp:437
void setRemoteClientBitrateLimit(qint32 newRemoteClientBitrateLimit)
Definition userpolicy.cpp:605
void setBlockedTags(QStringList newBlockedTags)
Definition userpolicy.cpp:356
bool enableAudioPlaybackTranscoding() const
Definition userpolicy.cpp:435
void setEnableSyncTranscoding(bool newEnableSyncTranscoding)
Gets or sets a value indicating whether [enable synchronize].
Definition userpolicy.cpp:486
void setPasswordResetProviderId(QString newPasswordResetProviderId)
Definition userpolicy.cpp:624
void setBlockedChannels(QStringList newBlockedChannels)
Definition userpolicy.cpp:592
void setEnableContentDeletionFromFolders(QStringList newEnableContentDeletionFromFolders)
Definition userpolicy.cpp:467
void setEnableContentDeletionFromFoldersNull()
Definition userpolicy.cpp:474
bool m_enableUserPreferenceAccess
Definition userpolicy.h:343
QString authenticationProviderId() const
Definition userpolicy.cpp:609
void setEnabledFoldersNull()
Definition userpolicy.cpp:543
void setEnableRemoteControlOfOtherUsers(bool newEnableRemoteControlOfOtherUsers)
Definition userpolicy.cpp:401
SyncPlayUserAccessType m_syncPlayAccess
Definition userpolicy.h:376
void setEnableAllChannels(bool newEnableAllChannels)
Definition userpolicy.cpp:530
void setBlockUnratedItemsNull()
Definition userpolicy.cpp:395
bool m_enableVideoPlaybackTranscoding
Definition userpolicy.h:353
void setEnablePublicSharing(bool newEnablePublicSharing)
Definition userpolicy.cpp:573
bool enableLiveTvAccess() const
Definition userpolicy.cpp:423
qint32 m_maxActiveSessions
Definition userpolicy.h:369
QList< UnratedItem > m_blockUnratedItems
Definition userpolicy.h:345
QStringList blockedTags() const
Definition userpolicy.cpp:354
void setEnableSharedDeviceControl(bool newEnableSharedDeviceControl)
Definition userpolicy.cpp:407
void setPasswordResetProviderIdNull()
Definition userpolicy.cpp:631
bool enableMediaConversion() const
Definition userpolicy.cpp:490
QStringList m_blockedMediaFolders
Definition userpolicy.h:371
bool m_enableAllChannels
Definition userpolicy.h:364
bool isHidden() const
Gets or sets a value indicating whether this instance is hidden.
Definition userpolicy.cpp:329
void setEnableAllDevices(bool newEnableAllDevices)
Definition userpolicy.cpp:511
void setEnableLiveTvAccess(bool newEnableLiveTvAccess)
Definition userpolicy.cpp:425
void setMaxActiveSessions(qint32 newMaxActiveSessions)
Definition userpolicy.cpp:567
bool m_isAdministrator
Definition userpolicy.h:338
void setIsAdministrator(bool newIsAdministrator)
Gets or sets a value indicating whether this instance is administrator.
Definition userpolicy.cpp:325
qint32 remoteClientBitrateLimit() const
Definition userpolicy.cpp:603
QStringList m_enabledChannels
Definition userpolicy.h:363
void setAccessSchedules(QList< AccessSchedule > newAccessSchedules)
Definition userpolicy.cpp:375
std::optional< qint32 > maxParentalRating() const
Gets or sets the max parental rating.
Definition userpolicy.cpp:341
QList< UnratedItem > blockUnratedItems() const
Definition userpolicy.cpp:386
bool enabledChannelsNull() const
Definition userpolicy.cpp:520
QJsonObject toJson() const
Definition userpolicy.cpp:230
bool blockedMediaFoldersNull() const
Definition userpolicy.cpp:582
void setBlockedTagsNull()
Definition userpolicy.cpp:363
void setEnableMediaPlayback(bool newEnableMediaPlayback)
Definition userpolicy.cpp:431
void setEnabledChannels(QStringList newEnabledChannels)
Definition userpolicy.cpp:517
QStringList m_blockedChannels
Definition userpolicy.h:372
bool m_isDisabled
Definition userpolicy.h:340
QList< AccessSchedule > accessSchedules() const
Definition userpolicy.cpp:373
bool blockUnratedItemsNull() const
Definition userpolicy.cpp:391
void setBlockedMediaFoldersNull()
Definition userpolicy.cpp:586
bool enableSharedDeviceControl() const
Definition userpolicy.cpp:405
bool m_enablePlaybackRemuxing
Definition userpolicy.h:354
QStringList m_enabledDevices
Definition userpolicy.h:361
void setAuthenticationProviderIdNull()
Definition userpolicy.cpp:618
void setEnablePlaybackRemuxing(bool newEnablePlaybackRemuxing)
Definition userpolicy.cpp:449
bool enabledFoldersNull() const
Definition userpolicy.cpp:539
bool m_isHidden
Definition userpolicy.h:339
bool m_enableAllFolders
Definition userpolicy.h:366
bool m_enableLiveTvAccess
Definition userpolicy.h:350
bool enabledDevicesNull() const
Definition userpolicy.cpp:501
void setBlockUnratedItems(QList< UnratedItem > newBlockUnratedItems)
Definition userpolicy.cpp:388
void setEnableLiveTvManagement(bool newEnableLiveTvManagement)
Definition userpolicy.cpp:419
void setEnabledDevices(QStringList newEnabledDevices)
Definition userpolicy.cpp:498
void setEnabledFolders(QStringList newEnabledFolders)
Definition userpolicy.cpp:536
bool enableVideoPlaybackTranscoding() const
Definition userpolicy.cpp:441
void replaceData(UserPolicy &other)
Definition userpolicy.cpp:138
void setForceRemoteSourceTranscoding(bool newForceRemoteSourceTranscoding)
Definition userpolicy.cpp:455
void setEnableContentDownloading(bool newEnableContentDownloading)
Definition userpolicy.cpp:480
qint32 maxActiveSessions() const
Definition userpolicy.cpp:565
QString passwordResetProviderId() const
Definition userpolicy.cpp:622
bool enableAllFolders() const
Definition userpolicy.cpp:547
bool passwordResetProviderIdNull() const
Definition userpolicy.cpp:627
bool m_enableSyncTranscoding
Definition userpolicy.h:359
QStringList m_enabledFolders
Definition userpolicy.h:365
void setAccessSchedulesNull()
Definition userpolicy.cpp:382
qint32 loginAttemptsBeforeLockout() const
Definition userpolicy.cpp:559
Definition mediaplayer2.h:20
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