ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2

This commit is contained in:
speakeasybot
2024-09-21 00:08:20 +00:00
parent b1a46864c8
commit 62f64fc047
61 changed files with 1610 additions and 1086 deletions

View File

@@ -325,15 +325,21 @@ case .empty:
- ``Operations/GetLibraryItemsCountry``
- ``Operations/GetLibraryItemsDirector``
- ``Operations/GetLibraryItemsErrors``
- ``Operations/GetLibraryItemsField``
- ``Operations/GetLibraryItemsFieldType``
- ``Operations/GetLibraryItemsFilter``
- ``Operations/GetLibraryItemsGenre``
- ``Operations/GetLibraryItemsLibraryErrors``
- ``Operations/GetLibraryItemsMedia``
- ``Operations/GetLibraryItemsMediaContainer``
- ``Operations/GetLibraryItemsMetadata``
- ``Operations/GetLibraryItemsOperator``
- ``Operations/GetLibraryItemsPart``
- ``Operations/GetLibraryItemsRequest``
- ``Operations/GetLibraryItemsResponseBody``
- ``Operations/GetLibraryItemsRole``
- ``Operations/GetLibraryItemsSort``
- ``Operations/GetLibraryItemsType``
- ``Operations/GetLibraryItemsUnauthorized``
- ``Operations/GetLibraryItemsWriter``
- ``Operations/GetMediaProvidersDirectory``
@@ -658,8 +664,10 @@ case .empty:
- ``Operations/MarkUnplayedUnauthorized``
- ``Operations/Media``
- ``Operations/MediaContainer``
- ``Operations/MediaGuid``
- ``Operations/MediaProvider``
- ``Operations/MediaReviewsVisibility``
- ``Operations/Meta``
- ``Operations/Metadata``
- ``Operations/MinSize``
- ``Operations/MyPlex``
@@ -692,7 +700,6 @@ case .empty:
- ``Operations/PostUsersSignInDataFeatures``
- ``Operations/PostUsersSignInDataMailingListStatus``
- ``Operations/PostUsersSignInDataMediaReviewsVisibility``
- ``Operations/PostUsersSignInDataRequest``
- ``Operations/PostUsersSignInDataRequestBody``
- ``Operations/PostUsersSignInDataServices``
- ``Operations/PostUsersSignInDataState``
@@ -703,6 +710,7 @@ case .empty:
- ``Operations/PostUsersSignInDataUserProfile``
- ``Operations/PostUsersSignInDataWatchedIndicator``
- ``Operations/Producer``
- ``Operations/`Protocol```
- ``Operations/Provider``
- ``Operations/QueryParamFilter``
- ``Operations/QueryParamForce``

View File

@@ -38,7 +38,7 @@ class _AuthenticationAPI: AuthenticationAPI {
)
}
public func postUsersSignInData(request: Operations.PostUsersSignInDataRequest, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response<Operations.PostUsersSignInDataResponse> {
public func postUsersSignInData(request: Operations.PostUsersSignInDataRequestBody, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response<Operations.PostUsersSignInDataResponse> {
return try await client.makeRequest(
with: try server?.server() ?? AuthenticationServers.PostUsersSignInData.default(),
configureRequest: { configuration in
@@ -72,12 +72,11 @@ private func configureGetTokenDetailsRequest(with configuration: URLRequestConfi
configuration.telemetryHeader = .userAgent
}
private func configurePostUsersSignInDataRequest(with configuration: URLRequestConfiguration, request: Operations.PostUsersSignInDataRequest) throws {
private func configurePostUsersSignInDataRequest(with configuration: URLRequestConfiguration, request: Operations.PostUsersSignInDataRequestBody) throws {
configuration.path = "/users/signin"
configuration.method = .post
configuration.queryParameterSerializable = request
configuration.contentType = "application/x-www-form-urlencoded"
configuration.body = try serializeFormData(with: request.requestBody)
configuration.body = try serializeFormData(with: request)
configuration.telemetryHeader = .userAgent
}

View File

@@ -125,7 +125,6 @@ private func configureGetTokenByPinIdRequest(with configuration: URLRequestConfi
configuration.path = "/pins/{pinID}"
configuration.method = .get
configuration.pathParameterSerializable = request
configuration.queryParameterSerializable = request
configuration.telemetryHeader = .userAgent
}

View File

@@ -21,7 +21,6 @@ extension Operations.GetPinRequest: Serializable {
extension Operations.GetPinRequest: QueryParameterSerializable {
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
let builder = QueryParameterBuilder()
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: clientName, named: "X-Plex-Product", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: clientPlatform, named: "X-Plex-Platform", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: clientVersion, named: "X-Plex-Version", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)

View File

@@ -21,7 +21,6 @@ extension Operations.GetServerResourcesRequest: Serializable {
extension Operations.GetServerResourcesRequest: QueryParameterSerializable {
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
let builder = QueryParameterBuilder()
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: includeHttps, named: "includeHttps", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: includeIPv6, named: "includeIPv6", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: includeRelay, named: "includeRelay", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)

View File

@@ -8,16 +8,10 @@ extension Operations.GetTokenByPinIdRequest: Serializable {
switch format {
case .path:
return try serializePathParameterSerializable(self, with: format)
case .query:
return try serializeQueryParameterSerializable(self, with: format)
case .header, .multipart, .form:
case .query, .header, .multipart, .form:
throw SerializationError.invalidSerializationParameter(type: "Operations.GetTokenByPinIdRequest", format: format.formatDescription)
}
}
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
return try serializedQueryParameters(with: nil, formatOverride: format)
}
}
extension Operations.GetTokenByPinIdRequest: PathParameterSerializable {
@@ -27,11 +21,3 @@ extension Operations.GetTokenByPinIdRequest: PathParameterSerializable {
].compactMapValues { $0 }
}
}
extension Operations.GetTokenByPinIdRequest: QueryParameterSerializable {
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
let builder = QueryParameterBuilder()
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
return builder.build()
}
}

View File

@@ -1,27 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations.PostUsersSignInDataRequest: Serializable {
func serialize(with format: SerializableFormat) throws -> String {
switch format {
case .query:
return try serializeQueryParameterSerializable(self, with: format)
case .path, .header, .multipart, .form:
throw SerializationError.invalidSerializationParameter(type: "Operations.PostUsersSignInDataRequest", format: format.formatDescription)
}
}
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
return try serializedQueryParameters(with: nil, formatOverride: format)
}
}
extension Operations.PostUsersSignInDataRequest: QueryParameterSerializable {
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
let builder = QueryParameterBuilder()
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
return builder.build()
}
}

View File

@@ -0,0 +1,14 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations.`Protocol`: 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))]
}
}

