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

@@ -1,17 +1,18 @@
lockVersion: 2.0.0
id: 5d77204e-e413-4fd0-a14a-bad3aee2247a
management:
docChecksum: 5bf578a672589649d8ed83c3927c50a6
docChecksum: 1b63d7c28734a44b0339f405b186b290
docVersion: 0.0.3
speakeasyVersion: 1.400.0
generationVersion: 2.420.2
releaseVersion: 0.6.4
configChecksum: a07a3c05b4eb6b8dc97de199085bb93d
speakeasyVersion: 1.401.2
generationVersion: 2.421.3
releaseVersion: 0.7.0
configChecksum: 328d2e540df29d38d8fd33e39ea9a7bc
repoURL: https://github.com/LukeHagar/plexswift.git
features:
swift:
core: 3.2.14
deprecations: 2.81.2
enums: 2.81.1
globalSecurity: 2.81.6
globalServerURLs: 2.82.1
globals: 2.81.3
@@ -127,11 +128,11 @@ generatedFiles:
- Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift
- Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift
- Sources/Plexswift/internal/models/Protocol+Serialization.swift
- Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift
- Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift
- Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift
@@ -353,16 +354,22 @@ generatedFiles:
- Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift
- Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift
- Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift
- Sources/Plexswift/models/operations/GetLibraryItemsField.swift
- Sources/Plexswift/models/operations/GetLibraryItemsFieldType.swift
- Sources/Plexswift/models/operations/GetLibraryItemsFilter.swift
- Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift
- Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift
- Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift
- Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift
- Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift
- Sources/Plexswift/models/operations/GetLibraryItemsOperator.swift
- Sources/Plexswift/models/operations/GetLibraryItemsPart.swift
- Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift
- Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift
- Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift
- Sources/Plexswift/models/operations/GetLibraryItemsRole.swift
- Sources/Plexswift/models/operations/GetLibraryItemsSort.swift
- Sources/Plexswift/models/operations/GetLibraryItemsType.swift
- Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift
- Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift
- Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift
@@ -705,8 +712,10 @@ generatedFiles:
- Sources/Plexswift/models/operations/MarkUnplayedUnauthorized.swift
- Sources/Plexswift/models/operations/Media.swift
- Sources/Plexswift/models/operations/MediaContainer.swift
- Sources/Plexswift/models/operations/MediaGuid.swift
- Sources/Plexswift/models/operations/MediaProvider.swift
- Sources/Plexswift/models/operations/MediaReviewsVisibility.swift
- Sources/Plexswift/models/operations/Meta.swift
- Sources/Plexswift/models/operations/Metadata.swift
- Sources/Plexswift/models/operations/MinSize.swift
- Sources/Plexswift/models/operations/MyPlex.swift
@@ -744,7 +753,6 @@ generatedFiles:
- Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift
@@ -756,6 +764,7 @@ generatedFiles:
- Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift
- Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift
- Sources/Plexswift/models/operations/Producer.swift
- Sources/Plexswift/models/operations/Protocol.swift
- Sources/Plexswift/models/operations/Provider.swift
- Sources/Plexswift/models/operations/QueryParamFilter.swift
- Sources/Plexswift/models/operations/QueryParamForce.swift
@@ -1096,6 +1105,310 @@ examples:
"401":
application/json:
errors: []
speakeasy-default-get-library-items:
parameters:
path:
sectionKey: 9518
tag: edition
query:
X-Plex-Container-Size: 50
X-Plex-Container-Start: 0
includeGuids: 1
includeMeta: 1
type: 2
responses:
"200":
application/json:
MediaContainer:
Meta:
FieldType:
- Operator:
- key: =
title: is
type: tag
- Operator:
- key: =
title: is
- key: =
title: is
type: tag
- Operator:
- key: =
title: is
- key: =
title: is
type: tag
Type:
- Field:
- key: show.title
subType: rating
title: Show Title
type: string
- key: show.title
subType: rating
title: Show Title
type: string
Filter: []
Sort: []
active: false
key: /library/sections/2/all?type=2
title: TV Shows
type: show
- Field:
- key: show.title
subType: rating
title: Show Title
type: string
- key: show.title
subType: rating
title: Show Title
type: string
- key: show.title
subType: rating
title: Show Title
type: string
Filter:
- filter: genre
filterType: string
key: /library/sections/2/genre?type=2
title: Genre
type: filter
- filter: genre
filterType: string
key: /library/sections/2/genre?type=2
title: Genre
type: filter
- filter: genre
filterType: string
key: /library/sections/2/genre?type=2
title: Genre
type: filter
Sort: []
active: false
key: /library/sections/2/all?type=2
title: TV Shows
type: show
Metadata:
- Country:
- tag: United States of America
- tag: United States of America
Director:
- tag: James Cameron
- tag: James Cameron
Genre:
- tag: Adventure
- tag: Adventure
- tag: Adventure
Guid:
- id: imdb://tt13015952
Media:
- Part:
- container: mkv
duration: 11558112
file: /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
id: 119542
key: /library/parts/119542/1680457526/file.mkv
size: 36158371307
videoProfile: main 10
- container: mkv
duration: 11558112
file: /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
id: 119542
key: /library/parts/119542/1680457526/file.mkv
size: 36158371307
videoProfile: main 10
- container: mkv
duration: 11558112
file: /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
id: 119542
key: /library/parts/119542/1680457526/file.mkv
size: 36158371307
videoProfile: main 10
aspectRatio: 1.85
audioChannels: 6
audioCodec: eac3
bitrate: 25025
container: mkv
duration: 11558112
height: 2072
id: 119534
videoCodec: hevc
videoFrameRate: 24p
videoProfile: main 10
videoResolution: 4k
width: 3840
Role:
- tag: Sigourney Weaver
- tag: Sigourney Weaver
- tag: Sigourney Weaver
Writer:
- tag: James Cameron
addedAt: 1680457607
art: /library/metadata/58683/art/1703239236
audienceRating: 9.2
audienceRatingImage: rottentomatoes://image.rating.upright
chapterSource: media
childCount: 1
contentRating: PG-13
duration: 11558112
grandparentArt: /library/metadata/66/art/1705716261
grandparentGuid: plex://show/5d9c081b170e24001f2a7be4
grandparentKey: /library/metadata/66
grandparentRatingKey: "66"
grandparentTheme: /library/metadata/66/theme/1705716261
grandparentThumb: /library/metadata/66/thumb/1705716261
grandparentTitle: Caprica
guid: plex://movie/5d7768ba96b655001fdc0408
hasPremiumExtras: "1"
hasPremiumPrimaryExtra: "1"
index: 1
key: /library/metadata/58683
lastViewedAt: 1682752242
leafCount: 14
originalTitle: 映画 ブラッククローバー 魔法帝の剣
originallyAvailableAt: "2022-12-14T00:00:00Z"
parentGuid: plex://show/5d9c081b170e24001f2a7be4
parentIndex: 1
parentKey: /library/metadata/66
parentRatingKey: "66"
parentStudio: UCP
parentTheme: /library/metadata/66/theme/1705716261
parentThumb: /library/metadata/66/thumb/1705716261
parentTitle: Caprica
parentYear: 2010
primaryExtraKey: /library/metadata/58684
rating: 7.6
ratingImage: rottentomatoes://image.rating.ripe
ratingKey: "58683"
skipCount: 1
studio: 20th Century Studios
summary: Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.
tagline: Return to Pandora.
theme: /library/metadata/1/theme/1705636920
thumb: /library/metadata/58683/thumb/1703239236
title: 'Avatar: The Way of Water'
titleSort: Whale
type: movie
updatedAt: 1703239236
viewCount: 1
viewOffset: 5222500
viewedLeafCount: 0
year: 2022
- Country:
- tag: United States of America
Director:
- tag: James Cameron
- tag: James Cameron
- tag: James Cameron
Genre: []
Guid:
- id: imdb://tt13015952
Media:
- Part:
- container: mkv
duration: 11558112
file: /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
id: 119542
key: /library/parts/119542/1680457526/file.mkv
size: 36158371307
videoProfile: main 10
aspectRatio: 1.85
audioChannels: 6
audioCodec: eac3
bitrate: 25025
container: mkv
duration: 11558112
height: 2072
id: 119534
videoCodec: hevc
videoFrameRate: 24p
videoProfile: main 10
videoResolution: 4k
width: 3840
Role:
- tag: Sigourney Weaver
- tag: Sigourney Weaver
- tag: Sigourney Weaver
Writer:
- tag: James Cameron
addedAt: 1680457607
art: /library/metadata/58683/art/1703239236
audienceRating: 9.2
audienceRatingImage: rottentomatoes://image.rating.upright
chapterSource: media
childCount: 1
contentRating: PG-13
duration: 11558112
grandparentArt: /library/metadata/66/art/1705716261
grandparentGuid: plex://show/5d9c081b170e24001f2a7be4
grandparentKey: /library/metadata/66
grandparentRatingKey: "66"
grandparentTheme: /library/metadata/66/theme/1705716261
grandparentThumb: /library/metadata/66/thumb/1705716261
grandparentTitle: Caprica
guid: plex://movie/5d7768ba96b655001fdc0408
hasPremiumExtras: "1"
hasPremiumPrimaryExtra: "1"
index: 1
key: /library/metadata/58683
lastViewedAt: 1682752242
leafCount: 14
originalTitle: 映画 ブラッククローバー 魔法帝の剣
originallyAvailableAt: "2022-12-14T00:00:00Z"
parentGuid: plex://show/5d9c081b170e24001f2a7be4
parentIndex: 1
parentKey: /library/metadata/66
parentRatingKey: "66"
parentStudio: UCP
parentTheme: /library/metadata/66/theme/1705716261
parentThumb: /library/metadata/66/thumb/1705716261
parentTitle: Caprica
parentYear: 2010
primaryExtraKey: /library/metadata/58684
rating: 7.6
ratingImage: rottentomatoes://image.rating.ripe
ratingKey: "58683"
skipCount: 1
studio: 20th Century Studios
summary: Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.
tagline: Return to Pandora.
theme: /library/metadata/1/theme/1705636920
thumb: /library/metadata/58683/thumb/1703239236
title: 'Avatar: The Way of Water'
titleSort: Whale
type: movie
updatedAt: 1703239236
viewCount: 1
viewOffset: 5222500
viewedLeafCount: 0
year: 2022
allowSync: true
art: /:/resources/movie-fanart.jpg
identifier: com.plexapp.plugins.library
librarySectionID: <value>
librarySectionTitle: Movies
librarySectionUUID: 322a231a-b7f7-49f5-920f-14c61199cd30
mediaTagPrefix: /system/bundle/media/flags/
mediaTagVersion: 1701731894
mixedParents: true
size: 70
thumb: /:/resources/movie.png
title1: Movies
title2: Recently Released
viewGroup: movie
viewMode: 65592
"400":
application/json:
errors:
- code: 1000
message: X-Plex-Client-Identifier is missing
status: 400
"401":
application/json:
errors:
- code: 1001
message: User could not be authenticated
status: 401
get-media-providers:
speakeasy-default-get-media-providers:
parameters:
@@ -1721,7 +2034,7 @@ examples:
speakeasy-default-get-resized-photo:
parameters:
query:
blur: 4000
blur: 0
height: 165
minSize: 0
opacity: 643869
@@ -1947,7 +2260,7 @@ examples:
speakeasy-default-get-source-connection-information:
parameters:
query:
source: server://client-identifier
source: provider://provider-identifier
responses:
"400":
application/json:
@@ -2041,13 +2354,13 @@ examples:
pin: string
profile:
autoSelectAudio: true
autoSelectSubtitle: "1"
autoSelectSubtitle: 1
defaultAudioLanguage: ja
defaultSubtitleAccessibility: "1"
defaultSubtitleForced: "0"
defaultSubtitleAccessibility: 1
defaultSubtitleForced: 1
defaultSubtitleLanguage: en
mediaReviewsVisibility: 0
watchedIndicator: "1"
mediaReviewsVisibility: 1
watchedIndicator: 1
protected: false
rememberExpiresAt: 1556281940
restricted: false
@@ -2282,7 +2595,7 @@ examples:
parameters:
query:
limit: 5
query: arnold
query: dylan
responses:
"400":
application/json:
@@ -2343,7 +2656,7 @@ examples:
maxHomeSize: 15
pastSubscriptions:
- billing:
paymentMethodId: 569045
paymentMethodId: 481656
canConvert: false
canDowngrade: false
canReactivate: false
@@ -2361,13 +2674,13 @@ examples:
pin: string
profile:
autoSelectAudio: true
autoSelectSubtitle: "1"
autoSelectSubtitle: 1
defaultAudioLanguage: ja
defaultSubtitleAccessibility: "1"
defaultSubtitleForced: "0"
defaultSubtitleAccessibility: 1
defaultSubtitleForced: 1
defaultSubtitleLanguage: en
mediaReviewsVisibility: 0
watchedIndicator: "1"
mediaReviewsVisibility: 1
watchedIndicator: 1
protected: false
rememberExpiresAt: 1556281940
restricted: false
@@ -2524,6 +2837,7 @@ examples:
query:
force: 0
path: /home/barkley/playlist.m3u
sectionID: 1
responses:
"400":
application/json:

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
swift:
version: 0.6.4
version: 0.7.0
author: LukeHagar
description: Swift Client SDK Generated by Speakeasy
imports:

