mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0
This commit is contained in:
@@ -5,120 +5,122 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsMedia {
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double
|
||||
public let audioChannels: Int
|
||||
public let audioCodec: String
|
||||
public let bitrate: Int
|
||||
public let container: String
|
||||
public let duration: Int
|
||||
public let height: Int
|
||||
public let id: Int
|
||||
public let part: [Operations.GetLibraryItemsPart]
|
||||
public let videoCodec: String
|
||||
public let videoFrameRate: String
|
||||
public let videoProfile: String
|
||||
public let videoResolution: String
|
||||
public let width: Int
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
public let bitrate: Int?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasVoiceActivity: Bool?
|
||||
public let height: Int?
|
||||
public let optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(aspectRatio: Double, audioChannels: Int, audioCodec: String, bitrate: Int, container: String, duration: Int, height: Int, id: Int, part: [Operations.GetLibraryItemsPart], videoCodec: String, videoFrameRate: String, videoProfile: String, videoResolution: String, width: Int, audioProfile: String? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.bitrate = bitrate
|
||||
public init(container: String, id: Int, part: [Operations.GetLibraryItemsPart], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.height = height
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
self.audioProfile = audioProfile
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case id
|
||||
case part = "Part"
|
||||
case optimizedForStreaming
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
case audioProfile
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case optimizedForStreaming
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._aspectRatio = try container.decode(DecimalSerialized<Double>.self, forKey: .aspectRatio)
|
||||
self.audioChannels = try container.decode(Int.self, forKey: .audioChannels)
|
||||
self.audioCodec = try container.decode(String.self, forKey: .audioCodec)
|
||||
self.bitrate = try container.decode(Int.self, forKey: .bitrate)
|
||||
self.container = try container.decode(String.self, forKey: .container)
|
||||
self.duration = try container.decode(Int.self, forKey: .duration)
|
||||
self.height = try container.decode(Int.self, forKey: .height)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.GetLibraryItemsPart].self, forKey: .part)
|
||||
self.videoCodec = try container.decode(String.self, forKey: .videoCodec)
|
||||
self.videoFrameRate = try container.decode(String.self, forKey: .videoFrameRate)
|
||||
self.videoProfile = try container.decode(String.self, forKey: .videoProfile)
|
||||
self.videoResolution = try container.decode(String.self, forKey: .videoResolution)
|
||||
self.width = try container.decode(Int.self, forKey: .width)
|
||||
self._aspectRatio = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .aspectRatio) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audioChannels = try container.decodeIfPresent(Int.self, forKey: .audioChannels)
|
||||
self.audioCodec = try container.decodeIfPresent(String.self, forKey: .audioCodec)
|
||||
self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.GetLibraryItemsOptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
self.videoCodec = try container.decodeIfPresent(String.self, forKey: .videoCodec)
|
||||
self.videoFrameRate = try container.decodeIfPresent(String.self, forKey: .videoFrameRate)
|
||||
self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile)
|
||||
self.videoResolution = try container.decodeIfPresent(String.self, forKey: .videoResolution)
|
||||
self.width = try container.decodeIfPresent(Int.self, forKey: .width)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
try container.encode(self.audioChannels, forKey: .audioChannels)
|
||||
try container.encode(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encode(self.bitrate, forKey: .bitrate)
|
||||
try container.encode(self.container, forKey: .container)
|
||||
try container.encode(self.duration, forKey: .duration)
|
||||
try container.encode(self.height, forKey: .height)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
try container.encode(self.videoCodec, forKey: .videoCodec)
|
||||
try container.encode(self.videoFrameRate, forKey: .videoFrameRate)
|
||||
try container.encode(self.videoProfile, forKey: .videoProfile)
|
||||
try container.encode(self.videoResolution, forKey: .videoResolution)
|
||||
try container.encode(self.width, forKey: .width)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
try container.encodeIfPresent(self.audioChannels, forKey: .audioChannels)
|
||||
try container.encodeIfPresent(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming)
|
||||
try container.encodeIfPresent(self.videoCodec, forKey: .videoCodec)
|
||||
try container.encodeIfPresent(self.videoFrameRate, forKey: .videoFrameRate)
|
||||
try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile)
|
||||
try container.encodeIfPresent(self.videoResolution, forKey: .videoResolution)
|
||||
try container.encodeIfPresent(self.width, forKey: .width)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryItemsMedia {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double> {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user