mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
swift:
|
||||
version: 0.10.3
|
||||
version: 0.10.5
|
||||
author: LukeHagar
|
||||
description: Swift Client SDK Generated by Speakeasy
|
||||
imports:
|
||||
|
||||
@@ -9,8 +9,8 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -18,10 +18,10 @@ targets:
|
||||
plexswift:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
codeSamplesNamespace: code-samples-swift-plexswift
|
||||
codeSamplesRevisionDigest: sha256:2791c989a9154c63541c0e45d5db9e043305012a241de17c40de5c038efcc7e4
|
||||
codeSamplesRevisionDigest: sha256:d7b2b324db0f365223bee21d09cb657417756c519e67d3425094d0bf48cea1d3
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
@@ -62,7 +62,7 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages.
|
||||
|
||||
```bash
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.10.3"))
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.10.5"))
|
||||
]
|
||||
```
|
||||
<!-- End SDK Installation [installation] -->
|
||||
@@ -148,7 +148,6 @@ case .empty:
|
||||
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
|
||||
|
||||
### [Log](docs/sdks/log/README.md)
|
||||
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -862,4 +862,14 @@ Based on:
|
||||
### Generated
|
||||
- [swift v0.10.3] .
|
||||
### Releases
|
||||
- [Swift Package Manager v0.10.3] https://github.com/LukeHagar/plexswift/releases/tag/v0.10.3 - .
|
||||
- [Swift Package Manager v0.10.3] https://github.com/LukeHagar/plexswift/releases/tag/v0.10.3 - .
|
||||
|
||||
## 2025-03-10 00:07:14
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [swift v0.10.5] .
|
||||
### Releases
|
||||
- [Swift Package Manager v0.10.5] https://github.com/LukeHagar/plexswift/releases/tag/v0.10.5 - .
|
||||
@@ -148,7 +148,6 @@ case .empty:
|
||||
- ``Operations/GetLibraryHubsBadRequest``
|
||||
- ``Operations/GetMetadataChildrenBadRequest``
|
||||
- ``Operations/GetMyPlexAccountBadRequest``
|
||||
- ``Operations/GetOnDeckBadRequest``
|
||||
- ``Operations/GetPinBadRequest``
|
||||
- ``Operations/GetPlaylistBadRequest``
|
||||
- ``Operations/GetPlaylistContentsBadRequest``
|
||||
@@ -231,7 +230,6 @@ case .empty:
|
||||
- ``Operations/GetLibraryHubsResponse``
|
||||
- ``Operations/GetMetadataChildrenResponse``
|
||||
- ``Operations/GetMyPlexAccountResponse``
|
||||
- ``Operations/GetOnDeckResponse``
|
||||
- ``Operations/GetPinResponse``
|
||||
- ``Operations/GetPlaylistResponse``
|
||||
- ``Operations/GetPlaylistContentsResponse``
|
||||
@@ -379,8 +377,10 @@ case .empty:
|
||||
- ``Operations/GetAllMediaLibraryFieldType``
|
||||
- ``Operations/GetAllMediaLibraryFilter``
|
||||
- ``Operations/GetAllMediaLibraryGenre``
|
||||
- ``Operations/GetAllMediaLibraryGuids``
|
||||
- ``Operations/GetAllMediaLibraryHasThumbnail``
|
||||
- ``Operations/GetAllMediaLibraryImage``
|
||||
- ``Operations/GetAllMediaLibraryLibrary1``
|
||||
- ``Operations/GetAllMediaLibraryLibraryErrors``
|
||||
- ``Operations/GetAllMediaLibraryLibraryOptimizedForStreaming``
|
||||
- ``Operations/GetAllMediaLibraryLibraryResponseType``
|
||||
@@ -441,13 +441,10 @@ case .empty:
|
||||
- ``Operations/GetLibraryItemsCountry``
|
||||
- ``Operations/GetLibraryItemsDefaultDirection``
|
||||
- ``Operations/GetLibraryItemsDirector``
|
||||
- ``Operations/GetLibraryItemsEnableCreditsMarkerGeneration``
|
||||
- ``Operations/GetLibraryItemsEpisodeSort``
|
||||
- ``Operations/GetLibraryItemsErrors``
|
||||
- ``Operations/GetLibraryItemsField``
|
||||
- ``Operations/GetLibraryItemsFieldType``
|
||||
- ``Operations/GetLibraryItemsFilter``
|
||||
- ``Operations/GetLibraryItemsFlattenSeasons``
|
||||
- ``Operations/GetLibraryItemsGenre``
|
||||
- ``Operations/GetLibraryItemsHasThumbnail``
|
||||
- ``Operations/GetLibraryItemsImage``
|
||||
@@ -465,10 +462,8 @@ case .empty:
|
||||
- ``Operations/GetLibraryItemsLocation``
|
||||
- ``Operations/GetLibraryItemsMedia``
|
||||
- ``Operations/GetLibraryItemsMediaContainer``
|
||||
- ``Operations/GetLibraryItemsMediaGuid``
|
||||
- ``Operations/GetLibraryItemsMeta``
|
||||
- ``Operations/GetLibraryItemsMetadata``
|
||||
- ``Operations/GetLibraryItemsMetaDataRating``
|
||||
- ``Operations/GetLibraryItemsOperator``
|
||||
- ``Operations/GetLibraryItemsOptimizedForStreaming``
|
||||
- ``Operations/GetLibraryItemsPart``
|
||||
@@ -477,7 +472,6 @@ case .empty:
|
||||
- ``Operations/GetLibraryItemsRequest``
|
||||
- ``Operations/GetLibraryItemsResponseBody``
|
||||
- ``Operations/GetLibraryItemsRole``
|
||||
- ``Operations/GetLibraryItemsShowOrdering``
|
||||
- ``Operations/GetLibraryItemsSort``
|
||||
- ``Operations/GetLibraryItemsStream``
|
||||
- ``Operations/GetLibraryItemsType``
|
||||
@@ -501,9 +495,11 @@ case .empty:
|
||||
- ``Operations/GetMediaMetaDataMetadata``
|
||||
- ``Operations/GetMediaMetaDataOptimizedForStreaming``
|
||||
- ``Operations/GetMediaMetaDataPart``
|
||||
- ``Operations/GetMediaMetaDataProducer``
|
||||
- ``Operations/GetMediaMetaDataRequest``
|
||||
- ``Operations/GetMediaMetaDataResponseBody``
|
||||
- ``Operations/GetMediaMetaDataRole``
|
||||
- ``Operations/GetMediaMetaDataSimilar``
|
||||
- ``Operations/GetMediaMetaDataStream``
|
||||
- ``Operations/GetMediaMetaDataUltraBlurColors``
|
||||
- ``Operations/GetMediaMetaDataUnauthorized``
|
||||
@@ -515,6 +511,7 @@ case .empty:
|
||||
- ``Operations/GetMediaProvidersResponseBody``
|
||||
- ``Operations/GetMediaProvidersServerErrors``
|
||||
- ``Operations/GetMediaProvidersUnauthorized``
|
||||
- ``Operations/GetRecentlyAdded1``
|
||||
- ``Operations/GetRecentlyAddedActiveDirection``
|
||||
- ``Operations/GetRecentlyAddedDefaultDirection``
|
||||
- ``Operations/GetRecentlyAddedField``
|
||||
@@ -526,6 +523,7 @@ case .empty:
|
||||
- ``Operations/GetRecentlyAddedMediaContainer``
|
||||
- ``Operations/GetRecentlyAddedMetadata``
|
||||
- ``Operations/GetRecentlyAddedOperator``
|
||||
- ``Operations/GetRecentlyAddedOptimizedForStreaming``
|
||||
- ``Operations/GetRecentlyAddedRequest``
|
||||
- ``Operations/GetRecentlyAddedResponseBody``
|
||||
- ``Operations/GetRecentlyAddedSort``
|
||||
@@ -683,16 +681,6 @@ case .empty:
|
||||
- ``Operations/GetMyPlexAccountResponseBody``
|
||||
- ``Operations/GetMyPlexAccountServerErrors``
|
||||
- ``Operations/GetMyPlexAccountUnauthorized``
|
||||
- ``Operations/GetOnDeckErrors``
|
||||
- ``Operations/GetOnDeckGuids``
|
||||
- ``Operations/GetOnDeckLibraryErrors``
|
||||
- ``Operations/GetOnDeckMedia``
|
||||
- ``Operations/GetOnDeckMediaContainer``
|
||||
- ``Operations/GetOnDeckMetadata``
|
||||
- ``Operations/GetOnDeckPart``
|
||||
- ``Operations/GetOnDeckResponseBody``
|
||||
- ``Operations/GetOnDeckStream``
|
||||
- ``Operations/GetOnDeckUnauthorized``
|
||||
- ``Operations/GetPinAuthPinContainer``
|
||||
- ``Operations/GetPinErrors``
|
||||
- ``Operations/GetPinRequest``
|
||||
@@ -942,6 +930,7 @@ case .empty:
|
||||
- ``Operations/QueryParamOnlyTransient``
|
||||
- ``Operations/QueryParamSmart``
|
||||
- ``Operations/QueryParamType``
|
||||
- ``Operations/Rating``
|
||||
- ``Operations/Ratings``
|
||||
- ``Operations/Release``
|
||||
- ``Operations/ResponseBody``
|
||||
|
||||
@@ -153,15 +153,6 @@ class _LibraryAPI: LibraryAPI {
|
||||
handleResponse: handleGetTopWatchedContentResponse
|
||||
)
|
||||
}
|
||||
|
||||
public func getOnDeck() async throws -> Response<Operations.GetOnDeckResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
try configureGetOnDeckRequest(with: configuration)
|
||||
},
|
||||
handleResponse: handleGetOnDeckResponse
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -289,12 +280,6 @@ private func configureGetTopWatchedContentRequest(with configuration: URLRequest
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetOnDeckRequest(with configuration: URLRequestConfiguration) throws {
|
||||
configuration.path = "/library/onDeck"
|
||||
configuration.method = .get
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
// MARK: - Response Handlers
|
||||
|
||||
private func handleGetFileHashResponse(response: Client.APIResponse) throws -> Operations.GetFileHashResponse {
|
||||
@@ -801,35 +786,3 @@ private func handleGetTopWatchedContentResponse(response: Client.APIResponse) th
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetOnDeckResponse(response: Client.APIResponse) throws -> Operations.GetOnDeckResponse {
|
||||
let httpResponse = response.httpResponse
|
||||
|
||||
if httpResponse.statusCode == 200 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .object(try JSONDecoder().decode(Operations.GetOnDeckResponseBody.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 400 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .badRequest(try JSONDecoder().decode(Operations.GetOnDeckBadRequest.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 401 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .unauthorized(try JSONDecoder().decode(Operations.GetOnDeckUnauthorized.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return .empty
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsEpisodeSort: Serializable {
|
||||
extension Operations.GetAllMediaLibraryLibrary1: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsEnableCreditsMarkerGeneration: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsFlattenSeasons: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsShowOrdering: Serializable {
|
||||
extension Operations.GetRecentlyAdded1: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetRecentlyAddedOptimizedForStreaming: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,6 @@ import Foundation
|
||||
|
||||
extension Operations.OptimizedForStreaming: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,14 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Collection {
|
||||
public let tag: String?
|
||||
/// The user-made collection this media item belongs to
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The user-made collection this media item belongs to
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
public init(tag: String) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -3,21 +3,29 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
/// The filter query string for country media items.
|
||||
public struct Country {
|
||||
public let tag: String?
|
||||
public let id: Int
|
||||
/// The country of origin of this media item
|
||||
public let tag: String
|
||||
public let filter: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The country of origin of this media item
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
public init(id: Int, tag: String, filter: String? = nil) {
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
self.filter = filter
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Country: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case tag
|
||||
case filter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,14 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Director {
|
||||
public let tag: String?
|
||||
/// The role of Director
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The role of Director
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
public init(tag: String) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -3,20 +3,30 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
/// The filter query string for similar items.
|
||||
public struct Genre {
|
||||
public let tag: String?
|
||||
public let filter: String
|
||||
public let id: Int
|
||||
/// The genre name of this media-item
|
||||
///
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The genre name of this media-item
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
public init(filter: String, id: Int, tag: String) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Genre: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,14 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAllMediaLibraryGenre {
|
||||
/// The country of origin of this media item
|
||||
/// The genre name of this media-item
|
||||
///
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The country of origin of this media item
|
||||
/// - Parameter tag: The genre name of this media-item
|
||||
///
|
||||
///
|
||||
public init(tag: String) {
|
||||
self.tag = tag
|
||||
|
||||
@@ -4,18 +4,22 @@ import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckGuids {
|
||||
public struct GetAllMediaLibraryGuids {
|
||||
/// The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
|
||||
///
|
||||
public let id: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter id: The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
|
||||
///
|
||||
///
|
||||
public init(id: String? = nil) {
|
||||
self.id = id
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckGuids: Codable {
|
||||
extension Operations.GetAllMediaLibraryGuids: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetAllMediaLibraryLibrary1: Int, Codable, APIValue {
|
||||
case zero = 0
|
||||
case one = 1
|
||||
}}
|
||||
@@ -5,14 +5,14 @@ import Foundation
|
||||
extension Operations {
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public enum GetAllMediaLibraryLibraryOptimizedForStreaming {
|
||||
case getAllMediaLibrary1(Operations.GetAllMediaLibrary1)
|
||||
case getAllMediaLibraryLibrary1(Operations.GetAllMediaLibraryLibrary1)
|
||||
case bool(Bool)
|
||||
}}
|
||||
|
||||
extension Operations.GetAllMediaLibraryLibraryOptimizedForStreaming: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
if let value = try? Operations.GetAllMediaLibrary1(from: decoder) {
|
||||
self = .getAllMediaLibrary1(value)
|
||||
if let value = try? Operations.GetAllMediaLibraryLibrary1(from: decoder) {
|
||||
self = .getAllMediaLibraryLibrary1(value)
|
||||
} else if let value = try? Bool(from: decoder) {
|
||||
self = .bool(value)
|
||||
} else {
|
||||
@@ -22,7 +22,7 @@ extension Operations.GetAllMediaLibraryLibraryOptimizedForStreaming: Codable {
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
switch self {
|
||||
case .getAllMediaLibrary1(let value):
|
||||
case .getAllMediaLibraryLibrary1(let value):
|
||||
try value.encode(to: encoder)
|
||||
case .bool(let value):
|
||||
try value.encode(to: encoder)
|
||||
|
||||
@@ -5,12 +5,8 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAllMediaLibraryMedia {
|
||||
/// Indicates whether voice activity is detected.
|
||||
public let hasVoiceActivity: Bool
|
||||
/// Unique media identifier.
|
||||
public let id: Int
|
||||
/// An array of parts for this media item.
|
||||
public let part: [Operations.GetAllMediaLibraryPart]
|
||||
/// Aspect ratio of the video.
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
@@ -28,10 +24,14 @@ extension Operations {
|
||||
/// Duration of the media in milliseconds.
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
/// Indicates whether voice activity is detected.
|
||||
public let hasVoiceActivity: Bool?
|
||||
/// Video height in pixels.
|
||||
public let height: Int?
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public let optimizedForStreaming: Operations.GetAllMediaLibraryOptimizedForStreaming?
|
||||
/// An array of parts for this media item.
|
||||
public let part: [Operations.GetAllMediaLibraryPart]?
|
||||
/// Video codec used.
|
||||
public let videoCodec: String?
|
||||
/// Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
@@ -46,9 +46,7 @@ extension Operations {
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter hasVoiceActivity: Indicates whether voice activity is detected.
|
||||
/// - Parameter id: Unique media identifier.
|
||||
/// - Parameter part: An array of parts for this media item.
|
||||
/// - Parameter aspectRatio: Aspect ratio of the video.
|
||||
/// - Parameter audioChannels: Number of audio channels.
|
||||
/// - Parameter audioCodec: Audio codec used.
|
||||
@@ -56,8 +54,10 @@ extension Operations {
|
||||
/// - Parameter bitrate: Bitrate in bits per second.
|
||||
/// - Parameter container: File container type.
|
||||
/// - Parameter duration: Duration of the media in milliseconds.
|
||||
/// - Parameter hasVoiceActivity: Indicates whether voice activity is detected.
|
||||
/// - Parameter height: Video height in pixels.
|
||||
/// - Parameter optimizedForStreaming: Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
/// - Parameter part: An array of parts for this media item.
|
||||
/// - Parameter videoCodec: Video codec used.
|
||||
/// - Parameter videoFrameRate: Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
///
|
||||
@@ -65,10 +65,8 @@ extension Operations {
|
||||
/// - Parameter videoResolution: Video resolution (e.g., 4k).
|
||||
/// - Parameter width: Video width in pixels.
|
||||
///
|
||||
public init(hasVoiceActivity: Bool, id: Int, part: [Operations.GetAllMediaLibraryPart], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, displayOffset: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetAllMediaLibraryOptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
public init(id: Int, aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, displayOffset: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetAllMediaLibraryOptimizedForStreaming? = nil, part: [Operations.GetAllMediaLibraryPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
@@ -78,8 +76,10 @@ extension Operations {
|
||||
self.displayOffset = displayOffset
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.part = part
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
@@ -90,9 +90,7 @@ extension Operations {
|
||||
|
||||
extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case hasVoiceActivity
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
@@ -102,8 +100,10 @@ extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
case displayOffset
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case optimizedForStreaming
|
||||
case part = "Part"
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
@@ -113,9 +113,7 @@ extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.hasVoiceActivity = try container.decode(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.GetAllMediaLibraryPart].self, forKey: .part)
|
||||
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)
|
||||
@@ -125,8 +123,10 @@ extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
self.displayOffset = try container.decodeIfPresent(Int.self, forKey: .displayOffset)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.GetAllMediaLibraryOptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
self.part = try container.decodeIfPresent([Operations.GetAllMediaLibraryPart].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)
|
||||
@@ -136,9 +136,7 @@ extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
@@ -150,8 +148,10 @@ extension Operations.GetAllMediaLibraryMedia: Codable {
|
||||
try container.encodeIfPresent(self.displayOffset, forKey: .displayOffset)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
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)
|
||||
|
||||
@@ -47,8 +47,6 @@ extension Operations {
|
||||
/// The sort title used for ordering media items.
|
||||
public let titleSort: String
|
||||
public let type: Operations.GetAllMediaLibraryLibraryType
|
||||
/// The release year of the media item.
|
||||
public let year: Int
|
||||
/// The URL for the audience rating image.
|
||||
public let audienceRatingImage: String?
|
||||
/// The source from which chapter data is derived.
|
||||
@@ -79,7 +77,7 @@ extension Operations {
|
||||
public let grandparentThumb: String?
|
||||
/// The title of the grandparent media item.
|
||||
public let grandparentTitle: String?
|
||||
public let guids: [Operations.Guids]?
|
||||
public let guids: [Operations.GetAllMediaLibraryGuids]?
|
||||
public let image: [Operations.GetAllMediaLibraryImage]?
|
||||
/// The Unix timestamp representing the last time the item was rated.
|
||||
public let lastRatedAt: Int?
|
||||
@@ -126,6 +124,8 @@ extension Operations {
|
||||
/// The current playback offset (in milliseconds).
|
||||
public let viewOffset: Int?
|
||||
public let writer: [Operations.GetAllMediaLibraryWriter]?
|
||||
/// The release year of the media item.
|
||||
public let year: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
@@ -147,7 +147,6 @@ extension Operations {
|
||||
/// - Parameter thumb: The thumbnail image URL for the media item.
|
||||
/// - Parameter title: The title of the media item.
|
||||
/// - Parameter titleSort: The sort title used for ordering media items.
|
||||
/// - Parameter year: The release year of the media item.
|
||||
/// - Parameter audienceRatingImage: The URL for the audience rating image.
|
||||
/// - Parameter chapterSource: The source from which chapter data is derived.
|
||||
/// - Parameter contentRating: The content rating for the media item.
|
||||
@@ -181,8 +180,9 @@ extension Operations {
|
||||
/// - Parameter viewCount: The number of times this media item has been viewed.
|
||||
/// - Parameter viewedLeafCount: The number of leaf items that have been viewed.
|
||||
/// - Parameter viewOffset: The current playback offset (in milliseconds).
|
||||
/// - Parameter year: The release year of the media item.
|
||||
///
|
||||
public init(addedAt: Int, art: String, audienceRating: Double, childCount: Int, duration: Int, guid: String, index: Int, key: String, originallyAvailableAt: Date, rating: Double, ratingKey: String, seasonCount: Int, slug: String, summary: String, tagline: String, theme: String, thumb: String, title: String, titleSort: String, type: Operations.GetAllMediaLibraryLibraryType, year: Int, audienceRatingImage: String? = nil, chapterSource: String? = nil, collection: [Operations.GetAllMediaLibraryCollection]? = nil, contentRating: String? = nil, country: [Operations.GetAllMediaLibraryCountry]? = nil, createdAtAccuracy: String? = nil, createdAtTZOffset: String? = nil, director: [Operations.GetAllMediaLibraryDirector]? = nil, genre: [Operations.GetAllMediaLibraryGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.Guids]? = nil, image: [Operations.GetAllMediaLibraryImage]? = nil, lastRatedAt: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, media: [Operations.GetAllMediaLibraryMedia]? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, ratingImage: String? = nil, role: [Operations.GetAllMediaLibraryRole]? = nil, skipCount: Int? = nil, studio: String? = nil, subtype: String? = nil, ultraBlurColors: Operations.GetAllMediaLibraryUltraBlurColors? = nil, updatedAt: Int? = nil, userRating: Double? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetAllMediaLibraryWriter]? = nil) {
|
||||
public init(addedAt: Int, art: String, audienceRating: Double, childCount: Int, duration: Int, guid: String, index: Int, key: String, originallyAvailableAt: Date, rating: Double, ratingKey: String, seasonCount: Int, slug: String, summary: String, tagline: String, theme: String, thumb: String, title: String, titleSort: String, type: Operations.GetAllMediaLibraryLibraryType, audienceRatingImage: String? = nil, chapterSource: String? = nil, collection: [Operations.GetAllMediaLibraryCollection]? = nil, contentRating: String? = nil, country: [Operations.GetAllMediaLibraryCountry]? = nil, createdAtAccuracy: String? = nil, createdAtTZOffset: String? = nil, director: [Operations.GetAllMediaLibraryDirector]? = nil, genre: [Operations.GetAllMediaLibraryGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.GetAllMediaLibraryGuids]? = nil, image: [Operations.GetAllMediaLibraryImage]? = nil, lastRatedAt: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, media: [Operations.GetAllMediaLibraryMedia]? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, ratingImage: String? = nil, role: [Operations.GetAllMediaLibraryRole]? = nil, skipCount: Int? = nil, studio: String? = nil, subtype: String? = nil, ultraBlurColors: Operations.GetAllMediaLibraryUltraBlurColors? = nil, updatedAt: Int? = nil, userRating: Double? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetAllMediaLibraryWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double>(wrappedValue: audienceRating)
|
||||
@@ -203,7 +203,6 @@ extension Operations {
|
||||
self.title = title
|
||||
self.titleSort = titleSort
|
||||
self.type = type
|
||||
self.year = year
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.chapterSource = chapterSource
|
||||
self.collection = collection
|
||||
@@ -247,6 +246,7 @@ extension Operations {
|
||||
self.viewedLeafCount = viewedLeafCount
|
||||
self.viewOffset = viewOffset
|
||||
self.writer = writer
|
||||
self.year = year
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -272,7 +272,6 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
case title
|
||||
case titleSort
|
||||
case type
|
||||
case year
|
||||
case audienceRatingImage
|
||||
case chapterSource
|
||||
case collection = "Collection"
|
||||
@@ -316,6 +315,7 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
case viewedLeafCount
|
||||
case viewOffset
|
||||
case writer = "Writer"
|
||||
case year
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
@@ -340,7 +340,6 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
self.title = try container.decode(String.self, forKey: .title)
|
||||
self.titleSort = try container.decode(String.self, forKey: .titleSort)
|
||||
self.type = try container.decode(Operations.GetAllMediaLibraryLibraryType.self, forKey: .type)
|
||||
self.year = try container.decode(Int.self, forKey: .year)
|
||||
self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage)
|
||||
self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||||
self.collection = try container.decodeIfPresent([Operations.GetAllMediaLibraryCollection].self, forKey: .collection)
|
||||
@@ -358,7 +357,7 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
self.grandparentTheme = try container.decodeIfPresent(String.self, forKey: .grandparentTheme)
|
||||
self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb)
|
||||
self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle)
|
||||
self.guids = try container.decodeIfPresent([Operations.Guids].self, forKey: .guids)
|
||||
self.guids = try container.decodeIfPresent([Operations.GetAllMediaLibraryGuids].self, forKey: .guids)
|
||||
self.image = try container.decodeIfPresent([Operations.GetAllMediaLibraryImage].self, forKey: .image)
|
||||
self.lastRatedAt = try container.decodeIfPresent(Int.self, forKey: .lastRatedAt)
|
||||
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
|
||||
@@ -384,6 +383,7 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
|
||||
self.viewOffset = try container.decodeIfPresent(Int.self, forKey: .viewOffset)
|
||||
self.writer = try container.decodeIfPresent([Operations.GetAllMediaLibraryWriter].self, forKey: .writer)
|
||||
self.year = try container.decodeIfPresent(Int.self, forKey: .year)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
@@ -408,7 +408,6 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
try container.encode(self.title, forKey: .title)
|
||||
try container.encode(self.titleSort, forKey: .titleSort)
|
||||
try container.encode(self.type, forKey: .type)
|
||||
try container.encode(self.year, forKey: .year)
|
||||
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||||
try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource)
|
||||
try container.encodeIfPresent(self.collection, forKey: .collection)
|
||||
@@ -454,6 +453,7 @@ extension Operations.GetAllMediaLibraryMetadata: Codable {
|
||||
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
|
||||
try container.encodeIfPresent(self.viewOffset, forKey: .viewOffset)
|
||||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||||
try container.encodeIfPresent(self.year, forKey: .year)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import Foundation
|
||||
extension Operations {
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public enum GetAllMediaLibraryOptimizedForStreaming {
|
||||
case one(Operations.One)
|
||||
case getAllMediaLibrary1(Operations.GetAllMediaLibrary1)
|
||||
case bool(Bool)
|
||||
}}
|
||||
|
||||
extension Operations.GetAllMediaLibraryOptimizedForStreaming: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
if let value = try? Operations.One(from: decoder) {
|
||||
self = .one(value)
|
||||
if let value = try? Operations.GetAllMediaLibrary1(from: decoder) {
|
||||
self = .getAllMediaLibrary1(value)
|
||||
} else if let value = try? Bool(from: decoder) {
|
||||
self = .bool(value)
|
||||
} else {
|
||||
@@ -22,7 +22,7 @@ extension Operations.GetAllMediaLibraryOptimizedForStreaming: Codable {
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
switch self {
|
||||
case .one(let value):
|
||||
case .getAllMediaLibrary1(let value):
|
||||
try value.encode(to: encoder)
|
||||
case .bool(let value):
|
||||
try value.encode(to: encoder)
|
||||
|
||||
@@ -5,12 +5,12 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAllMediaLibraryRole {
|
||||
/// The name of the actor for this role
|
||||
/// The display tag for the actor (typically the actor's name).
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter tag: The name of the actor for this role
|
||||
/// - Parameter tag: The display tag for the actor (typically the actor's name).
|
||||
///
|
||||
public init(tag: String) {
|
||||
self.tag = tag
|
||||
|
||||
@@ -15,12 +15,6 @@ extension Operations {
|
||||
public let id: Int
|
||||
/// Index of the stream.
|
||||
public let index: Int
|
||||
/// Language of the stream.
|
||||
public let language: String
|
||||
/// ISO language code.
|
||||
public let languageCode: String
|
||||
/// Language tag (e.g., en).
|
||||
public let languageTag: String
|
||||
/// Stream type (1=video, 2=audio, 3=subtitle).
|
||||
public let streamType: Int
|
||||
/// Audio channel layout.
|
||||
@@ -37,6 +31,7 @@ extension Operations {
|
||||
public let chromaLocation: String?
|
||||
/// Chroma subsampling format.
|
||||
public let chromaSubsampling: String?
|
||||
public let closedCaptions: Bool?
|
||||
/// Coded video height.
|
||||
public let codedHeight: Int?
|
||||
/// Coded video width.
|
||||
@@ -69,6 +64,7 @@ extension Operations {
|
||||
public let doviVersion: String?
|
||||
/// Indicates if the stream is a dub.
|
||||
public let dub: Bool?
|
||||
public let embeddedInVideo: String?
|
||||
public let forced: Bool?
|
||||
/// Frame rate of the stream.
|
||||
@DecimalSerialized
|
||||
@@ -80,6 +76,12 @@ extension Operations {
|
||||
public let hearingImpaired: Bool?
|
||||
/// Height of the video stream.
|
||||
public let height: Int?
|
||||
/// Language of the stream.
|
||||
public let language: String?
|
||||
/// ISO language code.
|
||||
public let languageCode: String?
|
||||
/// Language tag (e.g., en).
|
||||
public let languageTag: String?
|
||||
/// Video level.
|
||||
public let level: Int?
|
||||
/// Indicates if this is the original stream.
|
||||
@@ -105,9 +107,6 @@ extension Operations {
|
||||
/// - Parameter extendedDisplayTitle: Extended display title for the stream.
|
||||
/// - Parameter id: Unique stream identifier.
|
||||
/// - Parameter index: Index of the stream.
|
||||
/// - Parameter language: Language of the stream.
|
||||
/// - Parameter languageCode: ISO language code.
|
||||
/// - Parameter languageTag: Language tag (e.g., en).
|
||||
/// - Parameter streamType: Stream type (1=video, 2=audio, 3=subtitle).
|
||||
/// - Parameter audioChannelLayout: Audio channel layout.
|
||||
/// - Parameter bitDepth: Bit depth of the video stream.
|
||||
@@ -136,6 +135,9 @@ extension Operations {
|
||||
/// - Parameter headerCompression: Indicates whether header compression is enabled.
|
||||
/// - Parameter hearingImpaired: Indicates if the stream is for the hearing impaired.
|
||||
/// - Parameter height: Height of the video stream.
|
||||
/// - Parameter language: Language of the stream.
|
||||
/// - Parameter languageCode: ISO language code.
|
||||
/// - Parameter languageTag: Language tag (e.g., en).
|
||||
/// - Parameter level: Video level.
|
||||
/// - Parameter original: Indicates if this is the original stream.
|
||||
/// - Parameter profile: Video profile.
|
||||
@@ -145,15 +147,12 @@ extension Operations {
|
||||
/// - Parameter title: Optional title for the stream (e.g., language variant).
|
||||
/// - Parameter width: Width of the video stream.
|
||||
///
|
||||
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, language: String, languageCode: String, languageTag: String, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
|
||||
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, embeddedInVideo: String? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
|
||||
self.codec = codec
|
||||
self.displayTitle = displayTitle
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self.id = id
|
||||
self.index = index
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.streamType = streamType
|
||||
self.audioChannelLayout = audioChannelLayout
|
||||
self.bitDepth = bitDepth
|
||||
@@ -162,6 +161,7 @@ extension Operations {
|
||||
self.channels = channels
|
||||
self.chromaLocation = chromaLocation
|
||||
self.chromaSubsampling = chromaSubsampling
|
||||
self.closedCaptions = closedCaptions
|
||||
self.codedHeight = codedHeight
|
||||
self.codedWidth = codedWidth
|
||||
self.colorPrimaries = colorPrimaries
|
||||
@@ -178,12 +178,16 @@ extension Operations {
|
||||
self.dovirpuPresent = dovirpuPresent
|
||||
self.doviVersion = doviVersion
|
||||
self.dub = dub
|
||||
self.embeddedInVideo = embeddedInVideo
|
||||
self.forced = forced
|
||||
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
|
||||
self.hasScalingMatrix = hasScalingMatrix
|
||||
self.headerCompression = headerCompression
|
||||
self.hearingImpaired = hearingImpaired
|
||||
self.height = height
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.level = level
|
||||
self.original = original
|
||||
self.profile = profile
|
||||
@@ -203,9 +207,6 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
case extendedDisplayTitle
|
||||
case id
|
||||
case index
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case streamType
|
||||
case audioChannelLayout
|
||||
case bitDepth
|
||||
@@ -214,6 +215,7 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
case channels
|
||||
case chromaLocation
|
||||
case chromaSubsampling
|
||||
case closedCaptions
|
||||
case codedHeight
|
||||
case codedWidth
|
||||
case colorPrimaries
|
||||
@@ -230,12 +232,16 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
case dovirpuPresent = "DOVIRPUPresent"
|
||||
case doviVersion = "DOVIVersion"
|
||||
case dub
|
||||
case embeddedInVideo
|
||||
case forced
|
||||
case frameRate
|
||||
case hasScalingMatrix
|
||||
case headerCompression
|
||||
case hearingImpaired
|
||||
case height
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case level
|
||||
case original
|
||||
case profile
|
||||
@@ -254,9 +260,6 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
self.extendedDisplayTitle = try container.decode(String.self, forKey: .extendedDisplayTitle)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.index = try container.decode(Int.self, forKey: .index)
|
||||
self.language = try container.decode(String.self, forKey: .language)
|
||||
self.languageCode = try container.decode(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decode(String.self, forKey: .languageTag)
|
||||
self.streamType = try container.decode(Int.self, forKey: .streamType)
|
||||
self.audioChannelLayout = try container.decodeIfPresent(String.self, forKey: .audioChannelLayout)
|
||||
self.bitDepth = try container.decodeIfPresent(Int.self, forKey: .bitDepth)
|
||||
@@ -265,6 +268,7 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
self.channels = try container.decodeIfPresent(Int.self, forKey: .channels)
|
||||
self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation)
|
||||
self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling)
|
||||
self.closedCaptions = try container.decodeIfPresent(Bool.self, forKey: .closedCaptions)
|
||||
self.codedHeight = try container.decodeIfPresent(Int.self, forKey: .codedHeight)
|
||||
self.codedWidth = try container.decodeIfPresent(Int.self, forKey: .codedWidth)
|
||||
self.colorPrimaries = try container.decodeIfPresent(String.self, forKey: .colorPrimaries)
|
||||
@@ -281,12 +285,16 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
self.dovirpuPresent = try container.decodeIfPresent(Bool.self, forKey: .dovirpuPresent)
|
||||
self.doviVersion = try container.decodeIfPresent(String.self, forKey: .doviVersion)
|
||||
self.dub = try container.decodeIfPresent(Bool.self, forKey: .dub)
|
||||
self.embeddedInVideo = try container.decodeIfPresent(String.self, forKey: .embeddedInVideo)
|
||||
self.forced = try container.decodeIfPresent(Bool.self, forKey: .forced)
|
||||
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix)
|
||||
self.headerCompression = try container.decodeIfPresent(Bool.self, forKey: .headerCompression)
|
||||
self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.language = try container.decodeIfPresent(String.self, forKey: .language)
|
||||
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
|
||||
self.level = try container.decodeIfPresent(Int.self, forKey: .level)
|
||||
self.original = try container.decodeIfPresent(Bool.self, forKey: .original)
|
||||
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
|
||||
@@ -305,9 +313,6 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
try container.encode(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.index, forKey: .index)
|
||||
try container.encode(self.language, forKey: .language)
|
||||
try container.encode(self.languageCode, forKey: .languageCode)
|
||||
try container.encode(self.languageTag, forKey: .languageTag)
|
||||
try container.encode(self.streamType, forKey: .streamType)
|
||||
try container.encodeIfPresent(self.audioChannelLayout, forKey: .audioChannelLayout)
|
||||
try container.encodeIfPresent(self.bitDepth, forKey: .bitDepth)
|
||||
@@ -316,6 +321,7 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
try container.encodeIfPresent(self.channels, forKey: .channels)
|
||||
try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation)
|
||||
try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling)
|
||||
try container.encodeIfPresent(self.closedCaptions, forKey: .closedCaptions)
|
||||
try container.encodeIfPresent(self.codedHeight, forKey: .codedHeight)
|
||||
try container.encodeIfPresent(self.codedWidth, forKey: .codedWidth)
|
||||
try container.encodeIfPresent(self.colorPrimaries, forKey: .colorPrimaries)
|
||||
@@ -332,6 +338,7 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
try container.encodeIfPresent(self.dovirpuPresent, forKey: .dovirpuPresent)
|
||||
try container.encodeIfPresent(self.doviVersion, forKey: .doviVersion)
|
||||
try container.encodeIfPresent(self.dub, forKey: .dub)
|
||||
try container.encodeIfPresent(self.embeddedInVideo, forKey: .embeddedInVideo)
|
||||
try container.encodeIfPresent(self.forced, forKey: .forced)
|
||||
if self.frameRate != nil {
|
||||
try container.encode(self._frameRate, forKey: .frameRate)
|
||||
@@ -340,6 +347,9 @@ extension Operations.GetAllMediaLibraryStream: Codable {
|
||||
try container.encodeIfPresent(self.headerCompression, forKey: .headerCompression)
|
||||
try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.language, forKey: .language)
|
||||
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
|
||||
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
|
||||
try container.encodeIfPresent(self.level, forKey: .level)
|
||||
try container.encodeIfPresent(self.original, forKey: .original)
|
||||
try container.encodeIfPresent(self.profile, forKey: .profile)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
public enum GetLibraryItemsEnableCreditsMarkerGeneration: String, Codable, APIValue {
|
||||
case libraryDefault = "-1"
|
||||
case disabled = "0"
|
||||
}}
|
||||
@@ -1,11 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
public enum GetLibraryItemsEpisodeSort: String, Codable, APIValue {
|
||||
case libraryDefault = "-1"
|
||||
case oldestFirst = "0"
|
||||
case newestFirst = "1"
|
||||
}}
|
||||
@@ -1,11 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||
public enum GetLibraryItemsFlattenSeasons: String, Codable, APIValue {
|
||||
case libraryDefault = "-1"
|
||||
case hide = "0"
|
||||
case show = "1"
|
||||
}}
|
||||
@@ -1,29 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsMediaGuid {
|
||||
/// Can be one of the following formats:
|
||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
///
|
||||
public let id: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter id: Can be one of the following formats:
|
||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
///
|
||||
///
|
||||
public init(id: String) {
|
||||
self.id = id
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsMediaGuid: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ extension Operations {
|
||||
public let director: [Operations.GetLibraryItemsDirector]?
|
||||
public let duration: Int?
|
||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
public let enableCreditsMarkerGeneration: Operations.GetLibraryItemsEnableCreditsMarkerGeneration?
|
||||
public let enableCreditsMarkerGeneration: Operations.EnableCreditsMarkerGeneration?
|
||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
public let episodeSort: Operations.GetLibraryItemsEpisodeSort?
|
||||
public let episodeSort: Operations.EpisodeSort?
|
||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||
public let flattenSeasons: Operations.GetLibraryItemsFlattenSeasons?
|
||||
public let flattenSeasons: Operations.FlattenSeasons?
|
||||
public let genre: [Operations.GetLibraryItemsGenre]?
|
||||
public let grandparentArt: String?
|
||||
public let grandparentGuid: String?
|
||||
@@ -60,8 +60,8 @@ extension Operations {
|
||||
public let media: [Operations.GetLibraryItemsMedia]?
|
||||
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
public let mediaGuid: [Operations.GetLibraryItemsMediaGuid]?
|
||||
public let metaDataRating: [Operations.GetLibraryItemsMetaDataRating]?
|
||||
public let mediaGuid: [Operations.MediaGuid]?
|
||||
public let metaDataRating: [Operations.MetaDataRating]?
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let originalTitle: String?
|
||||
@@ -90,7 +90,7 @@ extension Operations {
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
public let showOrdering: Operations.GetLibraryItemsShowOrdering?
|
||||
public let showOrdering: Operations.ShowOrdering?
|
||||
public let skipChildren: Bool?
|
||||
public let skipCount: Int?
|
||||
public let slug: String?
|
||||
@@ -134,7 +134,7 @@ extension Operations {
|
||||
///
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
///
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetLibraryItemsLibraryType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.GetLibraryItemsCollection]? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, enableCreditsMarkerGeneration: Operations.GetLibraryItemsEnableCreditsMarkerGeneration? = nil, episodeSort: Operations.GetLibraryItemsEpisodeSort? = nil, flattenSeasons: Operations.GetLibraryItemsFlattenSeasons? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, image: [Operations.GetLibraryItemsImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.GetLibraryItemsLocation]? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, mediaGuid: [Operations.GetLibraryItemsMediaGuid]? = nil, metaDataRating: [Operations.GetLibraryItemsMetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: String? = nil, parentStudio: String? = nil, parentTheme: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, role: [Operations.GetLibraryItemsRole]? = nil, seasonCount: Int? = nil, showOrdering: Operations.GetLibraryItemsShowOrdering? = nil, skipChildren: Bool? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, ultraBlurColors: Operations.GetLibraryItemsUltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil, year: Int? = nil) {
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetLibraryItemsLibraryType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.GetLibraryItemsCollection]? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, enableCreditsMarkerGeneration: Operations.EnableCreditsMarkerGeneration? = nil, episodeSort: Operations.EpisodeSort? = nil, flattenSeasons: Operations.FlattenSeasons? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, image: [Operations.GetLibraryItemsImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.GetLibraryItemsLocation]? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, mediaGuid: [Operations.MediaGuid]? = nil, metaDataRating: [Operations.MetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: String? = nil, parentStudio: String? = nil, parentTheme: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, role: [Operations.GetLibraryItemsRole]? = nil, seasonCount: Int? = nil, showOrdering: Operations.ShowOrdering? = nil, skipChildren: Bool? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, ultraBlurColors: Operations.GetLibraryItemsUltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
@@ -314,9 +314,9 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
self.country = try container.decodeIfPresent([Operations.GetLibraryItemsCountry].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.GetLibraryItemsDirector].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.enableCreditsMarkerGeneration = try container.decodeIfPresent(Operations.GetLibraryItemsEnableCreditsMarkerGeneration.self, forKey: .enableCreditsMarkerGeneration)
|
||||
self.episodeSort = try container.decodeIfPresent(Operations.GetLibraryItemsEpisodeSort.self, forKey: .episodeSort)
|
||||
self.flattenSeasons = try container.decodeIfPresent(Operations.GetLibraryItemsFlattenSeasons.self, forKey: .flattenSeasons)
|
||||
self.enableCreditsMarkerGeneration = try container.decodeIfPresent(Operations.EnableCreditsMarkerGeneration.self, forKey: .enableCreditsMarkerGeneration)
|
||||
self.episodeSort = try container.decodeIfPresent(Operations.EpisodeSort.self, forKey: .episodeSort)
|
||||
self.flattenSeasons = try container.decodeIfPresent(Operations.FlattenSeasons.self, forKey: .flattenSeasons)
|
||||
self.genre = try container.decodeIfPresent([Operations.GetLibraryItemsGenre].self, forKey: .genre)
|
||||
self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt)
|
||||
self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid)
|
||||
@@ -337,8 +337,8 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.location = try container.decodeIfPresent([Operations.GetLibraryItemsLocation].self, forKey: .location)
|
||||
self.media = try container.decodeIfPresent([Operations.GetLibraryItemsMedia].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.GetLibraryItemsMediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.GetLibraryItemsMetaDataRating].self, forKey: .metaDataRating)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.MediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.MetaDataRating].self, forKey: .metaDataRating)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle)
|
||||
self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid)
|
||||
@@ -356,7 +356,7 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.role = try container.decodeIfPresent([Operations.GetLibraryItemsRole].self, forKey: .role)
|
||||
self.seasonCount = try container.decodeIfPresent(Int.self, forKey: .seasonCount)
|
||||
self.showOrdering = try container.decodeIfPresent(Operations.GetLibraryItemsShowOrdering.self, forKey: .showOrdering)
|
||||
self.showOrdering = try container.decodeIfPresent(Operations.ShowOrdering.self, forKey: .showOrdering)
|
||||
self.skipChildren = try container.decodeIfPresent(Bool.self, forKey: .skipChildren)
|
||||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||||
self.slug = try container.decodeIfPresent(String.self, forKey: .slug)
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Setting that indicates the episode ordering for the show.
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
public enum GetLibraryItemsShowOrdering: String, Codable, APIValue {
|
||||
case `none` = "None"
|
||||
case tmdbAiring = "tmdbAiring"
|
||||
case tvdbAired = "aired"
|
||||
case tvdbDvd = "dvd"
|
||||
case tvdbAbsolute = "absolute"
|
||||
}}
|
||||
@@ -5,12 +5,8 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetMediaMetaDataMedia {
|
||||
/// Indicates whether voice activity is detected.
|
||||
public let hasVoiceActivity: Bool
|
||||
/// Unique media identifier.
|
||||
public let id: Int
|
||||
/// An array of parts for this media item.
|
||||
public let part: [Operations.GetMediaMetaDataPart]
|
||||
/// Aspect ratio of the video.
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
@@ -28,10 +24,14 @@ extension Operations {
|
||||
/// Duration of the media in milliseconds.
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
/// Indicates whether voice activity is detected.
|
||||
public let hasVoiceActivity: Bool?
|
||||
/// Video height in pixels.
|
||||
public let height: Int?
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public let optimizedForStreaming: Operations.GetMediaMetaDataOptimizedForStreaming?
|
||||
/// An array of parts for this media item.
|
||||
public let part: [Operations.GetMediaMetaDataPart]?
|
||||
/// Video codec used.
|
||||
public let videoCodec: String?
|
||||
/// Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
@@ -46,9 +46,7 @@ extension Operations {
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter hasVoiceActivity: Indicates whether voice activity is detected.
|
||||
/// - Parameter id: Unique media identifier.
|
||||
/// - Parameter part: An array of parts for this media item.
|
||||
/// - Parameter aspectRatio: Aspect ratio of the video.
|
||||
/// - Parameter audioChannels: Number of audio channels.
|
||||
/// - Parameter audioCodec: Audio codec used.
|
||||
@@ -56,8 +54,10 @@ extension Operations {
|
||||
/// - Parameter bitrate: Bitrate in bits per second.
|
||||
/// - Parameter container: File container type.
|
||||
/// - Parameter duration: Duration of the media in milliseconds.
|
||||
/// - Parameter hasVoiceActivity: Indicates whether voice activity is detected.
|
||||
/// - Parameter height: Video height in pixels.
|
||||
/// - Parameter optimizedForStreaming: Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
/// - Parameter part: An array of parts for this media item.
|
||||
/// - Parameter videoCodec: Video codec used.
|
||||
/// - Parameter videoFrameRate: Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
///
|
||||
@@ -65,10 +65,8 @@ extension Operations {
|
||||
/// - Parameter videoResolution: Video resolution (e.g., 4k).
|
||||
/// - Parameter width: Video width in pixels.
|
||||
///
|
||||
public init(hasVoiceActivity: Bool, id: Int, part: [Operations.GetMediaMetaDataPart], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, displayOffset: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetMediaMetaDataOptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
public init(id: Int, aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, displayOffset: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetMediaMetaDataOptimizedForStreaming? = nil, part: [Operations.GetMediaMetaDataPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
@@ -78,8 +76,10 @@ extension Operations {
|
||||
self.displayOffset = displayOffset
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.part = part
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
@@ -90,9 +90,7 @@ extension Operations {
|
||||
|
||||
extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case hasVoiceActivity
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
@@ -102,8 +100,10 @@ extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
case displayOffset
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case optimizedForStreaming
|
||||
case part = "Part"
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
@@ -113,9 +113,7 @@ extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.hasVoiceActivity = try container.decode(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.GetMediaMetaDataPart].self, forKey: .part)
|
||||
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)
|
||||
@@ -125,8 +123,10 @@ extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
self.displayOffset = try container.decodeIfPresent(Int.self, forKey: .displayOffset)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.GetMediaMetaDataOptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
self.part = try container.decodeIfPresent([Operations.GetMediaMetaDataPart].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)
|
||||
@@ -136,9 +136,7 @@ extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
@@ -150,8 +148,10 @@ extension Operations.GetMediaMetaDataMedia: Codable {
|
||||
try container.encodeIfPresent(self.displayOffset, forKey: .displayOffset)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
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)
|
||||
|
||||
@@ -96,7 +96,7 @@ extension Operations {
|
||||
public let parentTitle: String?
|
||||
public let primaryExtraKey: String?
|
||||
/// An array of Writer roles.
|
||||
public let producer: [Operations.Producer]?
|
||||
public let producer: [Operations.GetMediaMetaDataProducer]?
|
||||
/// The general rating
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
@@ -107,7 +107,7 @@ extension Operations {
|
||||
/// An array of Actor roles.
|
||||
public let role: [Operations.GetMediaMetaDataRole]?
|
||||
/// An array of similar content objects.
|
||||
public let similar: [Operations.Similar]?
|
||||
public let similar: [Operations.GetMediaMetaDataSimilar]?
|
||||
/// The number of times the item has been skipped.
|
||||
public let skipCount: Int?
|
||||
/// A URL-friendly identifier for the item.
|
||||
@@ -183,7 +183,7 @@ extension Operations {
|
||||
/// - Parameter viewedLeafCount: The number of episodes that have been viewed.
|
||||
/// - Parameter writer: An array of Writer roles.
|
||||
///
|
||||
public init(addedAt: Int, art: String, duration: Int, guid: String, image: [Operations.GetMediaMetaDataImage], key: String, librarySectionID: Int, librarySectionKey: String, librarySectionTitle: String, ratingKey: String, summary: String, thumb: String, title: String, type: String, ultraBlurColors: Operations.GetMediaMetaDataUltraBlurColors, updatedAt: Int, year: Int, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetMediaMetaDataCountry]? = nil, director: [Operations.GetMediaMetaDataDirector]? = nil, genre: [Operations.GetMediaMetaDataGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.GetMediaMetaDataGuids]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, location: [Operations.GetMediaMetaDataLocation]? = nil, media: [Operations.GetMediaMetaDataMedia]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, producer: [Operations.Producer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMediaMetaDataRole]? = nil, similar: [Operations.Similar]? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, writer: [Operations.GetMediaMetaDataWriter]? = nil) {
|
||||
public init(addedAt: Int, art: String, duration: Int, guid: String, image: [Operations.GetMediaMetaDataImage], key: String, librarySectionID: Int, librarySectionKey: String, librarySectionTitle: String, ratingKey: String, summary: String, thumb: String, title: String, type: String, ultraBlurColors: Operations.GetMediaMetaDataUltraBlurColors, updatedAt: Int, year: Int, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetMediaMetaDataCountry]? = nil, director: [Operations.GetMediaMetaDataDirector]? = nil, genre: [Operations.GetMediaMetaDataGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.GetMediaMetaDataGuids]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, location: [Operations.GetMediaMetaDataLocation]? = nil, media: [Operations.GetMediaMetaDataMedia]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, producer: [Operations.GetMediaMetaDataProducer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMediaMetaDataRole]? = nil, similar: [Operations.GetMediaMetaDataSimilar]? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, writer: [Operations.GetMediaMetaDataWriter]? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.art = art
|
||||
self.duration = duration
|
||||
@@ -362,12 +362,12 @@ extension Operations.GetMediaMetaDataMetadata: Codable {
|
||||
self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb)
|
||||
self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle)
|
||||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||||
self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer)
|
||||
self.producer = try container.decodeIfPresent([Operations.GetMediaMetaDataProducer].self, forKey: .producer)
|
||||
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.ratings = try container.decodeIfPresent([Operations.Ratings].self, forKey: .ratings)
|
||||
self.role = try container.decodeIfPresent([Operations.GetMediaMetaDataRole].self, forKey: .role)
|
||||
self.similar = try container.decodeIfPresent([Operations.Similar].self, forKey: .similar)
|
||||
self.similar = try container.decodeIfPresent([Operations.GetMediaMetaDataSimilar].self, forKey: .similar)
|
||||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||||
self.slug = try container.decodeIfPresent(String.self, forKey: .slug)
|
||||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetMediaMetaDataProducer {
|
||||
/// The filter string for the role.
|
||||
public let filter: String
|
||||
/// The unique role identifier.
|
||||
public let id: Int
|
||||
/// The actor's name.
|
||||
public let tag: String
|
||||
/// A key associated with the actor tag.
|
||||
public let tagKey: String
|
||||
/// The character name or role.
|
||||
public let role: String?
|
||||
/// URL for the role thumbnail image.
|
||||
public let thumb: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter string for the role.
|
||||
/// - Parameter id: The unique role identifier.
|
||||
/// - Parameter tag: The actor's name.
|
||||
/// - Parameter tagKey: A key associated with the actor tag.
|
||||
/// - Parameter role: The character name or role.
|
||||
/// - Parameter thumb: URL for the role thumbnail image.
|
||||
///
|
||||
public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
self.tagKey = tagKey
|
||||
self.role = role
|
||||
self.thumb = thumb
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetMediaMetaDataProducer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case tag
|
||||
case tagKey
|
||||
case role
|
||||
case thumb
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetMediaMetaDataSimilar {
|
||||
/// The filter string for similar items.
|
||||
public let filter: String
|
||||
/// The unique similar item identifier.
|
||||
public let id: Int
|
||||
/// The tag or title of the similar content.
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter string for similar items.
|
||||
/// - Parameter id: The unique similar item identifier.
|
||||
/// - Parameter tag: The tag or title of the similar content.
|
||||
///
|
||||
public init(filter: String, id: Int, tag: String) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetMediaMetaDataSimilar: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,6 @@ extension Operations {
|
||||
public let id: Int
|
||||
/// Index of the stream.
|
||||
public let index: Int
|
||||
/// Language of the stream.
|
||||
public let language: String
|
||||
/// ISO language code.
|
||||
public let languageCode: String
|
||||
/// Language tag (e.g., en).
|
||||
public let languageTag: String
|
||||
/// Stream type (1=video, 2=audio, 3=subtitle).
|
||||
public let streamType: Int
|
||||
/// Audio channel layout.
|
||||
@@ -37,6 +31,7 @@ extension Operations {
|
||||
public let chromaLocation: String?
|
||||
/// Chroma subsampling format.
|
||||
public let chromaSubsampling: String?
|
||||
public let closedCaptions: Bool?
|
||||
/// Coded video height.
|
||||
public let codedHeight: Int?
|
||||
/// Coded video width.
|
||||
@@ -69,6 +64,7 @@ extension Operations {
|
||||
public let doviVersion: String?
|
||||
/// Indicates if the stream is a dub.
|
||||
public let dub: Bool?
|
||||
public let embeddedInVideo: String?
|
||||
public let forced: Bool?
|
||||
/// Frame rate of the stream.
|
||||
@DecimalSerialized
|
||||
@@ -80,6 +76,12 @@ extension Operations {
|
||||
public let hearingImpaired: Bool?
|
||||
/// Height of the video stream.
|
||||
public let height: Int?
|
||||
/// Language of the stream.
|
||||
public let language: String?
|
||||
/// ISO language code.
|
||||
public let languageCode: String?
|
||||
/// Language tag (e.g., en).
|
||||
public let languageTag: String?
|
||||
/// Video level.
|
||||
public let level: Int?
|
||||
/// Indicates if this is the original stream.
|
||||
@@ -105,9 +107,6 @@ extension Operations {
|
||||
/// - Parameter extendedDisplayTitle: Extended display title for the stream.
|
||||
/// - Parameter id: Unique stream identifier.
|
||||
/// - Parameter index: Index of the stream.
|
||||
/// - Parameter language: Language of the stream.
|
||||
/// - Parameter languageCode: ISO language code.
|
||||
/// - Parameter languageTag: Language tag (e.g., en).
|
||||
/// - Parameter streamType: Stream type (1=video, 2=audio, 3=subtitle).
|
||||
/// - Parameter audioChannelLayout: Audio channel layout.
|
||||
/// - Parameter bitDepth: Bit depth of the video stream.
|
||||
@@ -136,6 +135,9 @@ extension Operations {
|
||||
/// - Parameter headerCompression: Indicates whether header compression is enabled.
|
||||
/// - Parameter hearingImpaired: Indicates if the stream is for the hearing impaired.
|
||||
/// - Parameter height: Height of the video stream.
|
||||
/// - Parameter language: Language of the stream.
|
||||
/// - Parameter languageCode: ISO language code.
|
||||
/// - Parameter languageTag: Language tag (e.g., en).
|
||||
/// - Parameter level: Video level.
|
||||
/// - Parameter original: Indicates if this is the original stream.
|
||||
/// - Parameter profile: Video profile.
|
||||
@@ -145,15 +147,12 @@ extension Operations {
|
||||
/// - Parameter title: Optional title for the stream (e.g., language variant).
|
||||
/// - Parameter width: Width of the video stream.
|
||||
///
|
||||
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, language: String, languageCode: String, languageTag: String, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
|
||||
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, embeddedInVideo: String? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
|
||||
self.codec = codec
|
||||
self.displayTitle = displayTitle
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self.id = id
|
||||
self.index = index
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.streamType = streamType
|
||||
self.audioChannelLayout = audioChannelLayout
|
||||
self.bitDepth = bitDepth
|
||||
@@ -162,6 +161,7 @@ extension Operations {
|
||||
self.channels = channels
|
||||
self.chromaLocation = chromaLocation
|
||||
self.chromaSubsampling = chromaSubsampling
|
||||
self.closedCaptions = closedCaptions
|
||||
self.codedHeight = codedHeight
|
||||
self.codedWidth = codedWidth
|
||||
self.colorPrimaries = colorPrimaries
|
||||
@@ -178,12 +178,16 @@ extension Operations {
|
||||
self.dovirpuPresent = dovirpuPresent
|
||||
self.doviVersion = doviVersion
|
||||
self.dub = dub
|
||||
self.embeddedInVideo = embeddedInVideo
|
||||
self.forced = forced
|
||||
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
|
||||
self.hasScalingMatrix = hasScalingMatrix
|
||||
self.headerCompression = headerCompression
|
||||
self.hearingImpaired = hearingImpaired
|
||||
self.height = height
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.level = level
|
||||
self.original = original
|
||||
self.profile = profile
|
||||
@@ -203,9 +207,6 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
case extendedDisplayTitle
|
||||
case id
|
||||
case index
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case streamType
|
||||
case audioChannelLayout
|
||||
case bitDepth
|
||||
@@ -214,6 +215,7 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
case channels
|
||||
case chromaLocation
|
||||
case chromaSubsampling
|
||||
case closedCaptions
|
||||
case codedHeight
|
||||
case codedWidth
|
||||
case colorPrimaries
|
||||
@@ -230,12 +232,16 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
case dovirpuPresent = "DOVIRPUPresent"
|
||||
case doviVersion = "DOVIVersion"
|
||||
case dub
|
||||
case embeddedInVideo
|
||||
case forced
|
||||
case frameRate
|
||||
case hasScalingMatrix
|
||||
case headerCompression
|
||||
case hearingImpaired
|
||||
case height
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case level
|
||||
case original
|
||||
case profile
|
||||
@@ -254,9 +260,6 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
self.extendedDisplayTitle = try container.decode(String.self, forKey: .extendedDisplayTitle)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.index = try container.decode(Int.self, forKey: .index)
|
||||
self.language = try container.decode(String.self, forKey: .language)
|
||||
self.languageCode = try container.decode(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decode(String.self, forKey: .languageTag)
|
||||
self.streamType = try container.decode(Int.self, forKey: .streamType)
|
||||
self.audioChannelLayout = try container.decodeIfPresent(String.self, forKey: .audioChannelLayout)
|
||||
self.bitDepth = try container.decodeIfPresent(Int.self, forKey: .bitDepth)
|
||||
@@ -265,6 +268,7 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
self.channels = try container.decodeIfPresent(Int.self, forKey: .channels)
|
||||
self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation)
|
||||
self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling)
|
||||
self.closedCaptions = try container.decodeIfPresent(Bool.self, forKey: .closedCaptions)
|
||||
self.codedHeight = try container.decodeIfPresent(Int.self, forKey: .codedHeight)
|
||||
self.codedWidth = try container.decodeIfPresent(Int.self, forKey: .codedWidth)
|
||||
self.colorPrimaries = try container.decodeIfPresent(String.self, forKey: .colorPrimaries)
|
||||
@@ -281,12 +285,16 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
self.dovirpuPresent = try container.decodeIfPresent(Bool.self, forKey: .dovirpuPresent)
|
||||
self.doviVersion = try container.decodeIfPresent(String.self, forKey: .doviVersion)
|
||||
self.dub = try container.decodeIfPresent(Bool.self, forKey: .dub)
|
||||
self.embeddedInVideo = try container.decodeIfPresent(String.self, forKey: .embeddedInVideo)
|
||||
self.forced = try container.decodeIfPresent(Bool.self, forKey: .forced)
|
||||
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix)
|
||||
self.headerCompression = try container.decodeIfPresent(Bool.self, forKey: .headerCompression)
|
||||
self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.language = try container.decodeIfPresent(String.self, forKey: .language)
|
||||
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
|
||||
self.level = try container.decodeIfPresent(Int.self, forKey: .level)
|
||||
self.original = try container.decodeIfPresent(Bool.self, forKey: .original)
|
||||
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
|
||||
@@ -305,9 +313,6 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
try container.encode(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.index, forKey: .index)
|
||||
try container.encode(self.language, forKey: .language)
|
||||
try container.encode(self.languageCode, forKey: .languageCode)
|
||||
try container.encode(self.languageTag, forKey: .languageTag)
|
||||
try container.encode(self.streamType, forKey: .streamType)
|
||||
try container.encodeIfPresent(self.audioChannelLayout, forKey: .audioChannelLayout)
|
||||
try container.encodeIfPresent(self.bitDepth, forKey: .bitDepth)
|
||||
@@ -316,6 +321,7 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
try container.encodeIfPresent(self.channels, forKey: .channels)
|
||||
try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation)
|
||||
try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling)
|
||||
try container.encodeIfPresent(self.closedCaptions, forKey: .closedCaptions)
|
||||
try container.encodeIfPresent(self.codedHeight, forKey: .codedHeight)
|
||||
try container.encodeIfPresent(self.codedWidth, forKey: .codedWidth)
|
||||
try container.encodeIfPresent(self.colorPrimaries, forKey: .colorPrimaries)
|
||||
@@ -332,6 +338,7 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
try container.encodeIfPresent(self.dovirpuPresent, forKey: .dovirpuPresent)
|
||||
try container.encodeIfPresent(self.doviVersion, forKey: .doviVersion)
|
||||
try container.encodeIfPresent(self.dub, forKey: .dub)
|
||||
try container.encodeIfPresent(self.embeddedInVideo, forKey: .embeddedInVideo)
|
||||
try container.encodeIfPresent(self.forced, forKey: .forced)
|
||||
if self.frameRate != nil {
|
||||
try container.encode(self._frameRate, forKey: .frameRate)
|
||||
@@ -340,6 +347,9 @@ extension Operations.GetMediaMetaDataStream: Codable {
|
||||
try container.encodeIfPresent(self.headerCompression, forKey: .headerCompression)
|
||||
try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.language, forKey: .language)
|
||||
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
|
||||
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
|
||||
try container.encodeIfPresent(self.level, forKey: .level)
|
||||
try container.encodeIfPresent(self.original, forKey: .original)
|
||||
try container.encodeIfPresent(self.profile, forKey: .profile)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
public struct GetOnDeckBadRequest {
|
||||
public let errors: [Operations.GetOnDeckErrors]?
|
||||
|
||||
/// Creates a request model with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetOnDeckErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckBadRequest: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckMedia {
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var audioChannels: Double?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var bitrate: Double?
|
||||
public let container: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var duration: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var height: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var id: Double?
|
||||
public let part: [Operations.GetOnDeckPart]?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var width: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(aspectRatio: Double? = nil, audioChannels: Double? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Double? = nil, container: String? = nil, duration: Double? = nil, height: Double? = nil, id: Double? = nil, part: [Operations.GetOnDeckPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Double? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self._audioChannels = DecimalSerialized<Double?>(wrappedValue: audioChannels)
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self._bitrate = DecimalSerialized<Double?>(wrappedValue: bitrate)
|
||||
self.container = container
|
||||
self._duration = DecimalSerialized<Double?>(wrappedValue: duration)
|
||||
self._height = DecimalSerialized<Double?>(wrappedValue: height)
|
||||
self._id = DecimalSerialized<Double?>(wrappedValue: id)
|
||||
self.part = part
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self._width = DecimalSerialized<Double?>(wrappedValue: width)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case duration
|
||||
case height
|
||||
case id
|
||||
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(DecimalSerialized<Double?>.self, forKey: .audioChannels) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audioCodec = try container.decodeIfPresent(String.self, forKey: .audioCodec)
|
||||
self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self._bitrate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .bitrate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.container = try container.decodeIfPresent(String.self, forKey: .container)
|
||||
self._duration = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .duration) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._height = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .height) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.part = try container.decodeIfPresent([Operations.GetOnDeckPart].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(DecimalSerialized<Double?>.self, forKey: .width) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
if self.audioChannels != nil {
|
||||
try container.encode(self._audioChannels, forKey: .audioChannels)
|
||||
}
|
||||
try container.encodeIfPresent(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile)
|
||||
if self.bitrate != nil {
|
||||
try container.encode(self._bitrate, forKey: .bitrate)
|
||||
}
|
||||
try container.encodeIfPresent(self.container, forKey: .container)
|
||||
if self.duration != nil {
|
||||
try container.encode(self._duration, forKey: .duration)
|
||||
}
|
||||
if self.height != nil {
|
||||
try container.encode(self._height, forKey: .height)
|
||||
}
|
||||
if self.id != nil {
|
||||
try container.encode(self._id, forKey: .id)
|
||||
}
|
||||
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)
|
||||
if self.width != nil {
|
||||
try container.encode(self._width, forKey: .width)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetOnDeckMedia {
|
||||
var idWrapper: DecimalSerialized<Double?> {
|
||||
return _id
|
||||
}
|
||||
var durationWrapper: DecimalSerialized<Double?> {
|
||||
return _duration
|
||||
}
|
||||
var bitrateWrapper: DecimalSerialized<Double?> {
|
||||
return _bitrate
|
||||
}
|
||||
var widthWrapper: DecimalSerialized<Double?> {
|
||||
return _width
|
||||
}
|
||||
var heightWrapper: DecimalSerialized<Double?> {
|
||||
return _height
|
||||
}
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
var audioChannelsWrapper: DecimalSerialized<Double?> {
|
||||
return _audioChannels
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckMediaContainer {
|
||||
public let allowSync: Bool?
|
||||
public let identifier: String?
|
||||
public let mediaTagPrefix: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var mediaTagVersion: Double?
|
||||
public let metadata: [Operations.GetOnDeckMetadata]?
|
||||
public let mixedParents: Bool?
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool? = nil, identifier: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Double? = nil, metadata: [Operations.GetOnDeckMetadata]? = nil, mixedParents: Bool? = nil, size: Double? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.identifier = identifier
|
||||
self.mediaTagPrefix = mediaTagPrefix
|
||||
self._mediaTagVersion = DecimalSerialized<Double?>(wrappedValue: mediaTagVersion)
|
||||
self.metadata = metadata
|
||||
self.mixedParents = mixedParents
|
||||
self._size = DecimalSerialized<Double?>(wrappedValue: size)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case identifier
|
||||
case mediaTagPrefix
|
||||
case mediaTagVersion
|
||||
case metadata = "Metadata"
|
||||
case mixedParents
|
||||
case size
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.allowSync = try container.decodeIfPresent(Bool.self, forKey: .allowSync)
|
||||
self.identifier = try container.decodeIfPresent(String.self, forKey: .identifier)
|
||||
self.mediaTagPrefix = try container.decodeIfPresent(String.self, forKey: .mediaTagPrefix)
|
||||
self._mediaTagVersion = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .mediaTagVersion) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.metadata = try container.decodeIfPresent([Operations.GetOnDeckMetadata].self, forKey: .metadata)
|
||||
self.mixedParents = try container.decodeIfPresent(Bool.self, forKey: .mixedParents)
|
||||
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.allowSync, forKey: .allowSync)
|
||||
try container.encodeIfPresent(self.identifier, forKey: .identifier)
|
||||
try container.encodeIfPresent(self.mediaTagPrefix, forKey: .mediaTagPrefix)
|
||||
if self.mediaTagVersion != nil {
|
||||
try container.encode(self._mediaTagVersion, forKey: .mediaTagVersion)
|
||||
}
|
||||
try container.encodeIfPresent(self.metadata, forKey: .metadata)
|
||||
try container.encodeIfPresent(self.mixedParents, forKey: .mixedParents)
|
||||
if self.size != nil {
|
||||
try container.encode(self._size, forKey: .size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetOnDeckMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double?> {
|
||||
return _size
|
||||
}
|
||||
var mediaTagVersionWrapper: DecimalSerialized<Double?> {
|
||||
return _mediaTagVersion
|
||||
}
|
||||
}
|
||||
@@ -1,282 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckMetadata {
|
||||
@DecimalSerialized
|
||||
public private(set) var addedAt: Double?
|
||||
public let allowSync: Bool?
|
||||
public let art: String?
|
||||
public let contentRating: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var duration: Double?
|
||||
public let grandparentArt: String?
|
||||
public let grandparentGuid: String?
|
||||
public let grandparentKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var grandparentRatingKey: Double?
|
||||
public let grandparentTheme: String?
|
||||
public let grandparentThumb: String?
|
||||
public let grandparentTitle: String?
|
||||
public let guid: String?
|
||||
public let guids: [Operations.GetOnDeckGuids]?
|
||||
@DecimalSerialized
|
||||
public private(set) var index: Double?
|
||||
public let key: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var lastViewedAt: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var librarySectionID: Double?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let librarySectionUUID: String?
|
||||
public let media: [Operations.GetOnDeckMedia]?
|
||||
@DateTime
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let parentGuid: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var parentIndex: Double?
|
||||
public let parentKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var parentRatingKey: Double?
|
||||
public let parentThumb: String?
|
||||
public let parentTitle: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var ratingKey: Double?
|
||||
public let summary: String?
|
||||
public let thumb: String?
|
||||
public let title: String?
|
||||
public let type: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var updatedAt: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var year: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(addedAt: Double? = nil, allowSync: Bool? = nil, art: String? = nil, contentRating: String? = nil, duration: Double? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: Double? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guid: String? = nil, guids: [Operations.GetOnDeckGuids]? = nil, index: Double? = nil, key: String? = nil, lastViewedAt: Double? = nil, librarySectionID: Double? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, media: [Operations.GetOnDeckMedia]? = nil, originallyAvailableAt: Date? = nil, parentGuid: String? = nil, parentIndex: Double? = nil, parentKey: String? = nil, parentRatingKey: Double? = nil, parentThumb: String? = nil, parentTitle: String? = nil, ratingKey: Double? = nil, summary: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Double? = nil, year: Double? = nil) {
|
||||
self._addedAt = DecimalSerialized<Double?>(wrappedValue: addedAt)
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self.contentRating = contentRating
|
||||
self._duration = DecimalSerialized<Double?>(wrappedValue: duration)
|
||||
self.grandparentArt = grandparentArt
|
||||
self.grandparentGuid = grandparentGuid
|
||||
self.grandparentKey = grandparentKey
|
||||
self._grandparentRatingKey = DecimalSerialized<Double?>(wrappedValue: grandparentRatingKey)
|
||||
self.grandparentTheme = grandparentTheme
|
||||
self.grandparentThumb = grandparentThumb
|
||||
self.grandparentTitle = grandparentTitle
|
||||
self.guid = guid
|
||||
self.guids = guids
|
||||
self._index = DecimalSerialized<Double?>(wrappedValue: index)
|
||||
self.key = key
|
||||
self._lastViewedAt = DecimalSerialized<Double?>(wrappedValue: lastViewedAt)
|
||||
self._librarySectionID = DecimalSerialized<Double?>(wrappedValue: librarySectionID)
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.librarySectionUUID = librarySectionUUID
|
||||
self.media = media
|
||||
self._originallyAvailableAt = DateTime<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.parentGuid = parentGuid
|
||||
self._parentIndex = DecimalSerialized<Double?>(wrappedValue: parentIndex)
|
||||
self.parentKey = parentKey
|
||||
self._parentRatingKey = DecimalSerialized<Double?>(wrappedValue: parentRatingKey)
|
||||
self.parentThumb = parentThumb
|
||||
self.parentTitle = parentTitle
|
||||
self._ratingKey = DecimalSerialized<Double?>(wrappedValue: ratingKey)
|
||||
self.summary = summary
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.type = type
|
||||
self._updatedAt = DecimalSerialized<Double?>(wrappedValue: updatedAt)
|
||||
self._year = DecimalSerialized<Double?>(wrappedValue: year)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case allowSync
|
||||
case art
|
||||
case contentRating
|
||||
case duration
|
||||
case grandparentArt
|
||||
case grandparentGuid
|
||||
case grandparentKey
|
||||
case grandparentRatingKey
|
||||
case grandparentTheme
|
||||
case grandparentThumb
|
||||
case grandparentTitle
|
||||
case guid
|
||||
case guids = "Guid"
|
||||
case index
|
||||
case key
|
||||
case lastViewedAt
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case librarySectionUUID
|
||||
case media = "Media"
|
||||
case originallyAvailableAt
|
||||
case parentGuid
|
||||
case parentIndex
|
||||
case parentKey
|
||||
case parentRatingKey
|
||||
case parentThumb
|
||||
case parentTitle
|
||||
case ratingKey
|
||||
case summary
|
||||
case thumb
|
||||
case title
|
||||
case type
|
||||
case updatedAt
|
||||
case year
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._addedAt = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .addedAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.allowSync = try container.decodeIfPresent(Bool.self, forKey: .allowSync)
|
||||
self.art = try container.decodeIfPresent(String.self, forKey: .art)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self._duration = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .duration) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt)
|
||||
self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid)
|
||||
self.grandparentKey = try container.decodeIfPresent(String.self, forKey: .grandparentKey)
|
||||
self._grandparentRatingKey = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .grandparentRatingKey) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.grandparentTheme = try container.decodeIfPresent(String.self, forKey: .grandparentTheme)
|
||||
self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb)
|
||||
self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle)
|
||||
self.guid = try container.decodeIfPresent(String.self, forKey: .guid)
|
||||
self.guids = try container.decodeIfPresent([Operations.GetOnDeckGuids].self, forKey: .guids)
|
||||
self._index = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .index) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self._lastViewedAt = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .lastViewedAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._librarySectionID = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .librarySectionID) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.librarySectionUUID = try container.decodeIfPresent(String.self, forKey: .librarySectionUUID)
|
||||
self.media = try container.decodeIfPresent([Operations.GetOnDeckMedia].self, forKey: .media)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateTime<Date?>.self, forKey: .originallyAvailableAt) ?? DateTime<Date?>(wrappedValue: nil)
|
||||
self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid)
|
||||
self._parentIndex = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .parentIndex) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.parentKey = try container.decodeIfPresent(String.self, forKey: .parentKey)
|
||||
self._parentRatingKey = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .parentRatingKey) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb)
|
||||
self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle)
|
||||
self._ratingKey = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .ratingKey) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.summary = try container.decodeIfPresent(String.self, forKey: .summary)
|
||||
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(DecimalSerialized<Double?>.self, forKey: .updatedAt) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._year = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .year) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.addedAt != nil {
|
||||
try container.encode(self._addedAt, forKey: .addedAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.allowSync, forKey: .allowSync)
|
||||
try container.encodeIfPresent(self.art, forKey: .art)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
if self.duration != nil {
|
||||
try container.encode(self._duration, forKey: .duration)
|
||||
}
|
||||
try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt)
|
||||
try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid)
|
||||
try container.encodeIfPresent(self.grandparentKey, forKey: .grandparentKey)
|
||||
if self.grandparentRatingKey != nil {
|
||||
try container.encode(self._grandparentRatingKey, forKey: .grandparentRatingKey)
|
||||
}
|
||||
try container.encodeIfPresent(self.grandparentTheme, forKey: .grandparentTheme)
|
||||
try container.encodeIfPresent(self.grandparentThumb, forKey: .grandparentThumb)
|
||||
try container.encodeIfPresent(self.grandparentTitle, forKey: .grandparentTitle)
|
||||
try container.encodeIfPresent(self.guid, forKey: .guid)
|
||||
try container.encodeIfPresent(self.guids, forKey: .guids)
|
||||
if self.index != nil {
|
||||
try container.encode(self._index, forKey: .index)
|
||||
}
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
if self.lastViewedAt != nil {
|
||||
try container.encode(self._lastViewedAt, forKey: .lastViewedAt)
|
||||
}
|
||||
if self.librarySectionID != nil {
|
||||
try container.encode(self._librarySectionID, forKey: .librarySectionID)
|
||||
}
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.librarySectionUUID, forKey: .librarySectionUUID)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.parentGuid, forKey: .parentGuid)
|
||||
if self.parentIndex != nil {
|
||||
try container.encode(self._parentIndex, forKey: .parentIndex)
|
||||
}
|
||||
try container.encodeIfPresent(self.parentKey, forKey: .parentKey)
|
||||
if self.parentRatingKey != nil {
|
||||
try container.encode(self._parentRatingKey, forKey: .parentRatingKey)
|
||||
}
|
||||
try container.encodeIfPresent(self.parentThumb, forKey: .parentThumb)
|
||||
try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle)
|
||||
if self.ratingKey != nil {
|
||||
try container.encode(self._ratingKey, forKey: .ratingKey)
|
||||
}
|
||||
try container.encodeIfPresent(self.summary, forKey: .summary)
|
||||
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.type, forKey: .type)
|
||||
if self.updatedAt != nil {
|
||||
try container.encode(self._updatedAt, forKey: .updatedAt)
|
||||
}
|
||||
if self.year != nil {
|
||||
try container.encode(self._year, forKey: .year)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetOnDeckMetadata {
|
||||
var librarySectionIDWrapper: DecimalSerialized<Double?> {
|
||||
return _librarySectionID
|
||||
}
|
||||
var ratingKeyWrapper: DecimalSerialized<Double?> {
|
||||
return _ratingKey
|
||||
}
|
||||
var parentRatingKeyWrapper: DecimalSerialized<Double?> {
|
||||
return _parentRatingKey
|
||||
}
|
||||
var grandparentRatingKeyWrapper: DecimalSerialized<Double?> {
|
||||
return _grandparentRatingKey
|
||||
}
|
||||
var indexWrapper: DecimalSerialized<Double?> {
|
||||
return _index
|
||||
}
|
||||
var parentIndexWrapper: DecimalSerialized<Double?> {
|
||||
return _parentIndex
|
||||
}
|
||||
var lastViewedAtWrapper: DecimalSerialized<Double?> {
|
||||
return _lastViewedAt
|
||||
}
|
||||
var yearWrapper: DecimalSerialized<Double?> {
|
||||
return _year
|
||||
}
|
||||
var durationWrapper: DecimalSerialized<Double?> {
|
||||
return _duration
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateTime<Date?> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
var addedAtWrapper: DecimalSerialized<Double?> {
|
||||
return _addedAt
|
||||
}
|
||||
var updatedAtWrapper: DecimalSerialized<Double?> {
|
||||
return _updatedAt
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckPart {
|
||||
public let audioProfile: String?
|
||||
public let container: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var duration: Double?
|
||||
public let file: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var id: Double?
|
||||
public let key: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double?
|
||||
public let stream: [Operations.GetOnDeckStream]?
|
||||
public let videoProfile: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(audioProfile: String? = nil, container: String? = nil, duration: Double? = nil, file: String? = nil, id: Double? = nil, key: String? = nil, size: Double? = nil, stream: [Operations.GetOnDeckStream]? = nil, videoProfile: String? = nil) {
|
||||
self.audioProfile = audioProfile
|
||||
self.container = container
|
||||
self._duration = DecimalSerialized<Double?>(wrappedValue: duration)
|
||||
self.file = file
|
||||
self._id = DecimalSerialized<Double?>(wrappedValue: id)
|
||||
self.key = key
|
||||
self._size = DecimalSerialized<Double?>(wrappedValue: size)
|
||||
self.stream = stream
|
||||
self.videoProfile = videoProfile
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckPart: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case audioProfile
|
||||
case container
|
||||
case duration
|
||||
case file
|
||||
case id
|
||||
case key
|
||||
case size
|
||||
case stream = "Stream"
|
||||
case videoProfile
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.container = try container.decodeIfPresent(String.self, forKey: .container)
|
||||
self._duration = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .duration) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.file = try container.decodeIfPresent(String.self, forKey: .file)
|
||||
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||
self._size = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .size) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.stream = try container.decodeIfPresent([Operations.GetOnDeckStream].self, forKey: .stream)
|
||||
self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.container, forKey: .container)
|
||||
if self.duration != nil {
|
||||
try container.encode(self._duration, forKey: .duration)
|
||||
}
|
||||
try container.encodeIfPresent(self.file, forKey: .file)
|
||||
if self.id != nil {
|
||||
try container.encode(self._id, forKey: .id)
|
||||
}
|
||||
try container.encodeIfPresent(self.key, forKey: .key)
|
||||
if self.size != nil {
|
||||
try container.encode(self._size, forKey: .size)
|
||||
}
|
||||
try container.encodeIfPresent(self.stream, forKey: .stream)
|
||||
try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetOnDeckPart {
|
||||
var idWrapper: DecimalSerialized<Double?> {
|
||||
return _id
|
||||
}
|
||||
var durationWrapper: DecimalSerialized<Double?> {
|
||||
return _duration
|
||||
}
|
||||
var sizeWrapper: DecimalSerialized<Double?> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetOnDeckResponse {
|
||||
case empty
|
||||
case badRequest(Operations.GetOnDeckBadRequest)
|
||||
case object(Operations.GetOnDeckResponseBody)
|
||||
case unauthorized(Operations.GetOnDeckUnauthorized)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func badRequest() throws -> Operations.GetOnDeckBadRequest {
|
||||
guard case .badRequest(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.GetOnDeckResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func unauthorized() throws -> Operations.GetOnDeckUnauthorized {
|
||||
guard case .unauthorized(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}}
|
||||
@@ -1,23 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The on Deck content
|
||||
public struct GetOnDeckResponseBody {
|
||||
public let mediaContainer: Operations.GetOnDeckMediaContainer?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetOnDeckMediaContainer? = nil) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetOnDeckStream {
|
||||
@DecimalSerialized
|
||||
public private(set) var bitDepth: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var bitrate: Double?
|
||||
public let chromaLocation: String?
|
||||
public let chromaSubsampling: String?
|
||||
public let codec: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var codedHeight: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var codedWidth: Double?
|
||||
public let colorRange: String?
|
||||
public let `default`: Bool?
|
||||
public let displayTitle: String?
|
||||
public let extendedDisplayTitle: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var frameRate: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var height: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var id: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var index: Double?
|
||||
public let language: String?
|
||||
public let languageCode: String?
|
||||
public let languageTag: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var level: Double?
|
||||
public let profile: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var refFrames: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var streamType: Double?
|
||||
@DecimalSerialized
|
||||
public private(set) var width: Double?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(bitDepth: Double? = nil, bitrate: Double? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, codec: String? = nil, codedHeight: Double? = nil, codedWidth: Double? = nil, colorRange: String? = nil, `default`: Bool? = nil, displayTitle: String? = nil, extendedDisplayTitle: String? = nil, frameRate: Double? = nil, height: Double? = nil, id: Double? = nil, index: Double? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Double? = nil, profile: String? = nil, refFrames: Double? = nil, streamType: Double? = nil, width: Double? = nil) {
|
||||
self._bitDepth = DecimalSerialized<Double?>(wrappedValue: bitDepth)
|
||||
self._bitrate = DecimalSerialized<Double?>(wrappedValue: bitrate)
|
||||
self.chromaLocation = chromaLocation
|
||||
self.chromaSubsampling = chromaSubsampling
|
||||
self.codec = codec
|
||||
self._codedHeight = DecimalSerialized<Double?>(wrappedValue: codedHeight)
|
||||
self._codedWidth = DecimalSerialized<Double?>(wrappedValue: codedWidth)
|
||||
self.colorRange = colorRange
|
||||
self.`default` = `default`
|
||||
self.displayTitle = displayTitle
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
|
||||
self._height = DecimalSerialized<Double?>(wrappedValue: height)
|
||||
self._id = DecimalSerialized<Double?>(wrappedValue: id)
|
||||
self._index = DecimalSerialized<Double?>(wrappedValue: index)
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self._level = DecimalSerialized<Double?>(wrappedValue: level)
|
||||
self.profile = profile
|
||||
self._refFrames = DecimalSerialized<Double?>(wrappedValue: refFrames)
|
||||
self._streamType = DecimalSerialized<Double?>(wrappedValue: streamType)
|
||||
self._width = DecimalSerialized<Double?>(wrappedValue: width)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckStream: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case bitDepth
|
||||
case bitrate
|
||||
case chromaLocation
|
||||
case chromaSubsampling
|
||||
case codec
|
||||
case codedHeight
|
||||
case codedWidth
|
||||
case colorRange
|
||||
case `default` = "default"
|
||||
case displayTitle
|
||||
case extendedDisplayTitle
|
||||
case frameRate
|
||||
case height
|
||||
case id
|
||||
case index
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case level
|
||||
case profile
|
||||
case refFrames
|
||||
case streamType
|
||||
case width
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._bitDepth = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .bitDepth) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._bitrate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .bitrate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation)
|
||||
self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling)
|
||||
self.codec = try container.decodeIfPresent(String.self, forKey: .codec)
|
||||
self._codedHeight = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .codedHeight) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._codedWidth = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .codedWidth) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.colorRange = try container.decodeIfPresent(String.self, forKey: .colorRange)
|
||||
self.`default` = try container.decodeIfPresent(Bool.self, forKey: .`default`)
|
||||
self.displayTitle = try container.decodeIfPresent(String.self, forKey: .displayTitle)
|
||||
self.extendedDisplayTitle = try container.decodeIfPresent(String.self, forKey: .extendedDisplayTitle)
|
||||
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._height = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .height) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._index = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .index) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.language = try container.decodeIfPresent(String.self, forKey: .language)
|
||||
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
|
||||
self._level = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .level) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
|
||||
self._refFrames = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .refFrames) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._streamType = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .streamType) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self._width = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .width) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.bitDepth != nil {
|
||||
try container.encode(self._bitDepth, forKey: .bitDepth)
|
||||
}
|
||||
if self.bitrate != nil {
|
||||
try container.encode(self._bitrate, forKey: .bitrate)
|
||||
}
|
||||
try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation)
|
||||
try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling)
|
||||
try container.encodeIfPresent(self.codec, forKey: .codec)
|
||||
if self.codedHeight != nil {
|
||||
try container.encode(self._codedHeight, forKey: .codedHeight)
|
||||
}
|
||||
if self.codedWidth != nil {
|
||||
try container.encode(self._codedWidth, forKey: .codedWidth)
|
||||
}
|
||||
try container.encodeIfPresent(self.colorRange, forKey: .colorRange)
|
||||
try container.encodeIfPresent(self.`default`, forKey: .`default`)
|
||||
try container.encodeIfPresent(self.displayTitle, forKey: .displayTitle)
|
||||
try container.encodeIfPresent(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
if self.frameRate != nil {
|
||||
try container.encode(self._frameRate, forKey: .frameRate)
|
||||
}
|
||||
if self.height != nil {
|
||||
try container.encode(self._height, forKey: .height)
|
||||
}
|
||||
if self.id != nil {
|
||||
try container.encode(self._id, forKey: .id)
|
||||
}
|
||||
if self.index != nil {
|
||||
try container.encode(self._index, forKey: .index)
|
||||
}
|
||||
try container.encodeIfPresent(self.language, forKey: .language)
|
||||
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
|
||||
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
|
||||
if self.level != nil {
|
||||
try container.encode(self._level, forKey: .level)
|
||||
}
|
||||
try container.encodeIfPresent(self.profile, forKey: .profile)
|
||||
if self.refFrames != nil {
|
||||
try container.encode(self._refFrames, forKey: .refFrames)
|
||||
}
|
||||
if self.streamType != nil {
|
||||
try container.encode(self._streamType, forKey: .streamType)
|
||||
}
|
||||
if self.width != nil {
|
||||
try container.encode(self._width, forKey: .width)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetOnDeckStream {
|
||||
var idWrapper: DecimalSerialized<Double?> {
|
||||
return _id
|
||||
}
|
||||
var streamTypeWrapper: DecimalSerialized<Double?> {
|
||||
return _streamType
|
||||
}
|
||||
var indexWrapper: DecimalSerialized<Double?> {
|
||||
return _index
|
||||
}
|
||||
var bitrateWrapper: DecimalSerialized<Double?> {
|
||||
return _bitrate
|
||||
}
|
||||
var bitDepthWrapper: DecimalSerialized<Double?> {
|
||||
return _bitDepth
|
||||
}
|
||||
var codedHeightWrapper: DecimalSerialized<Double?> {
|
||||
return _codedHeight
|
||||
}
|
||||
var codedWidthWrapper: DecimalSerialized<Double?> {
|
||||
return _codedWidth
|
||||
}
|
||||
var frameRateWrapper: DecimalSerialized<Double?> {
|
||||
return _frameRate
|
||||
}
|
||||
var heightWrapper: DecimalSerialized<Double?> {
|
||||
return _height
|
||||
}
|
||||
var levelWrapper: DecimalSerialized<Double?> {
|
||||
return _level
|
||||
}
|
||||
var refFramesWrapper: DecimalSerialized<Double?> {
|
||||
return _refFrames
|
||||
}
|
||||
var widthWrapper: DecimalSerialized<Double?> {
|
||||
return _width
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetOnDeckUnauthorized {
|
||||
public let errors: [Operations.GetOnDeckLibraryErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetOnDeckLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetOnDeckUnauthorized: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetRecentlyAdded1: Int, Codable, APIValue {
|
||||
case zero = 0
|
||||
case one = 1
|
||||
}}
|
||||
@@ -5,41 +5,53 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetRecentlyAddedMediaContainer {
|
||||
/// Indicates whether syncing is allowed.
|
||||
public let allowSync: Bool
|
||||
/// An plugin identifier for the media container.
|
||||
public let identifier: String
|
||||
/// Offset value for pagination.
|
||||
public let offset: Int
|
||||
/// Number of media items returned in this response.
|
||||
public let size: Int
|
||||
public let allowSync: Bool?
|
||||
public let identifier: String?
|
||||
/// Total number of media items in the library.
|
||||
public let totalSize: Int
|
||||
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||
///
|
||||
public let meta: Operations.Meta?
|
||||
/// An array of metadata items.
|
||||
public let metadata: [Operations.GetRecentlyAddedMetadata]?
|
||||
public let offset: Int?
|
||||
public let totalSize: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter allowSync: Indicates whether syncing is allowed.
|
||||
/// - Parameter identifier: An plugin identifier for the media container.
|
||||
/// - Parameter offset: Offset value for pagination.
|
||||
/// - Parameter size: Number of media items returned in this response.
|
||||
/// - Parameter totalSize: Total number of media items in the library.
|
||||
/// - Parameter meta: The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||
///
|
||||
/// - Parameter metadata: An array of metadata items.
|
||||
///
|
||||
public init(size: Int, allowSync: Bool? = nil, identifier: String? = nil, meta: Operations.Meta? = nil, metadata: [Operations.GetRecentlyAddedMetadata]? = nil, offset: Int? = nil, totalSize: Int? = nil) {
|
||||
self.size = size
|
||||
public init(allowSync: Bool, identifier: String, offset: Int, size: Int, totalSize: Int, meta: Operations.Meta? = nil, metadata: [Operations.GetRecentlyAddedMetadata]? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.identifier = identifier
|
||||
self.offset = offset
|
||||
self.size = size
|
||||
self.totalSize = totalSize
|
||||
self.meta = meta
|
||||
self.metadata = metadata
|
||||
self.offset = offset
|
||||
self.totalSize = totalSize
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetRecentlyAddedMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case size
|
||||
case allowSync
|
||||
case identifier
|
||||
case offset
|
||||
case size
|
||||
case totalSize
|
||||
case meta = "Meta"
|
||||
case metadata = "Metadata"
|
||||
case offset
|
||||
case totalSize
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,159 +3,244 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
/// Unknown
|
||||
///
|
||||
public struct GetRecentlyAddedMetadata {
|
||||
/// Unix epoch datetime in seconds
|
||||
public let addedAt: Int
|
||||
public let guid: String
|
||||
public let key: String
|
||||
/// The rating key (Media ID) of this media item.
|
||||
/// Note: This is always an integer, but is represented as a string in the API.
|
||||
///
|
||||
public let ratingKey: String
|
||||
public let summary: String
|
||||
public let title: String
|
||||
/// The type of media content
|
||||
///
|
||||
public let type: Operations.GetRecentlyAddedHubsType
|
||||
public let art: String?
|
||||
/// The art image URL for the media item.
|
||||
public let art: String
|
||||
/// The audience rating for the media item.
|
||||
@DecimalSerialized
|
||||
public private(set) var audienceRating: Double?
|
||||
public private(set) var audienceRating: Double
|
||||
/// The number of child items associated with this media item.
|
||||
public let childCount: Int
|
||||
/// The duration of the media item in milliseconds.
|
||||
public let duration: Int
|
||||
/// The globally unique identifier for the media item.
|
||||
public let guid: String
|
||||
/// The index position of the media item.
|
||||
public let index: Int
|
||||
/// The unique key for the media item.
|
||||
public let key: String
|
||||
/// The identifier for the library section.
|
||||
public let librarySectionID: Int
|
||||
/// The key corresponding to the library section.
|
||||
public let librarySectionKey: String
|
||||
/// The title of the library section.
|
||||
public let librarySectionTitle: String
|
||||
/// The original release date of the media item.
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date
|
||||
/// The studio of the parent media item.
|
||||
public let parentStudio: String
|
||||
/// The theme URL for the parent media item.
|
||||
public let parentTheme: String
|
||||
/// The critic rating for the media item.
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double
|
||||
/// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||||
public let ratingKey: String
|
||||
/// The total number of seasons (for TV shows).
|
||||
public let seasonCount: Int
|
||||
/// A URL‐friendly version of the media title.
|
||||
public let slug: String
|
||||
/// A synopsis of the media item.
|
||||
public let summary: String
|
||||
/// A brief tagline for the media item.
|
||||
public let tagline: String
|
||||
/// The theme URL for the media item.
|
||||
public let theme: String
|
||||
/// The thumbnail image URL for the media item.
|
||||
public let thumb: String
|
||||
/// The title of the media item.
|
||||
public let title: String
|
||||
/// The sort title used for ordering media items.
|
||||
public let titleSort: String
|
||||
public let type: Operations.GetRecentlyAddedHubsType
|
||||
/// The URL for the audience rating image.
|
||||
public let audienceRatingImage: String?
|
||||
public let banner: String?
|
||||
/// The source from which chapter data is derived.
|
||||
public let chapterSource: String?
|
||||
public let childCount: Int?
|
||||
public let collection: [Operations.Collection]?
|
||||
/// The content rating for the media item.
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.Country]?
|
||||
/// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||||
public let createdAtAccuracy: String?
|
||||
/// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||||
public let createdAtTZOffset: String?
|
||||
public let director: [Operations.Director]?
|
||||
public let duration: Int?
|
||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
public let enableCreditsMarkerGeneration: Operations.EnableCreditsMarkerGeneration?
|
||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
public let episodeSort: Operations.EpisodeSort?
|
||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||
public let flattenSeasons: Operations.FlattenSeasons?
|
||||
public let genre: [Operations.Genre]?
|
||||
/// The art URL for the grandparent media item.
|
||||
public let grandparentArt: String?
|
||||
/// The GUID of the grandparent media item.
|
||||
public let grandparentGuid: String?
|
||||
/// The key of the grandparent media item.
|
||||
public let grandparentKey: String?
|
||||
/// The rating key of the grandparent media item.
|
||||
public let grandparentRatingKey: String?
|
||||
/// The slug for the grandparent media item.
|
||||
public let grandparentSlug: String?
|
||||
/// The theme URL for the grandparent media item.
|
||||
public let grandparentTheme: String?
|
||||
/// The thumbnail URL for the grandparent media item.
|
||||
public let grandparentThumb: String?
|
||||
/// The title of the grandparent media item.
|
||||
public let grandparentTitle: String?
|
||||
public let hasPremiumExtras: String?
|
||||
public let hasPremiumPrimaryExtra: String?
|
||||
public let guids: [Operations.Guids]?
|
||||
public let image: [Operations.GetRecentlyAddedImage]?
|
||||
public let index: Int?
|
||||
/// The Unix timestamp representing the last time the item was rated.
|
||||
public let lastRatedAt: Int?
|
||||
/// Unix timestamp for when the media item was last viewed.
|
||||
public let lastViewedAt: Int?
|
||||
/// The number of leaf items (end nodes) under this media item.
|
||||
public let leafCount: Int?
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let location: [Operations.Location]?
|
||||
/// The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
public let media: [Operations.Media]?
|
||||
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
public let mediaGuid: [Operations.MediaGuid]?
|
||||
public let metaDataRating: [Operations.MetaDataRating]?
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
/// The original title of the media item (if different).
|
||||
public let originalTitle: String?
|
||||
/// The GUID of the parent media item.
|
||||
public let parentGuid: String?
|
||||
/// The index position of the parent media item.
|
||||
public let parentIndex: Int?
|
||||
/// The key of the parent media item.
|
||||
public let parentKey: String?
|
||||
/// The rating key of the parent item.
|
||||
///
|
||||
/// The rating key of the parent media item.
|
||||
public let parentRatingKey: String?
|
||||
/// The slug for the parent media item.
|
||||
public let parentSlug: String?
|
||||
public let parentStudio: String?
|
||||
public let parentTheme: String?
|
||||
/// The thumbnail URL for the parent media item.
|
||||
public let parentThumb: String?
|
||||
/// The title of the parent media item.
|
||||
public let parentTitle: String?
|
||||
/// The release year of the parent media item.
|
||||
public let parentYear: Int?
|
||||
/// The primary extra key associated with this media item.
|
||||
public let primaryExtraKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
public let producer: [Operations.Producer]?
|
||||
public let rating1: [Operations.Rating]?
|
||||
/// The URL for the rating image.
|
||||
public let ratingImage: String?
|
||||
public let role: [Operations.Role]?
|
||||
public let seasonCount: Int?
|
||||
/// Setting that indicates the episode ordering for the show.
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
public let showOrdering: Operations.ShowOrdering?
|
||||
public let skipChildren: Bool?
|
||||
public let similar: [Operations.Similar]?
|
||||
/// The number of times this media item has been skipped.
|
||||
public let skipCount: Int?
|
||||
public let slug: String?
|
||||
/// The studio that produced the media item.
|
||||
public let studio: String?
|
||||
public let tagline: String?
|
||||
public let theme: String?
|
||||
public let thumb: String?
|
||||
public let titleSort: String?
|
||||
/// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||||
public let subtype: String?
|
||||
public let ultraBlurColors: Operations.UltraBlurColors?
|
||||
/// Unix epoch datetime in seconds
|
||||
public let updatedAt: Int?
|
||||
/// The rating provided by a user for the item. This value is expressed as a decimal number.
|
||||
@DecimalSerialized
|
||||
public private(set) var userRating: Double?
|
||||
/// The number of times this media item has been viewed.
|
||||
public let viewCount: Int?
|
||||
/// The number of leaf items that have been viewed.
|
||||
public let viewedLeafCount: Int?
|
||||
/// The current playback offset (in milliseconds).
|
||||
public let viewOffset: Int?
|
||||
public let writer: [Operations.Writer]?
|
||||
/// The release year of the media item.
|
||||
public let year: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter addedAt: Unix epoch datetime in seconds
|
||||
/// - Parameter ratingKey: The rating key (Media ID) of this media item.
|
||||
/// Note: This is always an integer, but is represented as a string in the API.
|
||||
///
|
||||
/// - Parameter type: The type of media content
|
||||
///
|
||||
/// - Parameter enableCreditsMarkerGeneration: Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
/// - Parameter episodeSort: Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
/// - Parameter flattenSeasons: Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||
/// - Parameter media: The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
/// - Parameter mediaGuid: The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
/// - Parameter parentRatingKey: The rating key of the parent item.
|
||||
///
|
||||
/// - Parameter showOrdering: Setting that indicates the episode ordering for the show.
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
/// - Parameter art: The art image URL for the media item.
|
||||
/// - Parameter audienceRating: The audience rating for the media item.
|
||||
/// - Parameter childCount: The number of child items associated with this media item.
|
||||
/// - Parameter duration: The duration of the media item in milliseconds.
|
||||
/// - Parameter guid: The globally unique identifier for the media item.
|
||||
/// - Parameter index: The index position of the media item.
|
||||
/// - Parameter key: The unique key for the media item.
|
||||
/// - Parameter librarySectionID: The identifier for the library section.
|
||||
/// - Parameter librarySectionKey: The key corresponding to the library section.
|
||||
/// - Parameter librarySectionTitle: The title of the library section.
|
||||
/// - Parameter originallyAvailableAt: The original release date of the media item.
|
||||
/// - Parameter parentStudio: The studio of the parent media item.
|
||||
/// - Parameter parentTheme: The theme URL for the parent media item.
|
||||
/// - Parameter rating: The critic rating for the media item.
|
||||
/// - Parameter ratingKey: The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||||
/// - Parameter seasonCount: The total number of seasons (for TV shows).
|
||||
/// - Parameter slug: A URL‐friendly version of the media title.
|
||||
/// - Parameter summary: A synopsis of the media item.
|
||||
/// - Parameter tagline: A brief tagline for the media item.
|
||||
/// - Parameter theme: The theme URL for the media item.
|
||||
/// - Parameter thumb: The thumbnail image URL for the media item.
|
||||
/// - Parameter title: The title of the media item.
|
||||
/// - Parameter titleSort: The sort title used for ordering media items.
|
||||
/// - Parameter audienceRatingImage: The URL for the audience rating image.
|
||||
/// - Parameter chapterSource: The source from which chapter data is derived.
|
||||
/// - Parameter contentRating: The content rating for the media item.
|
||||
/// - Parameter createdAtAccuracy: The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||||
/// - Parameter createdAtTZOffset: The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||||
/// - Parameter grandparentArt: The art URL for the grandparent media item.
|
||||
/// - Parameter grandparentGuid: The GUID of the grandparent media item.
|
||||
/// - Parameter grandparentKey: The key of the grandparent media item.
|
||||
/// - Parameter grandparentRatingKey: The rating key of the grandparent media item.
|
||||
/// - Parameter grandparentSlug: The slug for the grandparent media item.
|
||||
/// - Parameter grandparentTheme: The theme URL for the grandparent media item.
|
||||
/// - Parameter grandparentThumb: The thumbnail URL for the grandparent media item.
|
||||
/// - Parameter grandparentTitle: The title of the grandparent media item.
|
||||
/// - Parameter lastRatedAt: The Unix timestamp representing the last time the item was rated.
|
||||
/// - Parameter lastViewedAt: Unix timestamp for when the media item was last viewed.
|
||||
/// - Parameter leafCount: The number of leaf items (end nodes) under this media item.
|
||||
/// - Parameter originalTitle: The original title of the media item (if different).
|
||||
/// - Parameter parentGuid: The GUID of the parent media item.
|
||||
/// - Parameter parentIndex: The index position of the parent media item.
|
||||
/// - Parameter parentKey: The key of the parent media item.
|
||||
/// - Parameter parentRatingKey: The rating key of the parent media item.
|
||||
/// - Parameter parentSlug: The slug for the parent media item.
|
||||
/// - Parameter parentThumb: The thumbnail URL for the parent media item.
|
||||
/// - Parameter parentTitle: The title of the parent media item.
|
||||
/// - Parameter parentYear: The release year of the parent media item.
|
||||
/// - Parameter primaryExtraKey: The primary extra key associated with this media item.
|
||||
/// - Parameter ratingImage: The URL for the rating image.
|
||||
/// - Parameter skipCount: The number of times this media item has been skipped.
|
||||
/// - Parameter studio: The studio that produced the media item.
|
||||
/// - Parameter subtype: A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
/// - Parameter userRating: The rating provided by a user for the item. This value is expressed as a decimal number.
|
||||
/// - Parameter viewCount: The number of times this media item has been viewed.
|
||||
/// - Parameter viewedLeafCount: The number of leaf items that have been viewed.
|
||||
/// - Parameter viewOffset: The current playback offset (in milliseconds).
|
||||
/// - Parameter year: The release year of the media item.
|
||||
///
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetRecentlyAddedHubsType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.Collection]? = nil, contentRating: String? = nil, country: [Operations.Country]? = nil, director: [Operations.Director]? = nil, duration: Int? = nil, enableCreditsMarkerGeneration: Operations.EnableCreditsMarkerGeneration? = nil, episodeSort: Operations.EpisodeSort? = nil, flattenSeasons: Operations.FlattenSeasons? = nil, genre: [Operations.Genre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, image: [Operations.GetRecentlyAddedImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.Location]? = nil, media: [Operations.Media]? = nil, mediaGuid: [Operations.MediaGuid]? = nil, metaDataRating: [Operations.MetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: String? = nil, parentStudio: String? = nil, parentTheme: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, role: [Operations.Role]? = nil, seasonCount: Int? = nil, showOrdering: Operations.ShowOrdering? = nil, skipChildren: Bool? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, ultraBlurColors: Operations.UltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.Writer]? = nil, year: Int? = nil) {
|
||||
public init(addedAt: Int, art: String, audienceRating: Double, childCount: Int, duration: Int, guid: String, index: Int, key: String, librarySectionID: Int, librarySectionKey: String, librarySectionTitle: String, originallyAvailableAt: Date, parentStudio: String, parentTheme: String, rating: Double, ratingKey: String, seasonCount: Int, slug: String, summary: String, tagline: String, theme: String, thumb: String, title: String, titleSort: String, type: Operations.GetRecentlyAddedHubsType, audienceRatingImage: String? = nil, chapterSource: String? = nil, collection: [Operations.Collection]? = nil, contentRating: String? = nil, country: [Operations.Country]? = nil, createdAtAccuracy: String? = nil, createdAtTZOffset: String? = nil, director: [Operations.Director]? = nil, genre: [Operations.Genre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guids: [Operations.Guids]? = nil, image: [Operations.GetRecentlyAddedImage]? = nil, lastRatedAt: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, location: [Operations.Location]? = nil, media: [Operations.Media]? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, producer: [Operations.Producer]? = nil, rating1: [Operations.Rating]? = nil, ratingImage: String? = nil, role: [Operations.Role]? = nil, similar: [Operations.Similar]? = nil, skipCount: Int? = nil, studio: String? = nil, subtype: String? = nil, ultraBlurColors: Operations.UltraBlurColors? = nil, updatedAt: Int? = nil, userRating: Double? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.Writer]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self.ratingKey = ratingKey
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.banner = banner
|
||||
self.chapterSource = chapterSource
|
||||
self._audienceRating = DecimalSerialized<Double>(wrappedValue: audienceRating)
|
||||
self.childCount = childCount
|
||||
self.duration = duration
|
||||
self.guid = guid
|
||||
self.index = index
|
||||
self.key = key
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self._originallyAvailableAt = DateOnly<Date>(wrappedValue: originallyAvailableAt)
|
||||
self.parentStudio = parentStudio
|
||||
self.parentTheme = parentTheme
|
||||
self._rating = DecimalSerialized<Double>(wrappedValue: rating)
|
||||
self.ratingKey = ratingKey
|
||||
self.seasonCount = seasonCount
|
||||
self.slug = slug
|
||||
self.summary = summary
|
||||
self.tagline = tagline
|
||||
self.theme = theme
|
||||
self.thumb = thumb
|
||||
self.title = title
|
||||
self.titleSort = titleSort
|
||||
self.type = type
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.chapterSource = chapterSource
|
||||
self.collection = collection
|
||||
self.contentRating = contentRating
|
||||
self.country = country
|
||||
self.createdAtAccuracy = createdAtAccuracy
|
||||
self.createdAtTZOffset = createdAtTZOffset
|
||||
self.director = director
|
||||
self.duration = duration
|
||||
self.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration
|
||||
self.episodeSort = episodeSort
|
||||
self.flattenSeasons = flattenSeasons
|
||||
self.genre = genre
|
||||
self.grandparentArt = grandparentArt
|
||||
self.grandparentGuid = grandparentGuid
|
||||
@@ -165,47 +250,34 @@ extension Operations {
|
||||
self.grandparentTheme = grandparentTheme
|
||||
self.grandparentThumb = grandparentThumb
|
||||
self.grandparentTitle = grandparentTitle
|
||||
self.hasPremiumExtras = hasPremiumExtras
|
||||
self.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra
|
||||
self.guids = guids
|
||||
self.image = image
|
||||
self.index = index
|
||||
self.lastRatedAt = lastRatedAt
|
||||
self.lastViewedAt = lastViewedAt
|
||||
self.leafCount = leafCount
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.location = location
|
||||
self.media = media
|
||||
self.mediaGuid = mediaGuid
|
||||
self.metaDataRating = metaDataRating
|
||||
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.originalTitle = originalTitle
|
||||
self.parentGuid = parentGuid
|
||||
self.parentIndex = parentIndex
|
||||
self.parentKey = parentKey
|
||||
self.parentRatingKey = parentRatingKey
|
||||
self.parentSlug = parentSlug
|
||||
self.parentStudio = parentStudio
|
||||
self.parentTheme = parentTheme
|
||||
self.parentThumb = parentThumb
|
||||
self.parentTitle = parentTitle
|
||||
self.parentYear = parentYear
|
||||
self.primaryExtraKey = primaryExtraKey
|
||||
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
|
||||
self.producer = producer
|
||||
self.rating1 = rating1
|
||||
self.ratingImage = ratingImage
|
||||
self.role = role
|
||||
self.seasonCount = seasonCount
|
||||
self.showOrdering = showOrdering
|
||||
self.skipChildren = skipChildren
|
||||
self.similar = similar
|
||||
self.skipCount = skipCount
|
||||
self.slug = slug
|
||||
self.studio = studio
|
||||
self.tagline = tagline
|
||||
self.theme = theme
|
||||
self.thumb = thumb
|
||||
self.titleSort = titleSort
|
||||
self.subtype = subtype
|
||||
self.ultraBlurColors = ultraBlurColors
|
||||
self.updatedAt = updatedAt
|
||||
self._userRating = DecimalSerialized<Double?>(wrappedValue: userRating)
|
||||
self.viewCount = viewCount
|
||||
self.viewedLeafCount = viewedLeafCount
|
||||
self.viewOffset = viewOffset
|
||||
@@ -217,26 +289,38 @@ extension Operations {
|
||||
extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case guid
|
||||
case key
|
||||
case ratingKey
|
||||
case summary
|
||||
case title
|
||||
case type
|
||||
case art
|
||||
case audienceRating
|
||||
case audienceRatingImage
|
||||
case banner
|
||||
case chapterSource
|
||||
case childCount
|
||||
case duration
|
||||
case guid
|
||||
case index
|
||||
case key
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case originallyAvailableAt
|
||||
case parentStudio
|
||||
case parentTheme
|
||||
case rating
|
||||
case ratingKey
|
||||
case seasonCount
|
||||
case slug
|
||||
case summary
|
||||
case tagline
|
||||
case theme
|
||||
case thumb
|
||||
case title
|
||||
case titleSort
|
||||
case type
|
||||
case audienceRatingImage
|
||||
case chapterSource
|
||||
case collection = "Collection"
|
||||
case contentRating
|
||||
case country = "Country"
|
||||
case createdAtAccuracy
|
||||
case createdAtTZOffset
|
||||
case director = "Director"
|
||||
case duration
|
||||
case enableCreditsMarkerGeneration
|
||||
case episodeSort
|
||||
case flattenSeasons
|
||||
case genre = "Genre"
|
||||
case grandparentArt
|
||||
case grandparentGuid
|
||||
@@ -246,47 +330,34 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
case grandparentTheme
|
||||
case grandparentThumb
|
||||
case grandparentTitle
|
||||
case hasPremiumExtras
|
||||
case hasPremiumPrimaryExtra
|
||||
case guids = "Guid"
|
||||
case image = "Image"
|
||||
case index
|
||||
case lastRatedAt
|
||||
case lastViewedAt
|
||||
case leafCount
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case location = "Location"
|
||||
case media = "Media"
|
||||
case mediaGuid = "Guid"
|
||||
case metaDataRating = "Rating"
|
||||
case originallyAvailableAt
|
||||
case originalTitle
|
||||
case parentGuid
|
||||
case parentIndex
|
||||
case parentKey
|
||||
case parentRatingKey
|
||||
case parentSlug
|
||||
case parentStudio
|
||||
case parentTheme
|
||||
case parentThumb
|
||||
case parentTitle
|
||||
case parentYear
|
||||
case primaryExtraKey
|
||||
case rating
|
||||
case producer = "Producer"
|
||||
case rating1 = "Rating"
|
||||
case ratingImage
|
||||
case role = "Role"
|
||||
case seasonCount
|
||||
case showOrdering
|
||||
case skipChildren
|
||||
case similar = "Similar"
|
||||
case skipCount
|
||||
case slug
|
||||
case studio
|
||||
case tagline
|
||||
case theme
|
||||
case thumb
|
||||
case titleSort
|
||||
case subtype
|
||||
case ultraBlurColors = "UltraBlurColors"
|
||||
case updatedAt
|
||||
case userRating
|
||||
case viewCount
|
||||
case viewedLeafCount
|
||||
case viewOffset
|
||||
@@ -297,26 +368,38 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.addedAt = try container.decode(Int.self, forKey: .addedAt)
|
||||
self.art = try container.decode(String.self, forKey: .art)
|
||||
self._audienceRating = try container.decode(DecimalSerialized<Double>.self, forKey: .audienceRating)
|
||||
self.childCount = try container.decode(Int.self, forKey: .childCount)
|
||||
self.duration = try container.decode(Int.self, forKey: .duration)
|
||||
self.guid = try container.decode(String.self, forKey: .guid)
|
||||
self.index = try container.decode(Int.self, forKey: .index)
|
||||
self.key = try container.decode(String.self, forKey: .key)
|
||||
self.librarySectionID = try container.decode(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decode(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decode(String.self, forKey: .librarySectionTitle)
|
||||
self._originallyAvailableAt = try container.decode(DateOnly<Date>.self, forKey: .originallyAvailableAt)
|
||||
self.parentStudio = try container.decode(String.self, forKey: .parentStudio)
|
||||
self.parentTheme = try container.decode(String.self, forKey: .parentTheme)
|
||||
self._rating = try container.decode(DecimalSerialized<Double>.self, forKey: .rating)
|
||||
self.ratingKey = try container.decode(String.self, forKey: .ratingKey)
|
||||
self.seasonCount = try container.decode(Int.self, forKey: .seasonCount)
|
||||
self.slug = try container.decode(String.self, forKey: .slug)
|
||||
self.summary = try container.decode(String.self, forKey: .summary)
|
||||
self.tagline = try container.decode(String.self, forKey: .tagline)
|
||||
self.theme = try container.decode(String.self, forKey: .theme)
|
||||
self.thumb = try container.decode(String.self, forKey: .thumb)
|
||||
self.title = try container.decode(String.self, forKey: .title)
|
||||
self.titleSort = try container.decode(String.self, forKey: .titleSort)
|
||||
self.type = try container.decode(Operations.GetRecentlyAddedHubsType.self, forKey: .type)
|
||||
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.banner = try container.decodeIfPresent(String.self, forKey: .banner)
|
||||
self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||||
self.childCount = try container.decodeIfPresent(Int.self, forKey: .childCount)
|
||||
self.collection = try container.decodeIfPresent([Operations.Collection].self, forKey: .collection)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.Country].self, forKey: .country)
|
||||
self.createdAtAccuracy = try container.decodeIfPresent(String.self, forKey: .createdAtAccuracy)
|
||||
self.createdAtTZOffset = try container.decodeIfPresent(String.self, forKey: .createdAtTZOffset)
|
||||
self.director = try container.decodeIfPresent([Operations.Director].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.enableCreditsMarkerGeneration = try container.decodeIfPresent(Operations.EnableCreditsMarkerGeneration.self, forKey: .enableCreditsMarkerGeneration)
|
||||
self.episodeSort = try container.decodeIfPresent(Operations.EpisodeSort.self, forKey: .episodeSort)
|
||||
self.flattenSeasons = try container.decodeIfPresent(Operations.FlattenSeasons.self, forKey: .flattenSeasons)
|
||||
self.genre = try container.decodeIfPresent([Operations.Genre].self, forKey: .genre)
|
||||
self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt)
|
||||
self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid)
|
||||
@@ -326,47 +409,34 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
self.grandparentTheme = try container.decodeIfPresent(String.self, forKey: .grandparentTheme)
|
||||
self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb)
|
||||
self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle)
|
||||
self.hasPremiumExtras = try container.decodeIfPresent(String.self, forKey: .hasPremiumExtras)
|
||||
self.hasPremiumPrimaryExtra = try container.decodeIfPresent(String.self, forKey: .hasPremiumPrimaryExtra)
|
||||
self.guids = try container.decodeIfPresent([Operations.Guids].self, forKey: .guids)
|
||||
self.image = try container.decodeIfPresent([Operations.GetRecentlyAddedImage].self, forKey: .image)
|
||||
self.index = try container.decodeIfPresent(Int.self, forKey: .index)
|
||||
self.lastRatedAt = try container.decodeIfPresent(Int.self, forKey: .lastRatedAt)
|
||||
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
|
||||
self.leafCount = try container.decodeIfPresent(Int.self, forKey: .leafCount)
|
||||
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.location = try container.decodeIfPresent([Operations.Location].self, forKey: .location)
|
||||
self.media = try container.decodeIfPresent([Operations.Media].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.MediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.MetaDataRating].self, forKey: .metaDataRating)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle)
|
||||
self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid)
|
||||
self.parentIndex = try container.decodeIfPresent(Int.self, forKey: .parentIndex)
|
||||
self.parentKey = try container.decodeIfPresent(String.self, forKey: .parentKey)
|
||||
self.parentRatingKey = try container.decodeIfPresent(String.self, forKey: .parentRatingKey)
|
||||
self.parentSlug = try container.decodeIfPresent(String.self, forKey: .parentSlug)
|
||||
self.parentStudio = try container.decodeIfPresent(String.self, forKey: .parentStudio)
|
||||
self.parentTheme = try container.decodeIfPresent(String.self, forKey: .parentTheme)
|
||||
self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb)
|
||||
self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle)
|
||||
self.parentYear = try container.decodeIfPresent(Int.self, forKey: .parentYear)
|
||||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||||
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer)
|
||||
self.rating1 = try container.decodeIfPresent([Operations.Rating].self, forKey: .rating1)
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.role = try container.decodeIfPresent([Operations.Role].self, forKey: .role)
|
||||
self.seasonCount = try container.decodeIfPresent(Int.self, forKey: .seasonCount)
|
||||
self.showOrdering = try container.decodeIfPresent(Operations.ShowOrdering.self, forKey: .showOrdering)
|
||||
self.skipChildren = try container.decodeIfPresent(Bool.self, forKey: .skipChildren)
|
||||
self.similar = try container.decodeIfPresent([Operations.Similar].self, forKey: .similar)
|
||||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||||
self.slug = try container.decodeIfPresent(String.self, forKey: .slug)
|
||||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||
self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline)
|
||||
self.theme = try container.decodeIfPresent(String.self, forKey: .theme)
|
||||
self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb)
|
||||
self.titleSort = try container.decodeIfPresent(String.self, forKey: .titleSort)
|
||||
self.subtype = try container.decodeIfPresent(String.self, forKey: .subtype)
|
||||
self.ultraBlurColors = try container.decodeIfPresent(Operations.UltraBlurColors.self, forKey: .ultraBlurColors)
|
||||
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||||
self._userRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .userRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount)
|
||||
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
|
||||
self.viewOffset = try container.decodeIfPresent(Int.self, forKey: .viewOffset)
|
||||
@@ -377,28 +447,38 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.addedAt, forKey: .addedAt)
|
||||
try container.encode(self.art, forKey: .art)
|
||||
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||||
try container.encode(self.childCount, forKey: .childCount)
|
||||
try container.encode(self.duration, forKey: .duration)
|
||||
try container.encode(self.guid, forKey: .guid)
|
||||
try container.encode(self.index, forKey: .index)
|
||||
try container.encode(self.key, forKey: .key)
|
||||
try container.encode(self.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encode(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encode(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
try container.encode(self.parentStudio, forKey: .parentStudio)
|
||||
try container.encode(self.parentTheme, forKey: .parentTheme)
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
try container.encode(self.ratingKey, forKey: .ratingKey)
|
||||
try container.encode(self.seasonCount, forKey: .seasonCount)
|
||||
try container.encode(self.slug, forKey: .slug)
|
||||
try container.encode(self.summary, forKey: .summary)
|
||||
try container.encode(self.tagline, forKey: .tagline)
|
||||
try container.encode(self.theme, forKey: .theme)
|
||||
try container.encode(self.thumb, forKey: .thumb)
|
||||
try container.encode(self.title, forKey: .title)
|
||||
try container.encode(self.titleSort, forKey: .titleSort)
|
||||
try container.encode(self.type, forKey: .type)
|
||||
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.banner, forKey: .banner)
|
||||
try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource)
|
||||
try container.encodeIfPresent(self.childCount, forKey: .childCount)
|
||||
try container.encodeIfPresent(self.collection, forKey: .collection)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.createdAtAccuracy, forKey: .createdAtAccuracy)
|
||||
try container.encodeIfPresent(self.createdAtTZOffset, forKey: .createdAtTZOffset)
|
||||
try container.encodeIfPresent(self.director, forKey: .director)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.enableCreditsMarkerGeneration, forKey: .enableCreditsMarkerGeneration)
|
||||
try container.encodeIfPresent(self.episodeSort, forKey: .episodeSort)
|
||||
try container.encodeIfPresent(self.flattenSeasons, forKey: .flattenSeasons)
|
||||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||
try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt)
|
||||
try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid)
|
||||
@@ -408,51 +488,36 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
try container.encodeIfPresent(self.grandparentTheme, forKey: .grandparentTheme)
|
||||
try container.encodeIfPresent(self.grandparentThumb, forKey: .grandparentThumb)
|
||||
try container.encodeIfPresent(self.grandparentTitle, forKey: .grandparentTitle)
|
||||
try container.encodeIfPresent(self.hasPremiumExtras, forKey: .hasPremiumExtras)
|
||||
try container.encodeIfPresent(self.hasPremiumPrimaryExtra, forKey: .hasPremiumPrimaryExtra)
|
||||
try container.encodeIfPresent(self.guids, forKey: .guids)
|
||||
try container.encodeIfPresent(self.image, forKey: .image)
|
||||
try container.encodeIfPresent(self.index, forKey: .index)
|
||||
try container.encodeIfPresent(self.lastRatedAt, forKey: .lastRatedAt)
|
||||
try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt)
|
||||
try container.encodeIfPresent(self.leafCount, forKey: .leafCount)
|
||||
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.location, forKey: .location)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
|
||||
try container.encodeIfPresent(self.metaDataRating, forKey: .metaDataRating)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.originalTitle, forKey: .originalTitle)
|
||||
try container.encodeIfPresent(self.parentGuid, forKey: .parentGuid)
|
||||
try container.encodeIfPresent(self.parentIndex, forKey: .parentIndex)
|
||||
try container.encodeIfPresent(self.parentKey, forKey: .parentKey)
|
||||
try container.encodeIfPresent(self.parentRatingKey, forKey: .parentRatingKey)
|
||||
try container.encodeIfPresent(self.parentSlug, forKey: .parentSlug)
|
||||
try container.encodeIfPresent(self.parentStudio, forKey: .parentStudio)
|
||||
try container.encodeIfPresent(self.parentTheme, forKey: .parentTheme)
|
||||
try container.encodeIfPresent(self.parentThumb, forKey: .parentThumb)
|
||||
try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle)
|
||||
try container.encodeIfPresent(self.parentYear, forKey: .parentYear)
|
||||
try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey)
|
||||
if self.rating != nil {
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
}
|
||||
try container.encodeIfPresent(self.producer, forKey: .producer)
|
||||
try container.encodeIfPresent(self.rating1, forKey: .rating1)
|
||||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||||
try container.encodeIfPresent(self.role, forKey: .role)
|
||||
try container.encodeIfPresent(self.seasonCount, forKey: .seasonCount)
|
||||
try container.encodeIfPresent(self.showOrdering, forKey: .showOrdering)
|
||||
try container.encodeIfPresent(self.skipChildren, forKey: .skipChildren)
|
||||
try container.encodeIfPresent(self.similar, forKey: .similar)
|
||||
try container.encodeIfPresent(self.skipCount, forKey: .skipCount)
|
||||
try container.encodeIfPresent(self.slug, forKey: .slug)
|
||||
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||||
try container.encodeIfPresent(self.tagline, forKey: .tagline)
|
||||
try container.encodeIfPresent(self.theme, forKey: .theme)
|
||||
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||
try container.encodeIfPresent(self.titleSort, forKey: .titleSort)
|
||||
try container.encodeIfPresent(self.subtype, forKey: .subtype)
|
||||
try container.encodeIfPresent(self.ultraBlurColors, forKey: .ultraBlurColors)
|
||||
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||||
if self.userRating != nil {
|
||||
try container.encode(self._userRating, forKey: .userRating)
|
||||
}
|
||||
try container.encodeIfPresent(self.viewCount, forKey: .viewCount)
|
||||
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
|
||||
try container.encodeIfPresent(self.viewOffset, forKey: .viewOffset)
|
||||
@@ -462,13 +527,16 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
}
|
||||
|
||||
extension Operations.GetRecentlyAddedMetadata {
|
||||
var ratingWrapper: DecimalSerialized<Double?> {
|
||||
return _rating
|
||||
}
|
||||
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||
var audienceRatingWrapper: DecimalSerialized<Double> {
|
||||
return _audienceRating
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateOnly<Date?> {
|
||||
var originallyAvailableAtWrapper: DateOnly<Date> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
var ratingWrapper: DecimalSerialized<Double> {
|
||||
return _rating
|
||||
}
|
||||
var userRatingWrapper: DecimalSerialized<Double?> {
|
||||
return _userRating
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public enum GetRecentlyAddedOptimizedForStreaming {
|
||||
case getRecentlyAdded1(Operations.GetRecentlyAdded1)
|
||||
case bool(Bool)
|
||||
}}
|
||||
|
||||
extension Operations.GetRecentlyAddedOptimizedForStreaming: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
if let value = try? Operations.GetRecentlyAdded1(from: decoder) {
|
||||
self = .getRecentlyAdded1(value)
|
||||
} else if let value = try? Bool(from: decoder) {
|
||||
self = .bool(value)
|
||||
} else {
|
||||
throw PlexswiftError.failedToHandleResponse(.failedToDecodeResponse)
|
||||
}
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
switch self {
|
||||
case .getRecentlyAdded1(let value):
|
||||
try value.encode(to: encoder)
|
||||
case .bool(let value):
|
||||
try value.encode(to: encoder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Indicates if the part has a thumbnail.
|
||||
public enum HasThumbnail: String, Codable, APIValue {
|
||||
case `false` = "0"
|
||||
case `true` = "1"
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
/// The folder path for the media item.
|
||||
public struct Location {
|
||||
public let path: String?
|
||||
public let path: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(path: String? = nil) {
|
||||
public init(path: String) {
|
||||
self.path = path
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -5,43 +5,81 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Media {
|
||||
public let container: String
|
||||
/// Unique media identifier.
|
||||
public let id: Int
|
||||
public let part: [Operations.Part]
|
||||
/// Aspect ratio of the video.
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
/// Number of audio channels.
|
||||
public let audioChannels: Int?
|
||||
/// Audio codec used.
|
||||
public let audioCodec: String?
|
||||
/// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
public let audioProfile: String?
|
||||
/// Bitrate in bits per second.
|
||||
public let bitrate: Int?
|
||||
/// File container type.
|
||||
public let container: String?
|
||||
public let displayOffset: Int?
|
||||
/// Duration of the media in milliseconds.
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
/// Indicates whether voice activity is detected.
|
||||
public let hasVoiceActivity: Bool?
|
||||
/// Video height in pixels.
|
||||
public let height: Int?
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public let optimizedForStreaming: Operations.OptimizedForStreaming?
|
||||
/// An array of parts for this media item.
|
||||
public let part: [Operations.Part]?
|
||||
/// Video codec used.
|
||||
public let videoCodec: String?
|
||||
/// Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
///
|
||||
public let videoFrameRate: String?
|
||||
/// Video profile (e.g., main 10).
|
||||
public let videoProfile: String?
|
||||
/// Video resolution (e.g., 4k).
|
||||
public let videoResolution: String?
|
||||
/// Video width in pixels.
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter id: Unique media identifier.
|
||||
/// - Parameter aspectRatio: Aspect ratio of the video.
|
||||
/// - Parameter audioChannels: Number of audio channels.
|
||||
/// - Parameter audioCodec: Audio codec used.
|
||||
/// - Parameter audioProfile: The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
/// - Parameter bitrate: Bitrate in bits per second.
|
||||
/// - Parameter container: File container type.
|
||||
/// - Parameter duration: Duration of the media in milliseconds.
|
||||
/// - Parameter hasVoiceActivity: Indicates whether voice activity is detected.
|
||||
/// - Parameter height: Video height in pixels.
|
||||
/// - Parameter optimizedForStreaming: Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
/// - Parameter part: An array of parts for this media item.
|
||||
/// - Parameter videoCodec: Video codec used.
|
||||
/// - Parameter videoFrameRate: Frame rate of the video. Values found include NTSC, PAL, 24p
|
||||
///
|
||||
/// - Parameter videoProfile: Video profile (e.g., main 10).
|
||||
/// - Parameter videoResolution: Video resolution (e.g., 4k).
|
||||
/// - Parameter width: Video width in pixels.
|
||||
///
|
||||
public init(container: String, id: Int, part: [Operations.Part], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.OptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.container = container
|
||||
public init(id: Int, aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, displayOffset: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.OptimizedForStreaming? = nil, part: [Operations.Part]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.container = container
|
||||
self.displayOffset = displayOffset
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.part = part
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
@@ -52,19 +90,20 @@ extension Operations {
|
||||
|
||||
extension Operations.Media: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case displayOffset
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case optimizedForStreaming
|
||||
case part = "Part"
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
@@ -74,19 +113,20 @@ extension Operations.Media: Codable {
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.container = try container.decode(String.self, forKey: .container)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.Part].self, forKey: .part)
|
||||
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.displayOffset = try container.decodeIfPresent(Int.self, forKey: .displayOffset)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.OptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
self.part = try container.decodeIfPresent([Operations.Part].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)
|
||||
@@ -96,9 +136,7 @@ extension Operations.Media: Codable {
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.container, forKey: .container)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
@@ -106,11 +144,14 @@ extension Operations.Media: Codable {
|
||||
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.displayOffset, forKey: .displayOffset)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
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)
|
||||
|
||||
@@ -3,7 +3,30 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum OptimizedForStreaming: Int, Codable, APIValue {
|
||||
case disable = 0
|
||||
case enable = 1
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public enum OptimizedForStreaming {
|
||||
case one(Operations.One)
|
||||
case bool(Bool)
|
||||
}}
|
||||
|
||||
extension Operations.OptimizedForStreaming: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
if let value = try? Operations.One(from: decoder) {
|
||||
self = .one(value)
|
||||
} else if let value = try? Bool(from: decoder) {
|
||||
self = .bool(value)
|
||||
} else {
|
||||
throw PlexswiftError.failedToHandleResponse(.failedToDecodeResponse)
|
||||
}
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
switch self {
|
||||
case .one(let value):
|
||||
try value.encode(to: encoder)
|
||||
case .bool(let value):
|
||||
try value.encode(to: encoder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,39 +5,65 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Part {
|
||||
/// The container format of the media file.
|
||||
///
|
||||
public let container: String
|
||||
/// File path for the part.
|
||||
public let file: String
|
||||
/// Unique part identifier.
|
||||
public let id: Int
|
||||
/// Key to access this part.
|
||||
public let key: String
|
||||
/// File size in bytes.
|
||||
public let size: Int
|
||||
/// Indicates if the part is accessible.
|
||||
public let accessible: Bool?
|
||||
/// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
public let audioProfile: String?
|
||||
/// Container format of the part.
|
||||
public let container: String?
|
||||
/// Duration of the part in milliseconds.
|
||||
public let duration: Int?
|
||||
/// Indicates if the part exists.
|
||||
public let exists: Bool?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasThumbnail: Operations.HasThumbnail?
|
||||
public let indexes: String?
|
||||
public let optimizedForStreaming: Bool?
|
||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
public let optimizedForStreaming: Operations.GetRecentlyAddedOptimizedForStreaming?
|
||||
public let packetLength: Int?
|
||||
/// An array of streams for this part.
|
||||
public let stream: [Operations.Stream]?
|
||||
/// Video profile for the part.
|
||||
public let videoProfile: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter container: The container format of the media file.
|
||||
///
|
||||
/// - Parameter file: File path for the part.
|
||||
/// - Parameter id: Unique part identifier.
|
||||
/// - Parameter key: Key to access this part.
|
||||
/// - Parameter size: File size in bytes.
|
||||
/// - Parameter accessible: Indicates if the part is accessible.
|
||||
/// - Parameter audioProfile: The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||
/// - Parameter container: Container format of the part.
|
||||
/// - Parameter duration: Duration of the part in milliseconds.
|
||||
/// - Parameter exists: Indicates if the part exists.
|
||||
/// - Parameter optimizedForStreaming: Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||
/// - Parameter stream: An array of streams for this part.
|
||||
/// - Parameter videoProfile: Video profile for the part.
|
||||
///
|
||||
public init(container: String, file: String, id: Int, key: String, size: Int, audioProfile: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.HasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.Stream]? = nil, videoProfile: String? = nil) {
|
||||
self.container = container
|
||||
public init(file: String, id: Int, key: String, size: Int, accessible: Bool? = nil, audioProfile: String? = nil, container: String? = nil, duration: Int? = nil, exists: Bool? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.HasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Operations.GetRecentlyAddedOptimizedForStreaming? = nil, packetLength: Int? = nil, stream: [Operations.Stream]? = nil, videoProfile: String? = nil) {
|
||||
self.file = file
|
||||
self.id = id
|
||||
self.key = key
|
||||
self.size = size
|
||||
self.accessible = accessible
|
||||
self.audioProfile = audioProfile
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.exists = exists
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasThumbnail = hasThumbnail
|
||||
self.indexes = indexes
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.packetLength = packetLength
|
||||
self.stream = stream
|
||||
self.videoProfile = videoProfile
|
||||
}
|
||||
@@ -45,17 +71,20 @@ extension Operations {
|
||||
|
||||
extension Operations.Part: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case file
|
||||
case id
|
||||
case key
|
||||
case size
|
||||
case accessible
|
||||
case audioProfile
|
||||
case container
|
||||
case duration
|
||||
case exists
|
||||
case has64bitOffsets
|
||||
case hasThumbnail
|
||||
case indexes
|
||||
case optimizedForStreaming
|
||||
case packetLength
|
||||
case stream = "Stream"
|
||||
case videoProfile
|
||||
}
|
||||
|
||||
@@ -5,34 +5,30 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Producer {
|
||||
/// The filter string for the role.
|
||||
/// The filter string used to query this producer.
|
||||
public let filter: String
|
||||
/// The unique role identifier.
|
||||
/// Unique identifier for the producer.
|
||||
public let id: Int
|
||||
/// The actor's name.
|
||||
/// The name of the producer
|
||||
public let tag: String
|
||||
/// A key associated with the actor tag.
|
||||
public let tagKey: String
|
||||
/// The character name or role.
|
||||
public let role: String?
|
||||
/// URL for the role thumbnail image.
|
||||
/// A unique key associated with the producer's tag, used for internal identification.
|
||||
public let tagKey: String?
|
||||
/// The URL of the thumbnail image for the actor.
|
||||
public let thumb: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter string for the role.
|
||||
/// - Parameter id: The unique role identifier.
|
||||
/// - Parameter tag: The actor's name.
|
||||
/// - Parameter tagKey: A key associated with the actor tag.
|
||||
/// - Parameter role: The character name or role.
|
||||
/// - Parameter thumb: URL for the role thumbnail image.
|
||||
/// - Parameter filter: The filter string used to query this producer.
|
||||
/// - Parameter id: Unique identifier for the producer.
|
||||
/// - Parameter tag: The name of the producer
|
||||
/// - Parameter tagKey: A unique key associated with the producer's tag, used for internal identification.
|
||||
/// - Parameter thumb: The URL of the thumbnail image for the actor.
|
||||
///
|
||||
public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) {
|
||||
public init(filter: String, id: Int, tag: String, tagKey: String? = nil, thumb: String? = nil) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
self.tagKey = tagKey
|
||||
self.role = role
|
||||
self.thumb = thumb
|
||||
}
|
||||
}}
|
||||
@@ -43,7 +39,6 @@ extension Operations.Producer: Codable {
|
||||
case id
|
||||
case tag
|
||||
case tagKey
|
||||
case role
|
||||
case thumb
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,15 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsMetaDataRating {
|
||||
/// A URI or path to the rating image.
|
||||
/// The type of rating, for example 'audience' or 'critic'.
|
||||
public struct Rating {
|
||||
public let image: String
|
||||
/// The type of rating (e.g., audience, critic).
|
||||
public let type: String
|
||||
/// The value of the rating.
|
||||
@DecimalSerialized
|
||||
public private(set) var value: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter image: A URI or path to the rating image.
|
||||
/// - Parameter type: The type of rating (e.g., audience, critic).
|
||||
/// - Parameter value: The value of the rating.
|
||||
///
|
||||
public init(image: String, type: String, value: Double) {
|
||||
self.image = image
|
||||
@@ -26,7 +20,7 @@ extension Operations {
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsMetaDataRating: Codable {
|
||||
extension Operations.Rating: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case image
|
||||
case type
|
||||
@@ -48,7 +42,7 @@ extension Operations.GetLibraryItemsMetaDataRating: Codable {
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryItemsMetaDataRating {
|
||||
extension Operations.Rating {
|
||||
var valueWrapper: DecimalSerialized<Double> {
|
||||
return _value
|
||||
}
|
||||
@@ -5,33 +5,33 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Role {
|
||||
/// The filter used to find the actor or tag.
|
||||
public let filter: String?
|
||||
/// The ID of the tag or actor.
|
||||
public let id: Int?
|
||||
/// The role of the actor or tag in the media.
|
||||
/// The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
|
||||
public let filter: String
|
||||
/// Unique identifier for the actor or role.
|
||||
public let id: Int
|
||||
/// The display tag for the actor (typically the actor's name).
|
||||
public let tag: String
|
||||
/// The role played by the actor in the media item.
|
||||
public let role: String?
|
||||
/// The name of the tag or actor.
|
||||
public let tag: String?
|
||||
/// Unique identifier for the tag.
|
||||
/// A unique key associated with the actor's tag, used for internal identification.
|
||||
public let tagKey: String?
|
||||
/// The thumbnail of the actor
|
||||
/// The URL of the thumbnail image for the actor.
|
||||
public let thumb: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter used to find the actor or tag.
|
||||
/// - Parameter id: The ID of the tag or actor.
|
||||
/// - Parameter role: The role of the actor or tag in the media.
|
||||
/// - Parameter tag: The name of the tag or actor.
|
||||
/// - Parameter tagKey: Unique identifier for the tag.
|
||||
/// - Parameter thumb: The thumbnail of the actor
|
||||
/// - Parameter filter: The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
|
||||
/// - Parameter id: Unique identifier for the actor or role.
|
||||
/// - Parameter tag: The display tag for the actor (typically the actor's name).
|
||||
/// - Parameter role: The role played by the actor in the media item.
|
||||
/// - Parameter tagKey: A unique key associated with the actor's tag, used for internal identification.
|
||||
/// - Parameter thumb: The URL of the thumbnail image for the actor.
|
||||
///
|
||||
public init(filter: String? = nil, id: Int? = nil, role: String? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) {
|
||||
public init(filter: String, id: Int, tag: String, role: String? = nil, tagKey: String? = nil, thumb: String? = nil) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.role = role
|
||||
self.tag = tag
|
||||
self.role = role
|
||||
self.tagKey = tagKey
|
||||
self.thumb = thumb
|
||||
}
|
||||
@@ -41,8 +41,8 @@ extension Operations.Role: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case role
|
||||
case tag
|
||||
case role
|
||||
case tagKey
|
||||
case thumb
|
||||
}
|
||||
|
||||
@@ -3,20 +3,14 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
/// The display tag for the similar item, typically the title.
|
||||
public struct Similar {
|
||||
/// The filter string for similar items.
|
||||
public let filter: String
|
||||
/// The unique similar item identifier.
|
||||
public let id: Int
|
||||
/// The tag or title of the similar content.
|
||||
public let tag: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter string for similar items.
|
||||
/// - Parameter id: The unique similar item identifier.
|
||||
/// - Parameter tag: The tag or title of the similar content.
|
||||
///
|
||||
public init(filter: String, id: Int, tag: String) {
|
||||
self.filter = filter
|
||||
|
||||
@@ -5,119 +5,152 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Stream {
|
||||
/// Codec used by the stream
|
||||
/// Codec used by the stream.
|
||||
public let codec: String
|
||||
/// Display title for the stream.
|
||||
public let displayTitle: String
|
||||
/// Extended display title for the stream.
|
||||
public let extendedDisplayTitle: String
|
||||
/// Unique stream identifier.
|
||||
public let id: Int
|
||||
/// The index of the stream
|
||||
/// Index of the stream.
|
||||
public let index: Int
|
||||
/// Type of stream (1 = video, 2 = audio, 3 = subtitle)
|
||||
/// Stream type (1=video, 2=audio, 3=subtitle).
|
||||
public let streamType: Int
|
||||
/// The audio channel layout
|
||||
/// Audio channel layout.
|
||||
public let audioChannelLayout: String?
|
||||
/// The bit depth of the video stream
|
||||
/// Bit depth of the video stream.
|
||||
public let bitDepth: Int?
|
||||
/// The bitrate of the stream in kbps
|
||||
/// Bitrate of the stream.
|
||||
public let bitrate: Int?
|
||||
/// Indicates if the subtitle stream can auto-sync
|
||||
/// Indicates if the stream can auto-sync.
|
||||
public let canAutoSync: Bool?
|
||||
/// Number of audio channels (for audio streams)
|
||||
/// Number of audio channels (for audio streams).
|
||||
public let channels: Int?
|
||||
/// The chroma location of the video stream
|
||||
/// Chroma sample location.
|
||||
public let chromaLocation: String?
|
||||
/// The chroma subsampling format
|
||||
/// Chroma subsampling format.
|
||||
public let chromaSubsampling: String?
|
||||
public let closedCaptions: Bool?
|
||||
/// The coded height of the video stream
|
||||
/// Coded video height.
|
||||
public let codedHeight: Int?
|
||||
/// The coded width of the video stream
|
||||
/// Coded video width.
|
||||
public let codedWidth: Int?
|
||||
/// The color primaries of the video stream
|
||||
/// Color primaries used.
|
||||
public let colorPrimaries: String?
|
||||
/// The color range of the video stream
|
||||
/// Color range (e.g., tv).
|
||||
public let colorRange: String?
|
||||
/// The color space of the video stream
|
||||
/// Color space.
|
||||
public let colorSpace: String?
|
||||
/// The transfer characteristics (TRC) of the video stream
|
||||
/// Color transfer characteristics.
|
||||
public let colorTrc: String?
|
||||
/// Indicates if this is the default stream
|
||||
/// Indicates if this stream is default.
|
||||
public let `default`: Bool?
|
||||
/// Display title of the stream
|
||||
public let displayTitle: String?
|
||||
/// Dolby Vision BL compatibility ID.
|
||||
public let doviblCompatID: Int?
|
||||
/// Indicates if Dolby Vision BL is present.
|
||||
public let doviblPresent: Bool?
|
||||
/// Indicates if Dolby Vision EL is present.
|
||||
public let dovielPresent: Bool?
|
||||
/// Dolby Vision level.
|
||||
public let doviLevel: Int?
|
||||
/// Indicates if Dolby Vision is present.
|
||||
public let doviPresent: Bool?
|
||||
/// Dolby Vision profile.
|
||||
public let doviProfile: Int?
|
||||
/// Indicates if Dolby Vision RPU is present.
|
||||
public let dovirpuPresent: Bool?
|
||||
/// Dolby Vision version.
|
||||
public let doviVersion: String?
|
||||
/// Indicates if the stream is a dub.
|
||||
public let dub: Bool?
|
||||
public let embeddedInVideo: String?
|
||||
/// Extended display title of the stream
|
||||
public let extendedDisplayTitle: String?
|
||||
/// The frame rate of the video stream
|
||||
public let forced: Bool?
|
||||
/// Frame rate of the stream.
|
||||
@DecimalSerialized
|
||||
public private(set) var frameRate: Double?
|
||||
/// Indicates if the stream has a scaling matrix
|
||||
public let hasScalingMatrix: Bool?
|
||||
/// Indicates whether header compression is enabled.
|
||||
public let headerCompression: Bool?
|
||||
/// Indicates if the stream is for the hearing impaired.
|
||||
public let hearingImpaired: Bool?
|
||||
/// The height of the video stream
|
||||
/// Height of the video stream.
|
||||
public let height: Int?
|
||||
/// The language of the stream (for audio/subtitle streams)
|
||||
/// Language of the stream.
|
||||
public let language: String?
|
||||
/// Language code of the stream
|
||||
/// ISO language code.
|
||||
public let languageCode: String?
|
||||
/// Language tag of the stream
|
||||
/// Language tag (e.g., en).
|
||||
public let languageTag: String?
|
||||
/// The level of the video codec
|
||||
/// Video level.
|
||||
public let level: Int?
|
||||
/// The profile of the video codec
|
||||
/// Indicates if this is the original stream.
|
||||
public let original: Bool?
|
||||
/// Video profile.
|
||||
public let profile: String?
|
||||
/// Number of reference frames
|
||||
/// Number of reference frames.
|
||||
public let refFrames: Int?
|
||||
/// Sampling rate of the audio stream in Hz
|
||||
/// Sampling rate for the audio stream.
|
||||
public let samplingRate: Int?
|
||||
/// The scan type (progressive or interlaced)
|
||||
public let scanType: String?
|
||||
/// Indicates if the stream is selected
|
||||
/// Indicates if this stream is selected (applicable for audio streams).
|
||||
public let selected: Bool?
|
||||
/// The identifier of the video stream
|
||||
public let streamIdentifier: String?
|
||||
/// Title of the subtitle track (for subtitle streams)
|
||||
/// Optional title for the stream (e.g., language variant).
|
||||
public let title: String?
|
||||
/// The width of the video stream
|
||||
/// Width of the video stream.
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter codec: Codec used by the stream
|
||||
/// - Parameter index: The index of the stream
|
||||
/// - Parameter streamType: Type of stream (1 = video, 2 = audio, 3 = subtitle)
|
||||
/// - Parameter audioChannelLayout: The audio channel layout
|
||||
/// - Parameter bitDepth: The bit depth of the video stream
|
||||
/// - Parameter bitrate: The bitrate of the stream in kbps
|
||||
/// - Parameter canAutoSync: Indicates if the subtitle stream can auto-sync
|
||||
/// - Parameter channels: Number of audio channels (for audio streams)
|
||||
/// - Parameter chromaLocation: The chroma location of the video stream
|
||||
/// - Parameter chromaSubsampling: The chroma subsampling format
|
||||
/// - Parameter codedHeight: The coded height of the video stream
|
||||
/// - Parameter codedWidth: The coded width of the video stream
|
||||
/// - Parameter colorPrimaries: The color primaries of the video stream
|
||||
/// - Parameter colorRange: The color range of the video stream
|
||||
/// - Parameter colorSpace: The color space of the video stream
|
||||
/// - Parameter colorTrc: The transfer characteristics (TRC) of the video stream
|
||||
/// - Parameter `default`: Indicates if this is the default stream
|
||||
/// - Parameter displayTitle: Display title of the stream
|
||||
/// - Parameter extendedDisplayTitle: Extended display title of the stream
|
||||
/// - Parameter frameRate: The frame rate of the video stream
|
||||
/// - Parameter hasScalingMatrix: Indicates if the stream has a scaling matrix
|
||||
/// - Parameter height: The height of the video stream
|
||||
/// - Parameter language: The language of the stream (for audio/subtitle streams)
|
||||
/// - Parameter languageCode: Language code of the stream
|
||||
/// - Parameter languageTag: Language tag of the stream
|
||||
/// - Parameter level: The level of the video codec
|
||||
/// - Parameter profile: The profile of the video codec
|
||||
/// - Parameter refFrames: Number of reference frames
|
||||
/// - Parameter samplingRate: Sampling rate of the audio stream in Hz
|
||||
/// - Parameter scanType: The scan type (progressive or interlaced)
|
||||
/// - Parameter selected: Indicates if the stream is selected
|
||||
/// - Parameter streamIdentifier: The identifier of the video stream
|
||||
/// - Parameter title: Title of the subtitle track (for subtitle streams)
|
||||
/// - Parameter width: The width of the video stream
|
||||
/// - Parameter codec: Codec used by the stream.
|
||||
/// - Parameter displayTitle: Display title for the stream.
|
||||
/// - Parameter extendedDisplayTitle: Extended display title for the stream.
|
||||
/// - Parameter id: Unique stream identifier.
|
||||
/// - Parameter index: Index of the stream.
|
||||
/// - Parameter streamType: Stream type (1=video, 2=audio, 3=subtitle).
|
||||
/// - Parameter audioChannelLayout: Audio channel layout.
|
||||
/// - Parameter bitDepth: Bit depth of the video stream.
|
||||
/// - Parameter bitrate: Bitrate of the stream.
|
||||
/// - Parameter canAutoSync: Indicates if the stream can auto-sync.
|
||||
/// - Parameter channels: Number of audio channels (for audio streams).
|
||||
/// - Parameter chromaLocation: Chroma sample location.
|
||||
/// - Parameter chromaSubsampling: Chroma subsampling format.
|
||||
/// - Parameter codedHeight: Coded video height.
|
||||
/// - Parameter codedWidth: Coded video width.
|
||||
/// - Parameter colorPrimaries: Color primaries used.
|
||||
/// - Parameter colorRange: Color range (e.g., tv).
|
||||
/// - Parameter colorSpace: Color space.
|
||||
/// - Parameter colorTrc: Color transfer characteristics.
|
||||
/// - Parameter `default`: Indicates if this stream is default.
|
||||
/// - Parameter doviblCompatID: Dolby Vision BL compatibility ID.
|
||||
/// - Parameter doviblPresent: Indicates if Dolby Vision BL is present.
|
||||
/// - Parameter dovielPresent: Indicates if Dolby Vision EL is present.
|
||||
/// - Parameter doviLevel: Dolby Vision level.
|
||||
/// - Parameter doviPresent: Indicates if Dolby Vision is present.
|
||||
/// - Parameter doviProfile: Dolby Vision profile.
|
||||
/// - Parameter dovirpuPresent: Indicates if Dolby Vision RPU is present.
|
||||
/// - Parameter doviVersion: Dolby Vision version.
|
||||
/// - Parameter dub: Indicates if the stream is a dub.
|
||||
/// - Parameter frameRate: Frame rate of the stream.
|
||||
/// - Parameter headerCompression: Indicates whether header compression is enabled.
|
||||
/// - Parameter hearingImpaired: Indicates if the stream is for the hearing impaired.
|
||||
/// - Parameter height: Height of the video stream.
|
||||
/// - Parameter language: Language of the stream.
|
||||
/// - Parameter languageCode: ISO language code.
|
||||
/// - Parameter languageTag: Language tag (e.g., en).
|
||||
/// - Parameter level: Video level.
|
||||
/// - Parameter original: Indicates if this is the original stream.
|
||||
/// - Parameter profile: Video profile.
|
||||
/// - Parameter refFrames: Number of reference frames.
|
||||
/// - Parameter samplingRate: Sampling rate for the audio stream.
|
||||
/// - Parameter selected: Indicates if this stream is selected (applicable for audio streams).
|
||||
/// - Parameter title: Optional title for the stream (e.g., language variant).
|
||||
/// - Parameter width: Width of the video stream.
|
||||
///
|
||||
public init(codec: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, displayTitle: String? = nil, embeddedInVideo: String? = nil, extendedDisplayTitle: String? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, streamIdentifier: String? = nil, title: String? = nil, width: Int? = nil) {
|
||||
public init(codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, embeddedInVideo: String? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, headerCompression: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) {
|
||||
self.codec = codec
|
||||
self.displayTitle = displayTitle
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self.id = id
|
||||
self.index = index
|
||||
self.streamType = streamType
|
||||
@@ -136,23 +169,32 @@ extension Operations {
|
||||
self.colorSpace = colorSpace
|
||||
self.colorTrc = colorTrc
|
||||
self.`default` = `default`
|
||||
self.displayTitle = displayTitle
|
||||
self.doviblCompatID = doviblCompatID
|
||||
self.doviblPresent = doviblPresent
|
||||
self.dovielPresent = dovielPresent
|
||||
self.doviLevel = doviLevel
|
||||
self.doviPresent = doviPresent
|
||||
self.doviProfile = doviProfile
|
||||
self.dovirpuPresent = dovirpuPresent
|
||||
self.doviVersion = doviVersion
|
||||
self.dub = dub
|
||||
self.embeddedInVideo = embeddedInVideo
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self.forced = forced
|
||||
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
|
||||
self.hasScalingMatrix = hasScalingMatrix
|
||||
self.headerCompression = headerCompression
|
||||
self.hearingImpaired = hearingImpaired
|
||||
self.height = height
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.level = level
|
||||
self.original = original
|
||||
self.profile = profile
|
||||
self.refFrames = refFrames
|
||||
self.samplingRate = samplingRate
|
||||
self.scanType = scanType
|
||||
self.selected = selected
|
||||
self.streamIdentifier = streamIdentifier
|
||||
self.title = title
|
||||
self.width = width
|
||||
}
|
||||
@@ -161,6 +203,8 @@ extension Operations {
|
||||
extension Operations.Stream: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case codec
|
||||
case displayTitle
|
||||
case extendedDisplayTitle
|
||||
case id
|
||||
case index
|
||||
case streamType
|
||||
@@ -179,23 +223,32 @@ extension Operations.Stream: Codable {
|
||||
case colorSpace
|
||||
case colorTrc
|
||||
case `default` = "default"
|
||||
case displayTitle
|
||||
case doviblCompatID = "DOVIBLCompatID"
|
||||
case doviblPresent = "DOVIBLPresent"
|
||||
case dovielPresent = "DOVIELPresent"
|
||||
case doviLevel = "DOVILevel"
|
||||
case doviPresent = "DOVIPresent"
|
||||
case doviProfile = "DOVIProfile"
|
||||
case dovirpuPresent = "DOVIRPUPresent"
|
||||
case doviVersion = "DOVIVersion"
|
||||
case dub
|
||||
case embeddedInVideo
|
||||
case extendedDisplayTitle
|
||||
case forced
|
||||
case frameRate
|
||||
case hasScalingMatrix
|
||||
case headerCompression
|
||||
case hearingImpaired
|
||||
case height
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case level
|
||||
case original
|
||||
case profile
|
||||
case refFrames
|
||||
case samplingRate
|
||||
case scanType
|
||||
case selected
|
||||
case streamIdentifier
|
||||
case title
|
||||
case width
|
||||
}
|
||||
@@ -203,6 +256,8 @@ extension Operations.Stream: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.codec = try container.decode(String.self, forKey: .codec)
|
||||
self.displayTitle = try container.decode(String.self, forKey: .displayTitle)
|
||||
self.extendedDisplayTitle = try container.decode(String.self, forKey: .extendedDisplayTitle)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.index = try container.decode(Int.self, forKey: .index)
|
||||
self.streamType = try container.decode(Int.self, forKey: .streamType)
|
||||
@@ -221,23 +276,32 @@ extension Operations.Stream: Codable {
|
||||
self.colorSpace = try container.decodeIfPresent(String.self, forKey: .colorSpace)
|
||||
self.colorTrc = try container.decodeIfPresent(String.self, forKey: .colorTrc)
|
||||
self.`default` = try container.decodeIfPresent(Bool.self, forKey: .`default`)
|
||||
self.displayTitle = try container.decodeIfPresent(String.self, forKey: .displayTitle)
|
||||
self.doviblCompatID = try container.decodeIfPresent(Int.self, forKey: .doviblCompatID)
|
||||
self.doviblPresent = try container.decodeIfPresent(Bool.self, forKey: .doviblPresent)
|
||||
self.dovielPresent = try container.decodeIfPresent(Bool.self, forKey: .dovielPresent)
|
||||
self.doviLevel = try container.decodeIfPresent(Int.self, forKey: .doviLevel)
|
||||
self.doviPresent = try container.decodeIfPresent(Bool.self, forKey: .doviPresent)
|
||||
self.doviProfile = try container.decodeIfPresent(Int.self, forKey: .doviProfile)
|
||||
self.dovirpuPresent = try container.decodeIfPresent(Bool.self, forKey: .dovirpuPresent)
|
||||
self.doviVersion = try container.decodeIfPresent(String.self, forKey: .doviVersion)
|
||||
self.dub = try container.decodeIfPresent(Bool.self, forKey: .dub)
|
||||
self.embeddedInVideo = try container.decodeIfPresent(String.self, forKey: .embeddedInVideo)
|
||||
self.extendedDisplayTitle = try container.decodeIfPresent(String.self, forKey: .extendedDisplayTitle)
|
||||
self.forced = try container.decodeIfPresent(Bool.self, forKey: .forced)
|
||||
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix)
|
||||
self.headerCompression = try container.decodeIfPresent(Bool.self, forKey: .headerCompression)
|
||||
self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.language = try container.decodeIfPresent(String.self, forKey: .language)
|
||||
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
|
||||
self.level = try container.decodeIfPresent(Int.self, forKey: .level)
|
||||
self.original = try container.decodeIfPresent(Bool.self, forKey: .original)
|
||||
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
|
||||
self.refFrames = try container.decodeIfPresent(Int.self, forKey: .refFrames)
|
||||
self.samplingRate = try container.decodeIfPresent(Int.self, forKey: .samplingRate)
|
||||
self.scanType = try container.decodeIfPresent(String.self, forKey: .scanType)
|
||||
self.selected = try container.decodeIfPresent(Bool.self, forKey: .selected)
|
||||
self.streamIdentifier = try container.decodeIfPresent(String.self, forKey: .streamIdentifier)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
self.width = try container.decodeIfPresent(Int.self, forKey: .width)
|
||||
}
|
||||
@@ -245,6 +309,8 @@ extension Operations.Stream: Codable {
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.codec, forKey: .codec)
|
||||
try container.encode(self.displayTitle, forKey: .displayTitle)
|
||||
try container.encode(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.index, forKey: .index)
|
||||
try container.encode(self.streamType, forKey: .streamType)
|
||||
@@ -263,25 +329,34 @@ extension Operations.Stream: Codable {
|
||||
try container.encodeIfPresent(self.colorSpace, forKey: .colorSpace)
|
||||
try container.encodeIfPresent(self.colorTrc, forKey: .colorTrc)
|
||||
try container.encodeIfPresent(self.`default`, forKey: .`default`)
|
||||
try container.encodeIfPresent(self.displayTitle, forKey: .displayTitle)
|
||||
try container.encodeIfPresent(self.doviblCompatID, forKey: .doviblCompatID)
|
||||
try container.encodeIfPresent(self.doviblPresent, forKey: .doviblPresent)
|
||||
try container.encodeIfPresent(self.dovielPresent, forKey: .dovielPresent)
|
||||
try container.encodeIfPresent(self.doviLevel, forKey: .doviLevel)
|
||||
try container.encodeIfPresent(self.doviPresent, forKey: .doviPresent)
|
||||
try container.encodeIfPresent(self.doviProfile, forKey: .doviProfile)
|
||||
try container.encodeIfPresent(self.dovirpuPresent, forKey: .dovirpuPresent)
|
||||
try container.encodeIfPresent(self.doviVersion, forKey: .doviVersion)
|
||||
try container.encodeIfPresent(self.dub, forKey: .dub)
|
||||
try container.encodeIfPresent(self.embeddedInVideo, forKey: .embeddedInVideo)
|
||||
try container.encodeIfPresent(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
try container.encodeIfPresent(self.forced, forKey: .forced)
|
||||
if self.frameRate != nil {
|
||||
try container.encode(self._frameRate, forKey: .frameRate)
|
||||
}
|
||||
try container.encodeIfPresent(self.hasScalingMatrix, forKey: .hasScalingMatrix)
|
||||
try container.encodeIfPresent(self.headerCompression, forKey: .headerCompression)
|
||||
try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.language, forKey: .language)
|
||||
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
|
||||
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
|
||||
try container.encodeIfPresent(self.level, forKey: .level)
|
||||
try container.encodeIfPresent(self.original, forKey: .original)
|
||||
try container.encodeIfPresent(self.profile, forKey: .profile)
|
||||
try container.encodeIfPresent(self.refFrames, forKey: .refFrames)
|
||||
try container.encodeIfPresent(self.samplingRate, forKey: .samplingRate)
|
||||
try container.encodeIfPresent(self.scanType, forKey: .scanType)
|
||||
try container.encodeIfPresent(self.selected, forKey: .selected)
|
||||
try container.encodeIfPresent(self.streamIdentifier, forKey: .streamIdentifier)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.width, forKey: .width)
|
||||
}
|
||||
|
||||
@@ -5,19 +5,36 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Writer {
|
||||
public let tag: String?
|
||||
/// The filter string used to query this writer.
|
||||
public let filter: String
|
||||
/// Unique identifier for the writer.
|
||||
public let id: Int
|
||||
/// The role of Writer
|
||||
public let tag: String
|
||||
/// A unique key associated with the writers tag, used for internal identification.
|
||||
public let tagKey: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter string used to query this writer.
|
||||
/// - Parameter id: Unique identifier for the writer.
|
||||
/// - Parameter tag: The role of Writer
|
||||
/// - Parameter tagKey: A unique key associated with the writers tag, used for internal identification.
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
public init(filter: String, id: Int, tag: String, tagKey: String? = nil) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.tag = tag
|
||||
self.tagKey = tagKey
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Writer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case tag
|
||||
case tagKey
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -749,7 +749,6 @@ public protocol SearchAPI {
|
||||
/// - ``getMediaMetaData(request:)``
|
||||
/// - ``getMetadataChildren(request:)``
|
||||
/// - ``getTopWatchedContent(request:)``
|
||||
/// - ``getOnDeck()``
|
||||
///
|
||||
public protocol LibraryAPI {
|
||||
/// This resource returns hash values for local files
|
||||
@@ -956,13 +955,6 @@ public protocol LibraryAPI {
|
||||
/// - Returns: A ``Operations/GetTopWatchedContentResponse`` object describing the result of the API operation
|
||||
/// - Throws: An error of type ``PlexswiftError``
|
||||
func getTopWatchedContent(request: Operations.GetTopWatchedContentRequest) async throws -> Response<Operations.GetTopWatchedContentResponse>
|
||||
|
||||
/// This endpoint will return the on deck content.
|
||||
///
|
||||
///
|
||||
/// - Returns: A ``Operations/GetOnDeckResponse`` object describing the result of the API operation
|
||||
/// - Throws: An error of type ``PlexswiftError``
|
||||
func getOnDeck() async throws -> Response<Operations.GetOnDeckResponse>
|
||||
}
|
||||
|
||||
// MARK: - WatchlistAPI
|
||||
|
||||
@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
|
||||
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
||||
}
|
||||
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.10.3 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.10.5 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
|
||||
addSecurityParameters(to: &urlRequest)
|
||||
|
||||
|
||||
@@ -586,33 +586,6 @@ actions:
|
||||
- lang: swift
|
||||
label: image
|
||||
source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"<YOUR_API_KEY_HERE>\"))\n\nlet response = try await client.media.getThumbImage(\n request: Operations.GetThumbImageRequest(\n height: 396, \n minSize: 1, \n ratingKey: 9518, \n upscale: 1, \n width: 396, \n xPlexToken: \"CV5xoxjTpFKUzBTShsaf\"\n )\n)\n\nswitch response.data {\ncase .bytes(let bytes):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}"
|
||||
- target: $["paths"]["/library/onDeck"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: swift
|
||||
label: getOnDeck
|
||||
source: |-
|
||||
import Foundation
|
||||
import Plexswift
|
||||
|
||||
let client = Client(security: .accessToken("<YOUR_API_KEY_HERE>"))
|
||||
|
||||
let response = try await client.library.getOnDeck()
|
||||
|
||||
switch response.data {
|
||||
case .object(let object):
|
||||
// Handle response
|
||||
break
|
||||
case .badRequest(let badRequest):
|
||||
// Handle response
|
||||
break
|
||||
case .unauthorized(let unauthorized):
|
||||
// Handle response
|
||||
break
|
||||
case .empty:
|
||||
// Handle empty response
|
||||
break
|
||||
}
|
||||
- target: $["paths"]["/library/recentlyAdded"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
|
||||
Reference in New Issue
Block a user