View File

@@ -11,7 +11,7 @@ targets:
plexswift:
source: plexapi
codeSamplesNamespace: code-samples-swift-plexswift
codeSamplesRevisionDigest: sha256:de656e2e2522903926687a10343766a08fad4eda74322b983887b7ec0013aeb6
codeSamplesRevisionDigest: sha256:ae889ea6513310dba019f6f3b58474bf9316e90eeeb12b21d36a878aee527f44
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0

View File

@@ -38,7 +38,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.6.4"))
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.7.0"))
]
```
<!-- End SDK Installation [installation] -->
@@ -250,7 +250,7 @@ case .empty:
Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
@@ -275,26 +275,19 @@ This is used to track the client application and its usage
import Foundation
import Plexswift
let client = Client(security: .accessToken("<YOUR_API_KEY_HERE>"))
let client = Client()
let response = try await client.plex.getServerResources(
request: Operations.GetServerResourcesRequest(
includeHttps: .one,
includeIPv6: .one,
includeRelay: .one
)
let response = try await client.plex.getPin(
request: Operations.GetPinRequest()
)
switch response.data {
case .plexDevices(let plexDevices):
case .authPinContainer(let authPinContainer):
// Handle response
break
case .badRequest(let badRequest):
// Handle response
break
case .unauthorized(let unauthorized):
// Handle response
break
case .empty:
// Handle empty response
break

View File

@@ -623,3 +623,13 @@ Based on:
- [swift v0.6.4] .
### Releases
- [Swift Package Manager v0.6.4] https://github.com/LukeHagar/plexswift/releases/tag/v0.6.4 - .
## 2024-09-21 00:07:26
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [swift v0.7.0] .
### Releases
- [Swift Package Manager v0.7.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.7.0 - .

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
}}

View File

@@ -1239,11 +1239,11 @@ public protocol AuthenticationAPI {
/// Sign in user with username and password and return user data with Plex authentication token
///
/// - Parameter request: A ``Operations/PostUsersSignInDataRequest`` object describing the input to the API operation
/// - Parameter request: A ``Operations/PostUsersSignInDataRequestBody`` object describing the input to the API operation
/// - Parameter server: An optional server override to use for this operation
/// - Returns: A ``Operations/PostUsersSignInDataResponse`` object describing the result of the API operation
/// - Throws: An error of type ``PlexswiftError``
func postUsersSignInData(request: Operations.PostUsersSignInDataRequest, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response<Operations.PostUsersSignInDataResponse>
func postUsersSignInData(request: Operations.PostUsersSignInDataRequestBody, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response<Operations.PostUsersSignInDataResponse>
}
// MARK: - StatisticsAPI

View File

@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
}
urlRequest.setValue("speakeasy-sdk/swift 0.6.4 2.420.2 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
urlRequest.setValue("speakeasy-sdk/swift 0.7.0 2.421.3 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
addSecurityParameters(to: &urlRequest)

File diff suppressed because it is too large Load Diff