Files
plexswift/Sources/Plexswift/models/operations/GetPinResponse.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 GetPinResponse {
case empty
case twoHundredApplicationJsonObject(Operations.GetPinResponseBody)
case fourHundredApplicationJsonObject(Operations.GetPinPlexResponseBody)
var isEmpty: Bool {
if case .empty = self {
return true
} else {
return false
}
}
public func twoHundredApplicationJsonObject() throws -> Operations.GetPinResponseBody {
guard case .twoHundredApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
public func fourHundredApplicationJsonObject() throws -> Operations.GetPinPlexResponseBody {
guard case .fourHundredApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
}
}