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