jellyfin-discord-bot/server/jellyfin/models/UserDtoPolicy.ts

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';
/**
* Gets or sets the policy.
* @export
* @interface UserDtoPolicy
*/
export interface UserDtoPolicy {
/**
* Gets or sets a value indicating whether this instance is administrator.
* @type {boolean}
* @memberof UserDtoPolicy
*/
isAdministrator?: boolean;
/**
* Gets or sets a value indicating whether this instance is hidden.
* @type {boolean}
* @memberof UserDtoPolicy
*/
isHidden?: boolean;
/**
* Gets or sets a value indicating whether this instance is disabled.
* @type {boolean}
* @memberof UserDtoPolicy
*/
isDisabled?: boolean;
/**
* Gets or sets the max parental rating.
* @type {number}
* @memberof UserDtoPolicy
*/
maxParentalRating?: number | null;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
blockedTags?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableUserPreferenceAccess?: boolean;
/**
*
* @type {Array<AccessSchedule>}
* @memberof UserDtoPolicy
*/
accessSchedules?: Array<AccessSchedule> | null;
/**
*
* @type {Array<UnratedItem>}
* @memberof UserDtoPolicy
*/
blockUnratedItems?: Array<UnratedItem> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableRemoteControlOfOtherUsers?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableSharedDeviceControl?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableRemoteAccess?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableLiveTvManagement?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableLiveTvAccess?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableMediaPlayback?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableAudioPlaybackTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableVideoPlaybackTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enablePlaybackRemuxing?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
forceRemoteSourceTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableContentDeletion?: boolean;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
enableContentDeletionFromFolders?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableContentDownloading?: boolean;
/**
* Gets or sets a value indicating whether [enable synchronize].
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableSyncTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableMediaConversion?: boolean;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
enabledDevices?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableAllDevices?: boolean;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
enabledChannels?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableAllChannels?: boolean;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
enabledFolders?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enableAllFolders?: boolean;
/**
*
* @type {number}
* @memberof UserDtoPolicy
*/
invalidLoginAttemptCount?: number;
/**
*
* @type {number}
* @memberof UserDtoPolicy
*/
loginAttemptsBeforeLockout?: number;
/**
*
* @type {number}
* @memberof UserDtoPolicy
*/
maxActiveSessions?: number;
/**
*
* @type {boolean}
* @memberof UserDtoPolicy
*/
enablePublicSharing?: boolean;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
blockedMediaFolders?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof UserDtoPolicy
*/
blockedChannels?: Array<string> | null;
/**
*
* @type {number}
* @memberof UserDtoPolicy
*/
remoteClientBitrateLimit?: number;
/**
*
* @type {string}
* @memberof UserDtoPolicy
*/
authenticationProviderId?: string | null;
/**
*
* @type {string}
* @memberof UserDtoPolicy
*/
passwordResetProviderId?: string | null;
/**
*
* @type {SyncPlayUserAccessType}
* @memberof UserDtoPolicy
*/
syncPlayAccess?: SyncPlayUserAccessType;
}
/**
* Check if a given object implements the UserDtoPolicy interface.
*/
export function instanceOfUserDtoPolicy(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function UserDtoPolicyFromJSON(json: any): UserDtoPolicy {
return UserDtoPolicyFromJSONTyped(json, false);
}
export function UserDtoPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDtoPolicy {
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 UserDtoPolicyToJSON(value?: UserDtoPolicy | 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),
};
}