/* 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 { AccessGate } from './AccessGate'; import { AccessGateFromJSON, AccessGateFromJSONTyped, AccessGateToJSON, } from './AccessGate'; import type { CreatePlaylistRequestBodyCopyrightLine } from './CreatePlaylistRequestBodyCopyrightLine'; import { CreatePlaylistRequestBodyCopyrightLineFromJSON, CreatePlaylistRequestBodyCopyrightLineFromJSONTyped, CreatePlaylistRequestBodyCopyrightLineToJSON, } from './CreatePlaylistRequestBodyCopyrightLine'; import type { CreatePlaylistRequestBodyProducerCopyrightLine } from './CreatePlaylistRequestBodyProducerCopyrightLine'; import { CreatePlaylistRequestBodyProducerCopyrightLineFromJSON, CreatePlaylistRequestBodyProducerCopyrightLineFromJSONTyped, CreatePlaylistRequestBodyProducerCopyrightLineToJSON, } from './CreatePlaylistRequestBodyProducerCopyrightLine'; import type { DdexResourceContributor } from './DdexResourceContributor'; import { DdexResourceContributorFromJSON, DdexResourceContributorFromJSONTyped, DdexResourceContributorToJSON, } from './DdexResourceContributor'; import type { Genre } from './Genre'; import { GenreFromJSON, GenreFromJSONTyped, GenreToJSON, } from './Genre'; import type { Mood } from './Mood'; import { MoodFromJSON, MoodFromJSONTyped, MoodToJSON, } from './Mood'; import type { PlaylistAddedTimestamp } from './PlaylistAddedTimestamp'; import { PlaylistAddedTimestampFromJSON, PlaylistAddedTimestampFromJSONTyped, PlaylistAddedTimestampToJSON, } from './PlaylistAddedTimestamp'; /** * Request body for updating playlist information. All fields are optional. * @export * @interface UpdatePlaylistRequestBody */ export interface UpdatePlaylistRequestBody { /** * Playlist or album name * @type {string} * @memberof UpdatePlaylistRequestBody */ playlistName?: string; /** * Playlist description * @type {string} * @memberof UpdatePlaylistRequestBody */ description?: string; /** * Whether the playlist is private * @type {boolean} * @memberof UpdatePlaylistRequestBody */ isPrivate?: boolean; /** * Whether this is an album * @type {boolean} * @memberof UpdatePlaylistRequestBody */ isAlbum?: boolean; /** * * @type {Genre} * @memberof UpdatePlaylistRequestBody */ genre?: Genre; /** * * @type {Mood} * @memberof UpdatePlaylistRequestBody */ mood?: Mood; /** * Comma-separated tags * @type {string} * @memberof UpdatePlaylistRequestBody */ tags?: string; /** * License type * @type {string} * @memberof UpdatePlaylistRequestBody */ license?: string; /** * Universal Product Code (for albums) * @type {string} * @memberof UpdatePlaylistRequestBody */ upc?: string; /** * Release date * @type {Date} * @memberof UpdatePlaylistRequestBody */ releaseDate?: Date; /** * CID for the playlist cover art * @type {string} * @memberof UpdatePlaylistRequestBody */ playlistImageSizesMultihash?: string; /** * Array of track IDs to include in the playlist * @type {Array} * @memberof UpdatePlaylistRequestBody */ playlistContents?: Array; /** * Whether streaming is restricted behind an access gate * @type {boolean} * @memberof UpdatePlaylistRequestBody */ isStreamGated?: boolean | null; /** * Whether the playlist/album is a scheduled release * @type {boolean} * @memberof UpdatePlaylistRequestBody */ isScheduledRelease?: boolean | null; /** * * @type {AccessGate} * @memberof UpdatePlaylistRequestBody */ streamConditions?: AccessGate | null; /** * DDEX application identifier * @type {string} * @memberof UpdatePlaylistRequestBody */ ddexApp?: string; /** * DDEX release identifiers * @type {{ [key: string]: string; }} * @memberof UpdatePlaylistRequestBody */ ddexReleaseIds?: { [key: string]: string; } | null; /** * DDEX resource contributors / artists * @type {Array} * @memberof UpdatePlaylistRequestBody */ artists?: Array | null; /** * * @type {CreatePlaylistRequestBodyCopyrightLine} * @memberof UpdatePlaylistRequestBody */ copyrightLine?: CreatePlaylistRequestBodyCopyrightLine | null; /** * * @type {CreatePlaylistRequestBodyProducerCopyrightLine} * @memberof UpdatePlaylistRequestBody */ producerCopyrightLine?: CreatePlaylistRequestBodyProducerCopyrightLine | null; /** * Parental warning type * @type {string} * @memberof UpdatePlaylistRequestBody */ parentalWarningType?: string | null; /** * Whether the image is autogenerated * @type {boolean} * @memberof UpdatePlaylistRequestBody */ isImageAutogenerated?: boolean | null; } /** * Check if a given object implements the UpdatePlaylistRequestBody interface. */ export function instanceOfUpdatePlaylistRequestBody(value: object): value is UpdatePlaylistRequestBody { let isInstance = true; return isInstance; } export function UpdatePlaylistRequestBodyFromJSON(json: any): UpdatePlaylistRequestBody { return UpdatePlaylistRequestBodyFromJSONTyped(json, false); } export function UpdatePlaylistRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePlaylistRequestBody { if ((json === undefined) || (json === null)) { return json; } return { 'playlistName': !exists(json, 'playlist_name') ? undefined : json['playlist_name'], 'description': !exists(json, 'description') ? undefined : json['description'], 'isPrivate': !exists(json, 'is_private') ? undefined : json['is_private'], 'isAlbum': !exists(json, 'is_album') ? undefined : json['is_album'], 'genre': !exists(json, 'genre') ? undefined : GenreFromJSON(json['genre']), 'mood': !exists(json, 'mood') ? undefined : MoodFromJSON(json['mood']), 'tags': !exists(json, 'tags') ? undefined : json['tags'], 'license': !exists(json, 'license') ? undefined : json['license'], 'upc': !exists(json, 'upc') ? undefined : json['upc'], 'releaseDate': !exists(json, 'release_date') ? undefined : (new Date(json['release_date'])), 'playlistImageSizesMultihash': !exists(json, 'playlist_image_sizes_multihash') ? undefined : json['playlist_image_sizes_multihash'], 'playlistContents': !exists(json, 'playlist_contents') ? undefined : ((json['playlist_contents'] as Array).map(PlaylistAddedTimestampFromJSON)), 'isStreamGated': !exists(json, 'is_stream_gated') ? undefined : json['is_stream_gated'], 'isScheduledRelease': !exists(json, 'is_scheduled_release') ? undefined : json['is_scheduled_release'], 'streamConditions': !exists(json, 'stream_conditions') ? undefined : AccessGateFromJSON(json['stream_conditions']), 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], 'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'], 'artists': !exists(json, 'artists') ? undefined : (json['artists'] === null ? null : (json['artists'] as Array).map(DdexResourceContributorFromJSON)), 'copyrightLine': !exists(json, 'copyright_line') ? undefined : CreatePlaylistRequestBodyCopyrightLineFromJSON(json['copyright_line']), 'producerCopyrightLine': !exists(json, 'producer_copyright_line') ? undefined : CreatePlaylistRequestBodyProducerCopyrightLineFromJSON(json['producer_copyright_line']), 'parentalWarningType': !exists(json, 'parental_warning_type') ? undefined : json['parental_warning_type'], 'isImageAutogenerated': !exists(json, 'is_image_autogenerated') ? undefined : json['is_image_autogenerated'], }; } export function UpdatePlaylistRequestBodyToJSON(value?: UpdatePlaylistRequestBody | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'playlist_name': value.playlistName, 'description': value.description, 'is_private': value.isPrivate, 'is_album': value.isAlbum, 'genre': GenreToJSON(value.genre), 'mood': MoodToJSON(value.mood), 'tags': value.tags, 'license': value.license, 'upc': value.upc, 'release_date': value.releaseDate === undefined ? undefined : (value.releaseDate.toISOString().substr(0,10)), 'playlist_image_sizes_multihash': value.playlistImageSizesMultihash, 'playlist_contents': value.playlistContents === undefined ? undefined : ((value.playlistContents as Array).map(PlaylistAddedTimestampToJSON)), 'is_stream_gated': value.isStreamGated, 'is_scheduled_release': value.isScheduledRelease, 'stream_conditions': AccessGateToJSON(value.streamConditions), 'ddex_app': value.ddexApp, 'ddex_release_ids': value.ddexReleaseIds, 'artists': value.artists === undefined ? undefined : (value.artists === null ? null : (value.artists as Array).map(DdexResourceContributorToJSON)), 'copyright_line': CreatePlaylistRequestBodyCopyrightLineToJSON(value.copyrightLine), 'producer_copyright_line': CreatePlaylistRequestBodyProducerCopyrightLineToJSON(value.producerCopyrightLine), 'parental_warning_type': value.parentalWarningType, 'is_image_autogenerated': value.isImageAutogenerated, }; }