mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +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 GetSessionsResponse {
|
|
case empty
|
|
case badRequest(Operations.GetSessionsBadRequest)
|
|
case object(Operations.GetSessionsResponseBody)
|
|
case unauthorized(Operations.GetSessionsUnauthorized)
|
|
|
|
var isEmpty: Bool {
|
|
if case .empty = self {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
|
|
public func badRequest() throws -> Operations.GetSessionsBadRequest {
|
|
guard case .badRequest(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
|
|
public func object() throws -> Operations.GetSessionsResponseBody {
|
|
guard case .object(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
|
|
public func unauthorized() throws -> Operations.GetSessionsUnauthorized {
|
|
guard case .unauthorized(let value) = self else {
|
|
throw PlexswiftError.missingResponseData
|
|
}
|
|
return value
|
|
}
|
|
}}
|