/* 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 { DayOfWeek } from './DayOfWeek';
import {
    DayOfWeekFromJSON,
    DayOfWeekFromJSONTyped,
    DayOfWeekToJSON,
} from './DayOfWeek';
import type { DayPattern } from './DayPattern';
import {
    DayPatternFromJSON,
    DayPatternFromJSONTyped,
    DayPatternToJSON,
} from './DayPattern';
import type { KeepUntil } from './KeepUntil';
import {
    KeepUntilFromJSON,
    KeepUntilFromJSONTyped,
    KeepUntilToJSON,
} from './KeepUntil';

/**
 * Class SeriesTimerInfoDto.
 * @export
 * @interface SeriesTimerInfoDto
 */
export interface SeriesTimerInfoDto {
    /**
     * Gets or sets the Id of the recording.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    id?: string | null;
    /**
     * 
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    type?: string | null;
    /**
     * Gets or sets the server identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    serverId?: string | null;
    /**
     * Gets or sets the external identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    externalId?: string | null;
    /**
     * Gets or sets the channel id of the recording.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    channelId?: string;
    /**
     * Gets or sets the external channel identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    externalChannelId?: string | null;
    /**
     * Gets or sets the channel name of the recording.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    channelName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    channelPrimaryImageTag?: string | null;
    /**
     * Gets or sets the program identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    programId?: string | null;
    /**
     * Gets or sets the external program identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    externalProgramId?: string | null;
    /**
     * Gets or sets the name of the recording.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    name?: string | null;
    /**
     * Gets or sets the description of the recording.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    overview?: string | null;
    /**
     * Gets or sets the start date of the recording, in UTC.
     * @type {Date}
     * @memberof SeriesTimerInfoDto
     */
    startDate?: Date;
    /**
     * Gets or sets the end date of the recording, in UTC.
     * @type {Date}
     * @memberof SeriesTimerInfoDto
     */
    endDate?: Date;
    /**
     * Gets or sets the name of the service.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    serviceName?: string | null;
    /**
     * Gets or sets the priority.
     * @type {number}
     * @memberof SeriesTimerInfoDto
     */
    priority?: number;
    /**
     * Gets or sets the pre padding seconds.
     * @type {number}
     * @memberof SeriesTimerInfoDto
     */
    prePaddingSeconds?: number;
    /**
     * Gets or sets the post padding seconds.
     * @type {number}
     * @memberof SeriesTimerInfoDto
     */
    postPaddingSeconds?: number;
    /**
     * Gets or sets a value indicating whether this instance is pre padding required.
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    isPrePaddingRequired?: boolean;
    /**
     * Gets or sets the Id of the Parent that has a backdrop if the item does not have one.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    parentBackdropItemId?: string | null;
    /**
     * Gets or sets the parent backdrop image tags.
     * @type {Array<string>}
     * @memberof SeriesTimerInfoDto
     */
    parentBackdropImageTags?: Array<string> | null;
    /**
     * Gets or sets a value indicating whether this instance is post padding required.
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    isPostPaddingRequired?: boolean;
    /**
     * 
     * @type {KeepUntil}
     * @memberof SeriesTimerInfoDto
     */
    keepUntil?: KeepUntil;
    /**
     * Gets or sets a value indicating whether [record any time].
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    recordAnyTime?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    skipEpisodesInLibrary?: boolean;
    /**
     * Gets or sets a value indicating whether [record any channel].
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    recordAnyChannel?: boolean;
    /**
     * 
     * @type {number}
     * @memberof SeriesTimerInfoDto
     */
    keepUpTo?: number;
    /**
     * Gets or sets a value indicating whether [record new only].
     * @type {boolean}
     * @memberof SeriesTimerInfoDto
     */
    recordNewOnly?: boolean;
    /**
     * Gets or sets the days.
     * @type {Array<DayOfWeek>}
     * @memberof SeriesTimerInfoDto
     */
    days?: Array<DayOfWeek> | null;
    /**
     * 
     * @type {DayPattern}
     * @memberof SeriesTimerInfoDto
     */
    dayPattern?: DayPattern | null;
    /**
     * Gets or sets the image tags.
     * @type {{ [key: string]: string; }}
     * @memberof SeriesTimerInfoDto
     */
    imageTags?: { [key: string]: string; } | null;
    /**
     * Gets or sets the parent thumb item id.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    parentThumbItemId?: string | null;
    /**
     * Gets or sets the parent thumb image tag.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    parentThumbImageTag?: string | null;
    /**
     * Gets or sets the parent primary image item identifier.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    parentPrimaryImageItemId?: string | null;
    /**
     * Gets or sets the parent primary image tag.
     * @type {string}
     * @memberof SeriesTimerInfoDto
     */
    parentPrimaryImageTag?: string | null;
}

/**
 * Check if a given object implements the SeriesTimerInfoDto interface.
 */
