mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-09 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
public struct GetCountriesLibraryBadRequest {
|
||||
public let errors: [Operations.GetCountriesLibraryErrors]?
|
||||
|
||||
/// Creates a request model with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetCountriesLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryBadRequest: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetCountriesLibraryDirectory {
|
||||
public let fastKey: String
|
||||
public let key: String
|
||||
public let title: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(fastKey: String, key: String, title: String) {
|
||||
self.fastKey = fastKey
|
||||
self.key = key
|
||||
self.title = title
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryDirectory: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case fastKey
|
||||
case key
|
||||
case title
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetCountriesLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetCountriesLibraryLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetCountriesLibraryMediaContainer {
|
||||
public let allowSync: Bool
|
||||
public let art: String
|
||||
public let content: String
|
||||
public let identifier: String
|
||||
public let mediaTagPrefix: String
|
||||
public let mediaTagVersion: Int
|
||||
public let nocache: Bool
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double
|
||||
public let thumb: String
|
||||
public let title1: String
|
||||
public let title2: String
|
||||
public let viewGroup: String
|
||||
public let directory: [Operations.GetCountriesLibraryDirectory]?
|
||||
public let offset: Int?
|
||||
public let totalSize: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool, art: String, content: String, identifier: String, mediaTagPrefix: String, mediaTagVersion: Int, nocache: Bool, size: Double, thumb: String, title1: String, title2: String, viewGroup: String, directory: [Operations.GetCountriesLibraryDirectory]? = nil, offset: Int? = nil, totalSize: Int? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self.content = content
|
||||
self.identifier = identifier
|
||||
self.mediaTagPrefix = mediaTagPrefix
|
||||
self.mediaTagVersion = mediaTagVersion
|
||||
self.nocache = nocache
|
||||
self._size = DecimalSerialized<Double>(wrappedValue: size)
|
||||
self.thumb = thumb
|
||||
self.title1 = title1
|
||||
self.title2 = title2
|
||||
self.viewGroup = viewGroup
|
||||
self.directory = directory
|
||||
self.offset = offset
|
||||
self.totalSize = totalSize
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case art
|
||||
case content
|
||||
case identifier
|
||||
case mediaTagPrefix
|
||||
case mediaTagVersion
|
||||
case nocache
|
||||
case size
|
||||
case thumb
|
||||
case title1
|
||||
case title2
|
||||
case viewGroup
|
||||
case directory = "Directory"
|
||||
case offset
|
||||
case totalSize
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.allowSync = try container.decode(Bool.self, forKey: .allowSync)
|
||||
self.art = try container.decode(String.self, forKey: .art)
|
||||
self.content = try container.decode(String.self, forKey: .content)
|
||||
self.identifier = try container.decode(String.self, forKey: .identifier)
|
||||
self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix)
|
||||
self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion)
|
||||
self.nocache = try container.decode(Bool.self, forKey: .nocache)
|
||||
self._size = try container.decode(DecimalSerialized<Double>.self, forKey: .size)
|
||||
self.thumb = try container.decode(String.self, forKey: .thumb)
|
||||
self.title1 = try container.decode(String.self, forKey: .title1)
|
||||
self.title2 = try container.decode(String.self, forKey: .title2)
|
||||
self.viewGroup = try container.decode(String.self, forKey: .viewGroup)
|
||||
self.directory = try container.decodeIfPresent([Operations.GetCountriesLibraryDirectory].self, forKey: .directory)
|
||||
self.offset = try container.decodeIfPresent(Int.self, forKey: .offset)
|
||||
self.totalSize = try container.decodeIfPresent(Int.self, forKey: .totalSize)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.allowSync, forKey: .allowSync)
|
||||
try container.encode(self.art, forKey: .art)
|
||||
try container.encode(self.content, forKey: .content)
|
||||
try container.encode(self.identifier, forKey: .identifier)
|
||||
try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix)
|
||||
try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion)
|
||||
try container.encode(self.nocache, forKey: .nocache)
|
||||
try container.encode(self._size, forKey: .size)
|
||||
try container.encode(self.thumb, forKey: .thumb)
|
||||
try container.encode(self.title1, forKey: .title1)
|
||||
try container.encode(self.title2, forKey: .title2)
|
||||
try container.encode(self.viewGroup, forKey: .viewGroup)
|
||||
try container.encodeIfPresent(self.directory, forKey: .directory)
|
||||
try container.encodeIfPresent(self.offset, forKey: .offset)
|
||||
try container.encodeIfPresent(self.totalSize, forKey: .totalSize)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetCountriesLibraryMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetCountriesLibraryRequest: APIValue {
|
||||
/// The unique key of the Plex library.
|
||||
/// Note: This is unique in the context of the Plex server.
|
||||
///
|
||||
public let sectionKey: Int
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter sectionKey: The unique key of the Plex library.
|
||||
/// Note: This is unique in the context of the Plex server.
|
||||
///
|
||||
///
|
||||
public init(sectionKey: Int) {
|
||||
self.sectionKey = sectionKey
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetCountriesLibraryResponse {
|
||||
case empty
|
||||
case badRequest(Operations.GetCountriesLibraryBadRequest)
|
||||
case object(Operations.GetCountriesLibraryResponseBody)
|
||||
case unauthorized(Operations.GetCountriesLibraryUnauthorized)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func badRequest() throws -> Operations.GetCountriesLibraryBadRequest {
|
||||
guard case .badRequest(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.GetCountriesLibraryResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func unauthorized() throws -> Operations.GetCountriesLibraryUnauthorized {
|
||||
guard case .unauthorized(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Successful response containing media container data.
|
||||
public struct GetCountriesLibraryResponseBody {
|
||||
public let mediaContainer: Operations.GetCountriesLibraryMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetCountriesLibraryMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetCountriesLibraryUnauthorized {
|
||||
public let errors: [Operations.GetCountriesLibraryLibraryErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetCountriesLibraryLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetCountriesLibraryUnauthorized: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
public struct GetGenresLibraryBadRequest {
|
||||
public let errors: [Operations.GetGenresLibraryErrors]?
|
||||
|
||||
/// Creates a request model with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetGenresLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryBadRequest: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGenresLibraryDirectory {
|
||||
public let fastKey: String
|
||||
public let key: String
|
||||
public let title: String
|
||||
public let type: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(fastKey: String, key: String, title: String, type: String) {
|
||||
self.fastKey = fastKey
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.type = type
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryDirectory: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case fastKey
|
||||
case key
|
||||
case title
|
||||
case type
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGenresLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGenresLibraryLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGenresLibraryMediaContainer {
|
||||
public let allowSync: Bool
|
||||
public let art: String
|
||||
public let content: String
|
||||
public let identifier: String
|
||||
public let mediaTagPrefix: String
|
||||
public let mediaTagVersion: Int
|
||||
public let nocache: Bool
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double
|
||||
public let thumb: String
|
||||
public let title1: String
|
||||
public let title2: String
|
||||
public let viewGroup: String
|
||||
public let directory: [Operations.GetGenresLibraryDirectory]?
|
||||
public let offset: Int?
|
||||
public let totalSize: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool, art: String, content: String, identifier: String, mediaTagPrefix: String, mediaTagVersion: Int, nocache: Bool, size: Double, thumb: String, title1: String, title2: String, viewGroup: String, directory: [Operations.GetGenresLibraryDirectory]? = nil, offset: Int? = nil, totalSize: Int? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self.content = content
|
||||
self.identifier = identifier
|
||||
self.mediaTagPrefix = mediaTagPrefix
|
||||
self.mediaTagVersion = mediaTagVersion
|
||||
self.nocache = nocache
|
||||
self._size = DecimalSerialized<Double>(wrappedValue: size)
|
||||
self.thumb = thumb
|
||||
self.title1 = title1
|
||||
self.title2 = title2
|
||||
self.viewGroup = viewGroup
|
||||
self.directory = directory
|
||||
self.offset = offset
|
||||
self.totalSize = totalSize
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case art
|
||||
case content
|
||||
case identifier
|
||||
case mediaTagPrefix
|
||||
case mediaTagVersion
|
||||
case nocache
|
||||
case size
|
||||
case thumb
|
||||
case title1
|
||||
case title2
|
||||
case viewGroup
|
||||
case directory = "Directory"
|
||||
case offset
|
||||
case totalSize
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.allowSync = try container.decode(Bool.self, forKey: .allowSync)
|
||||
self.art = try container.decode(String.self, forKey: .art)
|
||||
self.content = try container.decode(String.self, forKey: .content)
|
||||
self.identifier = try container.decode(String.self, forKey: .identifier)
|
||||
self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix)
|
||||
self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion)
|
||||
self.nocache = try container.decode(Bool.self, forKey: .nocache)
|
||||
self._size = try container.decode(DecimalSerialized<Double>.self, forKey: .size)
|
||||
self.thumb = try container.decode(String.self, forKey: .thumb)
|
||||
self.title1 = try container.decode(String.self, forKey: .title1)
|
||||
self.title2 = try container.decode(String.self, forKey: .title2)
|
||||
self.viewGroup = try container.decode(String.self, forKey: .viewGroup)
|
||||
self.directory = try container.decodeIfPresent([Operations.GetGenresLibraryDirectory].self, forKey: .directory)
|
||||
self.offset = try container.decodeIfPresent(Int.self, forKey: .offset)
|
||||
self.totalSize = try container.decodeIfPresent(Int.self, forKey: .totalSize)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.allowSync, forKey: .allowSync)
|
||||
try container.encode(self.art, forKey: .art)
|
||||
try container.encode(self.content, forKey: .content)
|
||||
try container.encode(self.identifier, forKey: .identifier)
|
||||
try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix)
|
||||
try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion)
|
||||
try container.encode(self.nocache, forKey: .nocache)
|
||||
try container.encode(self._size, forKey: .size)
|
||||
try container.encode(self.thumb, forKey: .thumb)
|
||||
try container.encode(self.title1, forKey: .title1)
|
||||
try container.encode(self.title2, forKey: .title2)
|
||||
try container.encode(self.viewGroup, forKey: .viewGroup)
|
||||
try container.encodeIfPresent(self.directory, forKey: .directory)
|
||||
try container.encodeIfPresent(self.offset, forKey: .offset)
|
||||
try container.encodeIfPresent(self.totalSize, forKey: .totalSize)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGenresLibraryMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGenresLibraryRequest: APIValue {
|
||||
/// The unique key of the Plex library.
|
||||
/// Note: This is unique in the context of the Plex server.
|
||||
///
|
||||
public let sectionKey: Int
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter sectionKey: The unique key of the Plex library.
|
||||
/// Note: This is unique in the context of the Plex server.
|
||||
///
|
||||
///
|
||||
public init(sectionKey: Int) {
|
||||
self.sectionKey = sectionKey
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetGenresLibraryResponse {
|
||||
case empty
|
||||
case badRequest(Operations.GetGenresLibraryBadRequest)
|
||||
case object(Operations.GetGenresLibraryResponseBody)
|
||||
case unauthorized(Operations.GetGenresLibraryUnauthorized)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func badRequest() throws -> Operations.GetGenresLibraryBadRequest {
|
||||
guard case .badRequest(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.GetGenresLibraryResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func unauthorized() throws -> Operations.GetGenresLibraryUnauthorized {
|
||||
guard case .unauthorized(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Successful response containing media container data.
|
||||
public struct GetGenresLibraryResponseBody {
|
||||
public let mediaContainer: Operations.GetGenresLibraryMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetGenresLibraryMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetGenresLibraryUnauthorized {
|
||||
public let errors: [Operations.GetGenresLibraryLibraryErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetGenresLibraryLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetGenresLibraryUnauthorized: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user