mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 20:57:46 +00:00
42 lines
1.2 KiB
Swift
42 lines
1.2 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
extension Operations {
|
|
/// A response model
|
|
public enum GetHomeDataResponse {
|
|
case empty
|
|
case badRequest(Operations.GetHomeDataBadRequest)
|
|
case object(Operations.GetHomeDataResponseBody)
|
|
case unauthorized(Operations.GetHomeDataUnauthorized)
|
|
|
|
var isEmpty: Bool {
|
|
if case .empty = self {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
|
|
public func badRequest() throws -> Operations.GetHomeDataBadRequest {
|
|
guard case .badRequest(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
|
|
public func object() throws -> Operations.GetHomeDataResponseBody {
|
|
guard case .object(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
|
|
public func unauthorized() throws -> Operations.GetHomeDataUnauthorized {
|
|
guard case .unauthorized(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
}}
|