Files
plexswift/Sources/Plexswift/models/operations/GetTokenResponse.swift

35 lines
1.1 KiB
Swift

// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
import Foundation
extension Operations {
/// A response model
public enum GetTokenResponse {
case empty
case twoHundredApplicationJsonObject(Operations.GetTokenResponseBody)
case fourHundredApplicationJsonObject(Operations.GetTokenPlexResponseBody)
var isEmpty: Bool {
if case .empty = self {
return true
} else {
return false
}
}
public func twoHundredApplicationJsonObject() throws -> Operations.GetTokenResponseBody {
guard case .twoHundredApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
public func fourHundredApplicationJsonObject() throws -> Operations.GetTokenPlexResponseBody {
guard case .fourHundredApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
}
}