export function instanceOfSeriesTimerInfoDto(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function SeriesTimerInfoDtoFromJSON(json: any): SeriesTimerInfoDto {
    return SeriesTimerInfoDtoFromJSONTyped(json, false);
}

export function SeriesTimerInfoDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeriesTimerInfoDto {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': !exists(json, 'Id') ? undefined : json['Id'],
        'type': !exists(json, 'Type') ? undefined : json['Type'],
        'serverId': !exists(json, 'ServerId') ? undefined : json['ServerId'],
        'externalId': !exists(json, 'ExternalId') ? undefined : json['ExternalId'],
        'channelId': !exists(json, 'ChannelId') ? undefined : json['ChannelId'],
        'externalChannelId': !exists(json, 'ExternalChannelId') ? undefined : json['ExternalChannelId'],
        'channelName': !exists(json, 'ChannelName') ? undefined : json['ChannelName'],
        'channelPrimaryImageTag': !exists(json, 'ChannelPrimaryImageTag') ? undefined : json['ChannelPrimaryImageTag'],
        'programId': !exists(json, 'ProgramId') ? undefined : json['ProgramId'],
        'externalProgramId': !exists(json, 'ExternalProgramId') ? undefined : json['ExternalProgramId'],
        'name': !exists(json, 'Name') ? undefined : json['Name'],
        'overview': !exists(json, 'Overview') ? undefined : json['Overview'],
        'startDate': !exists(json, 'StartDate') ? undefined : (new Date(json['StartDate'])),
        'endDate': !exists(json, 'EndDate') ? undefined : (new Date(json['EndDate'])),
        'serviceName': !exists(json, 'ServiceName') ? undefined : json['ServiceName'],
        'priority': !exists(json, 'Priority') ? undefined : json['Priority'],
        'prePaddingSeconds': !exists(json, 'PrePaddingSeconds') ? undefined : json['PrePaddingSeconds'],
        'postPaddingSeconds': !exists(json, 'PostPaddingSeconds') ? undefined : json['PostPaddingSeconds'],
        'isPrePaddingRequired': !exists(json, 'IsPrePaddingRequired') ? undefined : json['IsPrePaddingRequired'],
        'parentBackdropItemId': !exists(json, 'ParentBackdropItemId') ? undefined : json['ParentBackdropItemId'],
        'parentBackdropImageTags': !exists(json, 'ParentBackdropImageTags') ? undefined : json['ParentBackdropImageTags'],
        'isPostPaddingRequired': !exists(json, 'IsPostPaddingRequired') ? undefined : json['IsPostPaddingRequired'],
        'keepUntil': !exists(json, 'KeepUntil') ? undefined : KeepUntilFromJSON(json['KeepUntil']),
        'recordAnyTime': !exists(json, 'RecordAnyTime') ? undefined : json['RecordAnyTime'],
        'skipEpisodesInLibrary': !exists(json, 'SkipEpisodesInLibrary') ? undefined : json['SkipEpisodesInLibrary'],
        'recordAnyChannel': !exists(json, 'RecordAnyChannel') ? undefined : json['RecordAnyChannel'],
        'keepUpTo': !exists(json, 'KeepUpTo') ? undefined : json['KeepUpTo'],
        'recordNewOnly': !exists(json, 'RecordNewOnly') ? undefined : json['RecordNewOnly'],
        'days': !exists(json, 'Days') ? undefined : (json['Days'] === null ? null : (json['Days'] as Array<any>).map(DayOfWeekFromJSON)),
        'dayPattern': !exists(json, 'DayPattern') ? undefined : DayPatternFromJSON(json['DayPattern']),
        'imageTags': !exists(json, 'ImageTags') ? undefined : json['ImageTags'],
        'parentThumbItemId': !exists(json, 'ParentThumbItemId') ? undefined : json['ParentThumbItemId'],
        'parentThumbImageTag': !exists(json, 'ParentThumbImageTag') ? undefined : json['ParentThumbImageTag'],
        'parentPrimaryImageItemId': !exists(json, 'ParentPrimaryImageItemId') ? undefined : json['ParentPrimaryImageItemId'],
        'parentPrimaryImageTag': !exists(json, 'ParentPrimaryImageTag') ? undefined : json['ParentPrimaryImageTag'],
    };
}

export function SeriesTimerInfoDtoToJSON(value?: SeriesTimerInfoDto | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Id': value.id,
        'Type': value.type,
        'ServerId': value.serverId,
        'ExternalId': value.externalId,
        'ChannelId': value.channelId,
        'ExternalChannelId': value.externalChannelId,
        'ChannelName': value.channelName,
        'ChannelPrimaryImageTag': value.channelPrimaryImageTag,
        'ProgramId': value.programId,
        'ExternalProgramId': value.externalProgramId,
        'Name': value.name,
        'Overview': value.overview,
        'StartDate': value.startDate === undefined ? undefined : (value.startDate.toISOString()),
        'EndDate': value.endDate === undefined ? undefined : (value.endDate.toISOString()),
        'ServiceName': value.serviceName,
        'Priority': value.priority,
        'PrePaddingSeconds': value.prePaddingSeconds,
        'PostPaddingSeconds': value.postPaddingSeconds,
        'IsPrePaddingRequired': value.isPrePaddingRequired,
        'ParentBackdropItemId': value.parentBackdropItemId,
        'ParentBackdropImageTags': value.parentBackdropImageTags,
        'IsPostPaddingRequired': value.isPostPaddingRequired,
        'KeepUntil': KeepUntilToJSON(value.keepUntil),
        'RecordAnyTime': value.recordAnyTime,
        'SkipEpisodesInLibrary': value.skipEpisodesInLibrary,
        'RecordAnyChannel': value.recordAnyChannel,
        'KeepUpTo': value.keepUpTo,
        'RecordNewOnly': value.recordNewOnly,
        'Days': value.days === undefined ? undefined : (value.days === null ? null : (value.days as Array<any>).map(DayOfWeekToJSON)),
        'DayPattern': DayPatternToJSON(value.dayPattern),
        'ImageTags': value.imageTags,
        'ParentThumbItemId': value.parentThumbItemId,
        'ParentThumbImageTag': value.parentThumbImageTag,
        'ParentPrimaryImageItemId': value.parentPrimaryImageItemId,
        'ParentPrimaryImageTag': value.parentPrimaryImageTag,
    };
}

