Files
plexswift/Sources/Plexswift/models/operations/GetLibraryResponse.swift
2024-04-11 11:10:38 -05:00

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 GetLibraryResponse {
case empty
case twoHundredApplicationJsonObject(Operations.GetLibraryResponseBody)
case fourHundredAndOneApplicationJsonObject(Operations.GetLibraryLibraryResponseBody)
var isEmpty: Bool {
if case .empty = self {
return true
} else {
return false
}
}
public func twoHundredApplicationJsonObject() throws -> Operations.GetLibraryResponseBody {
guard case .twoHundredApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibraryLibraryResponseBody {
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
}
}