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:
245
Sources/Plexswift/models/operations/Metadata.swift
Normal file
245
Sources/Plexswift/models/operations/Metadata.swift
Normal file
@@ -0,0 +1,245 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Metadata {
|
||||
@DecimalSerialized
|
||||
public private(set) var addedAt: Double?
|
||||
public let allowSync: Bool?
|
||||
public let art: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var audienceRating: Double?
|
||||
public let audienceRatingImage: String?
|
||||
public let chapterSource: String?
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.Country]?
|
||||
public let director: [Operations.Director]?
|
||||
@DecimalSerialized
|
||||
public private(set) var duration: Double?
|
||||
public let genre: [Operations.Genre]?
|
||||
public let guid: String?
|
||||
public let key: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var librarySectionID: Double?
|
||||
public let librarySectionTitle: String?
|
||||
public let librarySectionUUID: String?
|
||||
public let media: [Operations.Media]?
|
||||
@DateTime
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let primaryExtraKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
public let ratingImage: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var ratingKey: Double?
|
||||
public let role: [Operations.Role]?
|
||||
public let studio: String?
|
||||
public let summary: String?
|
||||
public let tagline: String?
|
||||
public let thumb: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var updatedAt: Double?
|
||||
public let writer: [Operations.Writer]?
|
||||
@DecimalSerialized
|
||||
public private(set) var year: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Double? = nil, allowSync: Bool? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, contentRating: String? = nil, country: [Operations.Country]? = nil, director: [Operations.Director]? = nil, duration: Double? = nil, genre: [Operations.Genre]? = nil, guid: String? = nil, key: String? = nil, librarySectionID: Double? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, media: [Operations.Media]? = nil, originallyAvailableAt: Date? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: Double? = nil, role: [Operations.Role]? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Double? = nil, writer: [Operations.Writer]? = nil, year: Double? = nil) {
|
||||
self._addedAt = DecimalSerialized<Double?>(wrappedValue: addedAt)
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.chapterSource = chapterSource
|
||||
self.contentRating = contentRating
|
||||
self.country = country
|
||||
self.director = director
|
||||
self._duration = DecimalSerialized<Double?>(wrappedValue: duration)
|
||||
self.genre = genre
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self._librarySectionID = DecimalSerialized<Double?>(wrappedValue: librarySectionID)
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.librarySectionUUID = librarySectionUUID
|
||||
self.media = media
|
||||
self._originallyAvailableAt = DateTime<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.primaryExtraKey = primaryExtraKey
|
||||
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
|
||||
self.ratingImage = ratingImage
|
||||
self._ratingKey = DecimalSerialized<Double?>(wrappedValue: ratingKey)
|
||||
self.role = role
|
||||
self.studio = studio
|
||||
self.summary = summary
|
||||
self.tagline = tagline
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.type = type
|
||||
self._updatedAt = DecimalSerialized<Double?>(wrappedValue: updatedAt)
|
||||
self.writer = writer
|
||||
self._year = DecimalSerialized<Double?>(wrappedValue: year)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Metadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case allowSync
|
||||
case art
|
||||
case audienceRating
|
||||
case audienceRatingImage
|
||||
case chapterSource
|
||||
case contentRating
|
||||
case country = "Country"
|
||||
case director = "Director"
|
||||
case duration
|
||||
case genre = "Genre"
|
||||
case guid
|
||||
case key
|
||||
case librarySectionID
|
||||
case librarySectionTitle
|
||||
case librarySectionUUID
|
||||
case media = "Media"
|
||||
case originallyAvailableAt
|
||||
case primaryExtraKey
|
||||
case rating
|
||||
case ratingImage
|
||||
case ratingKey
|
||||
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(DecimalSerialized<Double?>.self, forKey: .addedAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.allowSync = try container.decodeIfPresent(Bool.self, forKey: .allowSync)
|
||||
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.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.Country].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.Director].self, forKey: .director)
|
||||
self._duration = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .duration) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.genre = try container.decodeIfPresent([Operations.Genre].self, forKey: .genre)
|
||||
self.guid = try container.decodeIfPresent(String.self, forKey: .guid)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self._librarySectionID = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .librarySectionID) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.librarySectionUUID = try container.decodeIfPresent(String.self, forKey: .librarySectionUUID)
|
||||
self.media = try container.decodeIfPresent([Operations.Media].self, forKey: .media)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateTime<Date?>.self, forKey: .originallyAvailableAt) ?? DateTime<Date?>(wrappedValue: nil)
|
||||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||||
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(DecimalSerialized<Double?>.self, forKey: .ratingKey) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.role = try container.decodeIfPresent([Operations.Role].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(DecimalSerialized<Double?>.self, forKey: .updatedAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.writer = try container.decodeIfPresent([Operations.Writer].self, forKey: .writer)
|
||||
self._year = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .year) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.addedAt != nil {
|
||||
try container.encode(self._addedAt, forKey: .addedAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.allowSync, forKey: .allowSync)
|
||||
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.chapterSource, forKey: .chapterSource)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.director, forKey: .director)
|
||||
if self.duration != nil {
|
||||
try container.encode(self._duration, forKey: .duration)
|
||||
}
|
||||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||
try container.encodeIfPresent(self.guid, forKey: .guid)
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
if self.librarySectionID != nil {
|
||||
try container.encode(self._librarySectionID, forKey: .librarySectionID)
|
||||
}
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.librarySectionUUID, forKey: .librarySectionUUID)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey)
|
||||
if self.rating != nil {
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
}
|
||||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||||
if self.ratingKey != nil {
|
||||
try container.encode(self._ratingKey, forKey: .ratingKey)
|
||||
}
|
||||
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)
|
||||
if self.updatedAt != nil {
|
||||
try container.encode(self._updatedAt, forKey: .updatedAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||||
if self.year != nil {
|
||||
try container.encode(self._year, forKey: .year)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Metadata {
|
||||
var librarySectionIDWrapper: DecimalSerialized<Double?> {
|
||||
return _librarySectionID
|
||||
}
|
||||
var ratingKeyWrapper: DecimalSerialized<Double?> {
|
||||
return _ratingKey
|
||||
}
|
||||
var ratingWrapper: DecimalSerialized<Double?> {
|
||||
return _rating
|
||||
}
|
||||
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||
return _audienceRating
|
||||
}
|
||||
var yearWrapper: DecimalSerialized<Double?> {
|
||||
return _year
|
||||
}
|
||||
var durationWrapper: DecimalSerialized<Double?> {
|
||||
return _duration
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateTime<Date?> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
var addedAtWrapper: DecimalSerialized<Double?> {
|
||||
return _addedAt
|
||||
}
|
||||
var updatedAtWrapper: DecimalSerialized<Double?> {
|
||||
return _updatedAt
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user