mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 04:20:52 +00:00
96 lines
4.6 KiB
Swift
96 lines
4.6 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
extension Operations {
|
|
/// A model object
|
|
public struct GetMediaMetaDataMediaContainer {
|
|
/// Indicates whether syncing is allowed.
|
|
public let allowSync: Bool
|
|
/// An plugin identifier for the media container.
|
|
public let identifier: String
|
|
/// The unique identifier for the library section.
|
|
public let librarySectionID: Int
|
|
/// The title of the library section.
|
|
public let librarySectionTitle: String
|
|
/// The prefix used for media tag resource paths.
|
|
public let mediaTagPrefix: String
|
|
/// The version number for media tags.
|
|
public let mediaTagVersion: Int
|
|
/// An array of metadata items.
|
|
public let metadata: [Operations.GetMediaMetaDataMetadata]
|
|
@DecimalSerialized
|
|
public private(set) var size: Double
|
|
/// The universally unique identifier for the library section.
|
|
public let librarySectionUUID: String?
|
|
|
|
/// Creates an object with the specified parameters
|
|
///
|
|
/// - Parameter allowSync: Indicates whether syncing is allowed.
|
|
/// - Parameter identifier: An plugin identifier for the media container.
|
|
/// - Parameter librarySectionID: The unique identifier for the library section.
|
|
/// - Parameter librarySectionTitle: The title of the library section.
|
|
/// - Parameter mediaTagPrefix: The prefix used for media tag resource paths.
|
|
/// - Parameter mediaTagVersion: The version number for media tags.
|
|
/// - Parameter metadata: An array of metadata items.
|
|
/// - Parameter librarySectionUUID: The universally unique identifier for the library section.
|
|
///
|
|
public init(allowSync: Bool, identifier: String, librarySectionID: Int, librarySectionTitle: String, mediaTagPrefix: String, mediaTagVersion: Int, metadata: [Operations.GetMediaMetaDataMetadata], size: Double, librarySectionUUID: String? = nil) {
|
|
self.allowSync = allowSync
|
|
self.identifier = identifier
|
|
self.librarySectionID = librarySectionID
|
|
self.librarySectionTitle = librarySectionTitle
|
|
self.mediaTagPrefix = mediaTagPrefix
|
|
self.mediaTagVersion = mediaTagVersion
|
|
self.metadata = metadata
|
|
self._size = DecimalSerialized<Double>(wrappedValue: size)
|
|
self.librarySectionUUID = librarySectionUUID
|
|
}
|
|
}}
|
|
|
|
extension Operations.GetMediaMetaDataMediaContainer: Codable {
|
|
enum CodingKeys: String, CodingKey {
|
|
case allowSync
|
|
case identifier
|
|
case librarySectionID
|
|
case librarySectionTitle
|
|
case mediaTagPrefix
|
|
case mediaTagVersion
|
|
case metadata = "Metadata"
|
|
case size
|
|
case librarySectionUUID
|
|
}
|
|
|
|
public init(from decoder: Decoder) throws {
|
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
|
self.allowSync = try container.decode(Bool.self, forKey: .allowSync)
|
|
self.identifier = try container.decode(String.self, forKey: .identifier)
|
|
self.librarySectionID = try container.decode(Int.self, forKey: .librarySectionID)
|
|
self.librarySectionTitle = try container.decode(String.self, forKey: .librarySectionTitle)
|
|
self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix)
|
|
self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion)
|
|
self.metadata = try container.decode([Operations.GetMediaMetaDataMetadata].self, forKey: .metadata)
|
|
self._size = try container.decode(DecimalSerialized<Double>.self, forKey: .size)
|
|
self.librarySectionUUID = try container.decodeIfPresent(String.self, forKey: .librarySectionUUID)
|
|
}
|
|
|
|
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.identifier, forKey: .identifier)
|
|
try container.encode(self.librarySectionID, forKey: .librarySectionID)
|
|
try container.encode(self.librarySectionTitle, forKey: .librarySectionTitle)
|
|
try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix)
|
|
try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion)
|
|
try container.encode(self.metadata, forKey: .metadata)
|
|
try container.encode(self._size, forKey: .size)
|
|
try container.encodeIfPresent(self.librarySectionUUID, forKey: .librarySectionUUID)
|
|
}
|
|
}
|
|
|
|
extension Operations.GetMediaMetaDataMediaContainer {
|
|
var sizeWrapper: DecimalSerialized<Double> {
|
|
return _size
|
|
}
|
|
}
|