Files
plexswift/Sources/Plexswift/models/operations/GetUserFriendsResponse.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 GetUserFriendsResponse {
case empty
case badRequest(Operations.GetUserFriendsBadRequest)
case friends([Operations.Friend])
case unauthorized(Operations.GetUserFriendsUnauthorized)
var isEmpty: Bool {
if case .empty = self {
return true
} else {
return false
}
}
public func badRequest() throws -> Operations.GetUserFriendsBadRequest {
guard case .badRequest(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
public func friends() throws -> [Operations.Friend] {
guard case .friends(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
public func unauthorized() throws -> Operations.GetUserFriendsUnauthorized {
guard case .unauthorized(let value) = self else {
throw PlexswiftError.missingResponseData
}
return value
}
}}