/* tslint:disable */ /* eslint-disable */ // @ts-nocheck /** * Audius API * * The version of the OpenAPI document: 1.0 * * * 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 { UserPlaylistLibraryContentsInner } from './UserPlaylistLibraryContentsInner'; import { UserPlaylistLibraryContentsInnerFromJSON, UserPlaylistLibraryContentsInnerFromJSONTyped, UserPlaylistLibraryContentsInnerToJSON, } from './UserPlaylistLibraryContentsInner'; /** * Folder containing nested playlists and folders * @export * @interface PlaylistLibraryFolder */ export interface PlaylistLibraryFolder { /** * Unique folder identifier * @type {string} * @memberof PlaylistLibraryFolder */ id: string; /** * * @type {string} * @memberof PlaylistLibraryFolder */ type: PlaylistLibraryFolderTypeEnum; /** * Folder name * @type {string} * @memberof PlaylistLibraryFolder */ name: string; /** * Nested folders and playlist identifiers * @type {Array} * @memberof PlaylistLibraryFolder */ contents: Array; } /** * @export */ export const PlaylistLibraryFolderTypeEnum = { Folder: 'folder' } as const; export type PlaylistLibraryFolderTypeEnum = typeof PlaylistLibraryFolderTypeEnum[keyof typeof PlaylistLibraryFolderTypeEnum]; /** * Check if a given object implements the PlaylistLibraryFolder interface. */ export function instanceOfPlaylistLibraryFolder(value: object): value is PlaylistLibraryFolder { let isInstance = true; isInstance = isInstance && "id" in value && value["id"] !== undefined; isInstance = isInstance && "type" in value && value["type"] !== undefined; isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "contents" in value && value["contents"] !== undefined; return isInstance; } export function PlaylistLibraryFolderFromJSON(json: any): PlaylistLibraryFolder { return PlaylistLibraryFolderFromJSONTyped(json, false); } export function PlaylistLibraryFolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaylistLibraryFolder { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'type': json['type'], 'name': json['name'], 'contents': ((json['contents'] as Array).map(UserPlaylistLibraryContentsInnerFromJSON)), }; } export function PlaylistLibraryFolderToJSON(value?: PlaylistLibraryFolder | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'type': value.type, 'name': value.name, 'contents': ((value.contents as Array).map(UserPlaylistLibraryContentsInnerToJSON)), }; }