mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-07 20:57:47 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.209.3
This commit is contained in:
45
Sources/Plexswift/models/operations/Account.swift
Normal file
45
Sources/Plexswift/models/operations/Account.swift
Normal file
@@ -0,0 +1,45 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Account {
|
||||
public let autoSelectAudio: Bool?
|
||||
public let defaultAudioLanguage: String?
|
||||
public let defaultSubtitleLanguage: String?
|
||||
public let id: Int?
|
||||
public let key: String?
|
||||
public let name: String?
|
||||
public let subtitleMode: Int?
|
||||
public let thumb: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(autoSelectAudio: Bool? = nil, defaultAudioLanguage: String? = nil, defaultSubtitleLanguage: String? = nil, id: Int? = nil, key: String? = nil, name: String? = nil, subtitleMode: Int? = nil, thumb: String? = nil) {
|
||||
self.autoSelectAudio = autoSelectAudio
|
||||
self.defaultAudioLanguage = defaultAudioLanguage
|
||||
self.defaultSubtitleLanguage = defaultSubtitleLanguage
|
||||
self.id = id
|
||||
self.key = key
|
||||
self.name = name
|
||||
self.subtitleMode = subtitleMode
|
||||
self.thumb = thumb
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Account: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case autoSelectAudio
|
||||
case defaultAudioLanguage
|
||||
case defaultSubtitleLanguage
|
||||
case id
|
||||
case key
|
||||
case name
|
||||
case subtitleMode
|
||||
case thumb
|
||||
}
|
||||
}
|
||||
|
||||
83
Sources/Plexswift/models/operations/Activity.swift
Normal file
83
Sources/Plexswift/models/operations/Activity.swift
Normal file
@@ -0,0 +1,83 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Activity {
|
||||
public let cancellable: Bool?
|
||||
public let context: Operations.Context?
|
||||
@DecimalSerialized
|
||||
public private(set) var progress: Double?
|
||||
public let subtitle: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var userID: Double?
|
||||
public let uuid: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(cancellable: Bool? = nil, context: Operations.Context? = nil, progress: Double? = nil, subtitle: String? = nil, title: String? = nil, type: String? = nil, userID: Double? = nil, uuid: String? = nil) {
|
||||
self.cancellable = cancellable
|
||||
self.context = context
|
||||
self._progress = DecimalSerialized<Double?>(wrappedValue: progress)
|
||||
self.subtitle = subtitle
|
||||
self.title = title
|
||||
self.type = type
|
||||
self._userID = DecimalSerialized<Double?>(wrappedValue: userID)
|
||||
self.uuid = uuid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Activity: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case cancellable
|
||||
case context = "Context"
|
||||
case progress
|
||||
case subtitle
|
||||
case title
|
||||
case type
|
||||
case userID
|
||||
case uuid
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.cancellable = try container.decodeIfPresent(Bool.self, forKey: .cancellable)
|
||||
self.context = try container.decodeIfPresent(Operations.Context.self, forKey: .context)
|
||||
self._progress = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .progress) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.subtitle = try container.decodeIfPresent(String.self, forKey: .subtitle)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
self.type = try container.decodeIfPresent(String.self, forKey: .type)
|
||||
self._userID = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .userID) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.uuid = try container.decodeIfPresent(String.self, forKey: .uuid)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.cancellable, forKey: .cancellable)
|
||||
try container.encodeIfPresent(self.context, forKey: .context)
|
||||
if self.progress != nil {
|
||||
try container.encode(self._progress, forKey: .progress)
|
||||
}
|
||||
try container.encodeIfPresent(self.subtitle, forKey: .subtitle)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.type, forKey: .type)
|
||||
if self.userID != nil {
|
||||
try container.encode(self._userID, forKey: .userID)
|
||||
}
|
||||
try container.encodeIfPresent(self.uuid, forKey: .uuid)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Activity {
|
||||
var userIDWrapper: DecimalSerialized<Double?> {
|
||||
return _userID
|
||||
}
|
||||
var progressWrapper: DecimalSerialized<Double?> {
|
||||
return _progress
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct AddPlaylistContentsErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct AddPlaylistContentsMediaContainer {
|
||||
public let leafCountAdded: Int?
|
||||
public let leafCountRequested: Int?
|
||||
public let metadata: [Operations.AddPlaylistContentsMetadata]?
|
||||
public let size: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(leafCountAdded: Int? = nil, leafCountRequested: Int? = nil, metadata: [Operations.AddPlaylistContentsMetadata]? = nil, size: Int? = nil) {
|
||||
self.leafCountAdded = leafCountAdded
|
||||
self.leafCountRequested = leafCountRequested
|
||||
self.metadata = metadata
|
||||
self.size = size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case leafCountAdded
|
||||
case leafCountRequested
|
||||
case metadata = "Metadata"
|
||||
case size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct AddPlaylistContentsMetadata {
|
||||
public let addedAt: Int?
|
||||
public let composite: String?
|
||||
public let duration: Int?
|
||||
public let guid: String?
|
||||
public let key: String?
|
||||
public let leafCount: Int?
|
||||
public let playlistType: String?
|
||||
public let ratingKey: String?
|
||||
public let smart: Bool?
|
||||
public let summary: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Int? = nil, composite: String? = nil, duration: Int? = nil, guid: String? = nil, key: String? = nil, leafCount: Int? = nil, playlistType: String? = nil, ratingKey: String? = nil, smart: Bool? = nil, summary: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.composite = composite
|
||||
self.duration = duration
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self.leafCount = leafCount
|
||||
self.playlistType = playlistType
|
||||
self.ratingKey = ratingKey
|
||||
self.smart = smart
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case composite
|
||||
case duration
|
||||
case guid
|
||||
case key
|
||||
case leafCount
|
||||
case playlistType
|
||||
case ratingKey
|
||||
case smart
|
||||
case summary
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct AddPlaylistContentsPlaylistsResponseBody {
|
||||
public let errors: [Operations.AddPlaylistContentsErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.AddPlaylistContentsErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsPlaylistsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct AddPlaylistContentsRequest: APIValue {
|
||||
/// the ID of the playlist
|
||||
@DecimalSerialized
|
||||
public private(set) var playlistID: Double
|
||||
/// the content URI for the playlist
|
||||
public let uri: String
|
||||
/// the play queue to add to a playlist
|
||||
@DecimalSerialized
|
||||
public private(set) var playQueueID: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter playlistID: the ID of the playlist
|
||||
/// - Parameter uri: the content URI for the playlist
|
||||
/// - Parameter playQueueID: the play queue to add to a playlist
|
||||
///
|
||||
public init(playlistID: Double, uri: String, playQueueID: Double? = nil) {
|
||||
self._playlistID = DecimalSerialized<Double>(wrappedValue: playlistID)
|
||||
self.uri = uri
|
||||
self._playQueueID = DecimalSerialized<Double?>(wrappedValue: playQueueID)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.AddPlaylistContentsRequest {
|
||||
var playlistIDWrapper: DecimalSerialized<Double> {
|
||||
return _playlistID
|
||||
}
|
||||
var playQueueIDWrapper: DecimalSerialized<Double?> {
|
||||
return _playQueueID
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum AddPlaylistContentsResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.AddPlaylistContentsResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.AddPlaylistContentsPlaylistsResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.AddPlaylistContentsResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.AddPlaylistContentsPlaylistsResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Playlist Updated
|
||||
public struct AddPlaylistContentsResponseBody {
|
||||
public let mediaContainer: Operations.AddPlaylistContentsMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.AddPlaylistContentsMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.AddPlaylistContentsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift
Normal file
58
Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ApplyUpdatesErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ApplyUpdatesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ApplyUpdatesErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ApplyUpdatesRequest: APIValue {
|
||||
/// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
public let skip: Operations.Skip?
|
||||
/// Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
public let tonight: Operations.Tonight?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter skip: Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
||||
/// - Parameter tonight: Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
||||
///
|
||||
public init(skip: Operations.Skip? = nil, tonight: Operations.Tonight? = nil) {
|
||||
self.skip = skip
|
||||
self.tonight = tonight
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum ApplyUpdatesResponse {
|
||||
case empty
|
||||
case object(Operations.ApplyUpdatesResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.ApplyUpdatesResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct ApplyUpdatesResponseBody {
|
||||
public let errors: [Operations.ApplyUpdatesErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.ApplyUpdatesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ApplyUpdatesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
67
Sources/Plexswift/models/operations/ButlerTask.swift
Normal file
67
Sources/Plexswift/models/operations/ButlerTask.swift
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ButlerTask {
|
||||
public let description: String?
|
||||
public let enabled: Bool?
|
||||
@DecimalSerialized
|
||||
public private(set) var interval: Double?
|
||||
public let name: String?
|
||||
public let scheduleRandomized: Bool?
|
||||
public let title: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(description: String? = nil, enabled: Bool? = nil, interval: Double? = nil, name: String? = nil, scheduleRandomized: Bool? = nil, title: String? = nil) {
|
||||
self.description = description
|
||||
self.enabled = enabled
|
||||
self._interval = DecimalSerialized<Double?>(wrappedValue: interval)
|
||||
self.name = name
|
||||
self.scheduleRandomized = scheduleRandomized
|
||||
self.title = title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ButlerTask: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case description
|
||||
case enabled
|
||||
case interval
|
||||
case name
|
||||
case scheduleRandomized
|
||||
case title
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.description = try container.decodeIfPresent(String.self, forKey: .description)
|
||||
self.enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled)
|
||||
self._interval = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .interval) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.name = try container.decodeIfPresent(String.self, forKey: .name)
|
||||
self.scheduleRandomized = try container.decodeIfPresent(Bool.self, forKey: .scheduleRandomized)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.description, forKey: .description)
|
||||
try container.encodeIfPresent(self.enabled, forKey: .enabled)
|
||||
if self.interval != nil {
|
||||
try container.encode(self._interval, forKey: .interval)
|
||||
}
|
||||
try container.encodeIfPresent(self.name, forKey: .name)
|
||||
try container.encodeIfPresent(self.scheduleRandomized, forKey: .scheduleRandomized)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ButlerTask {
|
||||
var intervalWrapper: DecimalSerialized<Double?> {
|
||||
return _interval
|
||||
}
|
||||
}
|
||||
24
Sources/Plexswift/models/operations/ButlerTasks.swift
Normal file
24
Sources/Plexswift/models/operations/ButlerTasks.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ButlerTasks {
|
||||
public let butlerTask: [Operations.ButlerTask]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(butlerTask: [Operations.ButlerTask]? = nil) {
|
||||
self.butlerTask = butlerTask
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ButlerTasks: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case butlerTask = "ButlerTask"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CancelServerActivitiesErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CancelServerActivitiesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CancelServerActivitiesErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CancelServerActivitiesRequest: APIValue {
|
||||
/// The UUID of the activity to cancel.
|
||||
public let activityUUID: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter activityUUID: The UUID of the activity to cancel.
|
||||
///
|
||||
public init(activityUUID: String) {
|
||||
self.activityUUID = activityUUID
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum CancelServerActivitiesResponse {
|
||||
case empty
|
||||
case object(Operations.CancelServerActivitiesResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.CancelServerActivitiesResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct CancelServerActivitiesResponseBody {
|
||||
public let errors: [Operations.CancelServerActivitiesErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.CancelServerActivitiesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CancelServerActivitiesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CheckForUpdatesErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CheckForUpdatesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CheckForUpdatesErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CheckForUpdatesRequest: APIValue {
|
||||
/// Indicate that you want to start download any updates found.
|
||||
public let download: Operations.Download?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter download: Indicate that you want to start download any updates found.
|
||||
///
|
||||
public init(download: Operations.Download? = nil) {
|
||||
self.download = download
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum CheckForUpdatesResponse {
|
||||
case empty
|
||||
case object(Operations.CheckForUpdatesResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.CheckForUpdatesResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct CheckForUpdatesResponseBody {
|
||||
public let errors: [Operations.CheckForUpdatesErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.CheckForUpdatesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CheckForUpdatesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ClearPlaylistContentsErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ClearPlaylistContentsErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ClearPlaylistContentsErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct ClearPlaylistContentsRequest: APIValue {
|
||||
/// the ID of the playlist
|
||||
@DecimalSerialized
|
||||
public private(set) var playlistID: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter playlistID: the ID of the playlist
|
||||
///
|
||||
public init(playlistID: Double) {
|
||||
self._playlistID = DecimalSerialized<Double>(wrappedValue: playlistID)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.ClearPlaylistContentsRequest {
|
||||
var playlistIDWrapper: DecimalSerialized<Double> {
|
||||
return _playlistID
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum ClearPlaylistContentsResponse {
|
||||
case empty
|
||||
case object(Operations.ClearPlaylistContentsResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.ClearPlaylistContentsResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct ClearPlaylistContentsResponseBody {
|
||||
public let errors: [Operations.ClearPlaylistContentsErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.ClearPlaylistContentsErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.ClearPlaylistContentsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
24
Sources/Plexswift/models/operations/Context.swift
Normal file
24
Sources/Plexswift/models/operations/Context.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Context {
|
||||
public let librarySectionID: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(librarySectionID: String? = nil) {
|
||||
self.librarySectionID = librarySectionID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Context: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case librarySectionID
|
||||
}
|
||||
}
|
||||
|
||||
24
Sources/Plexswift/models/operations/Country.swift
Normal file
24
Sources/Plexswift/models/operations/Country.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Country {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Country: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CreatePlaylistErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CreatePlaylistMediaContainer {
|
||||
public let metadata: [Operations.CreatePlaylistMetadata]?
|
||||
public let size: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(metadata: [Operations.CreatePlaylistMetadata]? = nil, size: Int? = nil) {
|
||||
self.metadata = metadata
|
||||
self.size = size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case metadata = "Metadata"
|
||||
case size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CreatePlaylistMetadata {
|
||||
public let addedAt: Int?
|
||||
public let composite: String?
|
||||
public let duration: Int?
|
||||
public let guid: String?
|
||||
public let icon: String?
|
||||
public let key: String?
|
||||
public let lastViewedAt: Int?
|
||||
public let leafCount: Int?
|
||||
public let playlistType: String?
|
||||
public let ratingKey: String?
|
||||
public let smart: Bool?
|
||||
public let summary: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
public let viewCount: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Int? = nil, composite: String? = nil, duration: Int? = nil, guid: String? = nil, icon: String? = nil, key: String? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, playlistType: String? = nil, ratingKey: String? = nil, smart: Bool? = nil, summary: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.composite = composite
|
||||
self.duration = duration
|
||||
self.guid = guid
|
||||
self.icon = icon
|
||||
self.key = key
|
||||
self.lastViewedAt = lastViewedAt
|
||||
self.leafCount = leafCount
|
||||
self.playlistType = playlistType
|
||||
self.ratingKey = ratingKey
|
||||
self.smart = smart
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
self.viewCount = viewCount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case composite
|
||||
case duration
|
||||
case guid
|
||||
case icon
|
||||
case key
|
||||
case lastViewedAt
|
||||
case leafCount
|
||||
case playlistType
|
||||
case ratingKey
|
||||
case smart
|
||||
case summary
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
case viewCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct CreatePlaylistPlaylistsResponseBody {
|
||||
public let errors: [Operations.CreatePlaylistErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.CreatePlaylistErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistPlaylistsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct CreatePlaylistRequest: APIValue {
|
||||
/// whether the playlist is smart or not
|
||||
public let smart: Operations.Smart
|
||||
/// name of the playlist
|
||||
public let title: String
|
||||
/// type of playlist to create
|
||||
public let type: Operations.QueryParamType
|
||||
/// the content URI for the playlist
|
||||
public let uri: String
|
||||
/// the play queue to copy to a playlist
|
||||
@DecimalSerialized
|
||||
public private(set) var playQueueID: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter smart: whether the playlist is smart or not
|
||||
/// - Parameter title: name of the playlist
|
||||
/// - Parameter type: type of playlist to create
|
||||
/// - Parameter uri: the content URI for the playlist
|
||||
/// - Parameter playQueueID: the play queue to copy to a playlist
|
||||
///
|
||||
public init(smart: Operations.Smart, title: String, type: Operations.QueryParamType, uri: String, playQueueID: Double? = nil) {
|
||||
self.smart = smart
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.uri = uri
|
||||
self._playQueueID = DecimalSerialized<Double?>(wrappedValue: playQueueID)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.CreatePlaylistRequest {
|
||||
var playQueueIDWrapper: DecimalSerialized<Double?> {
|
||||
return _playQueueID
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum CreatePlaylistResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.CreatePlaylistResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.CreatePlaylistPlaylistsResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.CreatePlaylistResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.CreatePlaylistPlaylistsResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// returns all playlists
|
||||
public struct CreatePlaylistResponseBody {
|
||||
public let mediaContainer: Operations.CreatePlaylistMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.CreatePlaylistMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.CreatePlaylistResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct DeleteLibraryErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeleteLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeleteLibraryErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct DeleteLibraryRequest: APIValue {
|
||||
/// the Id of the library to query
|
||||
@DecimalSerialized
|
||||
public private(set) var sectionId: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter sectionId: the Id of the library to query
|
||||
///
|
||||
public init(sectionId: Double) {
|
||||
self._sectionId = DecimalSerialized<Double>(wrappedValue: sectionId)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.DeleteLibraryRequest {
|
||||
var sectionIdWrapper: DecimalSerialized<Double> {
|
||||
return _sectionId
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum DeleteLibraryResponse {
|
||||
case empty
|
||||
case object(Operations.DeleteLibraryResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.DeleteLibraryResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct DeleteLibraryResponseBody {
|
||||
public let errors: [Operations.DeleteLibraryErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.DeleteLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeleteLibraryResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct DeletePlaylistErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeletePlaylistErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeletePlaylistErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct DeletePlaylistRequest: APIValue {
|
||||
/// the ID of the playlist
|
||||
@DecimalSerialized
|
||||
public private(set) var playlistID: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter playlistID: the ID of the playlist
|
||||
///
|
||||
public init(playlistID: Double) {
|
||||
self._playlistID = DecimalSerialized<Double>(wrappedValue: playlistID)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.DeletePlaylistRequest {
|
||||
var playlistIDWrapper: DecimalSerialized<Double> {
|
||||
return _playlistID
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum DeletePlaylistResponse {
|
||||
case empty
|
||||
case object(Operations.DeletePlaylistResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.DeletePlaylistResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct DeletePlaylistResponseBody {
|
||||
public let errors: [Operations.DeletePlaylistErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.DeletePlaylistErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.DeletePlaylistResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
68
Sources/Plexswift/models/operations/Device.swift
Normal file
68
Sources/Plexswift/models/operations/Device.swift
Normal file
@@ -0,0 +1,68 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Device {
|
||||
public let clientIdentifier: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var createdAt: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var id: Double?
|
||||
public let name: String?
|
||||
public let platform: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(clientIdentifier: String? = nil, createdAt: Double? = nil, id: Double? = nil, name: String? = nil, platform: String? = nil) {
|
||||
self.clientIdentifier = clientIdentifier
|
||||
self._createdAt = DecimalSerialized<Double?>(wrappedValue: createdAt)
|
||||
self._id = DecimalSerialized<Double?>(wrappedValue: id)
|
||||
self.name = name
|
||||
self.platform = platform
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Device: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case clientIdentifier
|
||||
case createdAt
|
||||
case id
|
||||
case name
|
||||
case platform
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.clientIdentifier = try container.decodeIfPresent(String.self, forKey: .clientIdentifier)
|
||||
self._createdAt = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .createdAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.name = try container.decodeIfPresent(String.self, forKey: .name)
|
||||
self.platform = try container.decodeIfPresent(String.self, forKey: .platform)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.clientIdentifier, forKey: .clientIdentifier)
|
||||
if self.createdAt != nil {
|
||||
try container.encode(self._createdAt, forKey: .createdAt)
|
||||
}
|
||||
if self.id != nil {
|
||||
try container.encode(self._id, forKey: .id)
|
||||
}
|
||||
try container.encodeIfPresent(self.name, forKey: .name)
|
||||
try container.encodeIfPresent(self.platform, forKey: .platform)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Device {
|
||||
var idWrapper: DecimalSerialized<Double?> {
|
||||
return _id
|
||||
}
|
||||
var createdAtWrapper: DecimalSerialized<Double?> {
|
||||
return _createdAt
|
||||
}
|
||||
}
|
||||
24
Sources/Plexswift/models/operations/Director.swift
Normal file
24
Sources/Plexswift/models/operations/Director.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Director {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Director: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
52
Sources/Plexswift/models/operations/Directory.swift
Normal file
52
Sources/Plexswift/models/operations/Directory.swift
Normal file
@@ -0,0 +1,52 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Directory {
|
||||
@DecimalSerialized
|
||||
public private(set) var count: Double?
|
||||
public let key: String?
|
||||
public let title: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(count: Double? = nil, key: String? = nil, title: String? = nil) {
|
||||
self._count = DecimalSerialized<Double?>(wrappedValue: count)
|
||||
self.key = key
|
||||
self.title = title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Directory: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case count
|
||||
case key
|
||||
case title
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._count = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .count) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.count != nil {
|
||||
try container.encode(self._count, forKey: .count)
|
||||
}
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Directory {
|
||||
var countWrapper: DecimalSerialized<Double?> {
|
||||
return _count
|
||||
}
|
||||
}
|
||||
11
Sources/Plexswift/models/operations/Download.swift
Normal file
11
Sources/Plexswift/models/operations/Download.swift
Normal file
@@ -0,0 +1,11 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Indicate that you want to start download any updates found.
|
||||
public enum Download: Int, Codable, APIValue {
|
||||
case zero = 0
|
||||
case one = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct EnablePaperTrailErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.EnablePaperTrailErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.EnablePaperTrailErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum EnablePaperTrailResponse {
|
||||
case empty
|
||||
case object(Operations.EnablePaperTrailResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.EnablePaperTrailResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct EnablePaperTrailResponseBody {
|
||||
public let errors: [Operations.EnablePaperTrailErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.EnablePaperTrailErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.EnablePaperTrailResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/Errors.swift
Normal file
58
Sources/Plexswift/models/operations/Errors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Errors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Errors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Errors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
33
Sources/Plexswift/models/operations/Field.swift
Normal file
33
Sources/Plexswift/models/operations/Field.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Field {
|
||||
public let key: String?
|
||||
public let subType: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(key: String? = nil, subType: String? = nil, title: String? = nil, type: String? = nil) {
|
||||
self.key = key
|
||||
self.subType = subType
|
||||
self.title = title
|
||||
self.type = type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Field: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case subType
|
||||
case title
|
||||
case type
|
||||
}
|
||||
}
|
||||
|
||||
27
Sources/Plexswift/models/operations/FieldType.swift
Normal file
27
Sources/Plexswift/models/operations/FieldType.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct FieldType {
|
||||
public let `operator`: [Operations.Operator]?
|
||||
public let type: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(`operator`: [Operations.Operator]? = nil, type: String? = nil) {
|
||||
self.`operator` = `operator`
|
||||
self.type = type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.FieldType: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case `operator` = "Operator"
|
||||
case type
|
||||
}
|
||||
}
|
||||
|
||||
36
Sources/Plexswift/models/operations/Filter.swift
Normal file
36
Sources/Plexswift/models/operations/Filter.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Filter {
|
||||
public let filter: String?
|
||||
public let filterType: String?
|
||||
public let key: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(filter: String? = nil, filterType: String? = nil, key: String? = nil, title: String? = nil, type: String? = nil) {
|
||||
self.filter = filter
|
||||
self.filterType = filterType
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.type = type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Filter: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case filterType
|
||||
case key
|
||||
case title
|
||||
case type
|
||||
}
|
||||
}
|
||||
|
||||
15
Sources/Plexswift/models/operations/Force.swift
Normal file
15
Sources/Plexswift/models/operations/Force.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Force overwriting of duplicate playlists.
|
||||
/// By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||
/// The `force` argument is used to disable overwriting.
|
||||
/// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
||||
///
|
||||
public enum Force: Int, Codable, APIValue {
|
||||
case zero = 0
|
||||
case one = 1
|
||||
}
|
||||
}
|
||||
24
Sources/Plexswift/models/operations/Genre.swift
Normal file
24
Sources/Plexswift/models/operations/Genre.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Genre {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Genre: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAvailableClientsErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAvailableClientsMediaContainer {
|
||||
public let server: [Operations.Server]?
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(server: [Operations.Server]? = nil, size: Double? = nil) {
|
||||
self.server = server
|
||||
self._size = DecimalSerialized<Double?>(wrappedValue: size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case server = "Server"
|
||||
case size
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.server = try container.decodeIfPresent([Operations.Server].self, forKey: .server)
|
||||
self._size = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .size) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.server, forKey: .server)
|
||||
if self.size != nil {
|
||||
try container.encode(self._size, forKey: .size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double?> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetAvailableClientsResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.GetAvailableClientsResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.GetAvailableClientsServerResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.GetAvailableClientsResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetAvailableClientsServerResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Available Clients
|
||||
public struct GetAvailableClientsResponseBody {
|
||||
public let mediaContainer: Operations.GetAvailableClientsMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetAvailableClientsMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetAvailableClientsServerResponseBody {
|
||||
public let errors: [Operations.GetAvailableClientsErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetAvailableClientsErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetAvailableClientsServerResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetButlerTasksButlerResponseBody {
|
||||
public let errors: [Operations.GetButlerTasksErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetButlerTasksErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetButlerTasksButlerResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetButlerTasksErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetButlerTasksErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetButlerTasksErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetButlerTasksResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.GetButlerTasksResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.GetButlerTasksButlerResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.GetButlerTasksResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetButlerTasksButlerResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// All butler tasks
|
||||
public struct GetButlerTasksResponseBody {
|
||||
public let butlerTasks: Operations.ButlerTasks?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(butlerTasks: Operations.ButlerTasks? = nil) {
|
||||
self.butlerTasks = butlerTasks
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetButlerTasksResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case butlerTasks = "ButlerTasks"
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/GetDevicesErrors.swift
Normal file
58
Sources/Plexswift/models/operations/GetDevicesErrors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetDevicesErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetDevicesMediaContainer {
|
||||
public let device: [Operations.Device]?
|
||||
public let identifier: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(device: [Operations.Device]? = nil, identifier: String? = nil, size: Double? = nil) {
|
||||
self.device = device
|
||||
self.identifier = identifier
|
||||
self._size = DecimalSerialized<Double?>(wrappedValue: size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case device = "Device"
|
||||
case identifier
|
||||
case size
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.device = try container.decodeIfPresent([Operations.Device].self, forKey: .device)
|
||||
self.identifier = try container.decodeIfPresent(String.self, forKey: .identifier)
|
||||
self._size = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .size) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.device, forKey: .device)
|
||||
try container.encodeIfPresent(self.identifier, forKey: .identifier)
|
||||
if self.size != nil {
|
||||
try container.encode(self._size, forKey: .size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double?> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
34
Sources/Plexswift/models/operations/GetDevicesResponse.swift
Normal file
34
Sources/Plexswift/models/operations/GetDevicesResponse.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetDevicesResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.GetDevicesResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.GetDevicesServerResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.GetDevicesResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetDevicesServerResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Devices
|
||||
public struct GetDevicesResponseBody {
|
||||
public let mediaContainer: Operations.GetDevicesMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetDevicesMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetDevicesServerResponseBody {
|
||||
public let errors: [Operations.GetDevicesErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetDevicesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetDevicesServerResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/GetFileHashErrors.swift
Normal file
58
Sources/Plexswift/models/operations/GetFileHashErrors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetFileHashErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetFileHashErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetFileHashErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
29
Sources/Plexswift/models/operations/GetFileHashRequest.swift
Normal file
29
Sources/Plexswift/models/operations/GetFileHashRequest.swift
Normal file
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetFileHashRequest: APIValue {
|
||||
/// This is the path to the local file, must be prefixed by `file://`
|
||||
public let url: String
|
||||
/// Item type
|
||||
@DecimalSerialized
|
||||
public private(set) var type: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter url: This is the path to the local file, must be prefixed by `file://`
|
||||
/// - Parameter type: Item type
|
||||
///
|
||||
public init(url: String, type: Double? = nil) {
|
||||
self.url = url
|
||||
self._type = DecimalSerialized<Double?>(wrappedValue: type)
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.GetFileHashRequest {
|
||||
var typeWrapper: DecimalSerialized<Double?> {
|
||||
return _type
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetFileHashResponse {
|
||||
case empty
|
||||
case object(Operations.GetFileHashResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.GetFileHashResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetFileHashResponseBody {
|
||||
public let errors: [Operations.GetFileHashErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetFileHashErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetFileHashResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGlobalHubsErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetGlobalHubsHubsResponseBody {
|
||||
public let errors: [Operations.GetGlobalHubsErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetGlobalHubsErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsHubsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGlobalHubsMediaContainer {
|
||||
public let allowSync: Bool?
|
||||
public let hub: [Operations.Hub]?
|
||||
public let identifier: String?
|
||||
public let size: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool? = nil, hub: [Operations.Hub]? = nil, identifier: String? = nil, size: Int? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.hub = hub
|
||||
self.identifier = identifier
|
||||
self.size = size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case hub = "Hub"
|
||||
case identifier
|
||||
case size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGlobalHubsMetadata {
|
||||
public let addedAt: Int?
|
||||
public let composite: String?
|
||||
public let duration: Int?
|
||||
public let guid: String?
|
||||
public let icon: String?
|
||||
public let key: String?
|
||||
public let lastViewedAt: Int?
|
||||
public let leafCount: Int?
|
||||
public let playlistType: String?
|
||||
public let ratingKey: String?
|
||||
public let smart: Bool?
|
||||
public let summary: String?
|
||||
public let title: String?
|
||||
public let titleSort: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
public let viewCount: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Int? = nil, composite: String? = nil, duration: Int? = nil, guid: String? = nil, icon: String? = nil, key: String? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, playlistType: String? = nil, ratingKey: String? = nil, smart: Bool? = nil, summary: String? = nil, title: String? = nil, titleSort: String? = nil, type: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.composite = composite
|
||||
self.duration = duration
|
||||
self.guid = guid
|
||||
self.icon = icon
|
||||
self.key = key
|
||||
self.lastViewedAt = lastViewedAt
|
||||
self.leafCount = leafCount
|
||||
self.playlistType = playlistType
|
||||
self.ratingKey = ratingKey
|
||||
self.smart = smart
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.titleSort = titleSort
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
self.viewCount = viewCount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case composite
|
||||
case duration
|
||||
case guid
|
||||
case icon
|
||||
case key
|
||||
case lastViewedAt
|
||||
case leafCount
|
||||
case playlistType
|
||||
case ratingKey
|
||||
case smart
|
||||
case summary
|
||||
case title
|
||||
case titleSort
|
||||
case type
|
||||
case updatedAt
|
||||
case viewCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetGlobalHubsRequest: APIValue {
|
||||
/// The number of items to return with each hub.
|
||||
@DecimalSerialized
|
||||
public private(set) var count: Double?
|
||||
/// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
||||
public let onlyTransient: Operations.OnlyTransient?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter count: The number of items to return with each hub.
|
||||
/// - Parameter onlyTransient: Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
||||
///
|
||||
public init(count: Double? = nil, onlyTransient: Operations.OnlyTransient? = nil) {
|
||||
self._count = DecimalSerialized<Double?>(wrappedValue: count)
|
||||
self.onlyTransient = onlyTransient
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Operations.GetGlobalHubsRequest {
|
||||
var countWrapper: DecimalSerialized<Double?> {
|
||||
return _count
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetGlobalHubsResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.GetGlobalHubsResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.GetGlobalHubsHubsResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.GetGlobalHubsResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetGlobalHubsHubsResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// returns global hubs
|
||||
public struct GetGlobalHubsResponseBody {
|
||||
public let mediaContainer: Operations.GetGlobalHubsMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetGlobalHubsMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetGlobalHubsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibrariesDirectory {
|
||||
public let agent: String?
|
||||
public let allowSync: Bool?
|
||||
public let art: String?
|
||||
public let composite: String?
|
||||
public let content: Bool?
|
||||
public let contentChangedAt: Int?
|
||||
public let createdAt: Int?
|
||||
public let directory: Bool?
|
||||
public let filters: Bool?
|
||||
public let hidden: Int?
|
||||
public let key: String?
|
||||
public let language: String?
|
||||
public let location: [Operations.GetLibrariesLocation]?
|
||||
public let refreshing: Bool?
|
||||
public let scannedAt: Int?
|
||||
public let scanner: String?
|
||||
public let thumb: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
public let uuid: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(agent: String? = nil, allowSync: Bool? = nil, art: String? = nil, composite: String? = nil, content: Bool? = nil, contentChangedAt: Int? = nil, createdAt: Int? = nil, directory: Bool? = nil, filters: Bool? = nil, hidden: Int? = nil, key: String? = nil, language: String? = nil, location: [Operations.GetLibrariesLocation]? = nil, refreshing: Bool? = nil, scannedAt: Int? = nil, scanner: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, uuid: String? = nil) {
|
||||
self.agent = agent
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self.composite = composite
|
||||
self.content = content
|
||||
self.contentChangedAt = contentChangedAt
|
||||
self.createdAt = createdAt
|
||||
self.directory = directory
|
||||
self.filters = filters
|
||||
self.hidden = hidden
|
||||
self.key = key
|
||||
self.language = language
|
||||
self.location = location
|
||||
self.refreshing = refreshing
|
||||
self.scannedAt = scannedAt
|
||||
self.scanner = scanner
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
self.uuid = uuid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesDirectory: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case agent
|
||||
case allowSync
|
||||
case art
|
||||
case composite
|
||||
case content
|
||||
case contentChangedAt
|
||||
case createdAt
|
||||
case directory
|
||||
case filters
|
||||
case hidden
|
||||
case key
|
||||
case language
|
||||
case location = "Location"
|
||||
case refreshing
|
||||
case scannedAt
|
||||
case scanner
|
||||
case thumb
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
case uuid
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/GetLibrariesErrors.swift
Normal file
58
Sources/Plexswift/models/operations/GetLibrariesErrors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibrariesErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetLibrariesLibraryResponseBody {
|
||||
public let errors: [Operations.GetLibrariesErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetLibrariesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesLibraryResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibrariesLocation {
|
||||
public let id: Int?
|
||||
public let path: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(id: Int? = nil, path: String? = nil) {
|
||||
self.id = id
|
||||
self.path = path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesLocation: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibrariesMediaContainer {
|
||||
public let allowSync: Bool?
|
||||
public let directory: [Operations.GetLibrariesDirectory]?
|
||||
public let size: Int?
|
||||
public let title1: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool? = nil, directory: [Operations.GetLibrariesDirectory]? = nil, size: Int? = nil, title1: String? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.directory = directory
|
||||
self.size = size
|
||||
self.title1 = title1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case directory = "Directory"
|
||||
case size
|
||||
case title1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetLibrariesResponse {
|
||||
case empty
|
||||
case twoHundredApplicationJsonObject(Operations.GetLibrariesResponseBody)
|
||||
case fourHundredAndOneApplicationJsonObject(Operations.GetLibrariesLibraryResponseBody)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func twoHundredApplicationJsonObject() throws -> Operations.GetLibrariesResponseBody {
|
||||
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibrariesLibraryResponseBody {
|
||||
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The libraries available on the Server
|
||||
public struct GetLibrariesResponseBody {
|
||||
public let mediaContainer: Operations.GetLibrariesMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetLibrariesMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibrariesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryDirectory {
|
||||
public let key: String?
|
||||
public let prompt: String?
|
||||
public let search: Bool?
|
||||
public let secondary: Bool?
|
||||
public let title: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(key: String? = nil, prompt: String? = nil, search: Bool? = nil, secondary: Bool? = nil, title: String? = nil) {
|
||||
self.key = key
|
||||
self.prompt = prompt
|
||||
self.search = search
|
||||
self.secondary = secondary
|
||||
self.title = title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryDirectory: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case prompt
|
||||
case search
|
||||
case secondary
|
||||
case title
|
||||
}
|
||||
}
|
||||
|
||||
58
Sources/Plexswift/models/operations/GetLibraryErrors.swift
Normal file
58
Sources/Plexswift/models/operations/GetLibraryErrors.swift
Normal file
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsCountry {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsCountry: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsDirector {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsDirector: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsErrors {
|
||||
@DecimalSerialized
|
||||
public private(set) var code: Double?
|
||||
public let message: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var status: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||
self.message = message
|
||||
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.code != nil {
|
||||
try container.encode(self._code, forKey: .code)
|
||||
}
|
||||
try container.encodeIfPresent(self.message, forKey: .message)
|
||||
if self.status != nil {
|
||||
try container.encode(self._status, forKey: .status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsErrors {
|
||||
var codeWrapper: DecimalSerialized<Double?> {
|
||||
return _code
|
||||
}
|
||||
var statusWrapper: DecimalSerialized<Double?> {
|
||||
return _status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsGenre {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsGenre: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
57
Sources/Plexswift/models/operations/GetLibraryHubsHub.swift
Normal file
57
Sources/Plexswift/models/operations/GetLibraryHubsHub.swift
Normal file
@@ -0,0 +1,57 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsHub {
|
||||
public let context: String?
|
||||
public let hubIdentifier: String?
|
||||
public let hubKey: String?
|
||||
public let key: String?
|
||||
public let metadata: [Operations.GetLibraryHubsMetadata]?
|
||||
public let more: Bool?
|
||||
public let promoted: Bool?
|
||||
public let random: Bool?
|
||||
public let size: Int?
|
||||
public let style: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(context: String? = nil, hubIdentifier: String? = nil, hubKey: String? = nil, key: String? = nil, metadata: [Operations.GetLibraryHubsMetadata]? = nil, more: Bool? = nil, promoted: Bool? = nil, random: Bool? = nil, size: Int? = nil, style: String? = nil, title: String? = nil, type: String? = nil) {
|
||||
self.context = context
|
||||
self.hubIdentifier = hubIdentifier
|
||||
self.hubKey = hubKey
|
||||
self.key = key
|
||||
self.metadata = metadata
|
||||
self.more = more
|
||||
self.promoted = promoted
|
||||
self.random = random
|
||||
self.size = size
|
||||
self.style = style
|
||||
self.title = title
|
||||
self.type = type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsHub: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case context
|
||||
case hubIdentifier
|
||||
case hubKey
|
||||
case key
|
||||
case metadata = "Metadata"
|
||||
case more
|
||||
case promoted
|
||||
case random
|
||||
case size
|
||||
case style
|
||||
case title
|
||||
case type
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetLibraryHubsHubsResponseBody {
|
||||
public let errors: [Operations.GetLibraryHubsErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetLibraryHubsErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsHubsResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
122
Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift
Normal file
122
Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift
Normal file
@@ -0,0 +1,122 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsMedia {
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
public let bitrate: Int?
|
||||
public let container: String?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let height: Int?
|
||||
public let id: Int?
|
||||
public let optimizedForStreaming: Int?
|
||||
public let part: [Operations.GetLibraryHubsPart]?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, id: Int? = nil, optimizedForStreaming: Int? = nil, part: [Operations.GetLibraryHubsPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.height = height
|
||||
self.id = id
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.part = part
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case height
|
||||
case id
|
||||
case optimizedForStreaming
|
||||
case part = "Part"
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._aspectRatio = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .aspectRatio) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audioChannels = try container.decodeIfPresent(Int.self, forKey: .audioChannels)
|
||||
self.audioCodec = try container.decodeIfPresent(String.self, forKey: .audioCodec)
|
||||
self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.container = try container.decodeIfPresent(String.self, forKey: .container)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.id = try container.decodeIfPresent(Int.self, forKey: .id)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Int.self, forKey: .optimizedForStreaming)
|
||||
self.part = try container.decodeIfPresent([Operations.GetLibraryHubsPart].self, forKey: .part)
|
||||
self.videoCodec = try container.decodeIfPresent(String.self, forKey: .videoCodec)
|
||||
self.videoFrameRate = try container.decodeIfPresent(String.self, forKey: .videoFrameRate)
|
||||
self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile)
|
||||
self.videoResolution = try container.decodeIfPresent(String.self, forKey: .videoResolution)
|
||||
self.width = try container.decodeIfPresent(Int.self, forKey: .width)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
try container.encodeIfPresent(self.audioChannels, forKey: .audioChannels)
|
||||
try container.encodeIfPresent(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.container, forKey: .container)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.id, forKey: .id)
|
||||
try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming)
|
||||
try container.encodeIfPresent(self.part, forKey: .part)
|
||||
try container.encodeIfPresent(self.videoCodec, forKey: .videoCodec)
|
||||
try container.encodeIfPresent(self.videoFrameRate, forKey: .videoFrameRate)
|
||||
try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile)
|
||||
try container.encodeIfPresent(self.videoResolution, forKey: .videoResolution)
|
||||
try container.encodeIfPresent(self.width, forKey: .width)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsMedia {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsMediaContainer {
|
||||
public let allowSync: Bool?
|
||||
public let hub: [Operations.GetLibraryHubsHub]?
|
||||
public let identifier: String?
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionTitle: String?
|
||||
public let librarySectionUUID: String?
|
||||
public let size: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool? = nil, hub: [Operations.GetLibraryHubsHub]? = nil, identifier: String? = nil, librarySectionID: Int? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, size: Int? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.hub = hub
|
||||
self.identifier = identifier
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.librarySectionUUID = librarySectionUUID
|
||||
self.size = size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case hub = "Hub"
|
||||
case identifier
|
||||
case librarySectionID
|
||||
case librarySectionTitle
|
||||
case librarySectionUUID
|
||||
case size
|
||||
}
|
||||
}
|
||||
|
||||
219
Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift
Normal file
219
Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift
Normal file
@@ -0,0 +1,219 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryHubsMetadata {
|
||||
public let addedAt: Int?
|
||||
public let art: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var audienceRating: Double?
|
||||
public let audienceRatingImage: String?
|
||||
public let chapterSource: String?
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.GetLibraryHubsCountry]?
|
||||
public let director: [Operations.GetLibraryHubsDirector]?
|
||||
public let duration: Int?
|
||||
public let genre: [Operations.GetLibraryHubsGenre]?
|
||||
public let guid: String?
|
||||
public let key: String?
|
||||
public let lastViewedAt: Int?
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let media: [Operations.GetLibraryHubsMedia]?
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let primaryExtraKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
public let ratingImage: String?
|
||||
public let ratingKey: String?
|
||||
public let role: [Operations.GetLibraryHubsRole]?
|
||||
public let skipCount: Int?
|
||||
public let studio: String?
|
||||
public let summary: String?
|
||||
public let tagline: String?
|
||||
public let thumb: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
public let updatedAt: Int?
|
||||
public let viewCount: Int?
|
||||
public let writer: [Operations.GetLibraryHubsWriter]?
|
||||
public let year: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, contentRating: String? = nil, country: [Operations.GetLibraryHubsCountry]? = nil, director: [Operations.GetLibraryHubsDirector]? = nil, duration: Int? = nil, genre: [Operations.GetLibraryHubsGenre]? = nil, guid: String? = nil, key: String? = nil, lastViewedAt: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetLibraryHubsMedia]? = nil, originallyAvailableAt: Date? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: String? = nil, role: [Operations.GetLibraryHubsRole]? = nil, skipCount: Int? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, writer: [Operations.GetLibraryHubsWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.chapterSource = chapterSource
|
||||
self.contentRating = contentRating
|
||||
self.country = country
|
||||
self.director = director
|
||||
self.duration = duration
|
||||
self.genre = genre
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self.lastViewedAt = lastViewedAt
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.media = media
|
||||
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.primaryExtraKey = primaryExtraKey
|
||||
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
|
||||
self.ratingImage = ratingImage
|
||||
self.ratingKey = ratingKey
|
||||
self.role = role
|
||||
self.skipCount = skipCount
|
||||
self.studio = studio
|
||||
self.summary = summary
|
||||
self.tagline = tagline
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.updatedAt = updatedAt
|
||||
self.viewCount = viewCount
|
||||
self.writer = writer
|
||||
self.year = year
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case art
|
||||
case audienceRating
|
||||
case audienceRatingImage
|
||||
case chapterSource
|
||||
case contentRating
|
||||
case country = "Country"
|
||||
case director = "Director"
|
||||
case duration
|
||||
case genre = "Genre"
|
||||
case guid
|
||||
case key
|
||||
case lastViewedAt
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case media = "Media"
|
||||
case originallyAvailableAt
|
||||
case primaryExtraKey
|
||||
case rating
|
||||
case ratingImage
|
||||
case ratingKey
|
||||
case role = "Role"
|
||||
case skipCount
|
||||
case studio
|
||||
case summary
|
||||
case tagline
|
||||
case thumb
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
case viewCount
|
||||
case writer = "Writer"
|
||||
case year
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt)
|
||||
self.art = try container.decodeIfPresent(String.self, forKey: .art)
|
||||
self._audienceRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .audienceRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage)
|
||||
self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.GetLibraryHubsCountry].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.GetLibraryHubsDirector].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.genre = try container.decodeIfPresent([Operations.GetLibraryHubsGenre].self, forKey: .genre)
|
||||
self.guid = try container.decodeIfPresent(String.self, forKey: .guid)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
|
||||
self.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.media = try container.decodeIfPresent([Operations.GetLibraryHubsMedia].self, forKey: .media)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||||
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey)
|
||||
self.role = try container.decodeIfPresent([Operations.GetLibraryHubsRole].self, forKey: .role)
|
||||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||
self.summary = try container.decodeIfPresent(String.self, forKey: .summary)
|
||||
self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline)
|
||||
self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
self.type = try container.decodeIfPresent(String.self, forKey: .type)
|
||||
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||||
self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount)
|
||||
self.writer = try container.decodeIfPresent([Operations.GetLibraryHubsWriter].self, forKey: .writer)
|
||||
self.year = try container.decodeIfPresent(Int.self, forKey: .year)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.addedAt, forKey: .addedAt)
|
||||
try container.encodeIfPresent(self.art, forKey: .art)
|
||||
if self.audienceRating != nil {
|
||||
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||||
}
|
||||
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||||
try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.director, forKey: .director)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||
try container.encodeIfPresent(self.guid, forKey: .guid)
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt)
|
||||
try container.encodeIfPresent(self.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey)
|
||||
if self.rating != nil {
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
}
|
||||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||||
try container.encodeIfPresent(self.ratingKey, forKey: .ratingKey)
|
||||
try container.encodeIfPresent(self.role, forKey: .role)
|
||||
try container.encodeIfPresent(self.skipCount, forKey: .skipCount)
|
||||
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||||
try container.encodeIfPresent(self.summary, forKey: .summary)
|
||||
try container.encodeIfPresent(self.tagline, forKey: .tagline)
|
||||
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.type, forKey: .type)
|
||||
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||||
try container.encodeIfPresent(self.viewCount, forKey: .viewCount)
|
||||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||||
try container.encodeIfPresent(self.year, forKey: .year)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryHubsMetadata {
|
||||
var ratingWrapper: DecimalSerialized<Double?> {
|
||||
return _rating
|
||||
}
|
||||
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||
return _audienceRating
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateOnly<Date?> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user