389 lines
14 KiB
TypeScript
389 lines
14 KiB
TypeScript
|
/* tslint:disable */
|
||
|
/* eslint-disable */
|
||
|
/**
|
||
|
* Jellyfin API
|
||
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||
|
*
|
||
|
* The version of the OpenAPI document: 10.8.9
|
||
|
*
|
||
|
*
|
||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||
|
* https://openapi-generator.tech
|
||
|
* Do not edit the class manually.
|
||
|
*/
|
||
|
|
||
|
import { exists, mapValues } from '../runtime';
|
||
|
import type { AccessSchedule } from './AccessSchedule';
|
||
|
import {
|
||
|
AccessScheduleFromJSON,
|
||
|
AccessScheduleFromJSONTyped,
|
||
|
AccessScheduleToJSON,
|
||
|
} from './AccessSchedule';
|
||
|
import type { SyncPlayUserAccessType } from './SyncPlayUserAccessType';
|
||
|
import {
|
||
|
SyncPlayUserAccessTypeFromJSON,
|
||
|
SyncPlayUserAccessTypeFromJSONTyped,
|
||
|
SyncPlayUserAccessTypeToJSON,
|
||
|
} from './SyncPlayUserAccessType';
|
||
|
import type { UnratedItem } from './UnratedItem';
|
||
|
import {
|
||
|
UnratedItemFromJSON,
|
||
|
UnratedItemFromJSONTyped,
|
||
|
UnratedItemToJSON,
|
||
|
} from './UnratedItem';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @export
|
||
|
* @interface UserPolicy
|
||
|
*/
|
||
|
export interface UserPolicy {
|
||
|
/**
|
||
|
* Gets or sets a value indicating whether this instance is administrator.
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
isAdministrator?: boolean;
|
||
|
/**
|
||
|
* Gets or sets a value indicating whether this instance is hidden.
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
isHidden?: boolean;
|
||
|
/**
|
||
|
* Gets or sets a value indicating whether this instance is disabled.
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
isDisabled?: boolean;
|
||
|
/**
|
||
|
* Gets or sets the max parental rating.
|
||
|
* @type {number}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
maxParentalRating?: number | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
blockedTags?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableUserPreferenceAccess?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<AccessSchedule>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
accessSchedules?: Array<AccessSchedule> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<UnratedItem>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
blockUnratedItems?: Array<UnratedItem> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableRemoteControlOfOtherUsers?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableSharedDeviceControl?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableRemoteAccess?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableLiveTvManagement?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableLiveTvAccess?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableMediaPlayback?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableAudioPlaybackTranscoding?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableVideoPlaybackTranscoding?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enablePlaybackRemuxing?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
forceRemoteSourceTranscoding?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableContentDeletion?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableContentDeletionFromFolders?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableContentDownloading?: boolean;
|
||
|
/**
|
||
|
* Gets or sets a value indicating whether [enable synchronize].
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableSyncTranscoding?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableMediaConversion?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enabledDevices?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableAllDevices?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enabledChannels?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableAllChannels?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enabledFolders?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enableAllFolders?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
invalidLoginAttemptCount?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
loginAttemptsBeforeLockout?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
maxActiveSessions?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
enablePublicSharing?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
blockedMediaFolders?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
blockedChannels?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
remoteClientBitrateLimit?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {string}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
authenticationProviderId?: string | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {string}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
passwordResetProviderId?: string | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {SyncPlayUserAccessType}
|
||
|
* @memberof UserPolicy
|
||
|
*/
|
||
|
syncPlayAccess?: SyncPlayUserAccessType;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check if a given object implements the UserPolicy interface.
|
||
|
*/
|
||
|
export function instanceOfUserPolicy(value: object): boolean {
|
||
|
let isInstance = true;
|
||
|
|
||
|
return isInstance;
|
||
|
}
|
||
|
|
||
|
export function UserPolicyFromJSON(json: any): UserPolicy {
|
||
|
return UserPolicyFromJSONTyped(json, false);
|
||
|
}
|
||
|
|
||
|
export function UserPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPolicy {
|
||
|
if ((json === undefined) || (json === null)) {
|
||
|
return json;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'isAdministrator': !exists(json, 'IsAdministrator') ? undefined : json['IsAdministrator'],
|
||
|
'isHidden': !exists(json, 'IsHidden') ? undefined : json['IsHidden'],
|
||
|
'isDisabled': !exists(json, 'IsDisabled') ? undefined : json['IsDisabled'],
|
||
|
'maxParentalRating': !exists(json, 'MaxParentalRating') ? undefined : json['MaxParentalRating'],
|
||
|
'blockedTags': !exists(json, 'BlockedTags') ? undefined : json['BlockedTags'],
|
||
|
'enableUserPreferenceAccess': !exists(json, 'EnableUserPreferenceAccess') ? undefined : json['EnableUserPreferenceAccess'],
|
||
|
'accessSchedules': !exists(json, 'AccessSchedules') ? undefined : (json['AccessSchedules'] === null ? null : (json['AccessSchedules'] as Array<any>).map(AccessScheduleFromJSON)),
|
||
|
'blockUnratedItems': !exists(json, 'BlockUnratedItems') ? undefined : (json['BlockUnratedItems'] === null ? null : (json['BlockUnratedItems'] as Array<any>).map(UnratedItemFromJSON)),
|
||
|
'enableRemoteControlOfOtherUsers': !exists(json, 'EnableRemoteControlOfOtherUsers') ? undefined : json['EnableRemoteControlOfOtherUsers'],
|
||
|
'enableSharedDeviceControl': !exists(json, 'EnableSharedDeviceControl') ? undefined : json['EnableSharedDeviceControl'],
|
||
|
'enableRemoteAccess': !exists(json, 'EnableRemoteAccess') ? undefined : json['EnableRemoteAccess'],
|
||
|
'enableLiveTvManagement': !exists(json, 'EnableLiveTvManagement') ? undefined : json['EnableLiveTvManagement'],
|
||
|
'enableLiveTvAccess': !exists(json, 'EnableLiveTvAccess') ? undefined : json['EnableLiveTvAccess'],
|
||
|
'enableMediaPlayback': !exists(json, 'EnableMediaPlayback') ? undefined : json['EnableMediaPlayback'],
|
||
|
'enableAudioPlaybackTranscoding': !exists(json, 'EnableAudioPlaybackTranscoding') ? undefined : json['EnableAudioPlaybackTranscoding'],
|
||
|
'enableVideoPlaybackTranscoding': !exists(json, 'EnableVideoPlaybackTranscoding') ? undefined : json['EnableVideoPlaybackTranscoding'],
|
||
|
'enablePlaybackRemuxing': !exists(json, 'EnablePlaybackRemuxing') ? undefined : json['EnablePlaybackRemuxing'],
|
||
|
'forceRemoteSourceTranscoding': !exists(json, 'ForceRemoteSourceTranscoding') ? undefined : json['ForceRemoteSourceTranscoding'],
|
||
|
'enableContentDeletion': !exists(json, 'EnableContentDeletion') ? undefined : json['EnableContentDeletion'],
|
||
|
'enableContentDeletionFromFolders': !exists(json, 'EnableContentDeletionFromFolders') ? undefined : json['EnableContentDeletionFromFolders'],
|
||
|
'enableContentDownloading': !exists(json, 'EnableContentDownloading') ? undefined : json['EnableContentDownloading'],
|
||
|
'enableSyncTranscoding': !exists(json, 'EnableSyncTranscoding') ? undefined : json['EnableSyncTranscoding'],
|
||
|
'enableMediaConversion': !exists(json, 'EnableMediaConversion') ? undefined : json['EnableMediaConversion'],
|
||
|
'enabledDevices': !exists(json, 'EnabledDevices') ? undefined : json['EnabledDevices'],
|
||
|
'enableAllDevices': !exists(json, 'EnableAllDevices') ? undefined : json['EnableAllDevices'],
|
||
|
'enabledChannels': !exists(json, 'EnabledChannels') ? undefined : json['EnabledChannels'],
|
||
|
'enableAllChannels': !exists(json, 'EnableAllChannels') ? undefined : json['EnableAllChannels'],
|
||
|
'enabledFolders': !exists(json, 'EnabledFolders') ? undefined : json['EnabledFolders'],
|
||
|
'enableAllFolders': !exists(json, 'EnableAllFolders') ? undefined : json['EnableAllFolders'],
|
||
|
'invalidLoginAttemptCount': !exists(json, 'InvalidLoginAttemptCount') ? undefined : json['InvalidLoginAttemptCount'],
|
||
|
'loginAttemptsBeforeLockout': !exists(json, 'LoginAttemptsBeforeLockout') ? undefined : json['LoginAttemptsBeforeLockout'],
|
||
|
'maxActiveSessions': !exists(json, 'MaxActiveSessions') ? undefined : json['MaxActiveSessions'],
|
||
|
'enablePublicSharing': !exists(json, 'EnablePublicSharing') ? undefined : json['EnablePublicSharing'],
|
||
|
'blockedMediaFolders': !exists(json, 'BlockedMediaFolders') ? undefined : json['BlockedMediaFolders'],
|
||
|
'blockedChannels': !exists(json, 'BlockedChannels') ? undefined : json['BlockedChannels'],
|
||
|
'remoteClientBitrateLimit': !exists(json, 'RemoteClientBitrateLimit') ? undefined : json['RemoteClientBitrateLimit'],
|
||
|
'authenticationProviderId': !exists(json, 'AuthenticationProviderId') ? undefined : json['AuthenticationProviderId'],
|
||
|
'passwordResetProviderId': !exists(json, 'PasswordResetProviderId') ? undefined : json['PasswordResetProviderId'],
|
||
|
'syncPlayAccess': !exists(json, 'SyncPlayAccess') ? undefined : SyncPlayUserAccessTypeFromJSON(json['SyncPlayAccess']),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function UserPolicyToJSON(value?: UserPolicy | null): any {
|
||
|
if (value === undefined) {
|
||
|
return undefined;
|
||
|
}
|
||
|
if (value === null) {
|
||
|
return null;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'IsAdministrator': value.isAdministrator,
|
||
|
'IsHidden': value.isHidden,
|
||
|
'IsDisabled': value.isDisabled,
|
||
|
'MaxParentalRating': value.maxParentalRating,
|
||
|
'BlockedTags': value.blockedTags,
|
||
|
'EnableUserPreferenceAccess': value.enableUserPreferenceAccess,
|
||
|
'AccessSchedules': value.accessSchedules === undefined ? undefined : (value.accessSchedules === null ? null : (value.accessSchedules as Array<any>).map(AccessScheduleToJSON)),
|
||
|
'BlockUnratedItems': value.blockUnratedItems === undefined ? undefined : (value.blockUnratedItems === null ? null : (value.blockUnratedItems as Array<any>).map(UnratedItemToJSON)),
|
||
|
'EnableRemoteControlOfOtherUsers': value.enableRemoteControlOfOtherUsers,
|
||
|
'EnableSharedDeviceControl': value.enableSharedDeviceControl,
|
||
|
'EnableRemoteAccess': value.enableRemoteAccess,
|
||
|
'EnableLiveTvManagement': value.enableLiveTvManagement,
|
||
|
'EnableLiveTvAccess': value.enableLiveTvAccess,
|
||
|
'EnableMediaPlayback': value.enableMediaPlayback,
|
||
|
'EnableAudioPlaybackTranscoding': value.enableAudioPlaybackTranscoding,
|
||
|
'EnableVideoPlaybackTranscoding': value.enableVideoPlaybackTranscoding,
|
||
|
'EnablePlaybackRemuxing': value.enablePlaybackRemuxing,
|
||
|
'ForceRemoteSourceTranscoding': value.forceRemoteSourceTranscoding,
|
||
|
'EnableContentDeletion': value.enableContentDeletion,
|
||
|
'EnableContentDeletionFromFolders': value.enableContentDeletionFromFolders,
|
||
|
'EnableContentDownloading': value.enableContentDownloading,
|
||
|
'EnableSyncTranscoding': value.enableSyncTranscoding,
|
||
|
'EnableMediaConversion': value.enableMediaConversion,
|
||
|
'EnabledDevices': value.enabledDevices,
|
||
|
'EnableAllDevices': value.enableAllDevices,
|
||
|
'EnabledChannels': value.enabledChannels,
|
||
|
'EnableAllChannels': value.enableAllChannels,
|
||
|
'EnabledFolders': value.enabledFolders,
|
||
|
'EnableAllFolders': value.enableAllFolders,
|
||
|
'InvalidLoginAttemptCount': value.invalidLoginAttemptCount,
|
||
|
'LoginAttemptsBeforeLockout': value.loginAttemptsBeforeLockout,
|
||
|
'MaxActiveSessions': value.maxActiveSessions,
|
||
|
'EnablePublicSharing': value.enablePublicSharing,
|
||
|
'BlockedMediaFolders': value.blockedMediaFolders,
|
||
|
'BlockedChannels': value.blockedChannels,
|
||
|
'RemoteClientBitrateLimit': value.remoteClientBitrateLimit,
|
||
|
'AuthenticationProviderId': value.authenticationProviderId,
|
||
|
'PasswordResetProviderId': value.passwordResetProviderId,
|
||
|
'SyncPlayAccess': SyncPlayUserAccessTypeToJSON(value.syncPlayAccess),
|
||
|
};
|
||
|
}
|
||
|
|