// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetOnDeckPart { public let audioProfile: String? public let container: String? @DecimalSerialized public private(set) var duration: Double? public let file: String? @DecimalSerialized public private(set) var id: Double? public let key: String? @DecimalSerialized public private(set) var size: Double? public let stream: [Operations.GetOnDeckStream]? public let videoProfile: String? /// Creates an object with the specified parameters /// /// public init(audioProfile: String? = nil, container: String? = nil, duration: Double? = nil, file: String? = nil, id: Double? = nil, key: String? = nil, size: Double? = nil, stream: [Operations.GetOnDeckStream]? = nil, videoProfile: String? = nil) { self.audioProfile = audioProfile self.container = container self._duration = DecimalSerialized(wrappedValue: duration) self.file = file self._id = DecimalSerialized(wrappedValue: id) self.key = key self._size = DecimalSerialized(wrappedValue: size) self.stream = stream self.videoProfile = videoProfile } }} extension Operations.GetOnDeckPart: Codable { enum CodingKeys: String, CodingKey { case audioProfile case container case duration case file case id case key case size case stream = "Stream" case videoProfile } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile) self.container = try container.decodeIfPresent(String.self, forKey: .container) self._duration = try container.decodeIfPresent(DecimalSerialized.self, forKey: .duration) ?? DecimalSerialized(wrappedValue: nil) self.file = try container.decodeIfPresent(String.self, forKey: .file) self._id = try container.decodeIfPresent(DecimalSerialized.self, forKey: .id) ?? DecimalSerialized(wrappedValue: nil) self.key = try container.decodeIfPresent(String.self, forKey: .key) self._size = try container.decodeIfPresent(DecimalSerialized.self, forKey: .size) ?? DecimalSerialized(wrappedValue: nil) self.stream = try container.decodeIfPresent([Operations.GetOnDeckStream].self, forKey: .stream) self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile) try container.encodeIfPresent(self.container, forKey: .container) if self.duration != nil { try container.encode(self._duration, forKey: .duration) } try container.encodeIfPresent(self.file, forKey: .file) if self.id != nil { try container.encode(self._id, forKey: .id) } try container.encodeIfPresent(self.key, forKey: .key) if self.size != nil { try container.encode(self._size, forKey: .size) } try container.encodeIfPresent(self.stream, forKey: .stream) try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile) } } extension Operations.GetOnDeckPart { var idWrapper: DecimalSerialized { return _id } var durationWrapper: DecimalSerialized { return _duration } var sizeWrapper: DecimalSerialized { return _size } }