mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
34 lines
974 B
Swift
34 lines
974 B
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
extension Operations {
|
|
/// A response model
|
|
public enum StartTaskResponse {
|
|
case empty
|
|
case badRequest(Operations.StartTaskBadRequest)
|
|
case unauthorized(Operations.StartTaskUnauthorized)
|
|
|
|
var isEmpty: Bool {
|
|
if case .empty = self {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
|
|
public func badRequest() throws -> Operations.StartTaskBadRequest {
|
|
guard case .badRequest(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
|
|
public func unauthorized() throws -> Operations.StartTaskUnauthorized {
|
|
guard case .unauthorized(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
}}
|