mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-07 04:20:54 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.200.0
This commit is contained in:
214
Sources/Plexswift/models/operations/GetMetadataMetadata.swift
Normal file
214
Sources/Plexswift/models/operations/GetMetadataMetadata.swift
Normal file
@@ -0,0 +1,214 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetMetadataMetadata {
|
||||
public let addedAt: Int?
|
||||
public let art: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var audienceRating: Double?
|
||||
public let audienceRatingImage: String?
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.GetMetadataCountry]?
|
||||
public let director: [Operations.GetMetadataDirector]?
|
||||
public let duration: Int?
|
||||
public let genre: [Operations.GetMetadataGenre]?
|
||||
public let guid: String?
|
||||
public let guids: [Operations.Guids]?
|
||||
public let hasPremiumPrimaryExtra: String?
|
||||
public let key: String?
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let media: [Operations.GetMetadataMedia]?
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let producer: [Operations.Producer]?
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
public let ratingImage: String?
|
||||
public let ratingKey: String?
|
||||
public let ratings: [Operations.Ratings]?
|
||||
public let role: [Operations.GetMetadataRole]?
|
||||
public let studio: String?
|
||||
public let summary: String?
|
||||
public let tagline: String?
|
||||
public let thumb: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
public let writer: [Operations.GetMetadataWriter]?
|
||||
public let year: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, contentRating: String? = nil, country: [Operations.GetMetadataCountry]? = nil, director: [Operations.GetMetadataDirector]? = nil, duration: Int? = nil, genre: [Operations.GetMetadataGenre]? = nil, guid: String? = nil, guids: [Operations.Guids]? = nil, hasPremiumPrimaryExtra: String? = nil, key: String? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetMetadataMedia]? = nil, originallyAvailableAt: Date? = nil, producer: [Operations.Producer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMetadataRole]? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, writer: [Operations.GetMetadataWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.contentRating = contentRating
|
||||
self.country = country
|
||||
self.director = director
|
||||
self.duration = duration
|
||||
self.genre = genre
|
||||
self.guid = guid
|
||||
self.guids = guids
|
||||
self.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra
|
||||
self.key = key
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.media = media
|
||||
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.producer = producer
|
||||
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
|
||||
self.ratingImage = ratingImage
|
||||
self.ratingKey = ratingKey
|
||||
self.ratings = ratings
|
||||
self.role = role
|
||||
self.studio = studio
|
||||
self.summary = summary
|
||||
self.tagline = tagline
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
self.writer = writer
|
||||
self.year = year
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetMetadataMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case art
|
||||
case audienceRating
|
||||
case audienceRatingImage
|
||||
case contentRating
|
||||
case country = "Country"
|
||||
case director = "Director"
|
||||
case duration
|
||||
case genre = "Genre"
|
||||
case guid
|
||||
case guids = "Guid"
|
||||
case hasPremiumPrimaryExtra
|
||||
case key
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case media = "Media"
|
||||
case originallyAvailableAt
|
||||
case producer = "Producer"
|
||||
case rating
|
||||
case ratingImage
|
||||
case ratingKey
|
||||
case ratings = "Rating"
|
||||
case role = "Role"
|
||||
case studio
|
||||
case summary
|
||||
case tagline
|
||||
case thumb
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
case writer = "Writer"
|
||||
case year
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt)
|
||||
self.art = try container.decodeIfPresent(String.self, forKey: .art)
|
||||
self._audienceRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .audienceRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.GetMetadataCountry].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.GetMetadataDirector].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.genre = try container.decodeIfPresent([Operations.GetMetadataGenre].self, forKey: .genre)
|
||||
self.guid = try container.decodeIfPresent(String.self, forKey: .guid)
|
||||
self.guids = try container.decodeIfPresent([Operations.Guids].self, forKey: .guids)
|
||||
self.hasPremiumPrimaryExtra = try container.decodeIfPresent(String.self, forKey: .hasPremiumPrimaryExtra)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.media = try container.decodeIfPresent([Operations.GetMetadataMedia].self, forKey: .media)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer)
|
||||
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey)
|
||||
self.ratings = try container.decodeIfPresent([Operations.Ratings].self, forKey: .ratings)
|
||||
self.role = try container.decodeIfPresent([Operations.GetMetadataRole].self, forKey: .role)
|
||||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||
self.summary = try container.decodeIfPresent(String.self, forKey: .summary)
|
||||
self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline)
|
||||
self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
self.type = try container.decodeIfPresent(String.self, forKey: .type)
|
||||
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||||
self.writer = try container.decodeIfPresent([Operations.GetMetadataWriter].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.encodeIfPresent(self.addedAt, forKey: .addedAt)
|
||||
try container.encodeIfPresent(self.art, forKey: .art)
|
||||
if self.audienceRating != nil {
|
||||
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||||
}
|
||||
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.director, forKey: .director)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||
try container.encodeIfPresent(self.guid, forKey: .guid)
|
||||
try container.encodeIfPresent(self.guids, forKey: .guids)
|
||||
try container.encodeIfPresent(self.hasPremiumPrimaryExtra, forKey: .hasPremiumPrimaryExtra)
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
try container.encodeIfPresent(self.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.producer, forKey: .producer)
|
||||
if self.rating != nil {
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
}
|
||||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||||
try container.encodeIfPresent(self.ratingKey, forKey: .ratingKey)
|
||||
try container.encodeIfPresent(self.ratings, forKey: .ratings)
|
||||
try container.encodeIfPresent(self.role, forKey: .role)
|
||||
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||||
try container.encodeIfPresent(self.summary, forKey: .summary)
|
||||
try container.encodeIfPresent(self.tagline, forKey: .tagline)
|
||||
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.type, forKey: .type)
|
||||
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||||
try container.encodeIfPresent(self.year, forKey: .year)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetMetadataMetadata {
|
||||
var ratingWrapper: DecimalSerialized<Double?> {
|
||||
return _rating
|
||||
}
|
||||
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||
return _audienceRating
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateOnly<Date?> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user