mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
110 lines
4.8 KiB
Swift
110 lines
4.8 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
extension Operations {
|
|
/// A model object
|
|
public struct GetCountriesLibraryMediaContainer {
|
|
public let allowSync: Bool
|
|
public let art: String
|
|
public let content: String
|
|
public let identifier: String
|
|
public let mediaTagPrefix: String
|
|
public let mediaTagVersion: Int
|
|
public let nocache: Bool
|
|
@DecimalSerialized
|
|
public private(set) var size: Double
|
|
public let thumb: String
|
|
public let title1: String
|
|
public let title2: String
|
|
public let viewGroup: String
|
|
public let directory: [Operations.GetCountriesLibraryDirectory]?
|
|
public let offset: Int?
|
|
public let totalSize: Int?
|
|
|
|
/// Creates an object with the specified parameters
|
|
///
|
|
///
|
|
public init(allowSync: Bool, art: String, content: String, identifier: String, mediaTagPrefix: String, mediaTagVersion: Int, nocache: Bool, size: Double, thumb: String, title1: String, title2: String, viewGroup: String, directory: [Operations.GetCountriesLibraryDirectory]? = nil, offset: Int? = nil, totalSize: Int? = nil) {
|
|
self.allowSync = allowSync
|
|
self.art = art
|
|
self.content = content
|
|
self.identifier = identifier
|
|
self.mediaTagPrefix = mediaTagPrefix
|
|
self.mediaTagVersion = mediaTagVersion
|
|
self.nocache = nocache
|
|
self._size = DecimalSerialized<Double>(wrappedValue: size)
|
|
self.thumb = thumb
|
|
self.title1 = title1
|
|
self.title2 = title2
|
|
self.viewGroup = viewGroup
|
|
self.directory = directory
|
|
self.offset = offset
|
|
self.totalSize = totalSize
|
|
}
|
|
}}
|
|
|
|
extension Operations.GetCountriesLibraryMediaContainer: Codable {
|
|
enum CodingKeys: String, CodingKey {
|
|
case allowSync
|
|
case art
|
|
case content
|
|
case identifier
|
|
case mediaTagPrefix
|
|
case mediaTagVersion
|
|
case nocache
|
|
case size
|
|
case thumb
|
|
case title1
|
|
case title2
|
|
case viewGroup
|
|
case directory = "Directory"
|
|
case offset
|
|
case totalSize
|
|
}
|
|
|
|
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.content = try container.decode(String.self, forKey: .content)
|
|
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<Double>.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.directory = try container.decodeIfPresent([Operations.GetCountriesLibraryDirectory].self, forKey: .directory)
|
|
self.offset = try container.decodeIfPresent(Int.self, forKey: .offset)
|
|
self.totalSize = try container.decodeIfPresent(Int.self, forKey: .totalSize)
|
|
}
|
|
|
|
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.content, forKey: .content)
|
|
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.encodeIfPresent(self.directory, forKey: .directory)
|
|
try container.encodeIfPresent(self.offset, forKey: .offset)
|
|
try container.encodeIfPresent(self.totalSize, forKey: .totalSize)
|
|
}
|
|
}
|
|
|
|
extension Operations.GetCountriesLibraryMediaContainer {
|
|
var sizeWrapper: DecimalSerialized<Double> {
|
|
return _size
|
|
}
|
|
}
|