mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
extension Operations {
|
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
|
public enum GetAllMediaLibraryLibraryOptimizedForStreaming {
|
|
case getAllMediaLibraryLibrary1(Operations.GetAllMediaLibraryLibrary1)
|
|
case bool(Bool)
|
|
}}
|
|
|
|
extension Operations.GetAllMediaLibraryLibraryOptimizedForStreaming: Codable {
|
|
public init(from decoder: Decoder) throws {
|
|
if let value = try? Operations.GetAllMediaLibraryLibrary1(from: decoder) {
|
|
self = .getAllMediaLibraryLibrary1(value)
|
|
} else if let value = try? Bool(from: decoder) {
|
|
self = .bool(value)
|
|
} else {
|
|
throw PlexswiftError.failedToHandleResponse(.failedToDecodeResponse)
|
|
}
|
|
}
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
switch self {
|
|
case .getAllMediaLibraryLibrary1(let value):
|
|
try value.encode(to: encoder)
|
|
case .bool(let value):
|
|
try value.encode(to: encoder)
|
|
}
|
|
}
|
|
}
|
|
|