// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetActorsLibraryMediaContainer { /// Indicates whether syncing is allowed. public let allowSync: Bool /// URL for the background artwork of the media container. public let art: String /// An plugin identifier for the media container. public let identifier: String /// The prefix used for media tag resource paths. public let mediaTagPrefix: String /// The version number for media tags. public let mediaTagVersion: Int /// Specifies whether caching is disabled. public let nocache: Bool @DecimalSerialized public private(set) var size: Double /// URL for the thumbnail image of the media container. public let thumb: String /// The primary title of the media container. public let title1: String /// The secondary title of the media container. public let title2: String /// Identifier for the view group layout. public let viewGroup: String /// Identifier for the view mode. public let viewMode: String /// An array of actor entries for media items. public let directory: [Operations.GetActorsLibraryDirectory]? /// Creates an object with the specified parameters /// /// - Parameter allowSync: Indicates whether syncing is allowed. /// - Parameter art: URL for the background artwork of the media container. /// - Parameter identifier: An plugin identifier for the media container. /// - Parameter mediaTagPrefix: The prefix used for media tag resource paths. /// - Parameter mediaTagVersion: The version number for media tags. /// - Parameter nocache: Specifies whether caching is disabled. /// - Parameter thumb: URL for the thumbnail image of the media container. /// - Parameter title1: The primary title of the media container. /// - Parameter title2: The secondary title of the media container. /// - Parameter viewGroup: Identifier for the view group layout. /// - Parameter viewMode: Identifier for the view mode. /// - Parameter directory: An array of actor entries for media items. /// public init(allowSync: Bool, art: String, identifier: String, mediaTagPrefix: String, mediaTagVersion: Int, nocache: Bool, size: Double, thumb: String, title1: String, title2: String, viewGroup: String, viewMode: String, directory: [Operations.GetActorsLibraryDirectory]? = nil) { self.allowSync = allowSync self.art = art self.identifier = identifier self.mediaTagPrefix = mediaTagPrefix self.mediaTagVersion = mediaTagVersion self.nocache = nocache self._size = DecimalSerialized(wrappedValue: size) self.thumb = thumb self.title1 = title1 self.title2 = title2 self.viewGroup = viewGroup self.viewMode = viewMode self.directory = directory } }} extension Operations.GetActorsLibraryMediaContainer: Codable { enum CodingKeys: String, CodingKey { case allowSync case art case identifier case mediaTagPrefix case mediaTagVersion case nocache case size case thumb case title1 case title2 case viewGroup case viewMode case directory = "Directory" } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.allowSync = try container.decode(Bool.self, forKey: .allowSync) self.art = try container.decode(String.self, forKey: .art) self.identifier = try container.decode(String.self, forKey: .identifier) self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix) self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion) self.nocache = try container.decode(Bool.self, forKey: .nocache) self._size = try container.decode(DecimalSerialized.self, forKey: .size) self.thumb = try container.decode(String.self, forKey: .thumb) self.title1 = try container.decode(String.self, forKey: .title1) self.title2 = try container.decode(String.self, forKey: .title2) self.viewGroup = try container.decode(String.self, forKey: .viewGroup) self.viewMode = try container.decode(String.self, forKey: .viewMode) self.directory = try container.decodeIfPresent([Operations.GetActorsLibraryDirectory].self, forKey: .directory) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(self.allowSync, forKey: .allowSync) try container.encode(self.art, forKey: .art) try container.encode(self.identifier, forKey: .identifier) try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix) try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion) try container.encode(self.nocache, forKey: .nocache) try container.encode(self._size, forKey: .size) try container.encode(self.thumb, forKey: .thumb) try container.encode(self.title1, forKey: .title1) try container.encode(self.title2, forKey: .title2) try container.encode(self.viewGroup, forKey: .viewGroup) try container.encode(self.viewMode, forKey: .viewMode) try container.encodeIfPresent(self.directory, forKey: .directory) } } extension Operations.GetActorsLibraryMediaContainer { var sizeWrapper: DecimalSerialized { return _size } }