/* tslint:disable */ /* eslint-disable */ /** * Mubicon v1 API * Api with Swagger, Swashbuckle, and Manual API versioning. * * The version of the OpenAPI document: 1 * Contact: support@mubicloud.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { ApplicationUser } from './ApplicationUser'; import { ApplicationUserFromJSON, ApplicationUserFromJSONTyped, ApplicationUserToJSON, ApplicationUserToJSONTyped, } from './ApplicationUser'; import type { TimeOfDay } from './TimeOfDay'; import { TimeOfDayFromJSON, TimeOfDayFromJSONTyped, TimeOfDayToJSON, TimeOfDayToJSONTyped, } from './TimeOfDay'; import type { GenrePlaylist } from './GenrePlaylist'; import { GenrePlaylistFromJSON, GenrePlaylistFromJSONTyped, GenrePlaylistToJSON, GenrePlaylistToJSONTyped, } from './GenrePlaylist'; import type { TrackPlayList } from './TrackPlayList'; import { TrackPlayListFromJSON, TrackPlayListFromJSONTyped, TrackPlayListToJSON, TrackPlayListToJSONTyped, } from './TrackPlayList'; import type { CompanyTypePlaylist } from './CompanyTypePlaylist'; import { CompanyTypePlaylistFromJSON, CompanyTypePlaylistFromJSONTyped, CompanyTypePlaylistToJSON, CompanyTypePlaylistToJSONTyped, } from './CompanyTypePlaylist'; import type { PlaylistFeed } from './PlaylistFeed'; import { PlaylistFeedFromJSON, PlaylistFeedFromJSONTyped, PlaylistFeedToJSON, PlaylistFeedToJSONTyped, } from './PlaylistFeed'; import type { ArchivePlaylist } from './ArchivePlaylist'; import { ArchivePlaylistFromJSON, ArchivePlaylistFromJSONTyped, ArchivePlaylistToJSON, ArchivePlaylistToJSONTyped, } from './ArchivePlaylist'; /** * * @export * @interface Playlist */ export interface Playlist { /** * * @type {number} * @memberof Playlist */ playListId?: number; /** * * @type {string} * @memberof Playlist */ name: string; /** * * @type {string} * @memberof Playlist */ imageFile?: string | null; /** * * @type {TimeOfDay} * @memberof Playlist */ timeOfDay: TimeOfDay; /** * * @type {string} * @memberof Playlist */ duration?: string; /** * * @type {number} * @memberof Playlist */ rating?: number; /** * * @type {boolean} * @memberof Playlist */ download?: boolean; /** * * @type {Date} * @memberof Playlist */ createDate?: Date; /** * * @type {Date} * @memberof Playlist */ changeDate?: Date; /** * * @type {ApplicationUser} * @memberof Playlist */ applicationUser?: ApplicationUser; /** * * @type {Array} * @memberof Playlist */ companyTypePlaylists?: Array | null; /** * * @type {Array} * @memberof Playlist */ genrePlaylists?: Array | null; /** * * @type {Array} * @memberof Playlist */ trackPlayLists?: Array | null; /** * * @type {Array} * @memberof Playlist */ playlistFeeds?: Array | null; /** * * @type {ArchivePlaylist} * @memberof Playlist */ archivePlaylist?: ArchivePlaylist; } /** * Check if a given object implements the Playlist interface. */ export function instanceOfPlaylist(value: object): value is Playlist { if (!('name' in value) || value['name'] === undefined) return false; if (!('timeOfDay' in value) || value['timeOfDay'] === undefined) return false; return true; } export function PlaylistFromJSON(json: any): Playlist { return PlaylistFromJSONTyped(json, false); } export function PlaylistFromJSONTyped(json: any, ignoreDiscriminator: boolean): Playlist { if (json == null) { return json; } return { 'playListId': json['PlayListId'] == null ? undefined : json['PlayListId'], 'name': json['Name'], 'imageFile': json['ImageFile'] == null ? undefined : json['ImageFile'], 'timeOfDay': TimeOfDayFromJSON(json['TimeOfDay']), 'duration': json['Duration'] == null ? undefined : json['Duration'], 'rating': json['Rating'] == null ? undefined : json['Rating'], 'download': json['Download'] == null ? undefined : json['Download'], 'createDate': json['CreateDate'] == null ? undefined : (new Date(json['CreateDate'])), 'changeDate': json['ChangeDate'] == null ? undefined : (new Date(json['ChangeDate'])), 'applicationUser': json['ApplicationUser'] == null ? undefined : ApplicationUserFromJSON(json['ApplicationUser']), 'companyTypePlaylists': json['CompanyTypePlaylists'] == null ? undefined : ((json['CompanyTypePlaylists'] as Array).map(CompanyTypePlaylistFromJSON)), 'genrePlaylists': json['GenrePlaylists'] == null ? undefined : ((json['GenrePlaylists'] as Array).map(GenrePlaylistFromJSON)), 'trackPlayLists': json['TrackPlayLists'] == null ? undefined : ((json['TrackPlayLists'] as Array).map(TrackPlayListFromJSON)), 'playlistFeeds': json['PlaylistFeeds'] == null ? undefined : ((json['PlaylistFeeds'] as Array).map(PlaylistFeedFromJSON)), 'archivePlaylist': json['ArchivePlaylist'] == null ? undefined : ArchivePlaylistFromJSON(json['ArchivePlaylist']), }; } export function PlaylistToJSON(json: any): Playlist { return PlaylistToJSONTyped(json, false); } export function PlaylistToJSONTyped(value?: Playlist | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'PlayListId': value['playListId'], 'Name': value['name'], 'ImageFile': value['imageFile'], 'TimeOfDay': TimeOfDayToJSON(value['timeOfDay']), 'Duration': value['duration'], 'Rating': value['rating'], 'Download': value['download'], 'CreateDate': value['createDate'] == null ? undefined : ((value['createDate']).toISOString()), 'ChangeDate': value['changeDate'] == null ? undefined : ((value['changeDate']).toISOString()), 'ApplicationUser': ApplicationUserToJSON(value['applicationUser']), 'CompanyTypePlaylists': value['companyTypePlaylists'] == null ? undefined : ((value['companyTypePlaylists'] as Array).map(CompanyTypePlaylistToJSON)), 'GenrePlaylists': value['genrePlaylists'] == null ? undefined : ((value['genrePlaylists'] as Array).map(GenrePlaylistToJSON)), 'TrackPlayLists': value['trackPlayLists'] == null ? undefined : ((value['trackPlayLists'] as Array).map(TrackPlayListToJSON)), 'PlaylistFeeds': value['playlistFeeds'] == null ? undefined : ((value['playlistFeeds'] as Array).map(PlaylistFeedToJSON)), 'ArchivePlaylist': ArchivePlaylistToJSON(value['archivePlaylist']), }; }