Files
plexswift/Sources/Plexswift/models/operations/GetMediaMetaDataStream.swift

370 lines
20 KiB
Swift

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetMediaMetaDataStream {
/// Codec used by the stream.
public let codec: String
/// Display title for the stream.
public let displayTitle: String
/// Extended display title for the stream.
public let extendedDisplayTitle: String
/// Unique stream identifier.
public let id: Int
/// Index of the stream.
public let index: Int
/// Stream type (1=video, 2=audio, 3=subtitle).
public let streamType: Int
/// Audio channel layout.
public let audioChannelLayout: String?
/// Bit depth of the video stream.
public let bitDepth: Int?
/// Bitrate of the stream.
public let bitrate: Int?
/// Indicates if the stream can auto-sync.
public let canAutoSync: Bool?
/// Number of audio channels (for audio streams).
public let channels: Int?
/// Chroma sample location.
public let chromaLocation: String?
/// Chroma subsampling format.
public let chromaSubsampling: String?
public let closedCaptions: Bool?
/// Coded video height.
public let codedHeight: Int?
/// Coded video width.
public let codedWidth: Int?
/// Color primaries used.
public let colorPrimaries: String?
/// Color range (e.g., tv).
public let colorRange: String?
/// Color space.
public let colorSpace: String?
/// Color transfer characteristics.
public let colorTrc: String?
/// Indicates if this stream is default.
public let `default`: Bool?
/// Dolby Vision BL compatibility ID.
public let doviblCompatID: Int?
/// Indicates if Dolby Vision BL is present.
public let doviblPresent: Bool?
/// Indicates if Dolby Vision EL is present.
public let dovielPresent: Bool?
/// Dolby Vision level.
public let doviLevel: Int?
/// Indicates if Dolby Vision is present.
public let doviPresent: Bool?
/// Dolby Vision profile.
public let doviProfile: Int?
/// Indicates if Dolby Vision RPU is present.
public let dovirpuPresent: Bool?
/// Dolby Vision version.
public let doviVersion: String?
/// Indicates if the stream is a dub.
public let dub: Bool?
public let embeddedInVideo: String?
public let forced: Bool?
/// Frame rate of the stream.
@DecimalSerialized
public private(set) var frameRate: Double?
public let hasScalingMatrix: Bool?
/// Indicates whether header compression is enabled.
public let headerCompression: Bool?
/// Indicates if the stream is for the hearing impaired.
public let hearingImpaired: Bool?
/// Height of the video stream.
public let height: Int?
/// Language of the stream.
public let language: String?
/// ISO language code.
public let languageCode: String?
/// Language tag (e.g., en).
public let languageTag: String?
/// Video level.
public let level: Int?
/// Indicates if this is the original stream.
public let original: Bool?
/// Video profile.
public let profile: String?
/// Number of reference frames.
public let refFrames: Int?
/// Sampling rate for the audio stream.
public let samplingRate: Int?
public let scanType: String?
/// Indicates if this stream is selected (applicable for audio streams).
public let selected: Bool?
/// Optional title for the stream (e.g., language variant).
public let title: String?
/// Width of the video stream.
public let width: Int?
/// Creates an object with the specified parameters
///
/// - Parameter codec: Codec used by the stream.
/// - Parameter displayTitle: Display title for the stream.
/// - Parameter extendedDisplayTitle: Extended display title for the stream.
/// - Parameter id: Unique stream identifier.
/// - Parameter index: Index of the stream.
/// - Parameter streamType: Stream type (1=video, 2=audio, 3=subtitle).
/// - Parameter audioChannelLayout: Audio channel layout.
/// - Parameter bitDepth: Bit depth of the video stream.
/// - Parameter bitrate: Bitrate of the stream.
/// - Parameter canAutoSync: Indicates if the stream can auto-sync.
/// - Parameter channels: Number of audio channels (for audio streams).
/// - Parameter chromaLocation: Chroma sample location.
/// - Parameter chromaSubsampling: Chroma subsampling format.
/// - Parameter codedHeight: Coded video height.
/// - Parameter codedWidth: Coded video width.
/// - Parameter colorPrimaries: Color primaries used.
/// - Parameter colorRange: Color range (e.g., tv).
/// - Parameter colorSpace: Color space.
/// - Parameter colorTrc: Color transfer characteristics.
/// - Parameter `default`: Indicates if this stream is default.
/// - Parameter doviblCompatID: Dolby Vision BL compatibility ID.
/// - Parameter doviblPresent: Indicates if Dolby Vision BL is present.
/// - Parameter dovielPresent: Indicates if Dolby Vision EL is present.
/// - Parameter doviLevel: Dolby Vision level.
/// - Parameter doviPresent: Indicates if Dolby Vision is present.
/// - Parameter doviProfile: Dolby Vision profile.
/// - Parameter dovirpuPresent: Indicates if Dolby Vision RPU is present.
/// - Parameter doviVersion: Dolby Vision version.
/// - Parameter dub: Indicates if the stream is a dub.
/// - Parameter frameRate: Frame rate of the stream.
/// - Parameter headerCompression: Indicates whether header compression is enabled.
/// - Parameter hearingImpaired: Indicates if the stream is for the hearing impaired.
/// - Parameter height: Height of the video stream.
/// - Parameter language: Language of the stream.
/// - Parameter languageCode: ISO language code.
/// - Parameter languageTag: Language tag (e.g., en).
/// - Parameter level: Video level.
/// - Parameter original: Indicates if this is the original stream.
/// - Parameter profile: Video profile.
/// - Parameter refFrames: Number of reference frames.
/// - Parameter samplingRate: Sampling rate for the audio stream.
/// - Parameter selected: Indicates if this stream is selected (applicable for audio streams).
/// - Parameter title: Optional title for the stream (e.g., language variant).
/// - Parameter width: Width of the video stream.
///
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, embeddedInVideo: String? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
self.codec = codec
self.displayTitle = displayTitle
self.extendedDisplayTitle = extendedDisplayTitle
self.id = id
self.index = index
self.streamType = streamType
self.audioChannelLayout = audioChannelLayout
self.bitDepth = bitDepth
self.bitrate = bitrate
self.canAutoSync = canAutoSync
self.channels = channels
self.chromaLocation = chromaLocation
self.chromaSubsampling = chromaSubsampling
self.closedCaptions = closedCaptions
self.codedHeight = codedHeight
self.codedWidth = codedWidth
self.colorPrimaries = colorPrimaries
self.colorRange = colorRange
self.colorSpace = colorSpace
self.colorTrc = colorTrc
self.`default` = `default`
self.doviblCompatID = doviblCompatID
self.doviblPresent = doviblPresent
self.dovielPresent = dovielPresent
self.doviLevel = doviLevel
self.doviPresent = doviPresent
self.doviProfile = doviProfile
self.dovirpuPresent = dovirpuPresent
self.doviVersion = doviVersion
self.dub = dub
self.embeddedInVideo = embeddedInVideo
self.forced = forced
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
self.hasScalingMatrix = hasScalingMatrix
self.headerCompression = headerCompression
self.hearingImpaired = hearingImpaired
self.height = height
self.language = language
self.languageCode = languageCode
self.languageTag = languageTag
self.level = level
self.original = original
self.profile = profile
self.refFrames = refFrames
self.samplingRate = samplingRate
self.scanType = scanType
self.selected = selected
self.title = title
self.width = width
}
}}
extension Operations.GetMediaMetaDataStream: Codable {
enum CodingKeys: String, CodingKey {
case codec
case displayTitle
case extendedDisplayTitle
case id
case index
case streamType
case audioChannelLayout
case bitDepth
case bitrate
case canAutoSync
case channels
case chromaLocation
case chromaSubsampling
case closedCaptions
case codedHeight
case codedWidth
case colorPrimaries
case colorRange
case colorSpace
case colorTrc
case `default` = "default"
case doviblCompatID = "DOVIBLCompatID"
case doviblPresent = "DOVIBLPresent"
case dovielPresent = "DOVIELPresent"
case doviLevel = "DOVILevel"
case doviPresent = "DOVIPresent"
case doviProfile = "DOVIProfile"
case dovirpuPresent = "DOVIRPUPresent"
case doviVersion = "DOVIVersion"
case dub
case embeddedInVideo
case forced
case frameRate
case hasScalingMatrix
case headerCompression
case hearingImpaired
case height
case language
case languageCode
case languageTag
case level
case original
case profile
case refFrames
case samplingRate
case scanType
case selected
case title
case width
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.codec = try container.decode(String.self, forKey: .codec)
self.displayTitle = try container.decode(String.self, forKey: .displayTitle)
self.extendedDisplayTitle = try container.decode(String.self, forKey: .extendedDisplayTitle)
self.id = try container.decode(Int.self, forKey: .id)
self.index = try container.decode(Int.self, forKey: .index)
self.streamType = try container.decode(Int.self, forKey: .streamType)
self.audioChannelLayout = try container.decodeIfPresent(String.self, forKey: .audioChannelLayout)
self.bitDepth = try container.decodeIfPresent(Int.self, forKey: .bitDepth)
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
self.canAutoSync = try container.decodeIfPresent(Bool.self, forKey: .canAutoSync)
self.channels = try container.decodeIfPresent(Int.self, forKey: .channels)
self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation)
self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling)
self.closedCaptions = try container.decodeIfPresent(Bool.self, forKey: .closedCaptions)
self.codedHeight = try container.decodeIfPresent(Int.self, forKey: .codedHeight)
self.codedWidth = try container.decodeIfPresent(Int.self, forKey: .codedWidth)
self.colorPrimaries = try container.decodeIfPresent(String.self, forKey: .colorPrimaries)
self.colorRange = try container.decodeIfPresent(String.self, forKey: .colorRange)
self.colorSpace = try container.decodeIfPresent(String.self, forKey: .colorSpace)
self.colorTrc = try container.decodeIfPresent(String.self, forKey: .colorTrc)
self.`default` = try container.decodeIfPresent(Bool.self, forKey: .`default`)
self.doviblCompatID = try container.decodeIfPresent(Int.self, forKey: .doviblCompatID)
self.doviblPresent = try container.decodeIfPresent(Bool.self, forKey: .doviblPresent)
self.dovielPresent = try container.decodeIfPresent(Bool.self, forKey: .dovielPresent)
self.doviLevel = try container.decodeIfPresent(Int.self, forKey: .doviLevel)
self.doviPresent = try container.decodeIfPresent(Bool.self, forKey: .doviPresent)
self.doviProfile = try container.decodeIfPresent(Int.self, forKey: .doviProfile)
self.dovirpuPresent = try container.decodeIfPresent(Bool.self, forKey: .dovirpuPresent)
self.doviVersion = try container.decodeIfPresent(String.self, forKey: .doviVersion)
self.dub = try container.decodeIfPresent(Bool.self, forKey: .dub)
self.embeddedInVideo = try container.decodeIfPresent(String.self, forKey: .embeddedInVideo)
self.forced = try container.decodeIfPresent(Bool.self, forKey: .forced)
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix)
self.headerCompression = try container.decodeIfPresent(Bool.self, forKey: .headerCompression)
self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired)
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
self.language = try container.decodeIfPresent(String.self, forKey: .language)
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
self.level = try container.decodeIfPresent(Int.self, forKey: .level)
self.original = try container.decodeIfPresent(Bool.self, forKey: .original)
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
self.refFrames = try container.decodeIfPresent(Int.self, forKey: .refFrames)
self.samplingRate = try container.decodeIfPresent(Int.self, forKey: .samplingRate)
self.scanType = try container.decodeIfPresent(String.self, forKey: .scanType)
self.selected = try container.decodeIfPresent(Bool.self, forKey: .selected)
self.title = try container.decodeIfPresent(String.self, forKey: .title)
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.codec, forKey: .codec)
try container.encode(self.displayTitle, forKey: .displayTitle)
try container.encode(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
try container.encode(self.id, forKey: .id)
try container.encode(self.index, forKey: .index)
try container.encode(self.streamType, forKey: .streamType)
try container.encodeIfPresent(self.audioChannelLayout, forKey: .audioChannelLayout)
try container.encodeIfPresent(self.bitDepth, forKey: .bitDepth)
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
try container.encodeIfPresent(self.canAutoSync, forKey: .canAutoSync)
try container.encodeIfPresent(self.channels, forKey: .channels)
try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation)
try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling)
try container.encodeIfPresent(self.closedCaptions, forKey: .closedCaptions)
try container.encodeIfPresent(self.codedHeight, forKey: .codedHeight)
try container.encodeIfPresent(self.codedWidth, forKey: .codedWidth)
try container.encodeIfPresent(self.colorPrimaries, forKey: .colorPrimaries)
try container.encodeIfPresent(self.colorRange, forKey: .colorRange)
try container.encodeIfPresent(self.colorSpace, forKey: .colorSpace)
try container.encodeIfPresent(self.colorTrc, forKey: .colorTrc)
try container.encodeIfPresent(self.`default`, forKey: .`default`)
try container.encodeIfPresent(self.doviblCompatID, forKey: .doviblCompatID)
try container.encodeIfPresent(self.doviblPresent, forKey: .doviblPresent)
try container.encodeIfPresent(self.dovielPresent, forKey: .dovielPresent)
try container.encodeIfPresent(self.doviLevel, forKey: .doviLevel)
try container.encodeIfPresent(self.doviPresent, forKey: .doviPresent)
try container.encodeIfPresent(self.doviProfile, forKey: .doviProfile)
try container.encodeIfPresent(self.dovirpuPresent, forKey: .dovirpuPresent)
try container.encodeIfPresent(self.doviVersion, forKey: .doviVersion)
try container.encodeIfPresent(self.dub, forKey: .dub)
try container.encodeIfPresent(self.embeddedInVideo, forKey: .embeddedInVideo)
try container.encodeIfPresent(self.forced, forKey: .forced)
if self.frameRate != nil {
try container.encode(self._frameRate, forKey: .frameRate)
}
try container.encodeIfPresent(self.hasScalingMatrix, forKey: .hasScalingMatrix)
try container.encodeIfPresent(self.headerCompression, forKey: .headerCompression)
try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired)
try container.encodeIfPresent(self.height, forKey: .height)
try container.encodeIfPresent(self.language, forKey: .language)
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
try container.encodeIfPresent(self.level, forKey: .level)
try container.encodeIfPresent(self.original, forKey: .original)
try container.encodeIfPresent(self.profile, forKey: .profile)
try container.encodeIfPresent(self.refFrames, forKey: .refFrames)
try container.encodeIfPresent(self.samplingRate, forKey: .samplingRate)
try container.encodeIfPresent(self.scanType, forKey: .scanType)
try container.encodeIfPresent(self.selected, forKey: .selected)
try container.encodeIfPresent(self.title, forKey: .title)
try container.encodeIfPresent(self.width, forKey: .width)
}
}
extension Operations.GetMediaMetaDataStream {
var frameRateWrapper: DecimalSerialized<Double?> {
return _frameRate
}
}