/* 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 { CompanyTypeTrack } from './CompanyTypeTrack'; import { CompanyTypeTrackFromJSON, CompanyTypeTrackFromJSONTyped, CompanyTypeTrackToJSON, CompanyTypeTrackToJSONTyped, } from './CompanyTypeTrack'; import type { TrackStatus } from './TrackStatus'; import { TrackStatusFromJSON, TrackStatusFromJSONTyped, TrackStatusToJSON, TrackStatusToJSONTyped, } from './TrackStatus'; import type { CopyRightOwner } from './CopyRightOwner'; import { CopyRightOwnerFromJSON, CopyRightOwnerFromJSONTyped, CopyRightOwnerToJSON, CopyRightOwnerToJSONTyped, } from './CopyRightOwner'; import type { TrackPlayList } from './TrackPlayList'; import { TrackPlayListFromJSON, TrackPlayListFromJSONTyped, TrackPlayListToJSON, TrackPlayListToJSONTyped, } from './TrackPlayList'; import type { GenreTrack } from './GenreTrack'; import { GenreTrackFromJSON, GenreTrackFromJSONTyped, GenreTrackToJSON, GenreTrackToJSONTyped, } from './GenreTrack'; import type { TrackSelection } from './TrackSelection'; import { TrackSelectionFromJSON, TrackSelectionFromJSONTyped, TrackSelectionToJSON, TrackSelectionToJSONTyped, } from './TrackSelection'; /** * * @export * @interface Track */ export interface Track { /** * * @type {number} * @memberof Track */ trackId?: number; /** * * @type {string} * @memberof Track */ name: string; /** * * @type {string} * @memberof Track */ audioFile: string; /** * * @type {string} * @memberof Track */ imageFile?: string | null; /** * * @type {string} * @memberof Track */ isrc?: string | null; /** * * @type {number} * @memberof Track */ rating?: number; /** * * @type {string} * @memberof Track */ title?: string | null; /** * * @type {string} * @memberof Track */ artist?: string | null; /** * * @type {string} * @memberof Track */ album?: string | null; /** * * @type {number} * @memberof Track */ year?: number; /** * * @type {string} * @memberof Track */ duration?: string; /** * * @type {boolean} * @memberof Track */ publication?: boolean; /** * * @type {boolean} * @memberof Track */ reTag?: boolean; /** * * @type {boolean} * @memberof Track */ rePeak?: boolean; /** * * @type {boolean} * @memberof Track */ invalid?: boolean; /** * * @type {boolean} * @memberof Track */ cancel?: boolean; /** * * @type {Date} * @memberof Track */ cancelDate?: Date | null; /** * * @type {boolean} * @memberof Track */ newest?: boolean; /** * * @type {TrackStatus} * @memberof Track */ status?: TrackStatus; /** * * @type {string} * @memberof Track */ oldAudioFile?: string | null; /** * * @type {Date} * @memberof Track */ createDate?: Date; /** * * @type {Date} * @memberof Track */ changeDate?: Date; /** * * @type {number} * @memberof Track */ copyRightOwnerId?: number | null; /** * * @type {CopyRightOwner} * @memberof Track */ copyRightOwner?: CopyRightOwner; /** * * @type {string} * @memberof Track */ rawTags?: string | null; /** * * @type {string} * @memberof Track */ fileHash?: string | null; /** * * @type {Array} * @memberof Track */ companyTypeTracks?: Array | null; /** * * @type {Array} * @memberof Track */ genreTracks?: Array | null; /** * * @type {Array} * @memberof Track */ trackSelections?: Array | null; /** * * @type {Array} * @memberof Track */ trackPlayLists?: Array | null; } /** * Check if a given object implements the Track interface. */ export function instanceOfTrack(value: object): value is Track { if (!('name' in value) || value['name'] === undefined) return false; if (!('audioFile' in value) || value['audioFile'] === undefined) return false; return true; } export function TrackFromJSON(json: any): Track { return TrackFromJSONTyped(json, false); } export function TrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): Track { if (json == null) { return json; } return { 'trackId': json['TrackId'] == null ? undefined : json['TrackId'], 'name': json['Name'], 'audioFile': json['AudioFile'], 'imageFile': json['ImageFile'] == null ? undefined : json['ImageFile'], 'isrc': json['Isrc'] == null ? undefined : json['Isrc'], 'rating': json['Rating'] == null ? undefined : json['Rating'], 'title': json['Title'] == null ? undefined : json['Title'], 'artist': json['Artist'] == null ? undefined : json['Artist'], 'album': json['Album'] == null ? undefined : json['Album'], 'year': json['Year'] == null ? undefined : json['Year'], 'duration': json['Duration'] == null ? undefined : json['Duration'], 'publication': json['Publication'] == null ? undefined : json['Publication'], 'reTag': json['ReTag'] == null ? undefined : json['ReTag'], 'rePeak': json['RePeak'] == null ? undefined : json['RePeak'], 'invalid': json['Invalid'] == null ? undefined : json['Invalid'], 'cancel': json['Cancel'] == null ? undefined : json['Cancel'], 'cancelDate': json['CancelDate'] == null ? undefined : (new Date(json['CancelDate'])), 'newest': json['Newest'] == null ? undefined : json['Newest'], 'status': json['Status'] == null ? undefined : TrackStatusFromJSON(json['Status']), 'oldAudioFile': json['OldAudioFile'] == null ? undefined : json['OldAudioFile'], 'createDate': json['CreateDate'] == null ? undefined : (new Date(json['CreateDate'])), 'changeDate': json['ChangeDate'] == null ? undefined : (new Date(json['ChangeDate'])), 'copyRightOwnerId': json['CopyRightOwnerId'] == null ? undefined : json['CopyRightOwnerId'], 'copyRightOwner': json['CopyRightOwner'] == null ? undefined : CopyRightOwnerFromJSON(json['CopyRightOwner']), 'rawTags': json['RawTags'] == null ? undefined : json['RawTags'], 'fileHash': json['FileHash'] == null ? undefined : json['FileHash'], 'companyTypeTracks': json['CompanyTypeTracks'] == null ? undefined : ((json['CompanyTypeTracks'] as Array).map(CompanyTypeTrackFromJSON)), 'genreTracks': json['GenreTracks'] == null ? undefined : ((json['GenreTracks'] as Array).map(GenreTrackFromJSON)), 'trackSelections': json['TrackSelections'] == null ? undefined : ((json['TrackSelections'] as Array).map(TrackSelectionFromJSON)), 'trackPlayLists': json['TrackPlayLists'] == null ? undefined : ((json['TrackPlayLists'] as Array).map(TrackPlayListFromJSON)), }; } export function TrackToJSON(json: any): Track { return TrackToJSONTyped(json, false); } export function TrackToJSONTyped(value?: Track | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'TrackId': value['trackId'], 'Name': value['name'], 'AudioFile': value['audioFile'], 'ImageFile': value['imageFile'], 'Isrc': value['isrc'], 'Rating': value['rating'], 'Title': value['title'], 'Artist': value['artist'], 'Album': value['album'], 'Year': value['year'], 'Duration': value['duration'], 'Publication': value['publication'], 'ReTag': value['reTag'], 'RePeak': value['rePeak'], 'Invalid': value['invalid'], 'Cancel': value['cancel'], 'CancelDate': value['cancelDate'] == null ? undefined : ((value['cancelDate'] as any).toISOString()), 'Newest': value['newest'], 'Status': TrackStatusToJSON(value['status']), 'OldAudioFile': value['oldAudioFile'], 'CreateDate': value['createDate'] == null ? undefined : ((value['createDate']).toISOString()), 'ChangeDate': value['changeDate'] == null ? undefined : ((value['changeDate']).toISOString()), 'CopyRightOwnerId': value['copyRightOwnerId'], 'CopyRightOwner': CopyRightOwnerToJSON(value['copyRightOwner']), 'RawTags': value['rawTags'], 'FileHash': value['fileHash'], 'CompanyTypeTracks': value['companyTypeTracks'] == null ? undefined : ((value['companyTypeTracks'] as Array).map(CompanyTypeTrackToJSON)), 'GenreTracks': value['genreTracks'] == null ? undefined : ((value['genreTracks'] as Array).map(GenreTrackToJSON)), 'TrackSelections': value['trackSelections'] == null ? undefined : ((value['trackSelections'] as Array).map(TrackSelectionToJSON)), 'TrackPlayLists': value['trackPlayLists'] == null ? undefined : ((value['trackPlayLists'] as Array).map(TrackPlayListToJSON)), }; }