/* 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 { ImageType } from './ImageType'; import { ImageTypeFromJSON, ImageTypeFromJSONTyped, ImageTypeToJSON, } from './ImageType'; import type { ItemFields } from './ItemFields'; import { ItemFieldsFromJSON, ItemFieldsFromJSONTyped, ItemFieldsToJSON, } from './ItemFields'; import type { SortOrder } from './SortOrder'; import { SortOrderFromJSON, SortOrderFromJSONTyped, SortOrderToJSON, } from './SortOrder'; /** * Get programs dto. * @export * @interface GetProgramsRequest */ export interface GetProgramsRequest { /** * Gets or sets the channels to return guide information for. * @type {Array} * @memberof GetProgramsRequest */ channelIds?: Array; /** * Gets or sets optional. Filter by user id. * @type {string} * @memberof GetProgramsRequest */ userId?: string; /** * Gets or sets the minimum premiere start date. * Optional. * @type {Date} * @memberof GetProgramsRequest */ minStartDate?: Date | null; /** * Gets or sets filter by programs that have completed airing, or not. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ hasAired?: boolean | null; /** * Gets or sets filter by programs that are currently airing, or not. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isAiring?: boolean | null; /** * Gets or sets the maximum premiere start date. * Optional. * @type {Date} * @memberof GetProgramsRequest */ maxStartDate?: Date | null; /** * Gets or sets the minimum premiere end date. * Optional. * @type {Date} * @memberof GetProgramsRequest */ minEndDate?: Date | null; /** * Gets or sets the maximum premiere end date. * Optional. * @type {Date} * @memberof GetProgramsRequest */ maxEndDate?: Date | null; /** * Gets or sets filter for movies. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isMovie?: boolean | null; /** * Gets or sets filter for series. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isSeries?: boolean | null; /** * Gets or sets filter for news. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isNews?: boolean | null; /** * Gets or sets filter for kids. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isKids?: boolean | null; /** * Gets or sets filter for sports. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ isSports?: boolean | null; /** * Gets or sets the record index to start at. All items with a lower index will be dropped from the results. * Optional. * @type {number} * @memberof GetProgramsRequest */ startIndex?: number | null; /** * Gets or sets the maximum number of records to return. * Optional. * @type {number} * @memberof GetProgramsRequest */ limit?: number | null; /** * Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate. * Optional. * @type {Array} * @memberof GetProgramsRequest */ sortBy?: Array; /** * Gets or sets sort Order - Ascending,Descending. * @type {Array} * @memberof GetProgramsRequest */ sortOrder?: Array; /** * Gets or sets the genres to return guide information for. * @type {Array} * @memberof GetProgramsRequest */ genres?: Array; /** * Gets or sets the genre ids to return guide information for. * @type {Array} * @memberof GetProgramsRequest */ genreIds?: Array; /** * Gets or sets include image information in output. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ enableImages?: boolean | null; /** * Gets or sets a value indicating whether retrieve total record count. * @type {boolean} * @memberof GetProgramsRequest */ enableTotalRecordCount?: boolean; /** * Gets or sets the max number of images to return, per image type. * Optional. * @type {number} * @memberof GetProgramsRequest */ imageTypeLimit?: number | null; /** * Gets or sets the image types to include in the output. * Optional. * @type {Array} * @memberof GetProgramsRequest */ enableImageTypes?: Array; /** * Gets or sets include user data. * Optional. * @type {boolean} * @memberof GetProgramsRequest */ enableUserData?: boolean | null; /** * Gets or sets filter by series timer id. * Optional. * @type {string} * @memberof GetProgramsRequest */ seriesTimerId?: string | null; /** * Gets or sets filter by library series id. * Optional. * @type {string} * @memberof GetProgramsRequest */ librarySeriesId?: string; /** * Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. * Optional. * @type {Array} * @memberof GetProgramsRequest */ fields?: Array; } /** * Check if a given object implements the GetProgramsRequest interface. */ export function instanceOfGetProgramsRequest(value: object): boolean { let isInstance = true; return isInstance; } export function GetProgramsRequestFromJSON(json: any): GetProgramsRequest { return GetProgramsRequestFromJSONTyped(json, false); } export function GetProgramsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetProgramsRequest { if ((json === undefined) || (json === null)) { return json; } return { 'channelIds': !exists(json, 'ChannelIds') ? undefined : json['ChannelIds'], 'userId': !exists(json, 'UserId') ? undefined : json['UserId'], 'minStartDate': !exists(json, 'MinStartDate') ? undefined : (json['MinStartDate'] === null ? null : new Date(json['MinStartDate'])), 'hasAired': !exists(json, 'HasAired') ? undefined : json['HasAired'], 'isAiring': !exists(json, 'IsAiring') ? undefined : json['IsAiring'], 'maxStartDate': !exists(json, 'MaxStartDate') ? undefined : (json['MaxStartDate'] === null ? null : new Date(json['MaxStartDate'])), 'minEndDate': !exists(json, 'MinEndDate') ? undefined : (json['MinEndDate'] === null ? null : new Date(json['MinEndDate'])), 'maxEndDate': !exists(json, 'MaxEndDate') ? undefined : (json['MaxEndDate'] === null ? null : new Date(json['MaxEndDate'])), 'isMovie': !exists(json, 'IsMovie') ? undefined : json['IsMovie'], 'isSeries': !exists(json, 'IsSeries') ? undefined : json['IsSeries'], 'isNews': !exists(json, 'IsNews') ? undefined : json['IsNews'], 'isKids': !exists(json, 'IsKids') ? undefined : json['IsKids'], 'isSports': !exists(json, 'IsSports') ? undefined : json['IsSports'], 'startIndex': !exists(json, 'StartIndex') ? undefined : json['StartIndex'], 'limit': !exists(json, 'Limit') ? undefined : json['Limit'], 'sortBy': !exists(json, 'SortBy') ? undefined : json['SortBy'], 'sortOrder': !exists(json, 'SortOrder') ? undefined : ((json['SortOrder'] as Array).map(SortOrderFromJSON)), 'genres': !exists(json, 'Genres') ? undefined : json['Genres'], 'genreIds': !exists(json, 'GenreIds') ? undefined : json['GenreIds'], 'enableImages': !exists(json, 'EnableImages') ? undefined : json['EnableImages'], 'enableTotalRecordCount': !exists(json, 'EnableTotalRecordCount') ? undefined : json['EnableTotalRecordCount'], 'imageTypeLimit': !exists(json, 'ImageTypeLimit') ? undefined : json['ImageTypeLimit'], 'enableImageTypes': !exists(json, 'EnableImageTypes') ? undefined : ((json['EnableImageTypes'] as Array).map(ImageTypeFromJSON)), 'enableUserData': !exists(json, 'EnableUserData') ? undefined : json['EnableUserData'], 'seriesTimerId': !exists(json, 'SeriesTimerId') ? undefined : json['SeriesTimerId'], 'librarySeriesId': !exists(json, 'LibrarySeriesId') ? undefined : json['LibrarySeriesId'], 'fields': !exists(json, 'Fields') ? undefined : ((json['Fields'] as Array).map(ItemFieldsFromJSON)), }; } export function GetProgramsRequestToJSON(value?: GetProgramsRequest | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'ChannelIds': value.channelIds, 'UserId': value.userId, 'MinStartDate': value.minStartDate === undefined ? undefined : (value.minStartDate === null ? null : value.minStartDate.toISOString()), 'HasAired': value.hasAired, 'IsAiring': value.isAiring, 'MaxStartDate': value.maxStartDate === undefined ? undefined : (value.maxStartDate === null ? null : value.maxStartDate.toISOString()), 'MinEndDate': value.minEndDate === undefined ? undefined : (value.minEndDate === null ? null : value.minEndDate.toISOString()), 'MaxEndDate': value.maxEndDate === undefined ? undefined : (value.maxEndDate === null ? null : value.maxEndDate.toISOString()), 'IsMovie': value.isMovie, 'IsSeries': value.isSeries, 'IsNews': value.isNews, 'IsKids': value.isKids, 'IsSports': value.isSports, 'StartIndex': value.startIndex, 'Limit': value.limit, 'SortBy': value.sortBy, 'SortOrder': value.sortOrder === undefined ? undefined : ((value.sortOrder as Array).map(SortOrderToJSON)), 'Genres': value.genres, 'GenreIds': value.genreIds, 'EnableImages': value.enableImages, 'EnableTotalRecordCount': value.enableTotalRecordCount, 'ImageTypeLimit': value.imageTypeLimit, 'EnableImageTypes': value.enableImageTypes === undefined ? undefined : ((value.enableImageTypes as Array).map(ImageTypeToJSON)), 'EnableUserData': value.enableUserData, 'SeriesTimerId': value.seriesTimerId, 'LibrarySeriesId': value.librarySeriesId, 'Fields': value.fields === undefined ? undefined : ((value.fields as Array).map(ItemFieldsToJSON)), }; }