@@ -20,6 +20,24 @@ import {
2020 AccessGateFromJSONTyped ,
2121 AccessGateToJSON ,
2222} from './AccessGate' ;
23+ import type { CreatePlaylistRequestBodyCopyrightLine } from './CreatePlaylistRequestBodyCopyrightLine' ;
24+ import {
25+ CreatePlaylistRequestBodyCopyrightLineFromJSON ,
26+ CreatePlaylistRequestBodyCopyrightLineFromJSONTyped ,
27+ CreatePlaylistRequestBodyCopyrightLineToJSON ,
28+ } from './CreatePlaylistRequestBodyCopyrightLine' ;
29+ import type { CreatePlaylistRequestBodyProducerCopyrightLine } from './CreatePlaylistRequestBodyProducerCopyrightLine' ;
30+ import {
31+ CreatePlaylistRequestBodyProducerCopyrightLineFromJSON ,
32+ CreatePlaylistRequestBodyProducerCopyrightLineFromJSONTyped ,
33+ CreatePlaylistRequestBodyProducerCopyrightLineToJSON ,
34+ } from './CreatePlaylistRequestBodyProducerCopyrightLine' ;
35+ import type { DdexResourceContributor } from './DdexResourceContributor' ;
36+ import {
37+ DdexResourceContributorFromJSON ,
38+ DdexResourceContributorFromJSONTyped ,
39+ DdexResourceContributorToJSON ,
40+ } from './DdexResourceContributor' ;
2341import type { Genre } from './Genre' ;
2442import {
2543 GenreFromJSON ,
@@ -50,7 +68,7 @@ export interface CreatePlaylistRequestBody {
5068 * @type {string }
5169 * @memberof CreatePlaylistRequestBody
5270 */
53- playlistId ?: string | null ;
71+ playlistId ?: string ;
5472 /**
5573 * Playlist or album name
5674 * @type {string }
@@ -62,67 +80,67 @@ export interface CreatePlaylistRequestBody {
6280 * @type {string }
6381 * @memberof CreatePlaylistRequestBody
6482 */
65- description ?: string | null ;
83+ description ?: string ;
6684 /**
6785 * Whether the playlist is private
6886 * @type {boolean }
6987 * @memberof CreatePlaylistRequestBody
7088 */
71- isPrivate ?: boolean | null ;
89+ isPrivate ?: boolean ;
7290 /**
7391 * Whether this is an album
7492 * @type {boolean }
7593 * @memberof CreatePlaylistRequestBody
7694 */
77- isAlbum ?: boolean | null ;
95+ isAlbum ?: boolean ;
7896 /**
7997 *
8098 * @type {Genre }
8199 * @memberof CreatePlaylistRequestBody
82100 */
83- genre ?: Genre | null ;
101+ genre ?: Genre ;
84102 /**
85103 *
86104 * @type {Mood }
87105 * @memberof CreatePlaylistRequestBody
88106 */
89- mood ?: Mood | null ;
107+ mood ?: Mood ;
90108 /**
91109 * Comma-separated tags
92110 * @type {string }
93111 * @memberof CreatePlaylistRequestBody
94112 */
95- tags ?: string | null ;
113+ tags ?: string ;
96114 /**
97115 * License type
98116 * @type {string }
99117 * @memberof CreatePlaylistRequestBody
100118 */
101- license ?: string | null ;
119+ license ?: string ;
102120 /**
103121 * Universal Product Code (for albums)
104122 * @type {string }
105123 * @memberof CreatePlaylistRequestBody
106124 */
107- upc ?: string | null ;
125+ upc ?: string ;
108126 /**
109127 * Release date
110128 * @type {Date }
111129 * @memberof CreatePlaylistRequestBody
112130 */
113- releaseDate ?: Date | null ;
131+ releaseDate ?: Date ;
114132 /**
115133 * IPFS CID for cover art
116134 * @type {string }
117135 * @memberof CreatePlaylistRequestBody
118136 */
119- coverArtCid ?: string | null ;
137+ coverArtCid ?: string ;
120138 /**
121139 * Array of tracks in the playlist
122140 * @type {Array<PlaylistAddedTimestamp> }
123141 * @memberof CreatePlaylistRequestBody
124142 */
125- playlistContents ?: Array < PlaylistAddedTimestamp > | null ;
143+ playlistContents ?: Array < PlaylistAddedTimestamp > ;
126144 /**
127145 * Whether streaming is restricted behind an access gate
128146 * @type {boolean }
@@ -146,31 +164,31 @@ export interface CreatePlaylistRequestBody {
146164 * @type {string }
147165 * @memberof CreatePlaylistRequestBody
148166 */
149- ddexApp ?: string | null ;
167+ ddexApp ?: string ;
150168 /**
151169 * DDEX release identifiers
152- * @type {object }
170+ * @type {{ [key: string]: string; } }
153171 * @memberof CreatePlaylistRequestBody
154172 */
155- ddexReleaseIds ?: object | null ;
173+ ddexReleaseIds ?: { [ key : string ] : string ; } | null ;
156174 /**
157175 * DDEX resource contributors / artists
158- * @type {Array<object > }
176+ * @type {Array<DdexResourceContributor > }
159177 * @memberof CreatePlaylistRequestBody
160178 */
161- artists ?: Array < object > | null ;
179+ artists ?: Array < DdexResourceContributor > | null ;
162180 /**
163- * DDEX copyright line
164- * @type {object }
181+ *
182+ * @type {CreatePlaylistRequestBodyCopyrightLine }
165183 * @memberof CreatePlaylistRequestBody
166184 */
167- copyrightLine ?: object | null ;
185+ copyrightLine ?: CreatePlaylistRequestBodyCopyrightLine | null ;
168186 /**
169- * DDEX producer copyright line
170- * @type {object }
187+ *
188+ * @type {CreatePlaylistRequestBodyProducerCopyrightLine }
171189 * @memberof CreatePlaylistRequestBody
172190 */
173- producerCopyrightLine ?: object | null ;
191+ producerCopyrightLine ?: CreatePlaylistRequestBodyProducerCopyrightLine | null ;
174192 /**
175193 * Parental warning type
176194 * @type {string }
@@ -215,17 +233,17 @@ export function CreatePlaylistRequestBodyFromJSONTyped(json: any, ignoreDiscrimi
215233 'tags' : ! exists ( json , 'tags' ) ? undefined : json [ 'tags' ] ,
216234 'license' : ! exists ( json , 'license' ) ? undefined : json [ 'license' ] ,
217235 'upc' : ! exists ( json , 'upc' ) ? undefined : json [ 'upc' ] ,
218- 'releaseDate' : ! exists ( json , 'release_date' ) ? undefined : ( json [ 'release_date' ] === null ? null : new Date ( json [ 'release_date' ] ) ) ,
236+ 'releaseDate' : ! exists ( json , 'release_date' ) ? undefined : ( new Date ( json [ 'release_date' ] ) ) ,
219237 'coverArtCid' : ! exists ( json , 'cover_art_cid' ) ? undefined : json [ 'cover_art_cid' ] ,
220- 'playlistContents' : ! exists ( json , 'playlist_contents' ) ? undefined : ( json [ 'playlist_contents' ] === null ? null : ( json [ 'playlist_contents' ] as Array < any > ) . map ( PlaylistAddedTimestampFromJSON ) ) ,
238+ 'playlistContents' : ! exists ( json , 'playlist_contents' ) ? undefined : ( ( json [ 'playlist_contents' ] as Array < any > ) . map ( PlaylistAddedTimestampFromJSON ) ) ,
221239 'isStreamGated' : ! exists ( json , 'is_stream_gated' ) ? undefined : json [ 'is_stream_gated' ] ,
222240 'isScheduledRelease' : ! exists ( json , 'is_scheduled_release' ) ? undefined : json [ 'is_scheduled_release' ] ,
223241 'streamConditions' : ! exists ( json , 'stream_conditions' ) ? undefined : AccessGateFromJSON ( json [ 'stream_conditions' ] ) ,
224242 'ddexApp' : ! exists ( json , 'ddex_app' ) ? undefined : json [ 'ddex_app' ] ,
225243 'ddexReleaseIds' : ! exists ( json , 'ddex_release_ids' ) ? undefined : json [ 'ddex_release_ids' ] ,
226- 'artists' : ! exists ( json , 'artists' ) ? undefined : json [ 'artists' ] ,
227- 'copyrightLine' : ! exists ( json , 'copyright_line' ) ? undefined : json [ 'copyright_line' ] ,
228- 'producerCopyrightLine' : ! exists ( json , 'producer_copyright_line' ) ? undefined : json [ 'producer_copyright_line' ] ,
244+ 'artists' : ! exists ( json , 'artists' ) ? undefined : ( json [ 'artists' ] === null ? null : ( json [ 'artists' ] as Array < any > ) . map ( DdexResourceContributorFromJSON ) ) ,
245+ 'copyrightLine' : ! exists ( json , 'copyright_line' ) ? undefined : CreatePlaylistRequestBodyCopyrightLineFromJSON ( json [ 'copyright_line' ] ) ,
246+ 'producerCopyrightLine' : ! exists ( json , 'producer_copyright_line' ) ? undefined : CreatePlaylistRequestBodyProducerCopyrightLineFromJSON ( json [ 'producer_copyright_line' ] ) ,
229247 'parentalWarningType' : ! exists ( json , 'parental_warning_type' ) ? undefined : json [ 'parental_warning_type' ] ,
230248 'isImageAutogenerated' : ! exists ( json , 'is_image_autogenerated' ) ? undefined : json [ 'is_image_autogenerated' ] ,
231249 } ;
@@ -250,17 +268,17 @@ export function CreatePlaylistRequestBodyToJSON(value?: CreatePlaylistRequestBod
250268 'tags' : value . tags ,
251269 'license' : value . license ,
252270 'upc' : value . upc ,
253- 'release_date' : value . releaseDate === undefined ? undefined : ( value . releaseDate === null ? null : value . releaseDate . toISOString ( ) . substr ( 0 , 10 ) ) ,
271+ 'release_date' : value . releaseDate === undefined ? undefined : ( value . releaseDate . toISOString ( ) . substr ( 0 , 10 ) ) ,
254272 'cover_art_cid' : value . coverArtCid ,
255- 'playlist_contents' : value . playlistContents === undefined ? undefined : ( value . playlistContents === null ? null : ( value . playlistContents as Array < any > ) . map ( PlaylistAddedTimestampToJSON ) ) ,
273+ 'playlist_contents' : value . playlistContents === undefined ? undefined : ( ( value . playlistContents as Array < any > ) . map ( PlaylistAddedTimestampToJSON ) ) ,
256274 'is_stream_gated' : value . isStreamGated ,
257275 'is_scheduled_release' : value . isScheduledRelease ,
258276 'stream_conditions' : AccessGateToJSON ( value . streamConditions ) ,
259277 'ddex_app' : value . ddexApp ,
260278 'ddex_release_ids' : value . ddexReleaseIds ,
261- 'artists' : value . artists ,
262- 'copyright_line' : value . copyrightLine ,
263- 'producer_copyright_line' : value . producerCopyrightLine ,
279+ 'artists' : value . artists === undefined ? undefined : ( value . artists === null ? null : ( value . artists as Array < any > ) . map ( DdexResourceContributorToJSON ) ) ,
280+ 'copyright_line' : CreatePlaylistRequestBodyCopyrightLineToJSON ( value . copyrightLine ) ,
281+ 'producer_copyright_line' : CreatePlaylistRequestBodyProducerCopyrightLineToJSON ( value . producerCopyrightLine ) ,
264282 'parental_warning_type' : value . parentalWarningType ,
265283 'is_image_autogenerated' : value . isImageAutogenerated ,
266284 } ;
0 commit comments