View File

@@ -23,6 +23,7 @@ extension Operations.UploadPlaylistRequest: QueryParameterSerializable {
let builder = QueryParameterBuilder()
try builder.addQueryParameters(from: force, named: "force", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: path, named: "path", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
try builder.addQueryParameters(from: sectionID, named: "sectionID", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
return builder.build()
}
}

View File

@@ -4,7 +4,7 @@ import Foundation
extension Operations {
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
public enum AutoSelectSubtitle: String, Codable, APIValue {
case zero = "0"
case one = "1"
public enum AutoSelectSubtitle: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -5,23 +5,36 @@ import Foundation
extension Operations {
/// A model object
public struct Connections {
/// The (ip) address or domain name used for the connection
public let address: String
/// If the connection is using IPv6
public let iPv6: Bool
/// If the connection is local address
public let local: Bool
@DecimalSerialized
public private(set) var port: Double
public let `protocol`: String
/// The port used for the connection
public let port: Int
/// The protocol used for the connection (http, https, etc)
public let `protocol`: Operations.`Protocol`
/// If the connection is relayed through plex.direct
public let relay: Bool
/// The full URI of the connection
public let uri: String
/// Creates an object with the specified parameters
///
/// - Parameter address: The (ip) address or domain name used for the connection
/// - Parameter iPv6: If the connection is using IPv6
/// - Parameter local: If the connection is local address
/// - Parameter port: The port used for the connection
/// - Parameter `protocol`: The protocol used for the connection (http, https, etc)
/// - Parameter relay: If the connection is relayed through plex.direct
/// - Parameter uri: The full URI of the connection
///
public init(address: String, iPv6: Bool, local: Bool, port: Double, `protocol`: String, relay: Bool, uri: String) {
public init(address: String, iPv6: Bool, local: Bool, port: Int, `protocol`: Operations.`Protocol`, relay: Bool, uri: String) {
self.address = address
self.iPv6 = iPv6
self.local = local
self._port = DecimalSerialized<Double>(wrappedValue: port)
self.port = port
self.`protocol` = `protocol`
self.relay = relay
self.uri = uri
@@ -38,32 +51,5 @@ extension Operations.Connections: Codable {
case relay
case uri
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.address = try container.decode(String.self, forKey: .address)
self.iPv6 = try container.decode(Bool.self, forKey: .iPv6)
self.local = try container.decode(Bool.self, forKey: .local)
self._port = try container.decode(DecimalSerialized<Double>.self, forKey: .port)
self.`protocol` = try container.decode(String.self, forKey: .`protocol`)
self.relay = try container.decode(Bool.self, forKey: .relay)
self.uri = try container.decode(String.self, forKey: .uri)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(self.address, forKey: .address)
try container.encode(self.iPv6, forKey: .iPv6)
try container.encode(self.local, forKey: .local)
try container.encode(self._port, forKey: .port)
try container.encode(self.`protocol`, forKey: .`protocol`)
try container.encode(self.relay, forKey: .relay)
try container.encode(self.uri, forKey: .uri)
}
}
extension Operations.Connections {
var portWrapper: DecimalSerialized<Double> {
return _port
}
}

View File

@@ -3,8 +3,8 @@
import Foundation
extension Operations {
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
public enum DefaultSubtitleAccessibility: String, Codable, APIValue {
case zero = "0"
case one = "1"
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
public enum DefaultSubtitleAccessibility: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -4,7 +4,7 @@ import Foundation
extension Operations {
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
public enum DefaultSubtitleForced: String, Codable, APIValue {
case zero = "0"
case one = "1"
public enum DefaultSubtitleForced: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -5,38 +5,38 @@ import Foundation
extension Operations {
/// A model object
public struct GetAllLibrariesDirectory {
public let agent: String?
public let allowSync: Bool?
public let art: String?
public let composite: String?
public let content: Bool?
public let contentChangedAt: Int?
/// Unix epoch datetime
public let createdAt: Int?
public let directory: Bool?
public let filters: Bool?
public let hidden: Int?
public let key: String?
public let language: String?
public let location: [Operations.Location]?
public let refreshing: Bool?
/// Unix epoch datetime
public let scannedAt: Int?
public let scanner: String?
public let thumb: String?
public let title: String?
public let type: String?
/// Unix epoch datetime
public let updatedAt: Int?
public let uuid: String?
public let agent: String
public let allowSync: Bool
public let art: String
public let composite: String
public let content: Bool
public let contentChangedAt: Int
/// Unix epoch datetime in seconds
public let createdAt: Int
public let directory: Bool
public let filters: Bool
public let hidden: Int
public let key: String
public let language: String
public let location: [Operations.Location]
public let refreshing: Bool
/// Unix epoch datetime in seconds
public let scannedAt: Int
public let scanner: String
public let thumb: String
public let title: String
public let type: String
/// Unix epoch datetime in seconds
public let updatedAt: Int
public let uuid: String
/// Creates an object with the specified parameters
///
/// - Parameter createdAt: Unix epoch datetime
/// - Parameter scannedAt: Unix epoch datetime
/// - Parameter updatedAt: Unix epoch datetime
/// - Parameter createdAt: Unix epoch datetime in seconds
/// - Parameter scannedAt: Unix epoch datetime in seconds
/// - Parameter updatedAt: Unix epoch datetime in seconds
///
public init(agent: String? = nil, allowSync: Bool? = nil, art: String? = nil, composite: String? = nil, content: Bool? = nil, contentChangedAt: Int? = nil, createdAt: Int? = nil, directory: Bool? = nil, filters: Bool? = nil, hidden: Int? = nil, key: String? = nil, language: String? = nil, location: [Operations.Location]? = nil, refreshing: Bool? = nil, scannedAt: Int? = nil, scanner: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, uuid: String? = nil) {
public init(agent: String, allowSync: Bool, art: String, composite: String, content: Bool, contentChangedAt: Int, createdAt: Int, directory: Bool, filters: Bool, hidden: Int, key: String, language: String, location: [Operations.Location], refreshing: Bool, scannedAt: Int, scanner: String, thumb: String, title: String, type: String, updatedAt: Int, uuid: String) {
self.agent = agent
self.allowSync = allowSync
self.art = art

View File

@@ -6,27 +6,27 @@ extension Operations {
/// A model object
public struct GetAllLibrariesMediaContainer {
public let allowSync: Bool
public let directory: [Operations.GetAllLibrariesDirectory]
public let size: Int
public let title1: String
public let directory: [Operations.GetAllLibrariesDirectory]?
/// Creates an object with the specified parameters
///
///
public init(allowSync: Bool, size: Int, title1: String, directory: [Operations.GetAllLibrariesDirectory]? = nil) {
public init(allowSync: Bool, directory: [Operations.GetAllLibrariesDirectory], size: Int, title1: String) {
self.allowSync = allowSync
self.directory = directory
self.size = size
self.title1 = title1
self.directory = directory
}
}}
extension Operations.GetAllLibrariesMediaContainer: Codable {
enum CodingKeys: String, CodingKey {
case allowSync
case directory = "Directory"
case size
case title1
case directory = "Directory"
}
}

View File

@@ -5,12 +5,12 @@ import Foundation
extension Operations {
/// The libraries available on the Server
public struct GetAllLibrariesResponseBody {
public let mediaContainer: Operations.GetAllLibrariesMediaContainer?
public let mediaContainer: Operations.GetAllLibrariesMediaContainer
/// Creates an object with the specified parameters
///
///
public init(mediaContainer: Operations.GetAllLibrariesMediaContainer? = nil) {
public init(mediaContainer: Operations.GetAllLibrariesMediaContainer) {
self.mediaContainer = mediaContainer
}
}}

View File

@@ -0,0 +1,32 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsField {
public let key: String
public let title: String
public let type: String
public let subType: String?
/// Creates an object with the specified parameters
///
///
public init(key: String, title: String, type: String, subType: String? = nil) {
self.key = key
self.title = title
self.type = type
self.subType = subType
}
}}
extension Operations.GetLibraryItemsField: Codable {
enum CodingKeys: String, CodingKey {
case key
case title
case type
case subType
}
}

View File

@@ -0,0 +1,26 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsFieldType {
public let `operator`: [Operations.GetLibraryItemsOperator]
public let type: String
/// Creates an object with the specified parameters
///
///
public init(`operator`: [Operations.GetLibraryItemsOperator], type: String) {
self.`operator` = `operator`
self.type = type
}
}}
extension Operations.GetLibraryItemsFieldType: Codable {
enum CodingKeys: String, CodingKey {
case `operator` = "Operator"
case type
}
}

View File

@@ -0,0 +1,35 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsFilter {
public let filter: String
public let filterType: String
public let key: String
public let title: String
public let type: String
/// Creates an object with the specified parameters
///
///
public init(filter: String, filterType: String, key: String, title: String, type: String) {
self.filter = filter
self.filterType = filterType
self.key = key
self.title = title
self.type = type
}
}}
extension Operations.GetLibraryItemsFilter: Codable {
enum CodingKeys: String, CodingKey {
case filter
case filterType
case key
case title
case type
}
}

View File

@@ -5,27 +5,32 @@ import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsMediaContainer {
public let allowSync: Bool?
public let art: String?
public let identifier: String?
public let librarySectionID: Operations.LibrarySectionID?
public let librarySectionTitle: String?
public let librarySectionUUID: String?
public let mediaTagPrefix: String?
public let mediaTagVersion: Int?
public let allowSync: Bool
public let art: String
public let identifier: String
public let librarySectionID: Operations.LibrarySectionID
public let librarySectionTitle: String
public let librarySectionUUID: String
public let mediaTagPrefix: String
public let mediaTagVersion: Int
public let size: Int
public let thumb: String
public let title1: String
public let title2: String
public let viewGroup: String
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
///
public let meta: Operations.Meta?
public let metadata: [Operations.GetLibraryItemsMetadata]?
public let mixedParents: Bool?
public let size: Int?
public let thumb: String?
public let title1: String?
public let title2: String?
public let viewGroup: String?
public let viewMode: Int?
/// Creates an object with the specified parameters
///
/// - Parameter meta: The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
///
///
public init(allowSync: Bool? = nil, art: String? = nil, identifier: String? = nil, librarySectionID: Operations.LibrarySectionID? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetLibraryItemsMetadata]? = nil, mixedParents: Bool? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, title2: String? = nil, viewGroup: String? = nil, viewMode: Int? = nil) {
public init(allowSync: Bool, art: String, identifier: String, librarySectionID: Operations.LibrarySectionID, librarySectionTitle: String, librarySectionUUID: String, mediaTagPrefix: String, mediaTagVersion: Int, size: Int, thumb: String, title1: String, title2: String, viewGroup: String, meta: Operations.Meta? = nil, metadata: [Operations.GetLibraryItemsMetadata]? = nil, mixedParents: Bool? = nil, viewMode: Int? = nil) {
self.allowSync = allowSync
self.art = art
self.identifier = identifier
@@ -34,13 +39,14 @@ extension Operations {
self.librarySectionUUID = librarySectionUUID
self.mediaTagPrefix = mediaTagPrefix
self.mediaTagVersion = mediaTagVersion
self.metadata = metadata
self.mixedParents = mixedParents
self.size = size
self.thumb = thumb
self.title1 = title1
self.title2 = title2
self.viewGroup = viewGroup
self.meta = meta
self.metadata = metadata
self.mixedParents = mixedParents
self.viewMode = viewMode
}
}}
@@ -55,13 +61,14 @@ extension Operations.GetLibraryItemsMediaContainer: Codable {
case librarySectionUUID
case mediaTagPrefix
case mediaTagVersion
case metadata = "Metadata"
case mixedParents
case size
case thumb
case title1
case title2
case viewGroup
case meta = "Meta"
case metadata = "Metadata"
case mixedParents
case viewMode
}
}

View File

@@ -5,6 +5,14 @@ import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsMetadata {
public let duration: Int
public let guid: String
public let key: String
public let media: [Operations.GetLibraryItemsMedia]
public let ratingKey: String
public let title: String
public let type: String
public let year: Int
public let addedAt: Int?
public let art: String?
@DecimalSerialized
@@ -15,7 +23,6 @@ extension Operations {
public let contentRating: String?
public let country: [Operations.GetLibraryItemsCountry]?
public let director: [Operations.GetLibraryItemsDirector]?
public let duration: Int?
public let genre: [Operations.GetLibraryItemsGenre]?
public let grandparentArt: String?
public let grandparentGuid: String?
@@ -24,14 +31,14 @@ extension Operations {
public let grandparentTheme: String?
public let grandparentThumb: String?
public let grandparentTitle: String?
public let guid: String?
public let hasPremiumExtras: String?
public let hasPremiumPrimaryExtra: String?
public let index: Int?
public let key: String?
public let lastViewedAt: Int?
public let leafCount: Int?
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.MediaGuid]?
@DateOnly
public private(set) var originallyAvailableAt: Date?
public let originalTitle: String?
@@ -48,7 +55,6 @@ extension Operations {
@DecimalSerialized
public private(set) var rating: Double?
public let ratingImage: String?
public let ratingKey: String?
public let role: [Operations.GetLibraryItemsRole]?
public let skipCount: Int?
public let studio: String?
@@ -56,20 +62,27 @@ extension Operations {
public let tagline: String?
public let theme: String?
public let thumb: String?
public let title: String?
public let titleSort: String?
public let type: String?
public let updatedAt: Int?
public let viewCount: Int?
public let viewedLeafCount: Int?
public let viewOffset: Int?
public let writer: [Operations.GetLibraryItemsWriter]?
public let year: Int?
/// Creates an object with the specified parameters
///
/// - Parameter mediaGuid: The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
///
///
public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guid: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, index: Int? = nil, key: String? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: 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, ratingKey: String? = nil, role: [Operations.GetLibraryItemsRole]? = nil, skipCount: Int? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, title: String? = nil, titleSort: String? = nil, type: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil, year: Int? = nil) {
public init(duration: Int, guid: String, key: String, media: [Operations.GetLibraryItemsMedia], ratingKey: String, title: String, type: String, year: Int, addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, mediaGuid: [Operations.MediaGuid]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: 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, skipCount: Int? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil) {
self.duration = duration
self.guid = guid
self.key = key
self.media = media
self.ratingKey = ratingKey
self.title = title
self.type = type
self.year = year
self.addedAt = addedAt
self.art = art
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
@@ -79,7 +92,6 @@ extension Operations {
self.contentRating = contentRating
self.country = country
self.director = director
self.duration = duration
self.genre = genre
self.grandparentArt = grandparentArt
self.grandparentGuid = grandparentGuid
@@ -88,14 +100,12 @@ extension Operations {
self.grandparentTheme = grandparentTheme
self.grandparentThumb = grandparentThumb
self.grandparentTitle = grandparentTitle
self.guid = guid
self.hasPremiumExtras = hasPremiumExtras
self.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra
self.index = index
self.key = key
self.lastViewedAt = lastViewedAt
self.leafCount = leafCount
self.media = media
self.mediaGuid = mediaGuid
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
self.originalTitle = originalTitle
self.parentGuid = parentGuid
@@ -110,7 +120,6 @@ extension Operations {
self.primaryExtraKey = primaryExtraKey
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
self.ratingImage = ratingImage
self.ratingKey = ratingKey
self.role = role
self.skipCount = skipCount
self.studio = studio
@@ -118,20 +127,25 @@ extension Operations {
self.tagline = tagline
self.theme = theme
self.thumb = thumb
self.title = title
self.titleSort = titleSort
self.type = type
self.updatedAt = updatedAt
self.viewCount = viewCount
self.viewedLeafCount = viewedLeafCount
self.viewOffset = viewOffset
self.writer = writer
self.year = year
}
}}
extension Operations.GetLibraryItemsMetadata: Codable {
enum CodingKeys: String, CodingKey {
case duration
case guid
case key
case media = "Media"
case ratingKey
case title
case type
case year
case addedAt
case art
case audienceRating
@@ -141,7 +155,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
case contentRating
case country = "Country"
case director = "Director"
case duration
case genre = "Genre"
case grandparentArt
case grandparentGuid
@@ -150,14 +163,12 @@ extension Operations.GetLibraryItemsMetadata: Codable {
case grandparentTheme
case grandparentThumb
case grandparentTitle
case guid
case hasPremiumExtras
case hasPremiumPrimaryExtra
case index
case key
case lastViewedAt
case leafCount
case media = "Media"
case mediaGuid = "Guid"
case originallyAvailableAt
case originalTitle
case parentGuid
@@ -172,7 +183,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
case primaryExtraKey
case rating
case ratingImage
case ratingKey
case role = "Role"
case skipCount
case studio
@@ -180,19 +190,24 @@ extension Operations.GetLibraryItemsMetadata: Codable {
case tagline
case theme
case thumb
case title
case titleSort
case type
case updatedAt
case viewCount
case viewedLeafCount
case viewOffset
case writer = "Writer"
case year
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.duration = try container.decode(Int.self, forKey: .duration)
self.guid = try container.decode(String.self, forKey: .guid)
self.key = try container.decode(String.self, forKey: .key)
self.media = try container.decode([Operations.GetLibraryItemsMedia].self, forKey: .media)
self.ratingKey = try container.decode(String.self, forKey: .ratingKey)
self.title = try container.decode(String.self, forKey: .title)
self.type = try container.decode(String.self, forKey: .type)
self.year = try container.decode(Int.self, forKey: .year)
self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt)
self.art = try container.decodeIfPresent(String.self, forKey: .art)
self._audienceRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .audienceRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
@@ -202,7 +217,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
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.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)
@@ -211,14 +225,12 @@ extension Operations.GetLibraryItemsMetadata: 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.guid = try container.decodeIfPresent(String.self, forKey: .guid)
self.hasPremiumExtras = try container.decodeIfPresent(String.self, forKey: .hasPremiumExtras)
self.hasPremiumPrimaryExtra = try container.decodeIfPresent(String.self, forKey: .hasPremiumPrimaryExtra)
self.index = try container.decodeIfPresent(Int.self, forKey: .index)
self.key = try container.decodeIfPresent(String.self, forKey: .key)
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
self.leafCount = try container.decodeIfPresent(Int.self, forKey: .leafCount)
self.media = try container.decodeIfPresent([Operations.GetLibraryItemsMedia].self, forKey: .media)
self.mediaGuid = try container.decodeIfPresent([Operations.MediaGuid].self, forKey: .mediaGuid)
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)
@@ -233,7 +245,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey)
self.role = try container.decodeIfPresent([Operations.GetLibraryItemsRole].self, forKey: .role)
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
@@ -241,19 +252,24 @@ extension Operations.GetLibraryItemsMetadata: Codable {
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.title = try container.decodeIfPresent(String.self, forKey: .title)
self.titleSort = try container.decodeIfPresent(String.self, forKey: .titleSort)
self.type = try container.decodeIfPresent(String.self, forKey: .type)
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount)
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
self.viewOffset = try container.decodeIfPresent(Int.self, forKey: .viewOffset)
self.writer = try container.decodeIfPresent([Operations.GetLibraryItemsWriter].self, forKey: .writer)
self.year = try container.decodeIfPresent(Int.self, forKey: .year)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(self.duration, forKey: .duration)
try container.encode(self.guid, forKey: .guid)
try container.encode(self.key, forKey: .key)
try container.encode(self.media, forKey: .media)
try container.encode(self.ratingKey, forKey: .ratingKey)
try container.encode(self.title, forKey: .title)
try container.encode(self.type, forKey: .type)
try container.encode(self.year, forKey: .year)
try container.encodeIfPresent(self.addedAt, forKey: .addedAt)
try container.encodeIfPresent(self.art, forKey: .art)
if self.audienceRating != nil {
@@ -265,7 +281,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
try container.encodeIfPresent(self.country, forKey: .country)
try container.encodeIfPresent(self.director, forKey: .director)
try container.encodeIfPresent(self.duration, forKey: .duration)
try container.encodeIfPresent(self.genre, forKey: .genre)
try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt)
try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid)
@@ -274,14 +289,12 @@ extension Operations.GetLibraryItemsMetadata: 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.guid, forKey: .guid)
try container.encodeIfPresent(self.hasPremiumExtras, forKey: .hasPremiumExtras)
try container.encodeIfPresent(self.hasPremiumPrimaryExtra, forKey: .hasPremiumPrimaryExtra)
try container.encodeIfPresent(self.index, forKey: .index)
try container.encodeIfPresent(self.key, forKey: .key)
try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt)
try container.encodeIfPresent(self.leafCount, forKey: .leafCount)
try container.encodeIfPresent(self.media, forKey: .media)
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
if self.originallyAvailableAt != nil {
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
}
@@ -300,7 +313,6 @@ extension Operations.GetLibraryItemsMetadata: Codable {
try container.encode(self._rating, forKey: .rating)
}
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
try container.encodeIfPresent(self.ratingKey, forKey: .ratingKey)
try container.encodeIfPresent(self.role, forKey: .role)
try container.encodeIfPresent(self.skipCount, forKey: .skipCount)
try container.encodeIfPresent(self.studio, forKey: .studio)
@@ -308,15 +320,12 @@ extension Operations.GetLibraryItemsMetadata: Codable {
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.title, forKey: .title)
try container.encodeIfPresent(self.titleSort, forKey: .titleSort)
try container.encodeIfPresent(self.type, forKey: .type)
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
try container.encodeIfPresent(self.viewCount, forKey: .viewCount)
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
try container.encodeIfPresent(self.viewOffset, forKey: .viewOffset)
try container.encodeIfPresent(self.writer, forKey: .writer)
try container.encodeIfPresent(self.year, forKey: .year)
}
}

View File

@@ -0,0 +1,26 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsOperator {
public let key: String
public let title: String
/// Creates an object with the specified parameters
///
///
public init(key: String, title: String) {
self.key = key
self.title = title
}
}}
extension Operations.GetLibraryItemsOperator: Codable {
enum CodingKeys: String, CodingKey {
case key
case title
}
}

View File

@@ -0,0 +1,38 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsSort {
public let defaultDirection: String
public let key: String
public let title: String
public let `default`: String?
public let descKey: String?
public let firstCharacterKey: String?
/// Creates an object with the specified parameters
///
///
public init(defaultDirection: String, key: String, title: String, `default`: String? = nil, descKey: String? = nil, firstCharacterKey: String? = nil) {
self.defaultDirection = defaultDirection
self.key = key
self.title = title
self.`default` = `default`
self.descKey = descKey
self.firstCharacterKey = firstCharacterKey
}
}}
extension Operations.GetLibraryItemsSort: Codable {
enum CodingKeys: String, CodingKey {
case defaultDirection
case key
case title
case `default` = "default"
case descKey
case firstCharacterKey
}
}

View File

@@ -0,0 +1,41 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct GetLibraryItemsType {
public let active: Bool
public let key: String
public let title: String
public let type: String
public let field: [Operations.GetLibraryItemsField]?
public let filter: [Operations.GetLibraryItemsFilter]?
public let sort: [Operations.GetLibraryItemsSort]?
/// Creates an object with the specified parameters
///
///
public init(active: Bool, key: String, title: String, type: String, field: [Operations.GetLibraryItemsField]? = nil, filter: [Operations.GetLibraryItemsFilter]? = nil, sort: [Operations.GetLibraryItemsSort]? = nil) {
self.active = active
self.key = key
self.title = title
self.type = type
self.field = field
self.filter = filter
self.sort = sort
}
}}
extension Operations.GetLibraryItemsType: Codable {
enum CodingKeys: String, CodingKey {
case active
case key
case title
case type
case field = "Field"
case filter = "Filter"
case sort = "Sort"
}
}

View File

@@ -5,11 +5,6 @@ import Foundation
extension Operations {
/// A model object
public struct GetPinRequest: APIValue {
/// The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
public let clientID: String?
public let clientName: String?
public let clientPlatform: String?
public let clientVersion: String?
@@ -22,17 +17,12 @@ extension Operations {
/// Creates an object with the specified parameters
///
/// - Parameter clientID: The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
/// - Parameter strong: Determines the kind of code returned by the API call
/// Strong codes are used for Pin authentication flows
/// Non-Strong codes are used for `Plex.tv/link`
///
///
public init(clientID: String? = nil, clientName: String? = nil, clientPlatform: String? = nil, clientVersion: String? = nil, deviceName: String? = nil, strong: Bool? = nil) {
self.clientID = clientID
public init(clientName: String? = nil, clientPlatform: String? = nil, clientVersion: String? = nil, deviceName: String? = nil, strong: Bool? = nil) {
self.clientName = clientName
self.clientPlatform = clientPlatform
self.clientVersion = clientVersion

View File

@@ -11,8 +11,8 @@ extension Operations {
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
///
public enum GetPlaylistContentsQueryParamType: Int, Codable, APIValue {
case one = 1
case two = 2
case three = 3
case four = 4
case movie = 1
case show = 2
case season = 3
case episode = 4
}}

View File

@@ -5,11 +5,6 @@ import Foundation
extension Operations {
/// A model object
public struct GetServerResourcesRequest: APIValue {
/// The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
public let clientID: String?
/// Include Https entries in the results
public let includeHttps: Operations.IncludeHttps?
/// Include IPv6 entries in the results
@@ -21,18 +16,13 @@ extension Operations {
/// Creates an object with the specified parameters
///
/// - Parameter clientID: The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
/// - Parameter includeHttps: Include Https entries in the results
/// - Parameter includeIPv6: Include IPv6 entries in the results
/// - Parameter includeRelay: Include Relay addresses in the results
/// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
///
///
public init(clientID: String? = nil, includeHttps: Operations.IncludeHttps? = nil, includeIPv6: Operations.IncludeIPv6? = nil, includeRelay: Operations.IncludeRelay? = nil) {
self.clientID = clientID
public init(includeHttps: Operations.IncludeHttps? = nil, includeIPv6: Operations.IncludeIPv6? = nil, includeRelay: Operations.IncludeRelay? = nil) {
self.includeHttps = includeHttps
self.includeIPv6 = includeIPv6
self.includeRelay = includeRelay

View File

@@ -7,22 +7,12 @@ extension Operations {
public struct GetTokenByPinIdRequest: APIValue {
/// The PinID to retrieve an access token for
public let pinID: Int
/// The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
public let clientID: String?
/// Creates an object with the specified parameters
///
/// - Parameter pinID: The PinID to retrieve an access token for
/// - Parameter clientID: The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
///
public init(pinID: Int, clientID: String? = nil) {
public init(pinID: Int) {
self.pinID = pinID
self.clientID = clientID
}
}}

View File

@@ -45,7 +45,7 @@ extension Operations {
public let homeSize: Int
/// The Plex account ID
public let id: Int
/// Unix epoch datetime
/// Unix epoch datetime in seconds
public let joinedAt: Int
/// The account locale
public let locale: String
@@ -58,7 +58,7 @@ extension Operations {
public let profile: Operations.UserProfile
/// If the account has a Plex Home PIN enabled
public let protected: Bool
/// Unix epoch datetime
/// Unix epoch datetime in seconds
public let rememberExpiresAt: Int
/// If the account is a Plex Home managed user
public let restricted: Bool
@@ -107,13 +107,13 @@ extension Operations {
/// - Parameter homeAdmin: If the account is the Plex Home admin
/// - Parameter homeSize: The number of accounts in the Plex Home
/// - Parameter id: The Plex account ID
/// - Parameter joinedAt: Unix epoch datetime
/// - Parameter joinedAt: Unix epoch datetime in seconds
/// - Parameter locale: The account locale
/// - Parameter mailingListActive: If you are subscribed to the Plex newsletter
/// - Parameter mailingListStatus: Your current mailing list status
/// - Parameter maxHomeSize: The maximum number of accounts allowed in the Plex Home
/// - Parameter protected: If the account has a Plex Home PIN enabled
/// - Parameter rememberExpiresAt: Unix epoch datetime
/// - Parameter rememberExpiresAt: Unix epoch datetime in seconds
/// - Parameter restricted: If the account is a Plex Home managed user
/// - Parameter scrobbleTypes: Unknown
/// - Parameter subscription: If the accounts Plex Pass subscription is active

View File

@@ -11,8 +11,8 @@ extension Operations {
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
///
public enum GetTopWatchedContentQueryParamType: Int, Codable, APIValue {
case one = 1
case two = 2
case three = 3
case four = 4
case movie = 1
case show = 2
case season = 3
case episode = 4
}}

View File

@@ -6,6 +6,6 @@ extension Operations {
/// Adds the Guids object to the response
///
public enum IncludeGuids: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -5,6 +5,6 @@ import Foundation
extension Operations {
/// Include Https entries in the results
public enum IncludeHttps: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -5,6 +5,6 @@ import Foundation
extension Operations {
/// Include IPv6 entries in the results
public enum IncludeIPv6: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -6,6 +6,6 @@ extension Operations {
/// Adds the Meta object to the response
///
public enum IncludeMeta: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -7,6 +7,6 @@ extension Operations {
/// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
///
public enum IncludeRelay: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -5,13 +5,13 @@ import Foundation
extension Operations {
/// A model object
public struct Location {
public let id: Int?
public let path: String?
public let id: Int
public let path: String
/// Creates an object with the specified parameters
///
///
public init(id: Int? = nil, path: String? = nil) {
public init(id: Int, path: String) {
self.id = id
self.path = path
}

View File

@@ -0,0 +1,29 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct MediaGuid {
/// 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.MediaGuid: Codable {
enum CodingKeys: String, CodingKey {
case id
}
}

View File

@@ -3,7 +3,8 @@
import Foundation
extension Operations {
/// Whether or not the account has media reviews visibility enabled
public enum MediaReviewsVisibility: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -0,0 +1,27 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
///
public struct Meta {
public let fieldType: [Operations.GetLibraryItemsFieldType]?
public let type: [Operations.GetLibraryItemsType]?
/// Creates an object with the specified parameters
///
///
public init(fieldType: [Operations.GetLibraryItemsFieldType]? = nil, type: [Operations.GetLibraryItemsType]? = nil) {
self.fieldType = fieldType
self.type = type
}
}}
extension Operations.Meta: Codable {
enum CodingKeys: String, CodingKey {
case fieldType = "FieldType"
case type = "Type"
}
}

View File

@@ -4,7 +4,7 @@ import Foundation
extension Operations {
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
public enum PostUsersSignInDataAutoSelectSubtitle: String, Codable, APIValue {
case zero = "0"
case one = "1"
public enum PostUsersSignInDataAutoSelectSubtitle: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -3,8 +3,8 @@
import Foundation
extension Operations {
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
public enum PostUsersSignInDataDefaultSubtitleAccessibility: String, Codable, APIValue {
case zero = "0"
case one = "1"
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
public enum PostUsersSignInDataDefaultSubtitleAccessibility: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -4,7 +4,7 @@ import Foundation
extension Operations {
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
public enum PostUsersSignInDataDefaultSubtitleForced: String, Codable, APIValue {
case zero = "0"
case one = "1"
public enum PostUsersSignInDataDefaultSubtitleForced: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -3,7 +3,8 @@
import Foundation
extension Operations {
/// Whether or not the account has media reviews visibility enabled
public enum PostUsersSignInDataMediaReviewsVisibility: Int, Codable, APIValue {
case zero = 0
case one = 1
case disable = 0
case enable = 1
}}

View File

@@ -1,28 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// A model object
public struct PostUsersSignInDataRequest: APIValue {
/// The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
public let clientID: String?
/// Login credentials
public let requestBody: Operations.PostUsersSignInDataRequestBody?
/// Creates an object with the specified parameters
///
/// - Parameter clientID: The unique identifier for the client application
/// This is used to track the client application and its usage
/// (UUID, serial number, or other number unique per device)
///
/// - Parameter requestBody: Login credentials
///
public init(clientID: String? = nil, requestBody: Operations.PostUsersSignInDataRequestBody? = nil) {
self.clientID = clientID
self.requestBody = requestBody
}
}}

View File

@@ -45,7 +45,7 @@ extension Operations {
public let homeSize: Int
/// The Plex account ID
public let id: Int
/// Unix epoch datetime
/// Unix epoch datetime in seconds
public let joinedAt: Int
/// The account locale
public let locale: String
@@ -59,7 +59,7 @@ extension Operations {
public let profile: Operations.PostUsersSignInDataUserProfile
/// If the account has a Plex Home PIN enabled
public let protected: Bool
/// Unix epoch datetime
/// Unix epoch datetime in seconds
public let rememberExpiresAt: Int
/// If the account is a Plex Home managed user
public let restricted: Bool
@@ -109,13 +109,13 @@ extension Operations {
/// - Parameter homeAdmin: If the account is the Plex Home admin
/// - Parameter homeSize: The number of accounts in the Plex Home
/// - Parameter id: The Plex account ID
/// - Parameter joinedAt: Unix epoch datetime
/// - Parameter joinedAt: Unix epoch datetime in seconds
/// - Parameter locale: The account locale
/// - Parameter mailingListActive: If you are subscribed to the Plex newsletter
/// - Parameter mailingListStatus: Your current mailing list status
/// - Parameter maxHomeSize: The maximum number of accounts allowed in the Plex Home
/// - Parameter protected: If the account has a Plex Home PIN enabled
/// - Parameter rememberExpiresAt: Unix epoch datetime
/// - Parameter rememberExpiresAt: Unix epoch datetime in seconds
/// - Parameter restricted: If the account is a Plex Home managed user
/// - Parameter scrobbleTypes: Unknown
/// - Parameter subscription: If the accounts Plex Pass subscription is active

View File

@@ -5,37 +5,31 @@ import Foundation
extension Operations {
/// A model object
public struct PostUsersSignInDataUserProfile {
/// If the account has automatically select audio and subtitle tracks enabled
public let autoSelectAudio: Bool
public let autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle
/// The preferred audio language for the account
public let defaultAudioLanguage: String
public let defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility
public let defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced
/// The preferred subtitle language for the account
public let defaultSubtitleLanguage: String
/// If the account has automatically select audio and subtitle tracks enabled
public let autoSelectAudio: Bool?
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
public let autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle?
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
public let defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility?
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
public let defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced?
public let mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility?
public let watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator?
public let mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility
public let watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator
/// Creates an object with the specified parameters
///
/// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled
/// - Parameter defaultAudioLanguage: The preferred audio language for the account
/// - Parameter defaultSubtitleLanguage: The preferred subtitle language for the account
/// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled
/// - Parameter autoSelectSubtitle: The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// - Parameter defaultSubtitleAccessibility: The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// - Parameter defaultSubtitleForced: The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
///
public init(defaultAudioLanguage: String, defaultSubtitleLanguage: String, autoSelectAudio: Bool? = nil, autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle? = nil, defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility? = nil, defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced? = nil, mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility? = nil, watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator? = nil) {
self.defaultAudioLanguage = defaultAudioLanguage
self.defaultSubtitleLanguage = defaultSubtitleLanguage
public init(autoSelectAudio: Bool, autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle, defaultAudioLanguage: String, defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility, defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced, defaultSubtitleLanguage: String, mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility, watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator) {
self.autoSelectAudio = autoSelectAudio
self.autoSelectSubtitle = autoSelectSubtitle
self.defaultAudioLanguage = defaultAudioLanguage
self.defaultSubtitleAccessibility = defaultSubtitleAccessibility
self.defaultSubtitleForced = defaultSubtitleForced
self.defaultSubtitleLanguage = defaultSubtitleLanguage
self.mediaReviewsVisibility = mediaReviewsVisibility
self.watchedIndicator = watchedIndicator
}
@@ -43,12 +37,12 @@ extension Operations {
extension Operations.PostUsersSignInDataUserProfile: Codable {
enum CodingKeys: String, CodingKey {
case defaultAudioLanguage
case defaultSubtitleLanguage
case autoSelectAudio
case autoSelectSubtitle
case defaultAudioLanguage
case defaultSubtitleAccessibility
case defaultSubtitleForced
case defaultSubtitleLanguage
case mediaReviewsVisibility
case watchedIndicator
}

View File

@@ -3,7 +3,8 @@
import Foundation
extension Operations {
public enum PostUsersSignInDataWatchedIndicator: String, Codable, APIValue {
case zero = "0"
case one = "1"
/// Whether or not media watched indicators are enabled (little orange dot on media)
public enum PostUsersSignInDataWatchedIndicator: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}

View File

@@ -0,0 +1,10 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
import Foundation
extension Operations {
/// The protocol used for the connection (http, https, etc)
public enum `Protocol`: String, Codable, APIValue {
case http = "http"
case https = "https"
}}

View File

@@ -11,8 +11,8 @@ extension Operations {
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
///
public enum QueryParamType: Int, Codable, APIValue {
case one = 1
case two = 2
case three = 3
case four = 4
case movie = 1
case show = 2
case season = 3
case episode = 4
}}

View File

@@ -11,8 +11,8 @@ extension Operations {
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
///
public enum TypeModel: Int, Codable, APIValue {
case one = 1
case two = 2
case three = 3
case four = 4
case movie = 1
case show = 2
case season = 3
case episode = 4
}}

View File

@@ -19,6 +19,8 @@ extension Operations {
/// The GUID of each playlist is based on the filename.
///
public let path: String
/// Possibly the section ID to upload the playlist to, we are not certain.
public let sectionID: Int
/// Creates an object with the specified parameters
///
@@ -34,9 +36,11 @@ extension Operations {
/// If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
/// The GUID of each playlist is based on the filename.
///
/// - Parameter sectionID: Possibly the section ID to upload the playlist to, we are not certain.
///
public init(force: Operations.QueryParamForce, path: String) {
public init(force: Operations.QueryParamForce, path: String, sectionID: Int) {
self.force = force
self.path = path
self.sectionID = sectionID
}
}}

View File

@@ -5,37 +5,31 @@ import Foundation
extension Operations {
/// A model object
public struct UserProfile {
/// If the account has automatically select audio and subtitle tracks enabled
public let autoSelectAudio: Bool
public let autoSelectSubtitle: Operations.AutoSelectSubtitle
/// The preferred audio language for the account
public let defaultAudioLanguage: String
public let defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility
public let defaultSubtitleForced: Operations.DefaultSubtitleForced
/// The preferred subtitle language for the account
public let defaultSubtitleLanguage: String
/// If the account has automatically select audio and subtitle tracks enabled
public let autoSelectAudio: Bool?
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
public let autoSelectSubtitle: Operations.AutoSelectSubtitle?
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
public let defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility?
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
public let defaultSubtitleForced: Operations.DefaultSubtitleForced?
public let mediaReviewsVisibility: Operations.MediaReviewsVisibility?
public let watchedIndicator: Operations.WatchedIndicator?
public let mediaReviewsVisibility: Operations.MediaReviewsVisibility
public let watchedIndicator: Operations.WatchedIndicator
/// Creates an object with the specified parameters
///
/// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled
/// - Parameter defaultAudioLanguage: The preferred audio language for the account
/// - Parameter defaultSubtitleLanguage: The preferred subtitle language for the account
/// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled
/// - Parameter autoSelectSubtitle: The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// - Parameter defaultSubtitleAccessibility: The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// - Parameter defaultSubtitleForced: The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
///
public init(defaultAudioLanguage: String, defaultSubtitleLanguage: String, autoSelectAudio: Bool? = nil, autoSelectSubtitle: Operations.AutoSelectSubtitle? = nil, defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility? = nil, defaultSubtitleForced: Operations.DefaultSubtitleForced? = nil, mediaReviewsVisibility: Operations.MediaReviewsVisibility? = nil, watchedIndicator: Operations.WatchedIndicator? = nil) {
self.defaultAudioLanguage = defaultAudioLanguage
self.defaultSubtitleLanguage = defaultSubtitleLanguage
public init(autoSelectAudio: Bool, autoSelectSubtitle: Operations.AutoSelectSubtitle, defaultAudioLanguage: String, defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility, defaultSubtitleForced: Operations.DefaultSubtitleForced, defaultSubtitleLanguage: String, mediaReviewsVisibility: Operations.MediaReviewsVisibility, watchedIndicator: Operations.WatchedIndicator) {
self.autoSelectAudio = autoSelectAudio
self.autoSelectSubtitle = autoSelectSubtitle
self.defaultAudioLanguage = defaultAudioLanguage
self.defaultSubtitleAccessibility = defaultSubtitleAccessibility
self.defaultSubtitleForced = defaultSubtitleForced
self.defaultSubtitleLanguage = defaultSubtitleLanguage
self.mediaReviewsVisibility = mediaReviewsVisibility
self.watchedIndicator = watchedIndicator
}
@@ -43,12 +37,12 @@ extension Operations {
extension Operations.UserProfile: Codable {
enum CodingKeys: String, CodingKey {
case defaultAudioLanguage
case defaultSubtitleLanguage
case autoSelectAudio
case autoSelectSubtitle
case defaultAudioLanguage
case defaultSubtitleAccessibility
case defaultSubtitleForced
case defaultSubtitleLanguage
case mediaReviewsVisibility
case watchedIndicator
}

View File

@@ -3,7 +3,8 @@
import Foundation
extension Operations {
public enum WatchedIndicator: String, Codable, APIValue {
case zero = "0"
case one = "1"
/// Whether or not media watched indicators are enabled (little orange dot on media)
public enum WatchedIndicator: Int, Codable, APIValue {
case disable = 0
case enable = 1
}}