Music_Player3/MusicPlayer/MP/MPPositive/Models/JsonStructs(js文件结构)/MPPositive_JsonArtistMore.swift
2024-05-20 13:44:14 +08:00

275 lines
16 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// MPPositive_JsonArtistMore.swift
// MusicPlayer
//
// Created by Mr.Zhou on 2024/5/15.
//
import UIKit
struct JsonArtistMore: Codable {
///
let contents:Contents?
///continuation
let continuationContents:ContinuationContents?
enum CodingKeys: String, CodingKey {
case contents = "contents"
case continuationContents = "continuationContents"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
contents = try values.decodeIfPresent(Contents.self, forKey: .contents)
continuationContents = try values.decodeIfPresent(ContinuationContents.self, forKey: .continuationContents)
}
struct Contents: Codable {
let singleColumnBrowseResultsRenderer:SingleColumnBrowseResultsRenderer?
enum CodingKeys: String, CodingKey {
case singleColumnBrowseResultsRenderer = "singleColumnBrowseResultsRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
singleColumnBrowseResultsRenderer = try values.decodeIfPresent(SingleColumnBrowseResultsRenderer.self, forKey: .singleColumnBrowseResultsRenderer)
}
struct SingleColumnBrowseResultsRenderer: Codable {
///1
let tabs : [Tab]?
enum CodingKeys: String, CodingKey {
case tabs = "tabs"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
tabs = try values.decodeIfPresent([Tab].self, forKey: .tabs)
}
struct Tab : Codable {
let tabRenderer : TabRenderer?
enum CodingKeys: String, CodingKey {
case tabRenderer = "tabRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
tabRenderer = try values.decodeIfPresent(TabRenderer.self, forKey: .tabRenderer)
}
struct TabRenderer: Codable {
let content:Content?
enum CodingKeys: String, CodingKey {
case content = "content"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
content = try values.decodeIfPresent(Content.self, forKey: .content)
}
struct Content: Codable {
let sectionListRenderer:SectionListRenderer?
enum CodingKeys: String, CodingKey {
case sectionListRenderer = "sectionListRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
sectionListRenderer = try values.decodeIfPresent(SectionListRenderer.self, forKey: .sectionListRenderer)
}
struct SectionListRenderer: Codable {
let contents:[Content]?
enum CodingKeys: String, CodingKey {
case contents = "contents"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
contents = try values.decodeIfPresent([Content].self, forKey: .contents)
}
struct Content: Codable {
///
let musicPlaylistShelfRenderer:MusicPlaylistShelfRenderer?
///
let gridRenderer:GridRenderer?
enum CodingKeys: String, CodingKey {
case musicPlaylistShelfRenderer = "musicPlaylistShelfRenderer"
case gridRenderer = "gridRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
musicPlaylistShelfRenderer = try values.decodeIfPresent(MusicPlaylistShelfRenderer.self, forKey: .musicPlaylistShelfRenderer)
gridRenderer = try values.decodeIfPresent(GridRenderer.self, forKey: .gridRenderer)
}
struct MusicPlaylistShelfRenderer: Codable {
///id
let playlistId:String?
///
let contents:[Content]?
///
let continuations:[Continuation]?
enum CodingKeys: String, CodingKey {
case playlistId = "playlistId"
case contents = "contents"
case continuations = "continuations"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
playlistId = try values.decodeIfPresent(String.self, forKey: .playlistId)
contents = try values.decodeIfPresent([Content].self, forKey: .contents)
continuations = try values.decodeIfPresent([Continuation].self, forKey: .continuations)
}
struct Content: Codable {
let musicResponsiveListItemRenderer: RootMusicResponsiveListItemRenderer?
enum CodingKeys: String, CodingKey {
case musicResponsiveListItemRenderer = "musicResponsiveListItemRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
musicResponsiveListItemRenderer = try values.decodeIfPresent(RootMusicResponsiveListItemRenderer.self, forKey: .musicResponsiveListItemRenderer)
}
}
struct Continuation: Codable {
let nextContinuationData:NextContinuationData?
enum CodingKeys: String, CodingKey {
case nextContinuationData = "nextContinuationData"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
nextContinuationData = try values.decodeIfPresent(NextContinuationData.self, forKey: .nextContinuationData)
}
struct NextContinuationData: Codable {
let continuation:String?
let clickTrackingParams:String?
enum CodingKeys: String, CodingKey {
case continuation = "continuation"
case clickTrackingParams = "clickTrackingParams"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
continuation = try values.decodeIfPresent(String.self, forKey: .continuation)
clickTrackingParams = try values.decodeIfPresent(String.self, forKey: .clickTrackingParams)
}
}
}
}
struct GridRenderer: Codable {
///
let items:[Item]?
///
let continuations:[Continuation]?
enum CodingKeys: String, CodingKey {
case items = "items"
case continuations = "continuations"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
items = try values.decodeIfPresent([Item].self, forKey: .items)
continuations = try values.decodeIfPresent([Continuation].self, forKey: .continuations)
}
struct Item: Codable {
let musicTwoRowItemRenderer: RootMusicTwoRowItemRenderer?
enum CodingKeys: String, CodingKey {
case musicTwoRowItemRenderer = "musicTwoRowItemRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
musicTwoRowItemRenderer = try values.decodeIfPresent(RootMusicTwoRowItemRenderer.self, forKey: .musicTwoRowItemRenderer)
}
}
struct Continuation: Codable {
let nextContinuationData:NextContinuationData?
enum CodingKeys: String, CodingKey {
case nextContinuationData = "nextContinuationData"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
nextContinuationData = try values.decodeIfPresent(NextContinuationData.self, forKey: .nextContinuationData)
}
struct NextContinuationData: Codable {
let continuation:String?
let clickTrackingParams:String?
enum CodingKeys: String, CodingKey {
case continuation = "continuation"
case clickTrackingParams = "clickTrackingParams"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
continuation = try values.decodeIfPresent(String.self, forKey: .continuation)
clickTrackingParams = try values.decodeIfPresent(String.self, forKey: .clickTrackingParams)
}
}
}
}
}
}
}
}
}
}
}
struct ContinuationContents: Codable {
let musicPlaylistShelfContinuation:MusicPlaylistShelfContinuation?
enum CodingKeys: String, CodingKey {
case musicPlaylistShelfContinuation = "musicPlaylistShelfContinuation"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
musicPlaylistShelfContinuation = try values.decodeIfPresent(MusicPlaylistShelfContinuation.self, forKey: .musicPlaylistShelfContinuation)
}
struct MusicPlaylistShelfContinuation: Codable {
///
let contents:[Content]?
///
let continuations : [Continuation]?
enum CodingKeys: String, CodingKey {
case contents = "contents"
case continuations = "continuations"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
contents = try values.decodeIfPresent([Content].self, forKey: .contents)
continuations = try values.decodeIfPresent([Continuation].self, forKey: .continuations)
}
struct Content: Codable {
let musicResponsiveListItemRenderer:RootMusicResponsiveListItemRenderer?
let musicTwoRowItemRenderer:RootMusicTwoRowItemRenderer?
enum CodingKeys: String, CodingKey {
case musicResponsiveListItemRenderer = "musicResponsiveListItemRenderer"
case musicTwoRowItemRenderer = "musicTwoRowItemRenderer"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
musicResponsiveListItemRenderer = try values.decodeIfPresent(RootMusicResponsiveListItemRenderer.self, forKey: .musicResponsiveListItemRenderer)
musicTwoRowItemRenderer = try values.decodeIfPresent(RootMusicTwoRowItemRenderer.self, forKey: .musicTwoRowItemRenderer)
}
}
///
struct Continuation: Codable {
let nextContinuationData:NextContinuationData?
enum CodingKeys: String, CodingKey {
case nextContinuationData = "nextContinuationData"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
nextContinuationData = try values.decodeIfPresent(NextContinuationData.self, forKey: .nextContinuationData)
}
//MARK: -
struct NextContinuationData: Codable {
let continuation:String?
let clickTrackingParams:String?
enum CodingKeys: String, CodingKey {
case continuation = "continuation"
case clickTrackingParams = "clickTrackingParams"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
continuation = try values.decodeIfPresent(String.self, forKey: .continuation)
clickTrackingParams = try values.decodeIfPresent(String.self, forKey: .clickTrackingParams)
}
}
}
}
}
}