// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetDevicesMediaContainer { public let device: [Operations.Device]? public let identifier: String? @DecimalSerialized public private(set) var size: Double? /// Creates an object with the specified parameters /// /// public init(device: [Operations.Device]? = nil, identifier: String? = nil, size: Double? = nil) { self.device = device self.identifier = identifier self._size = DecimalSerialized(wrappedValue: size) } } } extension Operations.GetDevicesMediaContainer: Codable { enum CodingKeys: String, CodingKey { case device = "Device" case identifier case size } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.device = try container.decodeIfPresent([Operations.Device].self, forKey: .device) self.identifier = try container.decodeIfPresent(String.self, forKey: .identifier) self._size = try container.decodeIfPresent(DecimalSerialized.self, forKey: .size) ?? DecimalSerialized(wrappedValue: nil) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(self.device, forKey: .device) try container.encodeIfPresent(self.identifier, forKey: .identifier) if self.size != nil { try container.encode(self._size, forKey: .size) } } } extension Operations.GetDevicesMediaContainer { var sizeWrapper: DecimalSerialized { return _size } }