mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
474 lines
28 KiB
Swift
474 lines
28 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||
|
||
import Foundation
|
||
|
||
extension Operations {
|
||
/// Unknown
|
||
///
|
||
public struct GetAllMediaLibraryMetadata {
|
||
public let addedAt: Int
|
||
/// The art image URL for the media item.
|
||
public let art: String
|
||
/// The audience rating for the media item.
|
||
@DecimalSerialized
|
||
public private(set) var audienceRating: Double
|
||
/// The number of child items associated with this media item.
|
||
public let childCount: Int
|
||
/// The duration of the media item in milliseconds.
|
||
public let duration: Int
|
||
/// The globally unique identifier for the media item.
|
||
public let guid: String
|
||
/// The index position of the media item.
|
||
public let index: Int
|
||
/// The unique key for the media item.
|
||
public let key: String
|
||
/// The original release date of the media item.
|
||
@DateOnly
|
||
public private(set) var originallyAvailableAt: Date
|
||
/// The critic rating for the media item.
|
||
@DecimalSerialized
|
||
public private(set) var rating: Double
|
||
/// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||
public let ratingKey: String
|
||
/// The total number of seasons (for TV shows).
|
||
public let seasonCount: Int
|
||
/// A URL‐friendly version of the media title.
|
||
public let slug: String
|
||
/// A synopsis of the media item.
|
||
public let summary: String
|
||
/// A brief tagline for the media item.
|
||
public let tagline: String
|
||
/// The theme URL for the media item.
|
||
public let theme: String
|
||
/// The thumbnail image URL for the media item.
|
||
public let thumb: String
|
||
/// The title of the media item.
|
||
public let title: String
|
||
/// The sort title used for ordering media items.
|
||
public let titleSort: String
|
||
public let type: Operations.GetAllMediaLibraryLibraryType
|
||
/// The URL for the audience rating image.
|
||
public let audienceRatingImage: String?
|
||
/// The source from which chapter data is derived.
|
||
public let chapterSource: String?
|
||
public let collection: [Operations.GetAllMediaLibraryCollection]?
|
||
/// The content rating for the media item.
|
||
public let contentRating: String?
|
||
public let country: [Operations.GetAllMediaLibraryCountry]?
|
||
/// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||
public let createdAtAccuracy: String?
|
||
/// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||
public let createdAtTZOffset: String?
|
||
public let director: [Operations.GetAllMediaLibraryDirector]?
|
||
public let genre: [Operations.GetAllMediaLibraryGenre]?
|
||
/// The art URL for the grandparent media item.
|
||
public let grandparentArt: String?
|
||
/// The GUID of the grandparent media item.
|
||
public let grandparentGuid: String?
|
||
/// The key of the grandparent media item.
|
||
public let grandparentKey: String?
|
||
/// The rating key of the grandparent media item.
|
||
public let grandparentRatingKey: String?
|
||
/// The slug for the grandparent media item.
|
||
public let grandparentSlug: String?
|
||
/// The theme URL for the grandparent media item.
|
||
public let grandparentTheme: String?
|
||
/// The thumbnail URL for the grandparent media item.
|
||
public let grandparentThumb: String?
|
||
/// The title of the grandparent media item.
|
||
public let grandparentTitle: String?
|
||
public let guids: [Operations.GetAllMediaLibraryGuids]?
|
||
public let image: [Operations.GetAllMediaLibraryImage]?
|
||
/// The Unix timestamp representing the last time the item was rated.
|
||
public let lastRatedAt: Int?
|
||
/// Unix timestamp for when the media item was last viewed.
|
||
public let lastViewedAt: Int?
|
||
/// The number of leaf items (end nodes) under this media item.
|
||
public let leafCount: Int?
|
||
public let media: [Operations.GetAllMediaLibraryMedia]?
|
||
/// The original title of the media item (if different).
|
||
public let originalTitle: String?
|
||
/// The GUID of the parent media item.
|
||
public let parentGuid: String?
|
||
/// The index position of the parent media item.
|
||
public let parentIndex: Int?
|
||
/// The key of the parent media item.
|
||
public let parentKey: String?
|
||
/// The rating key of the parent media item.
|
||
public let parentRatingKey: String?
|
||
/// The thumbnail URL for the parent media item.
|
||
public let parentThumb: String?
|
||
/// The title of the parent media item.
|
||
public let parentTitle: String?
|
||
/// The primary extra key associated with this media item.
|
||
public let primaryExtraKey: String?
|
||
/// The URL for the rating image.
|
||
public let ratingImage: String?
|
||
public let role: [Operations.GetAllMediaLibraryRole]?
|
||
/// The number of times this media item has been skipped.
|
||
public let skipCount: Int?
|
||
/// The studio that produced the media item.
|
||
public let studio: String?
|
||
/// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||
public let subtype: String?
|
||
public let ultraBlurColors: Operations.GetAllMediaLibraryUltraBlurColors?
|
||
/// Unix epoch datetime in seconds
|
||
public let updatedAt: Int?
|
||
/// The rating provided by a user for the item. This value is expressed as a decimal number.
|
||
@DecimalSerialized
|
||
public private(set) var userRating: Double?
|
||
/// The number of times this media item has been viewed.
|
||
public let viewCount: Int?
|
||
/// The number of leaf items that have been viewed.
|
||
public let viewedLeafCount: Int?
|
||
/// The current playback offset (in milliseconds).
|
||
public let viewOffset: Int?
|
||
public let writer: [Operations.GetAllMediaLibraryWriter]?
|
||
/// The release year of the media item.
|
||
public let year: Int?
|
||
|
||
/// Creates an object with the specified parameters
|
||
///
|
||
/// - Parameter art: The art image URL for the media item.
|
||
/// - Parameter audienceRating: The audience rating for the media item.
|
||
/// - Parameter childCount: The number of child items associated with this media item.
|
||
/// - Parameter duration: The duration of the media item in milliseconds.
|
||
/// - Parameter guid: The globally unique identifier for the media item.
|
||
/// - Parameter index: The index position of the media item.
|
||
/// - Parameter key: The unique key for the media item.
|
||
/// - Parameter originallyAvailableAt: The original release date of the media item.
|
||
/// - Parameter rating: The critic rating for the media item.
|
||
/// - Parameter ratingKey: The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||
/// - Parameter seasonCount: The total number of seasons (for TV shows).
|
||
/// - Parameter slug: A URL‐friendly version of the media title.
|
||
/// - Parameter summary: A synopsis of the media item.
|
||
/// - Parameter tagline: A brief tagline for the media item.
|
||
/// - Parameter theme: The theme URL for the media item.
|
||
/// - Parameter thumb: The thumbnail image URL for the media item.
|
||
/// - Parameter title: The title of the media item.
|
||
/// - Parameter titleSort: The sort title used for ordering media items.
|
||
/// - Parameter audienceRatingImage: The URL for the audience rating image.
|
||
/// - Parameter chapterSource: The source from which chapter data is derived.
|
||
/// - Parameter contentRating: The content rating for the media item.
|
||
/// - Parameter createdAtAccuracy: The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||
/// - Parameter createdAtTZOffset: The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||
/// - Parameter grandparentArt: The art URL for the grandparent media item.
|
||
/// - Parameter grandparentGuid: The GUID of the grandparent media item.
|
||
/// - Parameter grandparentKey: The key of the grandparent media item.
|
||
/// - Parameter grandparentRatingKey: The rating key of the grandparent media item.
|
||
/// - Parameter grandparentSlug: The slug for the grandparent media item.
|
||
/// - Parameter grandparentTheme: The theme URL for the grandparent media item.
|
||
/// - Parameter grandparentThumb: The thumbnail URL for the grandparent media item.
|
||
/// - Parameter grandparentTitle: The title of the grandparent media item.
|
||
/// - Parameter lastRatedAt: The Unix timestamp representing the last time the item was rated.
|
||
/// - Parameter lastViewedAt: Unix timestamp for when the media item was last viewed.
|
||
/// - Parameter leafCount: The number of leaf items (end nodes) under this media item.
|
||
/// - Parameter originalTitle: The original title of the media item (if different).
|
||
/// - Parameter parentGuid: The GUID of the parent media item.
|
||
/// - Parameter parentIndex: The index position of the parent media item.
|
||
/// - Parameter parentKey: The key of the parent media item.
|
||
/// - Parameter parentRatingKey: The rating key of the parent media item.
|
||
/// - Parameter parentThumb: The thumbnail URL for the parent media item.
|
||
/// - Parameter parentTitle: The title of the parent media item.
|
||
/// - Parameter primaryExtraKey: The primary extra key associated with this media item.
|
||
/// - Parameter ratingImage: The URL for the rating image.
|
||
/// - Parameter skipCount: The number of times this media item has been skipped.
|
||
/// - Parameter studio: The studio that produced the media item.
|
||
/// - Parameter subtype: A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||
/// - Parameter userRating: The rating provided by a user for the item. This value is expressed as a decimal number.
|
||
/// - Parameter viewCount: The number of times this media item has been viewed.
|
||
/// - Parameter viewedLeafCount: The number of leaf items that have been viewed.
|
||
/// - Parameter viewOffset: The current playback offset (in milliseconds).
|
||
/// - Parameter year: The release year of the media item.
|
||
///
|
||
public init(addedAt: Int, art: String, audienceRating: Double, childCount: Int, duration: Int, guid: String, index: Int, key: String, originallyAvailableAt: Date, rating: Double, ratingKey: String, seasonCount: Int, slug: String, summary: String, tagline: String, theme: String, thumb: String, title: String, titleSort: String, type: Operations.GetAllMediaLibraryLibraryType, audienceRatingImage: String? = nil, chapterSource: String? = nil, collection: [Operations.GetAllMediaLibraryCollection]? = nil, contentRating: String? = nil, country: [Operations.GetAllMediaLibraryCountry]? = nil, createdAtAccuracy: String? = nil, createdAtTZOffset: String? = nil, director: [Operations.GetAllMediaLibraryDirector]? = nil, genre: [Operations.GetAllMediaLibraryGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.GetAllMediaLibraryGuids]? = nil, image: [Operations.GetAllMediaLibraryImage]? = nil, lastRatedAt: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, media: [Operations.GetAllMediaLibraryMedia]? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, ratingImage: String? = nil, role: [Operations.GetAllMediaLibraryRole]? = nil, skipCount: Int? = nil, studio: String? = nil, subtype: String? = nil, ultraBlurColors: Operations.GetAllMediaLibraryUltraBlurColors? = nil, updatedAt: Int? = nil, userRating: Double? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetAllMediaLibraryWriter]? = nil, year: Int? = nil) {
|
||
self.addedAt = addedAt
|
||
self.art = art
|
||
self._audienceRating = DecimalSerialized<Double>(wrappedValue: audienceRating)
|
||
self.childCount = childCount
|
||
self.duration = duration
|
||
self.guid = guid
|
||
self.index = index
|
||
self.key = key
|
||
self._originallyAvailableAt = DateOnly<Date>(wrappedValue: originallyAvailableAt)
|
||
self._rating = DecimalSerialized<Double>(wrappedValue: rating)
|
||
self.ratingKey = ratingKey
|
||
self.seasonCount = seasonCount
|
||
self.slug = slug
|
||
self.summary = summary
|
||
self.tagline = tagline
|
||
self.theme = theme
|
||
self.thumb = thumb
|
||
self.title = title
|
||
self.titleSort = titleSort
|
||
self.type = type
|
||
self.audienceRatingImage = audienceRatingImage
|
||
self.chapterSource = chapterSource
|
||
self.collection = collection
|
||
self.contentRating = contentRating
|
||
self.country = country
|
||
self.createdAtAccuracy = createdAtAccuracy
|
||
self.createdAtTZOffset = createdAtTZOffset
|
||
self.director = director
|
||
self.genre = genre
|
||
self.grandparentArt = grandparentArt
|
||
self.grandparentGuid = grandparentGuid
|
||
self.grandparentKey = grandparentKey
|
||
self.grandparentRatingKey = grandparentRatingKey
|
||
self.grandparentSlug = grandparentSlug
|
||
self.grandparentTheme = grandparentTheme
|
||
self.grandparentThumb = grandparentThumb
|
||
self.grandparentTitle = grandparentTitle
|
||
self.guids = guids
|
||
self.image = image
|
||
self.lastRatedAt = lastRatedAt
|
||
self.lastViewedAt = lastViewedAt
|
||
self.leafCount = leafCount
|
||
self.media = media
|
||
self.originalTitle = originalTitle
|
||
self.parentGuid = parentGuid
|
||
self.parentIndex = parentIndex
|
||
self.parentKey = parentKey
|
||
self.parentRatingKey = parentRatingKey
|
||
self.parentThumb = parentThumb
|
||
self.parentTitle = parentTitle
|
||
self.primaryExtraKey = primaryExtraKey
|
||
self.ratingImage = ratingImage
|
||
self.role = role
|
||
self.skipCount = skipCount
|
||
self.studio = studio
|
||
self.subtype = subtype
|
||
self.ultraBlurColors = ultraBlurColors
|
||
self.updatedAt = updatedAt
|
||
self._userRating = DecimalSerialized<Double?>(wrappedValue: userRating)
|
||
self.viewCount = viewCount
|
||
self.viewedLeafCount = viewedLeafCount
|
||
self.viewOffset = viewOffset
|
||
self.writer = writer
|
||
self.year = year
|
||
}
|
||
}}
|
||
|
||
extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||
enum CodingKeys: String, CodingKey {
|
||
case addedAt
|
||
case art
|
||
case audienceRating
|
||
case childCount
|
||
case duration
|
||
case guid
|
||
case index
|
||
case key
|
||
case originallyAvailableAt
|
||
case rating
|
||
case ratingKey
|
||
case seasonCount
|
||
case slug
|
||
case summary
|
||
case tagline
|
||
case theme
|
||
case thumb
|
||
case title
|
||
case titleSort
|
||
case type
|
||
case audienceRatingImage
|
||
case chapterSource
|
||
case collection = "Collection"
|
||
case contentRating
|
||
case country = "Country"
|
||
case createdAtAccuracy
|
||
case createdAtTZOffset
|
||
case director = "Director"
|
||
case genre = "Genre"
|
||
case grandparentArt
|
||
case grandparentGuid
|
||
case grandparentKey
|
||
case grandparentRatingKey
|
||
case grandparentSlug
|
||
case grandparentTheme
|
||
case grandparentThumb
|
||
case grandparentTitle
|
||
case guids = "Guid"
|
||
case image = "Image"
|
||
case lastRatedAt
|
||
case lastViewedAt
|
||
case leafCount
|
||
case media = "Media"
|
||
case originalTitle
|
||
case parentGuid
|
||
case parentIndex
|
||
case parentKey
|
||
case parentRatingKey
|
||
case parentThumb
|
||
case parentTitle
|
||
case primaryExtraKey
|
||
case ratingImage
|
||
case role = "Role"
|
||
case skipCount
|
||
case studio
|
||
case subtype
|
||
case ultraBlurColors = "UltraBlurColors"
|
||
case updatedAt
|
||
case userRating
|
||
case viewCount
|
||
case viewedLeafCount
|
||
case viewOffset
|
||
case writer = "Writer"
|
||
case year
|
||
}
|
||
|
||
public init(from decoder: Decoder) throws {
|
||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||
self.addedAt = try container.decode(Int.self, forKey: .addedAt)
|
||
self.art = try container.decode(String.self, forKey: .art)
|
||
self._audienceRating = try container.decode(DecimalSerialized<Double>.self, forKey: .audienceRating)
|
||
self.childCount = try container.decode(Int.self, forKey: .childCount)
|
||
self.duration = try container.decode(Int.self, forKey: .duration)
|
||
self.guid = try container.decode(String.self, forKey: .guid)
|
||
self.index = try container.decode(Int.self, forKey: .index)
|
||
self.key = try container.decode(String.self, forKey: .key)
|
||
self._originallyAvailableAt = try container.decode(DateOnly<Date>.self, forKey: .originallyAvailableAt)
|
||
self._rating = try container.decode(DecimalSerialized<Double>.self, forKey: .rating)
|
||
self.ratingKey = try container.decode(String.self, forKey: .ratingKey)
|
||
self.seasonCount = try container.decode(Int.self, forKey: .seasonCount)
|
||
self.slug = try container.decode(String.self, forKey: .slug)
|
||
self.summary = try container.decode(String.self, forKey: .summary)
|
||
self.tagline = try container.decode(String.self, forKey: .tagline)
|
||
self.theme = try container.decode(String.self, forKey: .theme)
|
||
self.thumb = try container.decode(String.self, forKey: .thumb)
|
||
self.title = try container.decode(String.self, forKey: .title)
|
||
self.titleSort = try container.decode(String.self, forKey: .titleSort)
|
||
self.type = try container.decode(Operations.GetAllMediaLibraryLibraryType.self, forKey: .type)
|
||
self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage)
|
||
self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||
self.collection = try container.decodeIfPresent([Operations.GetAllMediaLibraryCollection].self, forKey: .collection)
|
||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||
self.country = try container.decodeIfPresent([Operations.GetAllMediaLibraryCountry].self, forKey: .country)
|
||
self.createdAtAccuracy = try container.decodeIfPresent(String.self, forKey: .createdAtAccuracy)
|
||
self.createdAtTZOffset = try container.decodeIfPresent(String.self, forKey: .createdAtTZOffset)
|
||
self.director = try container.decodeIfPresent([Operations.GetAllMediaLibraryDirector].self, forKey: .director)
|
||
self.genre = try container.decodeIfPresent([Operations.GetAllMediaLibraryGenre].self, forKey: .genre)
|
||
self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt)
|
||
self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid)
|
||
self.grandparentKey = try container.decodeIfPresent(String.self, forKey: .grandparentKey)
|
||
self.grandparentRatingKey = try container.decodeIfPresent(String.self, forKey: .grandparentRatingKey)
|
||
self.grandparentSlug = try container.decodeIfPresent(String.self, forKey: .grandparentSlug)
|
||
self.grandparentTheme = try container.decodeIfPresent(String.self, forKey: .grandparentTheme)
|
||
self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb)
|
||
self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle)
|
||
self.guids = try container.decodeIfPresent([Operations.GetAllMediaLibraryGuids].self, forKey: .guids)
|
||
self.image = try container.decodeIfPresent([Operations.GetAllMediaLibraryImage].self, forKey: .image)
|
||
self.lastRatedAt = try container.decodeIfPresent(Int.self, forKey: .lastRatedAt)
|
||
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
|
||
self.leafCount = try container.decodeIfPresent(Int.self, forKey: .leafCount)
|
||
self.media = try container.decodeIfPresent([Operations.GetAllMediaLibraryMedia].self, forKey: .media)
|
||
self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle)
|
||
self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid)
|
||
self.parentIndex = try container.decodeIfPresent(Int.self, forKey: .parentIndex)
|
||
self.parentKey = try container.decodeIfPresent(String.self, forKey: .parentKey)
|
||
self.parentRatingKey = try container.decodeIfPresent(String.self, forKey: .parentRatingKey)
|
||
self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb)
|
||
self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle)
|
||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||
self.role = try container.decodeIfPresent([Operations.GetAllMediaLibraryRole].self, forKey: .role)
|
||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||
self.subtype = try container.decodeIfPresent(String.self, forKey: .subtype)
|
||
self.ultraBlurColors = try container.decodeIfPresent(Operations.GetAllMediaLibraryUltraBlurColors.self, forKey: .ultraBlurColors)
|
||
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||
self._userRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .userRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||
self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount)
|
||
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
|
||
self.viewOffset = try container.decodeIfPresent(Int.self, forKey: .viewOffset)
|
||
self.writer = try container.decodeIfPresent([Operations.GetAllMediaLibraryWriter].self, forKey: .writer)
|
||
self.year = try container.decodeIfPresent(Int.self, forKey: .year)
|
||
}
|
||
|
||
public func encode(to encoder: Encoder) throws {
|
||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||
try container.encode(self.addedAt, forKey: .addedAt)
|
||
try container.encode(self.art, forKey: .art)
|
||
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||
try container.encode(self.childCount, forKey: .childCount)
|
||
try container.encode(self.duration, forKey: .duration)
|
||
try container.encode(self.guid, forKey: .guid)
|
||
try container.encode(self.index, forKey: .index)
|
||
try container.encode(self.key, forKey: .key)
|
||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||
try container.encode(self._rating, forKey: .rating)
|
||
try container.encode(self.ratingKey, forKey: .ratingKey)
|
||
try container.encode(self.seasonCount, forKey: .seasonCount)
|
||
try container.encode(self.slug, forKey: .slug)
|
||
try container.encode(self.summary, forKey: .summary)
|
||
try container.encode(self.tagline, forKey: .tagline)
|
||
try container.encode(self.theme, forKey: .theme)
|
||
try container.encode(self.thumb, forKey: .thumb)
|
||
try container.encode(self.title, forKey: .title)
|
||
try container.encode(self.titleSort, forKey: .titleSort)
|
||
try container.encode(self.type, forKey: .type)
|
||
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||
try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource)
|
||
try container.encodeIfPresent(self.collection, forKey: .collection)
|
||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||
try container.encodeIfPresent(self.country, forKey: .country)
|
||
try container.encodeIfPresent(self.createdAtAccuracy, forKey: .createdAtAccuracy)
|
||
try container.encodeIfPresent(self.createdAtTZOffset, forKey: .createdAtTZOffset)
|
||
try container.encodeIfPresent(self.director, forKey: .director)
|
||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||
try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt)
|
||
try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid)
|
||
try container.encodeIfPresent(self.grandparentKey, forKey: .grandparentKey)
|
||
try container.encodeIfPresent(self.grandparentRatingKey, forKey: .grandparentRatingKey)
|
||
try container.encodeIfPresent(self.grandparentSlug, forKey: .grandparentSlug)
|
||
try container.encodeIfPresent(self.grandparentTheme, forKey: .grandparentTheme)
|
||
try container.encodeIfPresent(self.grandparentThumb, forKey: .grandparentThumb)
|
||
try container.encodeIfPresent(self.grandparentTitle, forKey: .grandparentTitle)
|
||
try container.encodeIfPresent(self.guids, forKey: .guids)
|
||
try container.encodeIfPresent(self.image, forKey: .image)
|
||
try container.encodeIfPresent(self.lastRatedAt, forKey: .lastRatedAt)
|
||
try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt)
|
||
try container.encodeIfPresent(self.leafCount, forKey: .leafCount)
|
||
try container.encodeIfPresent(self.media, forKey: .media)
|
||
try container.encodeIfPresent(self.originalTitle, forKey: .originalTitle)
|
||
try container.encodeIfPresent(self.parentGuid, forKey: .parentGuid)
|
||
try container.encodeIfPresent(self.parentIndex, forKey: .parentIndex)
|
||
try container.encodeIfPresent(self.parentKey, forKey: .parentKey)
|
||
try container.encodeIfPresent(self.parentRatingKey, forKey: .parentRatingKey)
|
||
try container.encodeIfPresent(self.parentThumb, forKey: .parentThumb)
|
||
try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle)
|
||
try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey)
|
||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||
try container.encodeIfPresent(self.role, forKey: .role)
|
||
try container.encodeIfPresent(self.skipCount, forKey: .skipCount)
|
||
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||
try container.encodeIfPresent(self.subtype, forKey: .subtype)
|
||
try container.encodeIfPresent(self.ultraBlurColors, forKey: .ultraBlurColors)
|
||
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||
if self.userRating != nil {
|
||
try container.encode(self._userRating, forKey: .userRating)
|
||
}
|
||
try container.encodeIfPresent(self.viewCount, forKey: .viewCount)
|
||
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
|
||
try container.encodeIfPresent(self.viewOffset, forKey: .viewOffset)
|
||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||
try container.encodeIfPresent(self.year, forKey: .year)
|
||
}
|
||
}
|
||
|
||
extension Operations.GetAllMediaLibraryMetadata {
|
||
var ratingWrapper: DecimalSerialized<Double> {
|
||
return _rating
|
||
}
|
||
var audienceRatingWrapper: DecimalSerialized<Double> {
|
||
return _audienceRating
|
||
}
|
||
var originallyAvailableAtWrapper: DateOnly<Date> {
|
||
return _originallyAvailableAt
|
||
}
|
||
var userRatingWrapper: DecimalSerialized<Double?> {
|
||
return _userRating
|
||
}
|
||
}
|