diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4f04e26..9147046 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5d77204e-e413-4fd0-a14a-bad3aee2247a management: - docChecksum: 7dec92ab9151a1b5a35df5faa81811ba + docChecksum: 5d44282cd3351c75bd6c9a894dbe1ec9 docVersion: 0.0.3 speakeasyVersion: 1.405.6 generationVersion: 2.428.1 - releaseVersion: 0.9.11 - configChecksum: 13e55494eeb94833b0c438321b3ef8ff + releaseVersion: 0.9.13 + configChecksum: da5f1f120e9c6bff2d38b33850661cbc repoURL: https://github.com/LukeHagar/plexswift.git features: swift: @@ -66,10 +66,14 @@ generatedFiles: - Sources/Plexswift/internal/models/Filter+Serialization.swift - Sources/Plexswift/internal/models/FlattenSeasons+Serialization.swift - Sources/Plexswift/internal/models/Force+Serialization.swift + - Sources/Plexswift/internal/models/GetActorsLibraryQueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/GetActorsLibraryRequest+Serialization.swift - Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift - Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetCountriesLibraryQueryParamType+Serialization.swift - Sources/Plexswift/internal/models/GetCountriesLibraryRequest+Serialization.swift - Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetGenresLibraryQueryParamType+Serialization.swift - Sources/Plexswift/internal/models/GetGenresLibraryRequest+Serialization.swift - Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift - Sources/Plexswift/internal/models/GetLibraryDetailsRequest+Serialization.swift @@ -89,8 +93,8 @@ generatedFiles: - Sources/Plexswift/internal/models/GetLibraryItemsQueryParamType+Serialization.swift - Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift - Sources/Plexswift/internal/models/GetLibraryItemsShowOrdering+Serialization.swift + - Sources/Plexswift/internal/models/GetMediaMetaDataRequest+Serialization.swift - Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift - - Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift - Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift - Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift - Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift @@ -306,6 +310,16 @@ generatedFiles: - Sources/Plexswift/models/operations/Friend.swift - Sources/Plexswift/models/operations/Genre.swift - Sources/Plexswift/models/operations/GeoData.swift + - Sources/Plexswift/models/operations/GetActorsLibraryBadRequest.swift + - Sources/Plexswift/models/operations/GetActorsLibraryDirectory.swift + - Sources/Plexswift/models/operations/GetActorsLibraryErrors.swift + - Sources/Plexswift/models/operations/GetActorsLibraryLibraryErrors.swift + - Sources/Plexswift/models/operations/GetActorsLibraryMediaContainer.swift + - Sources/Plexswift/models/operations/GetActorsLibraryQueryParamType.swift + - Sources/Plexswift/models/operations/GetActorsLibraryRequest.swift + - Sources/Plexswift/models/operations/GetActorsLibraryResponse.swift + - Sources/Plexswift/models/operations/GetActorsLibraryResponseBody.swift + - Sources/Plexswift/models/operations/GetActorsLibraryUnauthorized.swift - Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift - Sources/Plexswift/models/operations/GetAllLibrariesDirectory.swift - Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift @@ -354,6 +368,7 @@ generatedFiles: - Sources/Plexswift/models/operations/GetCountriesLibraryErrors.swift - Sources/Plexswift/models/operations/GetCountriesLibraryLibraryErrors.swift - Sources/Plexswift/models/operations/GetCountriesLibraryMediaContainer.swift + - Sources/Plexswift/models/operations/GetCountriesLibraryQueryParamType.swift - Sources/Plexswift/models/operations/GetCountriesLibraryRequest.swift - Sources/Plexswift/models/operations/GetCountriesLibraryResponse.swift - Sources/Plexswift/models/operations/GetCountriesLibraryResponseBody.swift @@ -376,6 +391,7 @@ generatedFiles: - Sources/Plexswift/models/operations/GetGenresLibraryErrors.swift - Sources/Plexswift/models/operations/GetGenresLibraryLibraryErrors.swift - Sources/Plexswift/models/operations/GetGenresLibraryMediaContainer.swift + - Sources/Plexswift/models/operations/GetGenresLibraryQueryParamType.swift - Sources/Plexswift/models/operations/GetGenresLibraryRequest.swift - Sources/Plexswift/models/operations/GetGenresLibraryResponse.swift - Sources/Plexswift/models/operations/GetGenresLibraryResponseBody.swift @@ -483,6 +499,26 @@ generatedFiles: - Sources/Plexswift/models/operations/GetLibraryItemsUltraBlurColors.swift - Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift - Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataBadRequest.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataCountry.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataDirector.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataErrors.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataGenre.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataImage.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataLibraryErrors.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataLocation.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataMedia.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataMediaContainer.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataMetadata.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataPart.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataRequest.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataResponse.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataResponseBody.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataRole.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataStream.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataUltraBlurColors.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataUnauthorized.swift + - Sources/Plexswift/models/operations/GetMediaMetaDataWriter.swift - Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift - Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift - Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift @@ -492,23 +528,6 @@ generatedFiles: - Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift - Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift - Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyStream.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift - - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift - Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift - Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift - Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift @@ -957,7 +976,7 @@ generatedFiles: - Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift - Sources/Plexswift/models/operations/QueryParamSmart.swift - Sources/Plexswift/models/operations/QueryParamType.swift - - Sources/Plexswift/models/operations/Ratings.swift + - Sources/Plexswift/models/operations/Rating.swift - Sources/Plexswift/models/operations/Release.swift - Sources/Plexswift/models/operations/ResponseBody.swift - Sources/Plexswift/models/operations/Restricted.swift @@ -972,6 +991,7 @@ generatedFiles: - Sources/Plexswift/models/operations/SharedServers.swift - Sources/Plexswift/models/operations/SharedSources.swift - Sources/Plexswift/models/operations/ShowOrdering.swift + - Sources/Plexswift/models/operations/Similar.swift - Sources/Plexswift/models/operations/Skip.swift - Sources/Plexswift/models/operations/Smart.swift - Sources/Plexswift/models/operations/Sort.swift @@ -2056,6 +2076,8 @@ examples: parameters: path: sectionKey: 9518 + query: + type: 2 responses: "200": application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows (Reality)", "title2": "By Genre", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/10/all?genre=89", "key": "89", "title": "Action", "type": "genre"}]}} @@ -2068,6 +2090,8 @@ examples: parameters: path: sectionKey: 9518 + query: + type: 2 responses: "200": application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Country", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/2/all?country=15491", "key": "15491", "title": "Japan"}]}} @@ -2099,5 +2123,45 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-actors-library: + speakeasy-default-get-actors-library: + parameters: + path: + sectionKey: 9518 + query: + type: 2 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "viewMode": "131131", "Directory": [{"fastKey": "/library/sections/2/all?actor=134671", "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", "key": "134671", "title": "Aaron Paul"}, {"fastKey": "/library/sections/2/all?actor=134671", "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", "key": "134671", "title": "Aaron Paul"}]}} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-media-meta-data: + speakeasy-default-get-media-meta-data: + parameters: + path: + ratingKey: 9518 + query: + includeConcerts: true + includeExtras: true + includeOnDeck: true + includePopularLeaves: true + includePreferences: true + includeReviews: true + includeChapters: true + includeStations: true + includeExternalMedia: true + asyncAugmentMetadata: true + asyncCheckFiles: true + asyncRefreshAnalysis: true + asyncRefreshLocalMediaAgent: true + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "Metadata": [{"ratingKey": "44288", "parentRatingKey": "48047", "grandparentRatingKey": "45520", "parentGuid": "plex://season/618b89208dde18df707ad15c", "grandparentGuid": "plex://show/5e16253691c20300412003a8", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/45520", "parentKey": "/library/metadata/48047", "key": "/library/metadata/44288/children", "guid": "plex://show/5d9c08254eefaa001f5d6dcb", "slug": "better-call-saul", "studio": "Sony Pictures Television", "type": "show", "title": "Better Call Saul", "originalTitle": "Wicked: Part I", "librarySectionTitle": "TV Series ", "librarySectionID": 2, "librarySectionKey": "/library/sections/2", "contentRating": "TV-MA", "summary": "Before Saul Goodman, he was Jimmy McGill. And if you're calling Jimmy, you're in real trouble. The prequel to \"Breaking Bad\" follows small-time attorney, Jimmy McGill, as he transforms into Walter White's morally challenged lawyer, Saul Goodman.", "index": 1, "grandparentTitle": "Alice in Borderland", "parentTitle": "Season 2", "audienceRating": 8.7, "viewCount": 4, "skipCount": 1, "lastViewedAt": 1625764795, "year": 2015, "tagline": "Make the call", "chapterSource": "media", "primaryExtraKey": "/library/metadata/134704", "thumb": "/library/metadata/44288/thumb/1736487993", "art": "/library/metadata/44288/art/1736487993", "theme": "/library/metadata/44288/theme/1736487993", "duration": 2700000, "originallyAvailableAt": "2015-02-08", "leafCount": 63, "viewedLeafCount": 4, "childCount": 6, "addedAt": 1625505101, "updatedAt": 1736487993, "audienceRatingImage": "themoviedb://image.rating", "parentIndex": 2, "parentThumb": "/library/metadata/48047/thumb/1671800243", "grandparentThumb": "/library/metadata/45520/thumb/1736488003", "grandparentArt": "/library/metadata/45520/art/1736488003", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": []}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": []}], "Image": [{"alt": "Better Call Saul", "type": "coverPoster", "url": "/library/metadata/44288/thumb/1736487993"}, {"alt": "Better Call Saul", "type": "coverPoster", "url": "/library/metadata/44288/thumb/1736487993"}], "UltraBlurColors": {"topLeft": "11333a", "topRight": "1d2721", "bottomRight": "5c451d", "bottomLeft": "372c10"}, "Genre": [{"id": 1057, "filter": "genre=1057", "tag": "Crime"}], "Country": [{"id": 58591, "filter": "country=58591", "tag": "United States of America"}, {"id": 58591, "filter": "country=58591", "tag": "United States of America"}], "Guid": [{"id": "imdb://tt3032476"}], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Role": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Director": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Writer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}]}, {"ratingKey": "44288", "parentRatingKey": "48047", "grandparentRatingKey": "45520", "parentGuid": "plex://season/618b89208dde18df707ad15c", "grandparentGuid": "plex://show/5e16253691c20300412003a8", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/45520", "parentKey": "/library/metadata/48047", "key": "/library/metadata/44288/children", "guid": "plex://show/5d9c08254eefaa001f5d6dcb", "slug": "better-call-saul", "studio": "Sony Pictures Television", "type": "show", "title": "Better Call Saul", "originalTitle": "Wicked: Part I", "librarySectionTitle": "TV Series ", "librarySectionID": 2, "librarySectionKey": "/library/sections/2", "contentRating": "TV-MA", "summary": "Before Saul Goodman, he was Jimmy McGill. And if you're calling Jimmy, you're in real trouble. The prequel to \"Breaking Bad\" follows small-time attorney, Jimmy McGill, as he transforms into Walter White's morally challenged lawyer, Saul Goodman.", "index": 1, "grandparentTitle": "Alice in Borderland", "parentTitle": "Season 2", "audienceRating": 8.7, "viewCount": 4, "skipCount": 1, "lastViewedAt": 1625764795, "year": 2015, "tagline": "Make the call", "chapterSource": "media", "primaryExtraKey": "/library/metadata/134704", "thumb": "/library/metadata/44288/thumb/1736487993", "art": "/library/metadata/44288/art/1736487993", "theme": "/library/metadata/44288/theme/1736487993", "duration": 2700000, "originallyAvailableAt": "2015-02-08", "leafCount": 63, "viewedLeafCount": 4, "childCount": 6, "addedAt": 1625505101, "updatedAt": 1736487993, "audienceRatingImage": "themoviedb://image.rating", "parentIndex": 2, "parentThumb": "/library/metadata/48047/thumb/1671800243", "grandparentThumb": "/library/metadata/45520/thumb/1736488003", "grandparentArt": "/library/metadata/45520/art/1736488003", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": []}], "Image": [], "UltraBlurColors": {"topLeft": "11333a", "topRight": "1d2721", "bottomRight": "5c451d", "bottomLeft": "372c10"}, "Genre": [{"id": 1057, "filter": "genre=1057", "tag": "Crime"}], "Country": [{"id": 58591, "filter": "country=58591", "tag": "United States of America"}, {"id": 58591, "filter": "country=58591", "tag": "United States of America"}], "Guid": [{"id": "imdb://tt3032476"}, {"id": "imdb://tt3032476"}], "Rating": [], "Role": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Director": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Writer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}, {"path": "/TV Shows/Better Call Saul"}]}, {"ratingKey": "44288", "parentRatingKey": "48047", "grandparentRatingKey": "45520", "parentGuid": "plex://season/618b89208dde18df707ad15c", "grandparentGuid": "plex://show/5e16253691c20300412003a8", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/45520", "parentKey": "/library/metadata/48047", "key": "/library/metadata/44288/children", "guid": "plex://show/5d9c08254eefaa001f5d6dcb", "slug": "better-call-saul", "studio": "Sony Pictures Television", "type": "show", "title": "Better Call Saul", "originalTitle": "Wicked: Part I", "librarySectionTitle": "TV Series ", "librarySectionID": 2, "librarySectionKey": "/library/sections/2", "contentRating": "TV-MA", "summary": "Before Saul Goodman, he was Jimmy McGill. And if you're calling Jimmy, you're in real trouble. The prequel to \"Breaking Bad\" follows small-time attorney, Jimmy McGill, as he transforms into Walter White's morally challenged lawyer, Saul Goodman.", "index": 1, "grandparentTitle": "Alice in Borderland", "parentTitle": "Season 2", "audienceRating": 8.7, "viewCount": 4, "skipCount": 1, "lastViewedAt": 1625764795, "year": 2015, "tagline": "Make the call", "chapterSource": "media", "primaryExtraKey": "/library/metadata/134704", "thumb": "/library/metadata/44288/thumb/1736487993", "art": "/library/metadata/44288/art/1736487993", "theme": "/library/metadata/44288/theme/1736487993", "duration": 2700000, "originallyAvailableAt": "2015-02-08", "leafCount": 63, "viewedLeafCount": 4, "childCount": 6, "addedAt": 1625505101, "updatedAt": 1736487993, "audienceRatingImage": "themoviedb://image.rating", "parentIndex": 2, "parentThumb": "/library/metadata/48047/thumb/1671800243", "grandparentThumb": "/library/metadata/45520/thumb/1736488003", "grandparentArt": "/library/metadata/45520/art/1736488003", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": []}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "container": "mkv", "videoProfile": "main 10", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Image": [{"alt": "Better Call Saul", "type": "coverPoster", "url": "/library/metadata/44288/thumb/1736487993"}], "UltraBlurColors": {"topLeft": "11333a", "topRight": "1d2721", "bottomRight": "5c451d", "bottomLeft": "372c10"}, "Genre": [{"id": 1057, "filter": "genre=1057", "tag": "Crime"}], "Country": [{"id": 58591, "filter": "country=58591", "tag": "United States of America"}, {"id": 58591, "filter": "country=58591", "tag": "United States of America"}], "Guid": [], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}, {"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Role": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Director": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Writer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}]}]}} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 82d7bc0..adb7466 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true swift: - version: 0.9.11 + version: 0.9.13 author: LukeHagar description: Swift Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index cd820df..0e19a09 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -9,8 +9,8 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae - sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9 + sourceRevisionDigest: sha256:49536684a97842ea7c069f909012b31a22a046d8277aee47b50a334494bf2c64 + sourceBlobDigest: sha256:eac671ea32ce31e1e558839153f7effef39bb35b4e461c6e95661d0eaf4ce1c8 tags: - latest - main @@ -18,10 +18,10 @@ targets: plexswift: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae - sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9 + sourceRevisionDigest: sha256:49536684a97842ea7c069f909012b31a22a046d8277aee47b50a334494bf2c64 + sourceBlobDigest: sha256:eac671ea32ce31e1e558839153f7effef39bb35b4e461c6e95661d0eaf4ce1c8 codeSamplesNamespace: code-samples-swift-plexswift - codeSamplesRevisionDigest: sha256:64579b8fbcfab80b7f0ffc43044c9ef8b89629cef77e28e9a3c4a75294c57ad7 + codeSamplesRevisionDigest: sha256:cbda8e96fd8d266feec7c3938d440b67c9b5b6673392feec2cf5ac13b4bf98df workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index bbf10c7..c8aee66 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages. ```bash dependencies: [ - .package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.9.11")) + .package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.9.13")) ] ``` @@ -142,8 +142,9 @@ case .empty: * [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library * [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media * [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media +* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media * [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries -* [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey +* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata * [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content * [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck diff --git a/RELEASES.md b/RELEASES.md index 05a26eb..157939f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -832,4 +832,14 @@ Based on: ### Generated - [swift v0.9.11] . ### Releases -- [Swift Package Manager v0.9.11] https://github.com/LukeHagar/plexswift/releases/tag/v0.9.11 - . \ No newline at end of file +- [Swift Package Manager v0.9.11] https://github.com/LukeHagar/plexswift/releases/tag/v0.9.11 - . + +## 2025-02-08 00:08:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [swift v0.9.13] . +### Releases +- [Swift Package Manager v0.9.13] https://github.com/LukeHagar/plexswift/releases/tag/v0.9.13 - . \ No newline at end of file diff --git a/Sources/Plexswift/Plexswift.docc/Plexswift.md b/Sources/Plexswift/Plexswift.docc/Plexswift.md index dba81e7..635d4c7 100644 --- a/Sources/Plexswift/Plexswift.docc/Plexswift.md +++ b/Sources/Plexswift/Plexswift.docc/Plexswift.md @@ -118,14 +118,15 @@ case .empty: - ``Operations/DeleteLibraryBadRequest`` - ``Operations/DeletePlaylistBadRequest`` - ``Operations/EnablePaperTrailBadRequest`` +- ``Operations/GetActorsLibraryBadRequest`` - ``Operations/GetAllLibrariesBadRequest`` - ``Operations/GetBannerImageBadRequest`` - ``Operations/GetCountriesLibraryBadRequest`` - ``Operations/GetGenresLibraryBadRequest`` - ``Operations/GetLibraryDetailsBadRequest`` - ``Operations/GetLibraryItemsBadRequest`` +- ``Operations/GetMediaMetaDataBadRequest`` - ``Operations/GetMediaProvidersBadRequest`` -- ``Operations/GetMetaDataByRatingKeyBadRequest`` - ``Operations/GetRecentlyAddedLibraryBadRequest`` - ``Operations/GetRefreshLibraryMetadataBadRequest`` - ``Operations/GetSearchAllLibrariesBadRequest`` @@ -197,14 +198,15 @@ case .empty: - ``Operations/DeleteLibraryResponse`` - ``Operations/DeletePlaylistResponse`` - ``Operations/EnablePaperTrailResponse`` +- ``Operations/GetActorsLibraryResponse`` - ``Operations/GetAllLibrariesResponse`` - ``Operations/GetBannerImageResponse`` - ``Operations/GetCountriesLibraryResponse`` - ``Operations/GetGenresLibraryResponse`` - ``Operations/GetLibraryDetailsResponse`` - ``Operations/GetLibraryItemsResponse`` +- ``Operations/GetMediaMetaDataResponse`` - ``Operations/GetMediaProvidersResponse`` -- ``Operations/GetMetaDataByRatingKeyResponse`` - ``Operations/GetRecentlyAddedResponse`` - ``Operations/GetRecentlyAddedLibraryResponse`` - ``Operations/GetRefreshLibraryMetadataResponse`` @@ -348,6 +350,14 @@ case .empty: - ``Operations/Friend`` - ``Operations/Genre`` - ``Operations/GeoData`` +- ``Operations/GetActorsLibraryDirectory`` +- ``Operations/GetActorsLibraryErrors`` +- ``Operations/GetActorsLibraryLibraryErrors`` +- ``Operations/GetActorsLibraryMediaContainer`` +- ``Operations/GetActorsLibraryQueryParamType`` +- ``Operations/GetActorsLibraryRequest`` +- ``Operations/GetActorsLibraryResponseBody`` +- ``Operations/GetActorsLibraryUnauthorized`` - ``Operations/GetAllLibrariesDirectory`` - ``Operations/GetAllLibrariesErrors`` - ``Operations/GetAllLibrariesLibraryErrors`` @@ -363,6 +373,7 @@ case .empty: - ``Operations/GetCountriesLibraryErrors`` - ``Operations/GetCountriesLibraryLibraryErrors`` - ``Operations/GetCountriesLibraryMediaContainer`` +- ``Operations/GetCountriesLibraryQueryParamType`` - ``Operations/GetCountriesLibraryRequest`` - ``Operations/GetCountriesLibraryResponseBody`` - ``Operations/GetCountriesLibraryUnauthorized`` @@ -370,6 +381,7 @@ case .empty: - ``Operations/GetGenresLibraryErrors`` - ``Operations/GetGenresLibraryLibraryErrors`` - ``Operations/GetGenresLibraryMediaContainer`` +- ``Operations/GetGenresLibraryQueryParamType`` - ``Operations/GetGenresLibraryRequest`` - ``Operations/GetGenresLibraryResponseBody`` - ``Operations/GetGenresLibraryUnauthorized`` @@ -434,6 +446,24 @@ case .empty: - ``Operations/GetLibraryItemsUltraBlurColors`` - ``Operations/GetLibraryItemsUnauthorized`` - ``Operations/GetLibraryItemsWriter`` +- ``Operations/GetMediaMetaDataCountry`` +- ``Operations/GetMediaMetaDataDirector`` +- ``Operations/GetMediaMetaDataErrors`` +- ``Operations/GetMediaMetaDataGenre`` +- ``Operations/GetMediaMetaDataImage`` +- ``Operations/GetMediaMetaDataLibraryErrors`` +- ``Operations/GetMediaMetaDataLocation`` +- ``Operations/GetMediaMetaDataMedia`` +- ``Operations/GetMediaMetaDataMediaContainer`` +- ``Operations/GetMediaMetaDataMetadata`` +- ``Operations/GetMediaMetaDataPart`` +- ``Operations/GetMediaMetaDataRequest`` +- ``Operations/GetMediaMetaDataResponseBody`` +- ``Operations/GetMediaMetaDataRole`` +- ``Operations/GetMediaMetaDataStream`` +- ``Operations/GetMediaMetaDataUltraBlurColors`` +- ``Operations/GetMediaMetaDataUnauthorized`` +- ``Operations/GetMediaMetaDataWriter`` - ``Operations/GetMediaProvidersDirectory`` - ``Operations/GetMediaProvidersErrors`` - ``Operations/GetMediaProvidersMediaContainer`` @@ -441,21 +471,6 @@ case .empty: - ``Operations/GetMediaProvidersResponseBody`` - ``Operations/GetMediaProvidersServerErrors`` - ``Operations/GetMediaProvidersUnauthorized`` -- ``Operations/GetMetaDataByRatingKeyCountry`` -- ``Operations/GetMetaDataByRatingKeyDirector`` -- ``Operations/GetMetaDataByRatingKeyErrors`` -- ``Operations/GetMetaDataByRatingKeyGenre`` -- ``Operations/GetMetaDataByRatingKeyLibraryErrors`` -- ``Operations/GetMetaDataByRatingKeyMedia`` -- ``Operations/GetMetaDataByRatingKeyMediaContainer`` -- ``Operations/GetMetaDataByRatingKeyMetadata`` -- ``Operations/GetMetaDataByRatingKeyPart`` -- ``Operations/GetMetaDataByRatingKeyRequest`` -- ``Operations/GetMetaDataByRatingKeyResponseBody`` -- ``Operations/GetMetaDataByRatingKeyRole`` -- ``Operations/GetMetaDataByRatingKeyStream`` -- ``Operations/GetMetaDataByRatingKeyUnauthorized`` -- ``Operations/GetMetaDataByRatingKeyWriter`` - ``Operations/GetRecentlyAddedActiveDirection`` - ``Operations/GetRecentlyAddedDefaultDirection`` - ``Operations/GetRecentlyAddedField`` @@ -879,7 +894,7 @@ case .empty: - ``Operations/QueryParamOnlyTransient`` - ``Operations/QueryParamSmart`` - ``Operations/QueryParamType`` -- ``Operations/Ratings`` +- ``Operations/Rating`` - ``Operations/Release`` - ``Operations/ResponseBody`` - ``Operations/Restricted`` @@ -894,6 +909,7 @@ case .empty: - ``Operations/SharedServers`` - ``Operations/SharedSources`` - ``Operations/ShowOrdering`` +- ``Operations/Similar`` - ``Operations/Skip`` - ``Operations/Smart`` - ``Operations/Sort`` diff --git a/Sources/Plexswift/internal/api/_LibraryAPI.swift b/Sources/Plexswift/internal/api/_LibraryAPI.swift index f646fa4..bb1b702 100644 --- a/Sources/Plexswift/internal/api/_LibraryAPI.swift +++ b/Sources/Plexswift/internal/api/_LibraryAPI.swift @@ -100,6 +100,15 @@ class _LibraryAPI: LibraryAPI { ) } + public func getActorsLibrary(request: Operations.GetActorsLibraryRequest) async throws -> Response { + return try await client.makeRequest( + configureRequest: { configuration in + try configureGetActorsLibraryRequest(with: configuration, request: request) + }, + handleResponse: handleGetActorsLibraryResponse + ) + } + public func getSearchAllLibraries(request: Operations.GetSearchAllLibrariesRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in @@ -109,12 +118,12 @@ class _LibraryAPI: LibraryAPI { ) } - public func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response { + public func getMediaMetaData(request: Operations.GetMediaMetaDataRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureGetMetaDataByRatingKeyRequest(with: configuration, request: request) + try configureGetMediaMetaDataRequest(with: configuration, request: request) }, - handleResponse: handleGetMetaDataByRatingKeyResponse + handleResponse: handleGetMediaMetaDataResponse ) } @@ -212,6 +221,7 @@ private func configureGetGenresLibraryRequest(with configuration: URLRequestConf configuration.path = "/library/sections/{sectionKey}/genre" configuration.method = .get configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } @@ -219,6 +229,15 @@ private func configureGetCountriesLibraryRequest(with configuration: URLRequestC configuration.path = "/library/sections/{sectionKey}/country" configuration.method = .get configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + +private func configureGetActorsLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.GetActorsLibraryRequest) throws { + configuration.path = "/library/sections/{sectionKey}/actor" + configuration.method = .get + configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } @@ -230,10 +249,11 @@ private func configureGetSearchAllLibrariesRequest(with configuration: URLReques configuration.telemetryHeader = .userAgent } -private func configureGetMetaDataByRatingKeyRequest(with configuration: URLRequestConfiguration, request: Operations.GetMetaDataByRatingKeyRequest) throws { +private func configureGetMediaMetaDataRequest(with configuration: URLRequestConfiguration, request: Operations.GetMediaMetaDataRequest) throws { configuration.path = "/library/metadata/{ratingKey}" configuration.method = .get configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } @@ -566,6 +586,40 @@ private func handleGetCountriesLibraryResponse(response: Client.APIResponse) thr return .empty } +private func handleGetActorsLibraryResponse(response: Client.APIResponse) throws -> Operations.GetActorsLibraryResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .object(try JSONDecoder().decode(Operations.GetActorsLibraryResponseBody.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetActorsLibraryBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetActorsLibraryUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 404 { + return .empty + } + + return .empty +} + private func handleGetSearchAllLibrariesResponse(response: Client.APIResponse) throws -> Operations.GetSearchAllLibrariesResponse { let httpResponse = response.httpResponse @@ -598,13 +652,13 @@ private func handleGetSearchAllLibrariesResponse(response: Client.APIResponse) t return .empty } -private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) throws -> Operations.GetMetaDataByRatingKeyResponse { +private func handleGetMediaMetaDataResponse(response: Client.APIResponse) throws -> Operations.GetMediaMetaDataResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetMediaMetaDataResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -612,7 +666,7 @@ private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) } else if httpResponse.statusCode == 400 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .badRequest(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyBadRequest.self, from: data)) + return .badRequest(try JSONDecoder().decode(Operations.GetMediaMetaDataBadRequest.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -620,11 +674,13 @@ private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .unauthorized(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyUnauthorized.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetMediaMetaDataUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } + } else if httpResponse.statusCode == 404 { + return .empty } return .empty diff --git a/Sources/Plexswift/internal/models/GetActorsLibraryQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetActorsLibraryQueryParamType+Serialization.swift new file mode 100644 index 0000000..85ebf25 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetActorsLibraryQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetActorsLibraryQueryParamType: 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))] + } +} diff --git a/Sources/Plexswift/internal/models/GetActorsLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetActorsLibraryRequest+Serialization.swift new file mode 100644 index 0000000..30c5fc0 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetActorsLibraryRequest+Serialization.swift @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetActorsLibraryRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetActorsLibraryRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetActorsLibraryRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetActorsLibraryRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetCountriesLibraryQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetCountriesLibraryQueryParamType+Serialization.swift new file mode 100644 index 0000000..47dca66 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetCountriesLibraryQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetCountriesLibraryQueryParamType: 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))] + } +} diff --git a/Sources/Plexswift/internal/models/GetCountriesLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetCountriesLibraryRequest+Serialization.swift index fb28601..ba2ee9e 100644 --- a/Sources/Plexswift/internal/models/GetCountriesLibraryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetCountriesLibraryRequest+Serialization.swift @@ -8,10 +8,16 @@ extension Operations.GetCountriesLibraryRequest: Serializable { switch format { case .path: return try serializePathParameterSerializable(self, with: format) - case .query, .header, .multipart, .form: + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: throw SerializationError.invalidSerializationParameter(type: "Operations.GetCountriesLibraryRequest", format: format.formatDescription) } } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } } extension Operations.GetCountriesLibraryRequest: PathParameterSerializable { @@ -21,3 +27,11 @@ extension Operations.GetCountriesLibraryRequest: PathParameterSerializable { ].compactMapValues { $0 } } } + +extension Operations.GetCountriesLibraryRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetGenresLibraryQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetGenresLibraryQueryParamType+Serialization.swift new file mode 100644 index 0000000..c6d9c2a --- /dev/null +++ b/Sources/Plexswift/internal/models/GetGenresLibraryQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetGenresLibraryQueryParamType: 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))] + } +} diff --git a/Sources/Plexswift/internal/models/GetGenresLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetGenresLibraryRequest+Serialization.swift index 2d336d6..5007411 100644 --- a/Sources/Plexswift/internal/models/GetGenresLibraryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetGenresLibraryRequest+Serialization.swift @@ -8,10 +8,16 @@ extension Operations.GetGenresLibraryRequest: Serializable { switch format { case .path: return try serializePathParameterSerializable(self, with: format) - case .query, .header, .multipart, .form: + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: throw SerializationError.invalidSerializationParameter(type: "Operations.GetGenresLibraryRequest", format: format.formatDescription) } } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } } extension Operations.GetGenresLibraryRequest: PathParameterSerializable { @@ -21,3 +27,11 @@ extension Operations.GetGenresLibraryRequest: PathParameterSerializable { ].compactMapValues { $0 } } } + +extension Operations.GetGenresLibraryRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift index c2119b3..7b9d356 100644 --- a/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift @@ -32,9 +32,9 @@ extension Operations.GetLibraryItemsRequest: PathParameterSerializable { extension Operations.GetLibraryItemsRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) try builder.addQueryParameters(from: includeGuids, named: "includeGuids", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) try builder.addQueryParameters(from: includeMeta, named: "includeMeta", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) - try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) try builder.addQueryParameters(from: xPlexContainerSize, named: "X-Plex-Container-Size", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) try builder.addQueryParameters(from: xPlexContainerStart, named: "X-Plex-Container-Start", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) return builder.build() diff --git a/Sources/Plexswift/internal/models/GetMediaMetaDataRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetMediaMetaDataRequest+Serialization.swift new file mode 100644 index 0000000..5becd6b --- /dev/null +++ b/Sources/Plexswift/internal/models/GetMediaMetaDataRequest+Serialization.swift @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetMediaMetaDataRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetMediaMetaDataRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetMediaMetaDataRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "ratingKey": try ratingKey.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetMediaMetaDataRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: asyncAugmentMetadata, named: "asyncAugmentMetadata", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: asyncCheckFiles, named: "asyncCheckFiles", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: asyncRefreshAnalysis, named: "asyncRefreshAnalysis", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: asyncRefreshLocalMediaAgent, named: "asyncRefreshLocalMediaAgent", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeChapters, named: "includeChapters", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeConcerts, named: "includeConcerts", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeExternalMedia, named: "includeExternalMedia", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeExtras, named: "includeExtras", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeOnDeck, named: "includeOnDeck", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includePopularLeaves, named: "includePopularLeaves", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includePreferences, named: "includePreferences", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeReviews, named: "includeReviews", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeStations, named: "includeStations", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift deleted file mode 100644 index 21c154b..0000000 --- a/Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - - -import Foundation - -extension Operations.GetMetaDataByRatingKeyRequest: Serializable { - func serialize(with format: SerializableFormat) throws -> String { - switch format { - case .path: - return try serializePathParameterSerializable(self, with: format) - case .query, .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.GetMetaDataByRatingKeyRequest", format: format.formatDescription) - } - } -} - -extension Operations.GetMetaDataByRatingKeyRequest: PathParameterSerializable { - func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { - return [ - "ratingKey": try ratingKey.serialize(with: formatOverride ?? .path(explode: false)), - ].compactMapValues { $0 } - } -} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift b/Sources/Plexswift/models/operations/GetActorsLibraryBadRequest.swift similarity index 60% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift rename to Sources/Plexswift/models/operations/GetActorsLibraryBadRequest.swift index af3c39e..58712c2 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift +++ b/Sources/Plexswift/models/operations/GetActorsLibraryBadRequest.swift @@ -4,18 +4,18 @@ import Foundation extension Operations { /// Bad Request - A parameter was not specified, or was specified incorrectly. - public struct GetMetaDataByRatingKeyBadRequest { - public let errors: [Operations.GetMetaDataByRatingKeyErrors]? + public struct GetActorsLibraryBadRequest { + public let errors: [Operations.GetActorsLibraryErrors]? /// Creates a request model with the specified parameters /// /// - public init(errors: [Operations.GetMetaDataByRatingKeyErrors]? = nil) { + public init(errors: [Operations.GetActorsLibraryErrors]? = nil) { self.errors = errors } }} -extension Operations.GetMetaDataByRatingKeyBadRequest: Codable { +extension Operations.GetActorsLibraryBadRequest: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetActorsLibraryDirectory.swift b/Sources/Plexswift/models/operations/GetActorsLibraryDirectory.swift new file mode 100644 index 0000000..548f86c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetActorsLibraryDirectory.swift @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetActorsLibraryDirectory { + /// A fast lookup key for the actor relative url. + public let fastKey: String + /// A unique key representing the actor. + public let key: String + /// URL for the thumbnail image of the actor. + public let thumb: String + /// The name of the actor. + public let title: String + + /// Creates an object with the specified parameters + /// + /// - Parameter fastKey: A fast lookup key for the actor relative url. + /// - Parameter key: A unique key representing the actor. + /// - Parameter thumb: URL for the thumbnail image of the actor. + /// - Parameter title: The name of the actor. + /// + public init(fastKey: String, key: String, thumb: String, title: String) { + self.fastKey = fastKey + self.key = key + self.thumb = thumb + self.title = title + } + }} + +extension Operations.GetActorsLibraryDirectory: Codable { + enum CodingKeys: String, CodingKey { + case fastKey + case key + case thumb + case title + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift b/Sources/Plexswift/models/operations/GetActorsLibraryErrors.swift similarity index 85% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift rename to Sources/Plexswift/models/operations/GetActorsLibraryErrors.swift index 8512052..4b36ab5 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift +++ b/Sources/Plexswift/models/operations/GetActorsLibraryErrors.swift @@ -4,7 +4,7 @@ import Foundation extension Operations { /// A model object - public struct GetMetaDataByRatingKeyErrors { + public struct GetActorsLibraryErrors { public let code: Int? public let message: String? public let status: Int? @@ -19,7 +19,7 @@ extension Operations { } }} -extension Operations.GetMetaDataByRatingKeyErrors: Codable { +extension Operations.GetActorsLibraryErrors: Codable { enum CodingKeys: String, CodingKey { case code case message diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift b/Sources/Plexswift/models/operations/GetActorsLibraryLibraryErrors.swift similarity index 83% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift rename to Sources/Plexswift/models/operations/GetActorsLibraryLibraryErrors.swift index 5dbe457..f1b7bb8 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift +++ b/Sources/Plexswift/models/operations/GetActorsLibraryLibraryErrors.swift @@ -4,7 +4,7 @@ import Foundation extension Operations { /// A model object - public struct GetMetaDataByRatingKeyLibraryErrors { + public struct GetActorsLibraryLibraryErrors { public let code: Int? public let message: String? public let status: Int? @@ -19,7 +19,7 @@ extension Operations { } }} -extension Operations.GetMetaDataByRatingKeyLibraryErrors: Codable { +extension Operations.GetActorsLibraryLibraryErrors: Codable { enum CodingKeys: String, CodingKey { case code case message diff --git a/Sources/Plexswift/models/operations/GetActorsLibraryMediaContainer.swift b/Sources/Plexswift/models/operations/GetActorsLibraryMediaContainer.swift new file mode 100644 index 0000000..f674206 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetActorsLibraryMediaContainer.swift @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetActorsLibraryMediaContainer { + /// Indicates whether syncing is allowed. + public let allowSync: Bool + /// URL for the background artwork of the media container. + public let art: String + /// An plugin identifier for the media container. + public let identifier: String + /// The prefix used for media tag resource paths. + public let mediaTagPrefix: String + /// The version number for media tags. + public let mediaTagVersion: Int + /// Specifies whether caching is disabled. + public let nocache: Bool + @DecimalSerialized + public private(set) var size: Double + /// URL for the thumbnail image of the media container. + public let thumb: String + /// The primary title of the media container. + public let title1: String + /// The secondary title of the media container. + public let title2: String + /// Identifier for the view group layout. + public let viewGroup: String + /// Identifier for the view mode. + public let viewMode: String + /// An array of actor entries for media items. + public let directory: [Operations.GetActorsLibraryDirectory]? + + /// Creates an object with the specified parameters + /// + /// - Parameter allowSync: Indicates whether syncing is allowed. + /// - Parameter art: URL for the background artwork of the media container. + /// - Parameter identifier: An plugin identifier for the media container. + /// - Parameter mediaTagPrefix: The prefix used for media tag resource paths. + /// - Parameter mediaTagVersion: The version number for media tags. + /// - Parameter nocache: Specifies whether caching is disabled. + /// - Parameter thumb: URL for the thumbnail image of the media container. + /// - Parameter title1: The primary title of the media container. + /// - Parameter title2: The secondary title of the media container. + /// - Parameter viewGroup: Identifier for the view group layout. + /// - Parameter viewMode: Identifier for the view mode. + /// - Parameter directory: An array of actor entries for media items. + /// + public init(allowSync: Bool, art: String, identifier: String, mediaTagPrefix: String, mediaTagVersion: Int, nocache: Bool, size: Double, thumb: String, title1: String, title2: String, viewGroup: String, viewMode: String, directory: [Operations.GetActorsLibraryDirectory]? = nil) { + self.allowSync = allowSync + self.art = art + self.identifier = identifier + self.mediaTagPrefix = mediaTagPrefix + self.mediaTagVersion = mediaTagVersion + self.nocache = nocache + self._size = DecimalSerialized(wrappedValue: size) + self.thumb = thumb + self.title1 = title1 + self.title2 = title2 + self.viewGroup = viewGroup + self.viewMode = viewMode + self.directory = directory + } + }} + +extension Operations.GetActorsLibraryMediaContainer: Codable { + enum CodingKeys: String, CodingKey { + case allowSync + case art + case identifier + case mediaTagPrefix + case mediaTagVersion + case nocache + case size + case thumb + case title1 + case title2 + case viewGroup + case viewMode + case directory = "Directory" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.allowSync = try container.decode(Bool.self, forKey: .allowSync) + self.art = try container.decode(String.self, forKey: .art) + self.identifier = try container.decode(String.self, forKey: .identifier) + self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix) + self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion) + self.nocache = try container.decode(Bool.self, forKey: .nocache) + self._size = try container.decode(DecimalSerialized.self, forKey: .size) + self.thumb = try container.decode(String.self, forKey: .thumb) + self.title1 = try container.decode(String.self, forKey: .title1) + self.title2 = try container.decode(String.self, forKey: .title2) + self.viewGroup = try container.decode(String.self, forKey: .viewGroup) + self.viewMode = try container.decode(String.self, forKey: .viewMode) + self.directory = try container.decodeIfPresent([Operations.GetActorsLibraryDirectory].self, forKey: .directory) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.allowSync, forKey: .allowSync) + try container.encode(self.art, forKey: .art) + try container.encode(self.identifier, forKey: .identifier) + try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix) + try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion) + try container.encode(self.nocache, forKey: .nocache) + try container.encode(self._size, forKey: .size) + try container.encode(self.thumb, forKey: .thumb) + try container.encode(self.title1, forKey: .title1) + try container.encode(self.title2, forKey: .title2) + try container.encode(self.viewGroup, forKey: .viewGroup) + try container.encode(self.viewMode, forKey: .viewMode) + try container.encodeIfPresent(self.directory, forKey: .directory) + } +} + +extension Operations.GetActorsLibraryMediaContainer { + var sizeWrapper: DecimalSerialized { + return _size + } +} diff --git a/Sources/Plexswift/models/operations/GetActorsLibraryQueryParamType.swift b/Sources/Plexswift/models/operations/GetActorsLibraryQueryParamType.swift new file mode 100644 index 0000000..98afeb3 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetActorsLibraryQueryParamType.swift @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum GetActorsLibraryQueryParamType: Int, Codable, APIValue { + case movie = 1 + case tvShow = 2 + case season = 3 + case episode = 4 + case audio = 8 + case album = 9 + case track = 10 + }} diff --git a/Sources/Plexswift/models/operations/GetActorsLibraryRequest.swift b/Sources/Plexswift/models/operations/GetActorsLibraryRequest.swift new file mode 100644 index 0000000..5935204 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetActorsLibraryRequest.swift @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetActorsLibraryRequest: APIValue { + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.GetActorsLibraryQueryParamType + + /// Creates an object with the specified parameters + /// + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + /// - Parameter type: The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + /// + public init(sectionKey: Int, type: Operations.GetActorsLibraryQueryParamType) { + self.sectionKey = sectionKey + self.type = type + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift b/Sources/Plexswift/models/operations/GetActorsLibraryResponse.swift similarity index 61% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift rename to Sources/Plexswift/models/operations/GetActorsLibraryResponse.swift index 18610ba..798e155 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift +++ b/Sources/Plexswift/models/operations/GetActorsLibraryResponse.swift @@ -4,11 +4,11 @@ import Foundation extension Operations { /// A response model - public enum GetMetaDataByRatingKeyResponse { + public enum GetActorsLibraryResponse { case empty - case badRequest(Operations.GetMetaDataByRatingKeyBadRequest) - case object(Operations.GetMetaDataByRatingKeyResponseBody) - case unauthorized(Operations.GetMetaDataByRatingKeyUnauthorized) + case badRequest(Operations.GetActorsLibraryBadRequest) + case object(Operations.GetActorsLibraryResponseBody) + case unauthorized(Operations.GetActorsLibraryUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -18,21 +18,21 @@ extension Operations { } } - public func badRequest() throws -> Operations.GetMetaDataByRatingKeyBadRequest { + public func badRequest() throws -> Operations.GetActorsLibraryBadRequest { guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func object() throws -> Operations.GetMetaDataByRatingKeyResponseBody { + public func object() throws -> Operations.GetActorsLibraryResponseBody { guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func unauthorized() throws -> Operations.GetMetaDataByRatingKeyUnauthorized { + public func unauthorized() throws -> Operations.GetActorsLibraryUnauthorized { guard case .unauthorized(let value) = self else { throw PlexswiftError.missingResponseData } diff --git a/Sources/Plexswift/models/operations/GetActorsLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetActorsLibraryResponseBody.swift new file mode 100644 index 0000000..97d029e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetActorsLibraryResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Successful response containing media container data. + public struct GetActorsLibraryResponseBody { + public let mediaContainer: Operations.GetActorsLibraryMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetActorsLibraryMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetActorsLibraryResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift b/Sources/Plexswift/models/operations/GetActorsLibraryUnauthorized.swift similarity index 58% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift rename to Sources/Plexswift/models/operations/GetActorsLibraryUnauthorized.swift index 2714f52..61b9490 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift +++ b/Sources/Plexswift/models/operations/GetActorsLibraryUnauthorized.swift @@ -4,18 +4,18 @@ import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetMetaDataByRatingKeyUnauthorized { - public let errors: [Operations.GetMetaDataByRatingKeyLibraryErrors]? + public struct GetActorsLibraryUnauthorized { + public let errors: [Operations.GetActorsLibraryLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetMetaDataByRatingKeyLibraryErrors]? = nil) { + public init(errors: [Operations.GetActorsLibraryLibraryErrors]? = nil) { self.errors = errors } }} -extension Operations.GetMetaDataByRatingKeyUnauthorized: Codable { +extension Operations.GetActorsLibraryUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetCountriesLibraryQueryParamType.swift b/Sources/Plexswift/models/operations/GetCountriesLibraryQueryParamType.swift new file mode 100644 index 0000000..9fe7f79 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCountriesLibraryQueryParamType.swift @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum GetCountriesLibraryQueryParamType: Int, Codable, APIValue { + case movie = 1 + case tvShow = 2 + case season = 3 + case episode = 4 + case audio = 8 + case album = 9 + case track = 10 + }} diff --git a/Sources/Plexswift/models/operations/GetCountriesLibraryRequest.swift b/Sources/Plexswift/models/operations/GetCountriesLibraryRequest.swift index c637eee..9147f7f 100644 --- a/Sources/Plexswift/models/operations/GetCountriesLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/GetCountriesLibraryRequest.swift @@ -9,14 +9,30 @@ extension Operations { /// Note: This is unique in the context of the Plex server. /// public let sectionKey: Int + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.GetCountriesLibraryQueryParamType /// Creates an object with the specified parameters /// /// - Parameter sectionKey: The unique key of the Plex library. /// Note: This is unique in the context of the Plex server. /// + /// - Parameter type: The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// /// - public init(sectionKey: Int) { + public init(sectionKey: Int, type: Operations.GetCountriesLibraryQueryParamType) { self.sectionKey = sectionKey + self.type = type } }} diff --git a/Sources/Plexswift/models/operations/GetGenresLibraryQueryParamType.swift b/Sources/Plexswift/models/operations/GetGenresLibraryQueryParamType.swift new file mode 100644 index 0000000..fbc88fd --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGenresLibraryQueryParamType.swift @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum GetGenresLibraryQueryParamType: Int, Codable, APIValue { + case movie = 1 + case tvShow = 2 + case season = 3 + case episode = 4 + case audio = 8 + case album = 9 + case track = 10 + }} diff --git a/Sources/Plexswift/models/operations/GetGenresLibraryRequest.swift b/Sources/Plexswift/models/operations/GetGenresLibraryRequest.swift index 3ace3a3..03a3468 100644 --- a/Sources/Plexswift/models/operations/GetGenresLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/GetGenresLibraryRequest.swift @@ -9,14 +9,30 @@ extension Operations { /// Note: This is unique in the context of the Plex server. /// public let sectionKey: Int + /// The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.GetGenresLibraryQueryParamType /// Creates an object with the specified parameters /// /// - Parameter sectionKey: The unique key of the Plex library. /// Note: This is unique in the context of the Plex server. /// + /// - Parameter type: The type of media to retrieve or filter by. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// /// - public init(sectionKey: Int) { + public init(sectionKey: Int, type: Operations.GetGenresLibraryQueryParamType) { self.sectionKey = sectionKey + self.type = type } }} diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsQueryParamType.swift b/Sources/Plexswift/models/operations/GetLibraryItemsQueryParamType.swift index 02d63fb..980f493 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsQueryParamType.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsQueryParamType.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift b/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift index 5d6a21b..1b1138d 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift @@ -11,20 +11,20 @@ extension Operations { public let sectionKey: Int /// A key representing a specific tag within the section. public let tag: Operations.Tag - /// Adds the Guids object to the response - /// - public let includeGuids: Operations.IncludeGuids? - /// Adds the Meta object to the response - /// - public let includeMeta: Operations.GetLibraryItemsQueryParamIncludeMeta? - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season /// 4 = episode /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries /// - public let type: Operations.GetLibraryItemsQueryParamType? + public let type: Operations.GetLibraryItemsQueryParamType + /// Adds the Guids object to the response + /// + public let includeGuids: Operations.IncludeGuids? + /// Adds the Meta object to the response + /// + public let includeMeta: Operations.GetLibraryItemsQueryParamIncludeMeta? /// The number of items to return. If not specified, all items will be returned. /// If the number of items exceeds the limit, the response will be paginated. /// By default this is 50 @@ -42,17 +42,17 @@ extension Operations { /// Note: This is unique in the context of the Plex server. /// /// - Parameter tag: A key representing a specific tag within the section. - /// - Parameter includeGuids: Adds the Guids object to the response - /// - /// - Parameter includeMeta: Adds the Meta object to the response - /// - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season /// 4 = episode /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries /// + /// - Parameter includeGuids: Adds the Guids object to the response + /// + /// - Parameter includeMeta: Adds the Meta object to the response + /// /// - Parameter xPlexContainerSize: The number of items to return. If not specified, all items will be returned. /// If the number of items exceeds the limit, the response will be paginated. /// By default this is 50 @@ -62,12 +62,12 @@ extension Operations { /// By default this is 0 /// /// - public init(sectionKey: Int, tag: Operations.Tag, includeGuids: Operations.IncludeGuids? = nil, includeMeta: Operations.GetLibraryItemsQueryParamIncludeMeta? = nil, type: Operations.GetLibraryItemsQueryParamType? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { + public init(sectionKey: Int, tag: Operations.Tag, type: Operations.GetLibraryItemsQueryParamType, includeGuids: Operations.IncludeGuids? = nil, includeMeta: Operations.GetLibraryItemsQueryParamIncludeMeta? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { self.sectionKey = sectionKey self.tag = tag + self.type = type self.includeGuids = includeGuids self.includeMeta = includeMeta - self.type = type self.xPlexContainerSize = xPlexContainerSize self.xPlexContainerStart = xPlexContainerStart } diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataBadRequest.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataBadRequest.swift new file mode 100644 index 0000000..94a3504 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetMediaMetaDataBadRequest { + public let errors: [Operations.GetMediaMetaDataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetMediaMetaDataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMediaMetaDataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataCountry.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataCountry.swift new file mode 100644 index 0000000..02b0edc --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataCountry.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataCountry { + /// The filter string for the country. + public let filter: String + /// The unique country identifier. + public let id: Int + /// The country name. + public let tag: String + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for the country. + /// - Parameter id: The unique country identifier. + /// - Parameter tag: The country name. + /// + public init(filter: String, id: Int, tag: String) { + self.filter = filter + self.id = id + self.tag = tag + } + }} + +extension Operations.GetMediaMetaDataCountry: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataDirector.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataDirector.swift new file mode 100644 index 0000000..925b615 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataDirector.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataDirector { + /// The filter string for the role. + public let filter: String + /// The unique role identifier. + public let id: Int + /// The actor's name. + public let tag: String + /// A key associated with the actor tag. + public let tagKey: String + /// The character name or role. + public let role: String? + /// URL for the role thumbnail image. + public let thumb: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for the role. + /// - Parameter id: The unique role identifier. + /// - Parameter tag: The actor's name. + /// - Parameter tagKey: A key associated with the actor tag. + /// - Parameter role: The character name or role. + /// - Parameter thumb: URL for the role thumbnail image. + /// + public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) { + self.filter = filter + self.id = id + self.tag = tag + self.tagKey = tagKey + self.role = role + self.thumb = thumb + } + }} + +extension Operations.GetMediaMetaDataDirector: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + case tagKey + case role + case thumb + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataErrors.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataErrors.swift new file mode 100644 index 0000000..c97d12c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMediaMetaDataErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataGenre.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataGenre.swift new file mode 100644 index 0000000..6ec7917 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataGenre.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataGenre { + /// The filter string for the genre. + public let filter: String + /// The unique genre identifier. + public let id: Int + /// The genre name. + public let tag: String + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for the genre. + /// - Parameter id: The unique genre identifier. + /// - Parameter tag: The genre name. + /// + public init(filter: String, id: Int, tag: String) { + self.filter = filter + self.id = id + self.tag = tag + } + }} + +extension Operations.GetMediaMetaDataGenre: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataImage.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataImage.swift new file mode 100644 index 0000000..ced10cc --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataImage.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataImage { + /// Alternate text for the image. + public let alt: String + /// The type of image (e.g., coverPoster, background, clearLogo). + public let type: String + /// The URL of the image. + public let url: String + + /// Creates an object with the specified parameters + /// + /// - Parameter alt: Alternate text for the image. + /// - Parameter type: The type of image (e.g., coverPoster, background, clearLogo). + /// - Parameter url: The URL of the image. + /// + public init(alt: String, type: String, url: String) { + self.alt = alt + self.type = type + self.url = url + } + }} + +extension Operations.GetMediaMetaDataImage: Codable { + enum CodingKeys: String, CodingKey { + case alt + case type + case url + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataLibraryErrors.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataLibraryErrors.swift new file mode 100644 index 0000000..23b42c8 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMediaMetaDataLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataLocation.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataLocation.swift new file mode 100644 index 0000000..73d0500 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataLocation.swift @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataLocation { + /// The file path for the location. + public let path: String + + /// Creates an object with the specified parameters + /// + /// - Parameter path: The file path for the location. + /// + public init(path: String) { + self.path = path + } + }} + +extension Operations.GetMediaMetaDataLocation: Codable { + enum CodingKeys: String, CodingKey { + case path + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataMedia.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataMedia.swift new file mode 100644 index 0000000..6bee8d8 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataMedia.swift @@ -0,0 +1,139 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataMedia { + /// Aspect ratio of the video. + @DecimalSerialized + public private(set) var aspectRatio: Double + /// Number of audio channels. + public let audioChannels: Int + /// Audio codec used. + public let audioCodec: String + /// Bitrate in bits per second. + public let bitrate: Int + /// File container type. + public let container: String + /// Duration of the media in milliseconds. + public let duration: Int + /// Indicates whether voice activity is detected. + public let hasVoiceActivity: Bool + /// Video height in pixels. + public let height: Int + /// Unique media identifier. + public let id: Int + /// An array of parts for this media item. + public let part: [Operations.GetMediaMetaDataPart] + /// Video codec used. + public let videoCodec: String + /// Frame rate of the video (e.g., 24p). + public let videoFrameRate: String + /// Video profile (e.g., main 10). + public let videoProfile: String + /// Video resolution (e.g., 4k). + public let videoResolution: String + /// Video width in pixels. + public let width: Int + + /// Creates an object with the specified parameters + /// + /// - Parameter aspectRatio: Aspect ratio of the video. + /// - Parameter audioChannels: Number of audio channels. + /// - Parameter audioCodec: Audio codec used. + /// - Parameter bitrate: Bitrate in bits per second. + /// - Parameter container: File container type. + /// - Parameter duration: Duration of the media in milliseconds. + /// - Parameter hasVoiceActivity: Indicates whether voice activity is detected. + /// - Parameter height: Video height in pixels. + /// - Parameter id: Unique media identifier. + /// - Parameter part: An array of parts for this media item. + /// - Parameter videoCodec: Video codec used. + /// - Parameter videoFrameRate: Frame rate of the video (e.g., 24p). + /// - Parameter videoProfile: Video profile (e.g., main 10). + /// - Parameter videoResolution: Video resolution (e.g., 4k). + /// - Parameter width: Video width in pixels. + /// + public init(aspectRatio: Double, audioChannels: Int, audioCodec: String, bitrate: Int, container: String, duration: Int, hasVoiceActivity: Bool, height: Int, id: Int, part: [Operations.GetMediaMetaDataPart], videoCodec: String, videoFrameRate: String, videoProfile: String, videoResolution: String, width: Int) { + self._aspectRatio = DecimalSerialized(wrappedValue: aspectRatio) + self.audioChannels = audioChannels + self.audioCodec = audioCodec + self.bitrate = bitrate + self.container = container + self.duration = duration + self.hasVoiceActivity = hasVoiceActivity + self.height = height + self.id = id + self.part = part + self.videoCodec = videoCodec + self.videoFrameRate = videoFrameRate + self.videoProfile = videoProfile + self.videoResolution = videoResolution + self.width = width + } + }} + +extension Operations.GetMediaMetaDataMedia: Codable { + enum CodingKeys: String, CodingKey { + case aspectRatio + case audioChannels + case audioCodec + case bitrate + case container + case duration + case hasVoiceActivity + case height + case id + case part = "Part" + case videoCodec + case videoFrameRate + case videoProfile + case videoResolution + case width + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self._aspectRatio = try container.decode(DecimalSerialized.self, forKey: .aspectRatio) + self.audioChannels = try container.decode(Int.self, forKey: .audioChannels) + self.audioCodec = try container.decode(String.self, forKey: .audioCodec) + self.bitrate = try container.decode(Int.self, forKey: .bitrate) + self.container = try container.decode(String.self, forKey: .container) + self.duration = try container.decode(Int.self, forKey: .duration) + self.hasVoiceActivity = try container.decode(Bool.self, forKey: .hasVoiceActivity) + self.height = try container.decode(Int.self, forKey: .height) + self.id = try container.decode(Int.self, forKey: .id) + self.part = try container.decode([Operations.GetMediaMetaDataPart].self, forKey: .part) + self.videoCodec = try container.decode(String.self, forKey: .videoCodec) + self.videoFrameRate = try container.decode(String.self, forKey: .videoFrameRate) + self.videoProfile = try container.decode(String.self, forKey: .videoProfile) + self.videoResolution = try container.decode(String.self, forKey: .videoResolution) + self.width = try container.decode(Int.self, forKey: .width) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self._aspectRatio, forKey: .aspectRatio) + try container.encode(self.audioChannels, forKey: .audioChannels) + try container.encode(self.audioCodec, forKey: .audioCodec) + try container.encode(self.bitrate, forKey: .bitrate) + try container.encode(self.container, forKey: .container) + try container.encode(self.duration, forKey: .duration) + try container.encode(self.hasVoiceActivity, forKey: .hasVoiceActivity) + try container.encode(self.height, forKey: .height) + try container.encode(self.id, forKey: .id) + try container.encode(self.part, forKey: .part) + try container.encode(self.videoCodec, forKey: .videoCodec) + try container.encode(self.videoFrameRate, forKey: .videoFrameRate) + try container.encode(self.videoProfile, forKey: .videoProfile) + try container.encode(self.videoResolution, forKey: .videoResolution) + try container.encode(self.width, forKey: .width) + } +} + +extension Operations.GetMediaMetaDataMedia { + var aspectRatioWrapper: DecimalSerialized { + return _aspectRatio + } +} diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataMediaContainer.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataMediaContainer.swift new file mode 100644 index 0000000..771c351 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataMediaContainer.swift @@ -0,0 +1,95 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataMediaContainer { + /// Indicates whether syncing is allowed. + public let allowSync: Bool + /// An plugin identifier for the media container. + public let identifier: String + /// The unique identifier for the library section. + public let librarySectionID: Int + /// The title of the library section. + public let librarySectionTitle: String + /// The prefix used for media tag resource paths. + public let mediaTagPrefix: String + /// The version number for media tags. + public let mediaTagVersion: Int + /// An array of metadata items. + public let metadata: [Operations.GetMediaMetaDataMetadata] + @DecimalSerialized + public private(set) var size: Double + /// The universally unique identifier for the library section. + public let librarySectionUUID: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter allowSync: Indicates whether syncing is allowed. + /// - Parameter identifier: An plugin identifier for the media container. + /// - Parameter librarySectionID: The unique identifier for the library section. + /// - Parameter librarySectionTitle: The title of the library section. + /// - Parameter mediaTagPrefix: The prefix used for media tag resource paths. + /// - Parameter mediaTagVersion: The version number for media tags. + /// - Parameter metadata: An array of metadata items. + /// - Parameter librarySectionUUID: The universally unique identifier for the library section. + /// + public init(allowSync: Bool, identifier: String, librarySectionID: Int, librarySectionTitle: String, mediaTagPrefix: String, mediaTagVersion: Int, metadata: [Operations.GetMediaMetaDataMetadata], size: Double, librarySectionUUID: String? = nil) { + self.allowSync = allowSync + self.identifier = identifier + self.librarySectionID = librarySectionID + self.librarySectionTitle = librarySectionTitle + self.mediaTagPrefix = mediaTagPrefix + self.mediaTagVersion = mediaTagVersion + self.metadata = metadata + self._size = DecimalSerialized(wrappedValue: size) + self.librarySectionUUID = librarySectionUUID + } + }} + +extension Operations.GetMediaMetaDataMediaContainer: Codable { + enum CodingKeys: String, CodingKey { + case allowSync + case identifier + case librarySectionID + case librarySectionTitle + case mediaTagPrefix + case mediaTagVersion + case metadata = "Metadata" + case size + case librarySectionUUID + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.allowSync = try container.decode(Bool.self, forKey: .allowSync) + self.identifier = try container.decode(String.self, forKey: .identifier) + self.librarySectionID = try container.decode(Int.self, forKey: .librarySectionID) + self.librarySectionTitle = try container.decode(String.self, forKey: .librarySectionTitle) + self.mediaTagPrefix = try container.decode(String.self, forKey: .mediaTagPrefix) + self.mediaTagVersion = try container.decode(Int.self, forKey: .mediaTagVersion) + self.metadata = try container.decode([Operations.GetMediaMetaDataMetadata].self, forKey: .metadata) + self._size = try container.decode(DecimalSerialized.self, forKey: .size) + self.librarySectionUUID = try container.decodeIfPresent(String.self, forKey: .librarySectionUUID) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.allowSync, forKey: .allowSync) + try container.encode(self.identifier, forKey: .identifier) + try container.encode(self.librarySectionID, forKey: .librarySectionID) + try container.encode(self.librarySectionTitle, forKey: .librarySectionTitle) + try container.encode(self.mediaTagPrefix, forKey: .mediaTagPrefix) + try container.encode(self.mediaTagVersion, forKey: .mediaTagVersion) + try container.encode(self.metadata, forKey: .metadata) + try container.encode(self._size, forKey: .size) + try container.encodeIfPresent(self.librarySectionUUID, forKey: .librarySectionUUID) + } +} + +extension Operations.GetMediaMetaDataMediaContainer { + var sizeWrapper: DecimalSerialized { + return _size + } +} diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataMetadata.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataMetadata.swift new file mode 100644 index 0000000..9bc8707 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataMetadata.swift @@ -0,0 +1,443 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataMetadata { + /// Unix timestamp when the item was added. + public let addedAt: Int + /// URL of the art image. + public let art: String + /// The audience rating for the content. + @DecimalSerialized + public private(set) var audienceRating: Double + /// The URL for the audience rating image. + public let audienceRatingImage: String + /// The content rating (e.g., TV-MA). + public let contentRating: String + /// Duration of the content in milliseconds. + public let duration: Int + /// The globally unique identifier for the item. + public let guid: String + /// An array of GUID objects. + public let guids: [Operations.Guids] + /// An array of image objects. + public let image: [Operations.GetMediaMetaDataImage] + /// The API key to access metadata details. + public let key: String + /// The ID of the library section. + public let librarySectionID: Int + /// The key of the library section. + public let librarySectionKey: String + /// The title of the library section. + public let librarySectionTitle: String + /// The original release date. + @DateOnly + public private(set) var originallyAvailableAt: Date + /// An array of rating objects. + public let rating: [Operations.Rating] + /// The rating key of the metadata item. + public let ratingKey: String + /// A summary of the content. + public let summary: String + /// URL of the thumbnail image. + public let thumb: String + /// The title of the content. + public let title: String + /// The type of content (e.g., show, movie). + public let type: String + public let ultraBlurColors: Operations.GetMediaMetaDataUltraBlurColors + /// Unix timestamp when the item was last updated. + public let updatedAt: Int + /// The release year. + public let year: Int + public let chapterSource: String? + /// The number of child items. + public let childCount: Int? + /// An array of country tags. + public let country: [Operations.GetMediaMetaDataCountry]? + /// An array of Director roles. + public let director: [Operations.GetMediaMetaDataDirector]? + /// An array of genre tags. + public let genre: [Operations.GetMediaMetaDataGenre]? + /// The URL of the grandparent's art image. + public let grandparentArt: String? + /// A GUID identifying the grandparent entity (e.g., show). + public let grandparentGuid: String? + /// A key identifying the grandparent metadata in the library. + public let grandparentKey: String? + /// The rating key of the grandparent of this metadata item. + public let grandparentRatingKey: String? + /// A URL-friendly identifier (slug) for the grandparent entity. + public let grandparentSlug: String? + /// The URL of the grandparent's thumbnail image. + public let grandparentThumb: String? + /// The title of the grandparent entity (typically the show's title). + public let grandparentTitle: String? + /// The index or order of the item. + public let index: Int? + /// Unix timestamp of when the item was last viewed. + public let lastViewedAt: Int? + /// The total number of episodes (or leaves). + public let leafCount: Int? + /// An array of location objects. + public let location: [Operations.GetMediaMetaDataLocation]? + public let media: [Operations.GetMediaMetaDataMedia]? + /// The original title of the content. + public let originalTitle: String? + /// A GUID identifying the parent entity (e.g., season) for the item. + public let parentGuid: String? + /// The index number of the parent entity, which could indicate its order or position. + public let parentIndex: Int? + /// A key identifying the parent metadata in the library. + public let parentKey: String? + /// The rating key of the parent of this metadata item. + public let parentRatingKey: String? + /// The URL of the parent's thumbnail image. + public let parentThumb: String? + /// The title of the parent entity (typically the season's title). + public let parentTitle: String? + public let primaryExtraKey: String? + /// An array of Writer roles. + public let producer: [Operations.Producer]? + /// An array of Actor roles. + public let role: [Operations.GetMediaMetaDataRole]? + /// An array of similar content objects. + public let similar: [Operations.Similar]? + /// The number of times the item has been skipped. + public let skipCount: Int? + /// A URL-friendly identifier for the item. + public let slug: String? + /// The studio that produced the content. + public let studio: String? + /// The tagline of the content. + public let tagline: String? + /// URL of the theme image. + public let theme: String? + /// The number of times the item has been viewed. + public let viewCount: Int? + /// The number of episodes that have been viewed. + public let viewedLeafCount: Int? + /// An array of Writer roles. + public let writer: [Operations.GetMediaMetaDataWriter]? + + /// Creates an object with the specified parameters + /// + /// - Parameter addedAt: Unix timestamp when the item was added. + /// - Parameter art: URL of the art image. + /// - Parameter audienceRating: The audience rating for the content. + /// - Parameter audienceRatingImage: The URL for the audience rating image. + /// - Parameter contentRating: The content rating (e.g., TV-MA). + /// - Parameter duration: Duration of the content in milliseconds. + /// - Parameter guid: The globally unique identifier for the item. + /// - Parameter guids: An array of GUID objects. + /// - Parameter image: An array of image objects. + /// - Parameter key: The API key to access metadata details. + /// - Parameter librarySectionID: The ID of the library section. + /// - Parameter librarySectionKey: The key of the library section. + /// - Parameter librarySectionTitle: The title of the library section. + /// - Parameter originallyAvailableAt: The original release date. + /// - Parameter rating: An array of rating objects. + /// - Parameter ratingKey: The rating key of the metadata item. + /// - Parameter summary: A summary of the content. + /// - Parameter thumb: URL of the thumbnail image. + /// - Parameter title: The title of the content. + /// - Parameter type: The type of content (e.g., show, movie). + /// - Parameter updatedAt: Unix timestamp when the item was last updated. + /// - Parameter year: The release year. + /// - Parameter childCount: The number of child items. + /// - Parameter country: An array of country tags. + /// - Parameter director: An array of Director roles. + /// - Parameter genre: An array of genre tags. + /// - Parameter grandparentArt: The URL of the grandparent's art image. + /// - Parameter grandparentGuid: A GUID identifying the grandparent entity (e.g., show). + /// - Parameter grandparentKey: A key identifying the grandparent metadata in the library. + /// - Parameter grandparentRatingKey: The rating key of the grandparent of this metadata item. + /// - Parameter grandparentSlug: A URL-friendly identifier (slug) for the grandparent entity. + /// - Parameter grandparentThumb: The URL of the grandparent's thumbnail image. + /// - Parameter grandparentTitle: The title of the grandparent entity (typically the show's title). + /// - Parameter index: The index or order of the item. + /// - Parameter lastViewedAt: Unix timestamp of when the item was last viewed. + /// - Parameter leafCount: The total number of episodes (or leaves). + /// - Parameter location: An array of location objects. + /// - Parameter originalTitle: The original title of the content. + /// - Parameter parentGuid: A GUID identifying the parent entity (e.g., season) for the item. + /// - Parameter parentIndex: The index number of the parent entity, which could indicate its order or position. + /// - Parameter parentKey: A key identifying the parent metadata in the library. + /// - Parameter parentRatingKey: The rating key of the parent of this metadata item. + /// - Parameter parentThumb: The URL of the parent's thumbnail image. + /// - Parameter parentTitle: The title of the parent entity (typically the season's title). + /// - Parameter producer: An array of Writer roles. + /// - Parameter role: An array of Actor roles. + /// - Parameter similar: An array of similar content objects. + /// - Parameter skipCount: The number of times the item has been skipped. + /// - Parameter slug: A URL-friendly identifier for the item. + /// - Parameter studio: The studio that produced the content. + /// - Parameter tagline: The tagline of the content. + /// - Parameter theme: URL of the theme image. + /// - Parameter viewCount: The number of times the item has been viewed. + /// - Parameter viewedLeafCount: The number of episodes that have been viewed. + /// - Parameter writer: An array of Writer roles. + /// + public init(addedAt: Int, art: String, audienceRating: Double, audienceRatingImage: String, contentRating: String, duration: Int, guid: String, guids: [Operations.Guids], image: [Operations.GetMediaMetaDataImage], key: String, librarySectionID: Int, librarySectionKey: String, librarySectionTitle: String, originallyAvailableAt: Date, rating: [Operations.Rating], ratingKey: String, summary: String, thumb: String, title: String, type: String, ultraBlurColors: Operations.GetMediaMetaDataUltraBlurColors, updatedAt: Int, year: Int, chapterSource: String? = nil, childCount: Int? = nil, country: [Operations.GetMediaMetaDataCountry]? = nil, director: [Operations.GetMediaMetaDataDirector]? = nil, genre: [Operations.GetMediaMetaDataGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, location: [Operations.GetMediaMetaDataLocation]? = nil, media: [Operations.GetMediaMetaDataMedia]? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, primaryExtraKey: String? = nil, producer: [Operations.Producer]? = nil, role: [Operations.GetMediaMetaDataRole]? = nil, similar: [Operations.Similar]? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, writer: [Operations.GetMediaMetaDataWriter]? = nil) { + self.addedAt = addedAt + self.art = art + self._audienceRating = DecimalSerialized(wrappedValue: audienceRating) + self.audienceRatingImage = audienceRatingImage + self.contentRating = contentRating + self.duration = duration + self.guid = guid + self.guids = guids + self.image = image + self.key = key + self.librarySectionID = librarySectionID + self.librarySectionKey = librarySectionKey + self.librarySectionTitle = librarySectionTitle + self._originallyAvailableAt = DateOnly(wrappedValue: originallyAvailableAt) + self.rating = rating + self.ratingKey = ratingKey + self.summary = summary + self.thumb = thumb + self.title = title + self.type = type + self.ultraBlurColors = ultraBlurColors + self.updatedAt = updatedAt + self.year = year + self.chapterSource = chapterSource + self.childCount = childCount + self.country = country + self.director = director + self.genre = genre + self.grandparentArt = grandparentArt + self.grandparentGuid = grandparentGuid + self.grandparentKey = grandparentKey + self.grandparentRatingKey = grandparentRatingKey + self.grandparentSlug = grandparentSlug + self.grandparentThumb = grandparentThumb + self.grandparentTitle = grandparentTitle + self.index = index + self.lastViewedAt = lastViewedAt + self.leafCount = leafCount + self.location = location + self.media = media + self.originalTitle = originalTitle + self.parentGuid = parentGuid + self.parentIndex = parentIndex + self.parentKey = parentKey + self.parentRatingKey = parentRatingKey + self.parentThumb = parentThumb + self.parentTitle = parentTitle + self.primaryExtraKey = primaryExtraKey + self.producer = producer + self.role = role + self.similar = similar + self.skipCount = skipCount + self.slug = slug + self.studio = studio + self.tagline = tagline + self.theme = theme + self.viewCount = viewCount + self.viewedLeafCount = viewedLeafCount + self.writer = writer + } + }} + +extension Operations.GetMediaMetaDataMetadata: Codable { + enum CodingKeys: String, CodingKey { + case addedAt + case art + case audienceRating + case audienceRatingImage + case contentRating + case duration + case guid + case guids = "Guid" + case image = "Image" + case key + case librarySectionID + case librarySectionKey + case librarySectionTitle + case originallyAvailableAt + case rating = "Rating" + case ratingKey + case summary + case thumb + case title + case type + case ultraBlurColors = "UltraBlurColors" + case updatedAt + case year + case chapterSource + case childCount + case country = "Country" + case director = "Director" + case genre = "Genre" + case grandparentArt + case grandparentGuid + case grandparentKey + case grandparentRatingKey + case grandparentSlug + case grandparentThumb + case grandparentTitle + case index + case lastViewedAt + case leafCount + case location = "Location" + case media = "Media" + case originalTitle + case parentGuid + case parentIndex + case parentKey + case parentRatingKey + case parentThumb + case parentTitle + case primaryExtraKey + case producer = "Producer" + case role = "Role" + case similar = "Similar" + case skipCount + case slug + case studio + case tagline + case theme + case viewCount + case viewedLeafCount + case writer = "Writer" + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.addedAt = try container.decode(Int.self, forKey: .addedAt) + self.art = try container.decode(String.self, forKey: .art) + self._audienceRating = try container.decode(DecimalSerialized.self, forKey: .audienceRating) + self.audienceRatingImage = try container.decode(String.self, forKey: .audienceRatingImage) + self.contentRating = try container.decode(String.self, forKey: .contentRating) + self.duration = try container.decode(Int.self, forKey: .duration) + self.guid = try container.decode(String.self, forKey: .guid) + self.guids = try container.decode([Operations.Guids].self, forKey: .guids) + self.image = try container.decode([Operations.GetMediaMetaDataImage].self, forKey: .image) + self.key = try container.decode(String.self, forKey: .key) + self.librarySectionID = try container.decode(Int.self, forKey: .librarySectionID) + self.librarySectionKey = try container.decode(String.self, forKey: .librarySectionKey) + self.librarySectionTitle = try container.decode(String.self, forKey: .librarySectionTitle) + self._originallyAvailableAt = try container.decode(DateOnly.self, forKey: .originallyAvailableAt) + self.rating = try container.decode([Operations.Rating].self, forKey: .rating) + self.ratingKey = try container.decode(String.self, forKey: .ratingKey) + self.summary = try container.decode(String.self, forKey: .summary) + self.thumb = try container.decode(String.self, forKey: .thumb) + self.title = try container.decode(String.self, forKey: .title) + self.type = try container.decode(String.self, forKey: .type) + self.ultraBlurColors = try container.decode(Operations.GetMediaMetaDataUltraBlurColors.self, forKey: .ultraBlurColors) + self.updatedAt = try container.decode(Int.self, forKey: .updatedAt) + self.year = try container.decode(Int.self, forKey: .year) + self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource) + self.childCount = try container.decodeIfPresent(Int.self, forKey: .childCount) + self.country = try container.decodeIfPresent([Operations.GetMediaMetaDataCountry].self, forKey: .country) + self.director = try container.decodeIfPresent([Operations.GetMediaMetaDataDirector].self, forKey: .director) + self.genre = try container.decodeIfPresent([Operations.GetMediaMetaDataGenre].self, forKey: .genre) + self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt) + self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid) + self.grandparentKey = try container.decodeIfPresent(String.self, forKey: .grandparentKey) + self.grandparentRatingKey = try container.decodeIfPresent(String.self, forKey: .grandparentRatingKey) + self.grandparentSlug = try container.decodeIfPresent(String.self, forKey: .grandparentSlug) + self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb) + self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle) + self.index = try container.decodeIfPresent(Int.self, forKey: .index) + self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt) + self.leafCount = try container.decodeIfPresent(Int.self, forKey: .leafCount) + self.location = try container.decodeIfPresent([Operations.GetMediaMetaDataLocation].self, forKey: .location) + self.media = try container.decodeIfPresent([Operations.GetMediaMetaDataMedia].self, forKey: .media) + self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle) + self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid) + self.parentIndex = try container.decodeIfPresent(Int.self, forKey: .parentIndex) + self.parentKey = try container.decodeIfPresent(String.self, forKey: .parentKey) + self.parentRatingKey = try container.decodeIfPresent(String.self, forKey: .parentRatingKey) + self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb) + self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle) + self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey) + self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer) + self.role = try container.decodeIfPresent([Operations.GetMediaMetaDataRole].self, forKey: .role) + self.similar = try container.decodeIfPresent([Operations.Similar].self, forKey: .similar) + self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount) + self.slug = try container.decodeIfPresent(String.self, forKey: .slug) + self.studio = try container.decodeIfPresent(String.self, forKey: .studio) + self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline) + self.theme = try container.decodeIfPresent(String.self, forKey: .theme) + self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount) + self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount) + self.writer = try container.decodeIfPresent([Operations.GetMediaMetaDataWriter].self, forKey: .writer) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.addedAt, forKey: .addedAt) + try container.encode(self.art, forKey: .art) + try container.encode(self._audienceRating, forKey: .audienceRating) + try container.encode(self.audienceRatingImage, forKey: .audienceRatingImage) + try container.encode(self.contentRating, forKey: .contentRating) + try container.encode(self.duration, forKey: .duration) + try container.encode(self.guid, forKey: .guid) + try container.encode(self.guids, forKey: .guids) + try container.encode(self.image, forKey: .image) + try container.encode(self.key, forKey: .key) + try container.encode(self.librarySectionID, forKey: .librarySectionID) + try container.encode(self.librarySectionKey, forKey: .librarySectionKey) + try container.encode(self.librarySectionTitle, forKey: .librarySectionTitle) + try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt) + try container.encode(self.rating, forKey: .rating) + try container.encode(self.ratingKey, forKey: .ratingKey) + try container.encode(self.summary, forKey: .summary) + try container.encode(self.thumb, forKey: .thumb) + try container.encode(self.title, forKey: .title) + try container.encode(self.type, forKey: .type) + try container.encode(self.ultraBlurColors, forKey: .ultraBlurColors) + try container.encode(self.updatedAt, forKey: .updatedAt) + try container.encode(self.year, forKey: .year) + try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource) + try container.encodeIfPresent(self.childCount, forKey: .childCount) + try container.encodeIfPresent(self.country, forKey: .country) + try container.encodeIfPresent(self.director, forKey: .director) + try container.encodeIfPresent(self.genre, forKey: .genre) + try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt) + try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid) + try container.encodeIfPresent(self.grandparentKey, forKey: .grandparentKey) + try container.encodeIfPresent(self.grandparentRatingKey, forKey: .grandparentRatingKey) + try container.encodeIfPresent(self.grandparentSlug, forKey: .grandparentSlug) + try container.encodeIfPresent(self.grandparentThumb, forKey: .grandparentThumb) + try container.encodeIfPresent(self.grandparentTitle, forKey: .grandparentTitle) + try container.encodeIfPresent(self.index, forKey: .index) + try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt) + try container.encodeIfPresent(self.leafCount, forKey: .leafCount) + try container.encodeIfPresent(self.location, forKey: .location) + try container.encodeIfPresent(self.media, forKey: .media) + try container.encodeIfPresent(self.originalTitle, forKey: .originalTitle) + try container.encodeIfPresent(self.parentGuid, forKey: .parentGuid) + try container.encodeIfPresent(self.parentIndex, forKey: .parentIndex) + try container.encodeIfPresent(self.parentKey, forKey: .parentKey) + try container.encodeIfPresent(self.parentRatingKey, forKey: .parentRatingKey) + try container.encodeIfPresent(self.parentThumb, forKey: .parentThumb) + try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle) + try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey) + try container.encodeIfPresent(self.producer, forKey: .producer) + try container.encodeIfPresent(self.role, forKey: .role) + try container.encodeIfPresent(self.similar, forKey: .similar) + try container.encodeIfPresent(self.skipCount, forKey: .skipCount) + try container.encodeIfPresent(self.slug, forKey: .slug) + try container.encodeIfPresent(self.studio, forKey: .studio) + try container.encodeIfPresent(self.tagline, forKey: .tagline) + try container.encodeIfPresent(self.theme, forKey: .theme) + try container.encodeIfPresent(self.viewCount, forKey: .viewCount) + try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount) + try container.encodeIfPresent(self.writer, forKey: .writer) + } +} + +extension Operations.GetMediaMetaDataMetadata { + var audienceRatingWrapper: DecimalSerialized { + return _audienceRating + } + var originallyAvailableAtWrapper: DateOnly { + return _originallyAvailableAt + } +} diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataPart.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataPart.swift new file mode 100644 index 0000000..91e9638 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataPart.swift @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataPart { + /// Container format of the part. + public let container: String + /// Duration of the part in milliseconds. + public let duration: Int + /// File path for the part. + public let file: String + /// Unique part identifier. + public let id: Int + /// Key to access this part. + public let key: String + /// File size in bytes. + public let size: Int + /// An array of streams for this part. + public let stream: [Operations.GetMediaMetaDataStream] + /// Video profile for the part. + public let videoProfile: String + /// Indicates if the part is accessible. + public let accessible: Bool? + /// Indicates if the part exists. + public let exists: Bool? + public let indexes: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter container: Container format of the part. + /// - Parameter duration: Duration of the part in milliseconds. + /// - Parameter file: File path for the part. + /// - Parameter id: Unique part identifier. + /// - Parameter key: Key to access this part. + /// - Parameter size: File size in bytes. + /// - Parameter stream: An array of streams for this part. + /// - Parameter videoProfile: Video profile for the part. + /// - Parameter accessible: Indicates if the part is accessible. + /// - Parameter exists: Indicates if the part exists. + /// + public init(container: String, duration: Int, file: String, id: Int, key: String, size: Int, stream: [Operations.GetMediaMetaDataStream], videoProfile: String, accessible: Bool? = nil, exists: Bool? = nil, indexes: String? = nil) { + self.container = container + self.duration = duration + self.file = file + self.id = id + self.key = key + self.size = size + self.stream = stream + self.videoProfile = videoProfile + self.accessible = accessible + self.exists = exists + self.indexes = indexes + } + }} + +extension Operations.GetMediaMetaDataPart: Codable { + enum CodingKeys: String, CodingKey { + case container + case duration + case file + case id + case key + case size + case stream = "Stream" + case videoProfile + case accessible + case exists + case indexes + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataRequest.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataRequest.swift new file mode 100644 index 0000000..e4eb565 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataRequest.swift @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataRequest: APIValue { + /// the id of the library item to return the children of. + public let ratingKey: Int + /// Trigger asynchronous metadata augmentation. + public let asyncAugmentMetadata: Bool? + /// Trigger asynchronous file checking. + public let asyncCheckFiles: Bool? + /// Trigger asynchronous refresh of analysis. + public let asyncRefreshAnalysis: Bool? + /// Trigger asynchronous refresh of the local media agent. + public let asyncRefreshLocalMediaAgent: Bool? + /// Include chapter details. + public let includeChapters: Bool? + /// Include concerts data if set to true. + public let includeConcerts: Bool? + /// Include external media data. + public let includeExternalMedia: Bool? + /// Include extra content (e.g. bonus features). + public let includeExtras: Bool? + /// Include on-deck items. + public let includeOnDeck: Bool? + /// Include popular leaves (episodes/chapters). + public let includePopularLeaves: Bool? + /// Include preferences information. + public let includePreferences: Bool? + /// Include reviews for the content. + public let includeReviews: Bool? + /// Include station data. + public let includeStations: Bool? + + /// Creates an object with the specified parameters + /// + /// - Parameter ratingKey: the id of the library item to return the children of. + /// - Parameter asyncAugmentMetadata: Trigger asynchronous metadata augmentation. + /// - Parameter asyncCheckFiles: Trigger asynchronous file checking. + /// - Parameter asyncRefreshAnalysis: Trigger asynchronous refresh of analysis. + /// - Parameter asyncRefreshLocalMediaAgent: Trigger asynchronous refresh of the local media agent. + /// - Parameter includeChapters: Include chapter details. + /// - Parameter includeConcerts: Include concerts data if set to true. + /// - Parameter includeExternalMedia: Include external media data. + /// - Parameter includeExtras: Include extra content (e.g. bonus features). + /// - Parameter includeOnDeck: Include on-deck items. + /// - Parameter includePopularLeaves: Include popular leaves (episodes/chapters). + /// - Parameter includePreferences: Include preferences information. + /// - Parameter includeReviews: Include reviews for the content. + /// - Parameter includeStations: Include station data. + /// + public init(ratingKey: Int, asyncAugmentMetadata: Bool? = nil, asyncCheckFiles: Bool? = nil, asyncRefreshAnalysis: Bool? = nil, asyncRefreshLocalMediaAgent: Bool? = nil, includeChapters: Bool? = nil, includeConcerts: Bool? = nil, includeExternalMedia: Bool? = nil, includeExtras: Bool? = nil, includeOnDeck: Bool? = nil, includePopularLeaves: Bool? = nil, includePreferences: Bool? = nil, includeReviews: Bool? = nil, includeStations: Bool? = nil) { + self.ratingKey = ratingKey + self.asyncAugmentMetadata = asyncAugmentMetadata + self.asyncCheckFiles = asyncCheckFiles + self.asyncRefreshAnalysis = asyncRefreshAnalysis + self.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent + self.includeChapters = includeChapters + self.includeConcerts = includeConcerts + self.includeExternalMedia = includeExternalMedia + self.includeExtras = includeExtras + self.includeOnDeck = includeOnDeck + self.includePopularLeaves = includePopularLeaves + self.includePreferences = includePreferences + self.includeReviews = includeReviews + self.includeStations = includeStations + } + }} diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataResponse.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataResponse.swift new file mode 100644 index 0000000..f28d535 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetMediaMetaDataResponse { + case empty + case badRequest(Operations.GetMediaMetaDataBadRequest) + case object(Operations.GetMediaMetaDataResponseBody) + case unauthorized(Operations.GetMediaMetaDataUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetMediaMetaDataBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetMediaMetaDataResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetMediaMetaDataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataResponseBody.swift similarity index 57% rename from Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift rename to Sources/Plexswift/models/operations/GetMediaMetaDataResponseBody.swift index b51ec28..e74d113 100644 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataResponseBody.swift @@ -4,18 +4,18 @@ import Foundation extension Operations { /// The metadata of the library item. - public struct GetMetaDataByRatingKeyResponseBody { - public let mediaContainer: Operations.GetMetaDataByRatingKeyMediaContainer? + public struct GetMediaMetaDataResponseBody { + public let mediaContainer: Operations.GetMediaMetaDataMediaContainer? /// Creates an object with the specified parameters /// /// - public init(mediaContainer: Operations.GetMetaDataByRatingKeyMediaContainer? = nil) { + public init(mediaContainer: Operations.GetMediaMetaDataMediaContainer? = nil) { self.mediaContainer = mediaContainer } }} -extension Operations.GetMetaDataByRatingKeyResponseBody: Codable { +extension Operations.GetMediaMetaDataResponseBody: Codable { enum CodingKeys: String, CodingKey { case mediaContainer = "MediaContainer" } diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataRole.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataRole.swift new file mode 100644 index 0000000..03cd324 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataRole.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataRole { + /// The filter string for the role. + public let filter: String + /// The unique role identifier. + public let id: Int + /// The actor's name. + public let tag: String + /// A key associated with the actor tag. + public let tagKey: String + /// The character name or role. + public let role: String? + /// URL for the role thumbnail image. + public let thumb: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for the role. + /// - Parameter id: The unique role identifier. + /// - Parameter tag: The actor's name. + /// - Parameter tagKey: A key associated with the actor tag. + /// - Parameter role: The character name or role. + /// - Parameter thumb: URL for the role thumbnail image. + /// + public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) { + self.filter = filter + self.id = id + self.tag = tag + self.tagKey = tagKey + self.role = role + self.thumb = thumb + } + }} + +extension Operations.GetMediaMetaDataRole: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + case tagKey + case role + case thumb + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataStream.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataStream.swift new file mode 100644 index 0000000..aa51a72 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataStream.swift @@ -0,0 +1,352 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataStream { + /// Bitrate of the stream. + public let bitrate: Int + /// Codec used by the stream. + public let codec: String + /// Display title for the stream. + public let displayTitle: String + /// Extended display title for the stream. + public let extendedDisplayTitle: String + /// Unique stream identifier. + public let id: Int + /// Index of the stream. + public let index: Int + /// Language of the stream. + public let language: String + /// ISO language code. + public let languageCode: String + /// Language tag (e.g., en). + public let languageTag: String + /// Stream type (1=video, 2=audio, 3=subtitle). + public let streamType: Int + /// Audio channel layout. + public let audioChannelLayout: String? + /// Bit depth of the video stream. + public let bitDepth: Int? + /// Indicates if the stream can auto-sync. + public let canAutoSync: Bool? + /// Number of audio channels (for audio streams). + public let channels: Int? + /// Chroma sample location. + public let chromaLocation: String? + /// Chroma subsampling format. + public let chromaSubsampling: String? + /// Coded video height. + public let codedHeight: Int? + /// Coded video width. + public let codedWidth: Int? + /// Color primaries used. + public let colorPrimaries: String? + /// Color range (e.g., tv). + public let colorRange: String? + /// Color space. + public let colorSpace: String? + /// Color transfer characteristics. + public let colorTrc: String? + /// Indicates if this stream is default. + public let `default`: Bool? + /// Dolby Vision BL compatibility ID. + public let doviblCompatID: Int? + /// Indicates if Dolby Vision BL is present. + public let doviblPresent: Bool? + /// Indicates if Dolby Vision EL is present. + public let dovielPresent: Bool? + /// Dolby Vision level. + public let doviLevel: Int? + /// Indicates if Dolby Vision is present. + public let doviPresent: Bool? + /// Dolby Vision profile. + public let doviProfile: Int? + /// Indicates if Dolby Vision RPU is present. + public let dovirpuPresent: Bool? + /// Dolby Vision version. + public let doviVersion: String? + /// Indicates if the stream is a dub. + public let dub: Bool? + public let forced: Bool? + /// Frame rate of the stream. + @DecimalSerialized + public private(set) var frameRate: Double? + public let hasScalingMatrix: Bool? + /// Indicates if the stream is for the hearing impaired. + public let hearingImpaired: Bool? + /// Height of the video stream. + public let height: Int? + /// Video level. + public let level: Int? + /// Indicates if this is the original stream. + public let original: Bool? + /// Video profile. + public let profile: String? + /// Number of reference frames. + public let refFrames: Int? + /// Sampling rate for the audio stream. + public let samplingRate: Int? + public let scanType: String? + /// Indicates if this stream is selected (applicable for audio streams). + public let selected: Bool? + /// Optional title for the stream (e.g., language variant). + public let title: String? + /// Width of the video stream. + public let width: Int? + + /// Creates an object with the specified parameters + /// + /// - Parameter bitrate: Bitrate of the stream. + /// - Parameter codec: Codec used by the stream. + /// - Parameter displayTitle: Display title for the stream. + /// - Parameter extendedDisplayTitle: Extended display title for the stream. + /// - Parameter id: Unique stream identifier. + /// - Parameter index: Index of the stream. + /// - Parameter language: Language of the stream. + /// - Parameter languageCode: ISO language code. + /// - Parameter languageTag: Language tag (e.g., en). + /// - Parameter streamType: Stream type (1=video, 2=audio, 3=subtitle). + /// - Parameter audioChannelLayout: Audio channel layout. + /// - Parameter bitDepth: Bit depth of the video stream. + /// - Parameter canAutoSync: Indicates if the stream can auto-sync. + /// - Parameter channels: Number of audio channels (for audio streams). + /// - Parameter chromaLocation: Chroma sample location. + /// - Parameter chromaSubsampling: Chroma subsampling format. + /// - Parameter codedHeight: Coded video height. + /// - Parameter codedWidth: Coded video width. + /// - Parameter colorPrimaries: Color primaries used. + /// - Parameter colorRange: Color range (e.g., tv). + /// - Parameter colorSpace: Color space. + /// - Parameter colorTrc: Color transfer characteristics. + /// - Parameter `default`: Indicates if this stream is default. + /// - Parameter doviblCompatID: Dolby Vision BL compatibility ID. + /// - Parameter doviblPresent: Indicates if Dolby Vision BL is present. + /// - Parameter dovielPresent: Indicates if Dolby Vision EL is present. + /// - Parameter doviLevel: Dolby Vision level. + /// - Parameter doviPresent: Indicates if Dolby Vision is present. + /// - Parameter doviProfile: Dolby Vision profile. + /// - Parameter dovirpuPresent: Indicates if Dolby Vision RPU is present. + /// - Parameter doviVersion: Dolby Vision version. + /// - Parameter dub: Indicates if the stream is a dub. + /// - Parameter frameRate: Frame rate of the stream. + /// - Parameter hearingImpaired: Indicates if the stream is for the hearing impaired. + /// - Parameter height: Height of the video stream. + /// - Parameter level: Video level. + /// - Parameter original: Indicates if this is the original stream. + /// - Parameter profile: Video profile. + /// - Parameter refFrames: Number of reference frames. + /// - Parameter samplingRate: Sampling rate for the audio stream. + /// - Parameter selected: Indicates if this stream is selected (applicable for audio streams). + /// - Parameter title: Optional title for the stream (e.g., language variant). + /// - Parameter width: Width of the video stream. + /// + public init(bitrate: Int, codec: String, displayTitle: String, extendedDisplayTitle: String, id: Int, index: Int, language: String, languageCode: String, languageTag: String, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, doviblCompatID: Int? = nil, doviblPresent: Bool? = nil, dovielPresent: Bool? = nil, doviLevel: Int? = nil, doviPresent: Bool? = nil, doviProfile: Int? = nil, dovirpuPresent: Bool? = nil, doviVersion: String? = nil, dub: Bool? = nil, forced: Bool? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, level: Int? = nil, original: Bool? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, title: String? = nil, width: Int? = nil) { + self.bitrate = bitrate + self.codec = codec + self.displayTitle = displayTitle + self.extendedDisplayTitle = extendedDisplayTitle + self.id = id + self.index = index + self.language = language + self.languageCode = languageCode + self.languageTag = languageTag + self.streamType = streamType + self.audioChannelLayout = audioChannelLayout + self.bitDepth = bitDepth + self.canAutoSync = canAutoSync + self.channels = channels + self.chromaLocation = chromaLocation + self.chromaSubsampling = chromaSubsampling + self.codedHeight = codedHeight + self.codedWidth = codedWidth + self.colorPrimaries = colorPrimaries + self.colorRange = colorRange + self.colorSpace = colorSpace + self.colorTrc = colorTrc + self.`default` = `default` + self.doviblCompatID = doviblCompatID + self.doviblPresent = doviblPresent + self.dovielPresent = dovielPresent + self.doviLevel = doviLevel + self.doviPresent = doviPresent + self.doviProfile = doviProfile + self.dovirpuPresent = dovirpuPresent + self.doviVersion = doviVersion + self.dub = dub + self.forced = forced + self._frameRate = DecimalSerialized(wrappedValue: frameRate) + self.hasScalingMatrix = hasScalingMatrix + self.hearingImpaired = hearingImpaired + self.height = height + self.level = level + self.original = original + self.profile = profile + self.refFrames = refFrames + self.samplingRate = samplingRate + self.scanType = scanType + self.selected = selected + self.title = title + self.width = width + } + }} + +extension Operations.GetMediaMetaDataStream: Codable { + enum CodingKeys: String, CodingKey { + case bitrate + case codec + case displayTitle + case extendedDisplayTitle + case id + case index + case language + case languageCode + case languageTag + case streamType + case audioChannelLayout + case bitDepth + case canAutoSync + case channels + case chromaLocation + case chromaSubsampling + case codedHeight + case codedWidth + case colorPrimaries + case colorRange + case colorSpace + case colorTrc + case `default` = "default" + case doviblCompatID = "DOVIBLCompatID" + case doviblPresent = "DOVIBLPresent" + case dovielPresent = "DOVIELPresent" + case doviLevel = "DOVILevel" + case doviPresent = "DOVIPresent" + case doviProfile = "DOVIProfile" + case dovirpuPresent = "DOVIRPUPresent" + case doviVersion = "DOVIVersion" + case dub + case forced + case frameRate + case hasScalingMatrix + case hearingImpaired + case height + case level + case original + case profile + case refFrames + case samplingRate + case scanType + case selected + case title + case width + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.bitrate = try container.decode(Int.self, forKey: .bitrate) + self.codec = try container.decode(String.self, forKey: .codec) + self.displayTitle = try container.decode(String.self, forKey: .displayTitle) + self.extendedDisplayTitle = try container.decode(String.self, forKey: .extendedDisplayTitle) + self.id = try container.decode(Int.self, forKey: .id) + self.index = try container.decode(Int.self, forKey: .index) + self.language = try container.decode(String.self, forKey: .language) + self.languageCode = try container.decode(String.self, forKey: .languageCode) + self.languageTag = try container.decode(String.self, forKey: .languageTag) + self.streamType = try container.decode(Int.self, forKey: .streamType) + self.audioChannelLayout = try container.decodeIfPresent(String.self, forKey: .audioChannelLayout) + self.bitDepth = try container.decodeIfPresent(Int.self, forKey: .bitDepth) + self.canAutoSync = try container.decodeIfPresent(Bool.self, forKey: .canAutoSync) + self.channels = try container.decodeIfPresent(Int.self, forKey: .channels) + self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation) + self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling) + self.codedHeight = try container.decodeIfPresent(Int.self, forKey: .codedHeight) + self.codedWidth = try container.decodeIfPresent(Int.self, forKey: .codedWidth) + self.colorPrimaries = try container.decodeIfPresent(String.self, forKey: .colorPrimaries) + self.colorRange = try container.decodeIfPresent(String.self, forKey: .colorRange) + self.colorSpace = try container.decodeIfPresent(String.self, forKey: .colorSpace) + self.colorTrc = try container.decodeIfPresent(String.self, forKey: .colorTrc) + self.`default` = try container.decodeIfPresent(Bool.self, forKey: .`default`) + self.doviblCompatID = try container.decodeIfPresent(Int.self, forKey: .doviblCompatID) + self.doviblPresent = try container.decodeIfPresent(Bool.self, forKey: .doviblPresent) + self.dovielPresent = try container.decodeIfPresent(Bool.self, forKey: .dovielPresent) + self.doviLevel = try container.decodeIfPresent(Int.self, forKey: .doviLevel) + self.doviPresent = try container.decodeIfPresent(Bool.self, forKey: .doviPresent) + self.doviProfile = try container.decodeIfPresent(Int.self, forKey: .doviProfile) + self.dovirpuPresent = try container.decodeIfPresent(Bool.self, forKey: .dovirpuPresent) + self.doviVersion = try container.decodeIfPresent(String.self, forKey: .doviVersion) + self.dub = try container.decodeIfPresent(Bool.self, forKey: .dub) + self.forced = try container.decodeIfPresent(Bool.self, forKey: .forced) + self._frameRate = try container.decodeIfPresent(DecimalSerialized.self, forKey: .frameRate) ?? DecimalSerialized(wrappedValue: nil) + self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix) + self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired) + self.height = try container.decodeIfPresent(Int.self, forKey: .height) + self.level = try container.decodeIfPresent(Int.self, forKey: .level) + self.original = try container.decodeIfPresent(Bool.self, forKey: .original) + self.profile = try container.decodeIfPresent(String.self, forKey: .profile) + self.refFrames = try container.decodeIfPresent(Int.self, forKey: .refFrames) + self.samplingRate = try container.decodeIfPresent(Int.self, forKey: .samplingRate) + self.scanType = try container.decodeIfPresent(String.self, forKey: .scanType) + self.selected = try container.decodeIfPresent(Bool.self, forKey: .selected) + self.title = try container.decodeIfPresent(String.self, forKey: .title) + self.width = try container.decodeIfPresent(Int.self, forKey: .width) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.bitrate, forKey: .bitrate) + try container.encode(self.codec, forKey: .codec) + try container.encode(self.displayTitle, forKey: .displayTitle) + try container.encode(self.extendedDisplayTitle, forKey: .extendedDisplayTitle) + try container.encode(self.id, forKey: .id) + try container.encode(self.index, forKey: .index) + try container.encode(self.language, forKey: .language) + try container.encode(self.languageCode, forKey: .languageCode) + try container.encode(self.languageTag, forKey: .languageTag) + try container.encode(self.streamType, forKey: .streamType) + try container.encodeIfPresent(self.audioChannelLayout, forKey: .audioChannelLayout) + try container.encodeIfPresent(self.bitDepth, forKey: .bitDepth) + try container.encodeIfPresent(self.canAutoSync, forKey: .canAutoSync) + try container.encodeIfPresent(self.channels, forKey: .channels) + try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation) + try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling) + try container.encodeIfPresent(self.codedHeight, forKey: .codedHeight) + try container.encodeIfPresent(self.codedWidth, forKey: .codedWidth) + try container.encodeIfPresent(self.colorPrimaries, forKey: .colorPrimaries) + try container.encodeIfPresent(self.colorRange, forKey: .colorRange) + try container.encodeIfPresent(self.colorSpace, forKey: .colorSpace) + try container.encodeIfPresent(self.colorTrc, forKey: .colorTrc) + try container.encodeIfPresent(self.`default`, forKey: .`default`) + try container.encodeIfPresent(self.doviblCompatID, forKey: .doviblCompatID) + try container.encodeIfPresent(self.doviblPresent, forKey: .doviblPresent) + try container.encodeIfPresent(self.dovielPresent, forKey: .dovielPresent) + try container.encodeIfPresent(self.doviLevel, forKey: .doviLevel) + try container.encodeIfPresent(self.doviPresent, forKey: .doviPresent) + try container.encodeIfPresent(self.doviProfile, forKey: .doviProfile) + try container.encodeIfPresent(self.dovirpuPresent, forKey: .dovirpuPresent) + try container.encodeIfPresent(self.doviVersion, forKey: .doviVersion) + try container.encodeIfPresent(self.dub, forKey: .dub) + try container.encodeIfPresent(self.forced, forKey: .forced) + if self.frameRate != nil { + try container.encode(self._frameRate, forKey: .frameRate) + } + try container.encodeIfPresent(self.hasScalingMatrix, forKey: .hasScalingMatrix) + try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired) + try container.encodeIfPresent(self.height, forKey: .height) + try container.encodeIfPresent(self.level, forKey: .level) + try container.encodeIfPresent(self.original, forKey: .original) + try container.encodeIfPresent(self.profile, forKey: .profile) + try container.encodeIfPresent(self.refFrames, forKey: .refFrames) + try container.encodeIfPresent(self.samplingRate, forKey: .samplingRate) + try container.encodeIfPresent(self.scanType, forKey: .scanType) + try container.encodeIfPresent(self.selected, forKey: .selected) + try container.encodeIfPresent(self.title, forKey: .title) + try container.encodeIfPresent(self.width, forKey: .width) + } +} + +extension Operations.GetMediaMetaDataStream { + var frameRateWrapper: DecimalSerialized { + return _frameRate + } +} diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataUltraBlurColors.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataUltraBlurColors.swift new file mode 100644 index 0000000..bab1711 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataUltraBlurColors.swift @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataUltraBlurColors { + /// The bottom-left color value. + public let bottomLeft: String + /// The bottom-right color value. + public let bottomRight: String + /// The top-left color value. + public let topLeft: String + /// The top-right color value. + public let topRight: String + + /// Creates an object with the specified parameters + /// + /// - Parameter bottomLeft: The bottom-left color value. + /// - Parameter bottomRight: The bottom-right color value. + /// - Parameter topLeft: The top-left color value. + /// - Parameter topRight: The top-right color value. + /// + public init(bottomLeft: String, bottomRight: String, topLeft: String, topRight: String) { + self.bottomLeft = bottomLeft + self.bottomRight = bottomRight + self.topLeft = topLeft + self.topRight = topRight + } + }} + +extension Operations.GetMediaMetaDataUltraBlurColors: Codable { + enum CodingKeys: String, CodingKey { + case bottomLeft + case bottomRight + case topLeft + case topRight + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataUnauthorized.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataUnauthorized.swift new file mode 100644 index 0000000..15a7e7c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetMediaMetaDataUnauthorized { + public let errors: [Operations.GetMediaMetaDataLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetMediaMetaDataLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMediaMetaDataUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaMetaDataWriter.swift b/Sources/Plexswift/models/operations/GetMediaMetaDataWriter.swift new file mode 100644 index 0000000..a155e9d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaMetaDataWriter.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaMetaDataWriter { + /// The filter string for the role. + public let filter: String + /// The unique role identifier. + public let id: Int + /// The actor's name. + public let tag: String + /// A key associated with the actor tag. + public let tagKey: String + /// The character name or role. + public let role: String? + /// URL for the role thumbnail image. + public let thumb: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for the role. + /// - Parameter id: The unique role identifier. + /// - Parameter tag: The actor's name. + /// - Parameter tagKey: A key associated with the actor tag. + /// - Parameter role: The character name or role. + /// - Parameter thumb: URL for the role thumbnail image. + /// + public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) { + self.filter = filter + self.id = id + self.tag = tag + self.tagKey = tagKey + self.role = role + self.thumb = thumb + } + }} + +extension Operations.GetMediaMetaDataWriter: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + case tagKey + case role + case thumb + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift deleted file mode 100644 index b469589..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyCountry { - public let filter: String? - public let id: Int? - public let tag: String? - - /// Creates an object with the specified parameters - /// - /// - public init(filter: String? = nil, id: Int? = nil, tag: String? = nil) { - self.filter = filter - self.id = id - self.tag = tag - } - }} - -extension Operations.GetMetaDataByRatingKeyCountry: Codable { - enum CodingKeys: String, CodingKey { - case filter - case id - case tag - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift deleted file mode 100644 index 79bc25d..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyDirector { - public let filter: String? - public let id: Int? - public let tag: String? - public let tagKey: String? - public let thumb: String? - - /// Creates an object with the specified parameters - /// - /// - public init(filter: String? = nil, id: Int? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) { - self.filter = filter - self.id = id - self.tag = tag - self.tagKey = tagKey - self.thumb = thumb - } - }} - -extension Operations.GetMetaDataByRatingKeyDirector: Codable { - enum CodingKeys: String, CodingKey { - case filter - case id - case tag - case tagKey - case thumb - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift deleted file mode 100644 index f0e49d4..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyGenre { - public let filter: String? - public let id: Int? - public let tag: String? - - /// Creates an object with the specified parameters - /// - /// - public init(filter: String? = nil, id: Int? = nil, tag: String? = nil) { - self.filter = filter - self.id = id - self.tag = tag - } - }} - -extension Operations.GetMetaDataByRatingKeyGenre: Codable { - enum CodingKeys: String, CodingKey { - case filter - case id - case tag - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift deleted file mode 100644 index 6b83077..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyMedia { - @DecimalSerialized - public private(set) var aspectRatio: Double? - public let audioChannels: Int? - public let audioCodec: String? - public let audioProfile: String? - public let bitrate: Int? - public let container: String? - public let duration: Int? - public let has64bitOffsets: Bool? - public let height: Int? - public let id: Int? - public let optimizedForStreaming: Int? - public let part: [Operations.GetMetaDataByRatingKeyPart]? - public let videoCodec: String? - public let videoFrameRate: String? - public let videoProfile: String? - public let videoResolution: String? - public let width: Int? - - /// Creates an object with the specified parameters - /// - /// - public init(aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, id: Int? = nil, optimizedForStreaming: Int? = nil, part: [Operations.GetMetaDataByRatingKeyPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) { - self._aspectRatio = DecimalSerialized(wrappedValue: aspectRatio) - self.audioChannels = audioChannels - self.audioCodec = audioCodec - self.audioProfile = audioProfile - self.bitrate = bitrate - self.container = container - self.duration = duration - self.has64bitOffsets = has64bitOffsets - self.height = height - self.id = id - self.optimizedForStreaming = optimizedForStreaming - self.part = part - self.videoCodec = videoCodec - self.videoFrameRate = videoFrameRate - self.videoProfile = videoProfile - self.videoResolution = videoResolution - self.width = width - } - }} - -extension Operations.GetMetaDataByRatingKeyMedia: Codable { - enum CodingKeys: String, CodingKey { - case aspectRatio - case audioChannels - case audioCodec - case audioProfile - case bitrate - case container - case duration - case has64bitOffsets - case height - case id - case optimizedForStreaming - case part = "Part" - case videoCodec - case videoFrameRate - case videoProfile - case videoResolution - case width - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._aspectRatio = try container.decodeIfPresent(DecimalSerialized.self, forKey: .aspectRatio) ?? DecimalSerialized(wrappedValue: nil) - self.audioChannels = try container.decodeIfPresent(Int.self, forKey: .audioChannels) - self.audioCodec = try container.decodeIfPresent(String.self, forKey: .audioCodec) - self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile) - self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate) - self.container = try container.decodeIfPresent(String.self, forKey: .container) - self.duration = try container.decodeIfPresent(Int.self, forKey: .duration) - self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets) - self.height = try container.decodeIfPresent(Int.self, forKey: .height) - self.id = try container.decodeIfPresent(Int.self, forKey: .id) - self.optimizedForStreaming = try container.decodeIfPresent(Int.self, forKey: .optimizedForStreaming) - self.part = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyPart].self, forKey: .part) - self.videoCodec = try container.decodeIfPresent(String.self, forKey: .videoCodec) - self.videoFrameRate = try container.decodeIfPresent(String.self, forKey: .videoFrameRate) - self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile) - self.videoResolution = try container.decodeIfPresent(String.self, forKey: .videoResolution) - self.width = try container.decodeIfPresent(Int.self, forKey: .width) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.aspectRatio != nil { - try container.encode(self._aspectRatio, forKey: .aspectRatio) - } - try container.encodeIfPresent(self.audioChannels, forKey: .audioChannels) - try container.encodeIfPresent(self.audioCodec, forKey: .audioCodec) - try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile) - try container.encodeIfPresent(self.bitrate, forKey: .bitrate) - try container.encodeIfPresent(self.container, forKey: .container) - try container.encodeIfPresent(self.duration, forKey: .duration) - try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets) - try container.encodeIfPresent(self.height, forKey: .height) - try container.encodeIfPresent(self.id, forKey: .id) - try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming) - try container.encodeIfPresent(self.part, forKey: .part) - try container.encodeIfPresent(self.videoCodec, forKey: .videoCodec) - try container.encodeIfPresent(self.videoFrameRate, forKey: .videoFrameRate) - try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile) - try container.encodeIfPresent(self.videoResolution, forKey: .videoResolution) - try container.encodeIfPresent(self.width, forKey: .width) - } -} - -extension Operations.GetMetaDataByRatingKeyMedia { - var aspectRatioWrapper: DecimalSerialized { - return _aspectRatio - } -} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift deleted file mode 100644 index 2963989..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyMediaContainer { - public let allowSync: Bool? - public let identifier: String? - public let librarySectionID: Int? - public let librarySectionTitle: String? - public let librarySectionUUID: String? - public let mediaTagPrefix: String? - public let mediaTagVersion: Int? - public let metadata: [Operations.GetMetaDataByRatingKeyMetadata]? - public let size: Int? - - /// Creates an object with the specified parameters - /// - /// - public init(allowSync: Bool? = nil, identifier: String? = nil, librarySectionID: Int? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetMetaDataByRatingKeyMetadata]? = nil, size: Int? = nil) { - self.allowSync = allowSync - self.identifier = identifier - self.librarySectionID = librarySectionID - self.librarySectionTitle = librarySectionTitle - self.librarySectionUUID = librarySectionUUID - self.mediaTagPrefix = mediaTagPrefix - self.mediaTagVersion = mediaTagVersion - self.metadata = metadata - self.size = size - } - }} - -extension Operations.GetMetaDataByRatingKeyMediaContainer: Codable { - enum CodingKeys: String, CodingKey { - case allowSync - case identifier - case librarySectionID - case librarySectionTitle - case librarySectionUUID - case mediaTagPrefix - case mediaTagVersion - case metadata = "Metadata" - case size - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift deleted file mode 100644 index 364f489..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyMetadata { - public let addedAt: Int? - public let art: String? - @DecimalSerialized - public private(set) var audienceRating: Double? - public let audienceRatingImage: String? - public let contentRating: String? - public let country: [Operations.GetMetaDataByRatingKeyCountry]? - public let director: [Operations.GetMetaDataByRatingKeyDirector]? - public let duration: Int? - public let genre: [Operations.GetMetaDataByRatingKeyGenre]? - /// The name of the album artist for the track when audio, and the name of the TV show for the episode when video. - public let grandparentTitle: String? - public let guid: String? - public let guids: [Operations.Guids]? - public let hasPremiumPrimaryExtra: String? - /// The index starting from 0 of this media item in the MetaData array. - public let index: Int? - public let key: String? - public let librarySectionID: Int? - public let librarySectionKey: String? - public let librarySectionTitle: String? - public let media: [Operations.GetMetaDataByRatingKeyMedia]? - @DateOnly - public private(set) var originallyAvailableAt: Date? - /// The orginal untranslated name of the media item when non-english. - public let originalTitle: String? - /// The parent index starting from 0 of this media item in the parent MetaData array. - public let parentIndex: Int? - /// The name of the album for the track when audio, and the name of the season for the episode when TV show. - public let parentTitle: String? - public let producer: [Operations.Producer]? - @DecimalSerialized - public private(set) var rating: Double? - public let ratingImage: String? - public let ratingKey: String? - public let ratings: [Operations.Ratings]? - public let role: [Operations.GetMetaDataByRatingKeyRole]? - public let studio: String? - public let summary: String? - public let tagline: String? - public let thumb: String? - public let title: String? - public let type: String? - public let updatedAt: Int? - public let writer: [Operations.GetMetaDataByRatingKeyWriter]? - public let year: Int? - - /// Creates an object with the specified parameters - /// - /// - Parameter grandparentTitle: The name of the album artist for the track when audio, and the name of the TV show for the episode when video. - /// - Parameter index: The index starting from 0 of this media item in the MetaData array. - /// - Parameter originalTitle: The orginal untranslated name of the media item when non-english. - /// - Parameter parentIndex: The parent index starting from 0 of this media item in the parent MetaData array. - /// - Parameter parentTitle: The name of the album for the track when audio, and the name of the season for the episode when TV show. - /// - public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, contentRating: String? = nil, country: [Operations.GetMetaDataByRatingKeyCountry]? = nil, director: [Operations.GetMetaDataByRatingKeyDirector]? = nil, duration: Int? = nil, genre: [Operations.GetMetaDataByRatingKeyGenre]? = nil, grandparentTitle: String? = nil, guid: String? = nil, guids: [Operations.Guids]? = nil, hasPremiumPrimaryExtra: String? = nil, index: Int? = nil, key: String? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetMetaDataByRatingKeyMedia]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentIndex: Int? = nil, parentTitle: String? = nil, producer: [Operations.Producer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMetaDataByRatingKeyRole]? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, writer: [Operations.GetMetaDataByRatingKeyWriter]? = nil, year: Int? = nil) { - self.addedAt = addedAt - self.art = art - self._audienceRating = DecimalSerialized(wrappedValue: audienceRating) - self.audienceRatingImage = audienceRatingImage - self.contentRating = contentRating - self.country = country - self.director = director - self.duration = duration - self.genre = genre - self.grandparentTitle = grandparentTitle - self.guid = guid - self.guids = guids - self.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra - self.index = index - self.key = key - self.librarySectionID = librarySectionID - self.librarySectionKey = librarySectionKey - self.librarySectionTitle = librarySectionTitle - self.media = media - self._originallyAvailableAt = DateOnly(wrappedValue: originallyAvailableAt) - self.originalTitle = originalTitle - self.parentIndex = parentIndex - self.parentTitle = parentTitle - self.producer = producer - self._rating = DecimalSerialized(wrappedValue: rating) - self.ratingImage = ratingImage - self.ratingKey = ratingKey - self.ratings = ratings - self.role = role - self.studio = studio - self.summary = summary - self.tagline = tagline - self.thumb = thumb - self.title = title - self.type = type - self.updatedAt = updatedAt - self.writer = writer - self.year = year - } - }} - -extension Operations.GetMetaDataByRatingKeyMetadata: Codable { - enum CodingKeys: String, CodingKey { - case addedAt - case art - case audienceRating - case audienceRatingImage - case contentRating - case country = "Country" - case director = "Director" - case duration - case genre = "Genre" - case grandparentTitle - case guid - case guids = "Guid" - case hasPremiumPrimaryExtra - case index - case key - case librarySectionID - case librarySectionKey - case librarySectionTitle - case media = "Media" - case originallyAvailableAt - case originalTitle - case parentIndex - case parentTitle - case producer = "Producer" - case rating - case ratingImage - case ratingKey - case ratings = "Rating" - case role = "Role" - case studio - case summary - case tagline - case thumb - case title - case type - case updatedAt - case writer = "Writer" - case year - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt) - self.art = try container.decodeIfPresent(String.self, forKey: .art) - self._audienceRating = try container.decodeIfPresent(DecimalSerialized.self, forKey: .audienceRating) ?? DecimalSerialized(wrappedValue: nil) - self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage) - self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating) - self.country = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyCountry].self, forKey: .country) - self.director = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyDirector].self, forKey: .director) - self.duration = try container.decodeIfPresent(Int.self, forKey: .duration) - self.genre = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyGenre].self, forKey: .genre) - self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle) - self.guid = try container.decodeIfPresent(String.self, forKey: .guid) - self.guids = try container.decodeIfPresent([Operations.Guids].self, forKey: .guids) - 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.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID) - self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey) - self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle) - self.media = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyMedia].self, forKey: .media) - self._originallyAvailableAt = try container.decodeIfPresent(DateOnly.self, forKey: .originallyAvailableAt) ?? DateOnly(wrappedValue: nil) - self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle) - self.parentIndex = try container.decodeIfPresent(Int.self, forKey: .parentIndex) - self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle) - self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer) - self._rating = try container.decodeIfPresent(DecimalSerialized.self, forKey: .rating) ?? DecimalSerialized(wrappedValue: nil) - self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage) - self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey) - self.ratings = try container.decodeIfPresent([Operations.Ratings].self, forKey: .ratings) - self.role = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyRole].self, forKey: .role) - self.studio = try container.decodeIfPresent(String.self, forKey: .studio) - self.summary = try container.decodeIfPresent(String.self, forKey: .summary) - self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline) - self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb) - self.title = try container.decodeIfPresent(String.self, forKey: .title) - self.type = try container.decodeIfPresent(String.self, forKey: .type) - self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt) - self.writer = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyWriter].self, forKey: .writer) - self.year = try container.decodeIfPresent(Int.self, forKey: .year) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.addedAt, forKey: .addedAt) - try container.encodeIfPresent(self.art, forKey: .art) - if self.audienceRating != nil { - try container.encode(self._audienceRating, forKey: .audienceRating) - } - try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage) - try container.encodeIfPresent(self.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.grandparentTitle, forKey: .grandparentTitle) - try container.encodeIfPresent(self.guid, forKey: .guid) - try container.encodeIfPresent(self.guids, forKey: .guids) - 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.librarySectionID, forKey: .librarySectionID) - try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey) - try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle) - try container.encodeIfPresent(self.media, forKey: .media) - if self.originallyAvailableAt != nil { - try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt) - } - try container.encodeIfPresent(self.originalTitle, forKey: .originalTitle) - try container.encodeIfPresent(self.parentIndex, forKey: .parentIndex) - try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle) - try container.encodeIfPresent(self.producer, forKey: .producer) - if self.rating != nil { - try container.encode(self._rating, forKey: .rating) - } - try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage) - try container.encodeIfPresent(self.ratingKey, forKey: .ratingKey) - try container.encodeIfPresent(self.ratings, forKey: .ratings) - try container.encodeIfPresent(self.role, forKey: .role) - try container.encodeIfPresent(self.studio, forKey: .studio) - try container.encodeIfPresent(self.summary, forKey: .summary) - try container.encodeIfPresent(self.tagline, forKey: .tagline) - try container.encodeIfPresent(self.thumb, forKey: .thumb) - try container.encodeIfPresent(self.title, forKey: .title) - try container.encodeIfPresent(self.type, forKey: .type) - try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt) - try container.encodeIfPresent(self.writer, forKey: .writer) - try container.encodeIfPresent(self.year, forKey: .year) - } -} - -extension Operations.GetMetaDataByRatingKeyMetadata { - var ratingWrapper: DecimalSerialized { - return _rating - } - var audienceRatingWrapper: DecimalSerialized { - return _audienceRating - } - var originallyAvailableAtWrapper: DateOnly { - return _originallyAvailableAt - } -} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift deleted file mode 100644 index 0ec8e32..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyPart { - public let audioProfile: String? - public let container: String? - public let duration: Int? - public let file: String? - public let has64bitOffsets: Bool? - public let id: Int? - public let key: String? - public let optimizedForStreaming: Bool? - public let size: Int? - public let stream: [Operations.GetMetaDataByRatingKeyStream]? - public let videoProfile: String? - - /// Creates an object with the specified parameters - /// - /// - public init(audioProfile: String? = nil, container: String? = nil, duration: Int? = nil, file: String? = nil, has64bitOffsets: Bool? = nil, id: Int? = nil, key: String? = nil, optimizedForStreaming: Bool? = nil, size: Int? = nil, stream: [Operations.GetMetaDataByRatingKeyStream]? = nil, videoProfile: String? = nil) { - self.audioProfile = audioProfile - self.container = container - self.duration = duration - self.file = file - self.has64bitOffsets = has64bitOffsets - self.id = id - self.key = key - self.optimizedForStreaming = optimizedForStreaming - self.size = size - self.stream = stream - self.videoProfile = videoProfile - } - }} - -extension Operations.GetMetaDataByRatingKeyPart: Codable { - enum CodingKeys: String, CodingKey { - case audioProfile - case container - case duration - case file - case has64bitOffsets - case id - case key - case optimizedForStreaming - case size - case stream = "Stream" - case videoProfile - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift deleted file mode 100644 index 8631b29..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyRequest: APIValue { - /// the id of the library item to return the children of. - public let ratingKey: Int - - /// Creates an object with the specified parameters - /// - /// - Parameter ratingKey: the id of the library item to return the children of. - /// - public init(ratingKey: Int) { - self.ratingKey = ratingKey - } - }} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift deleted file mode 100644 index bdd612a..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyRole { - public let filter: String? - public let id: Int? - public let role: String? - public let tag: String? - public let tagKey: String? - public let thumb: String? - - /// Creates an object with the specified parameters - /// - /// - public init(filter: String? = nil, id: Int? = nil, role: String? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) { - self.filter = filter - self.id = id - self.role = role - self.tag = tag - self.tagKey = tagKey - self.thumb = thumb - } - }} - -extension Operations.GetMetaDataByRatingKeyRole: Codable { - enum CodingKeys: String, CodingKey { - case filter - case id - case role - case tag - case tagKey - case thumb - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyStream.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyStream.swift deleted file mode 100644 index 66733d1..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyStream.swift +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyStream { - public let bitDepth: Int? - public let bitrate: Int? - public let channels: Int? - public let chromaLocation: String? - public let chromaSubsampling: String? - public let codec: String? - public let codedHeight: Int? - public let codedWidth: Int? - public let colorPrimaries: String? - public let colorRange: String? - public let colorSpace: String? - public let colorTrc: String? - public let `default`: Bool? - public let displayTitle: String? - public let extendedDisplayTitle: String? - public let frameRate: Int? - public let hasScalingMatrix: Bool? - public let height: Int? - public let id: Int? - public let index: Int? - public let language: String? - public let languageCode: String? - public let languageTag: String? - public let level: Int? - public let profile: String? - public let refFrames: Int? - public let samplingRate: Int? - public let scanType: String? - public let selected: Bool? - public let streamIdentifier: String? - public let streamType: Int? - public let width: Int? - - /// Creates an object with the specified parameters - /// - /// - public init(bitDepth: Int? = nil, bitrate: Int? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, codec: String? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, displayTitle: String? = nil, extendedDisplayTitle: String? = nil, frameRate: Int? = nil, hasScalingMatrix: Bool? = nil, height: Int? = nil, id: Int? = nil, index: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, streamIdentifier: String? = nil, streamType: Int? = nil, width: Int? = nil) { - self.bitDepth = bitDepth - self.bitrate = bitrate - self.channels = channels - self.chromaLocation = chromaLocation - self.chromaSubsampling = chromaSubsampling - self.codec = codec - self.codedHeight = codedHeight - self.codedWidth = codedWidth - self.colorPrimaries = colorPrimaries - self.colorRange = colorRange - self.colorSpace = colorSpace - self.colorTrc = colorTrc - self.`default` = `default` - self.displayTitle = displayTitle - self.extendedDisplayTitle = extendedDisplayTitle - self.frameRate = frameRate - self.hasScalingMatrix = hasScalingMatrix - self.height = height - self.id = id - self.index = index - self.language = language - self.languageCode = languageCode - self.languageTag = languageTag - self.level = level - self.profile = profile - self.refFrames = refFrames - self.samplingRate = samplingRate - self.scanType = scanType - self.selected = selected - self.streamIdentifier = streamIdentifier - self.streamType = streamType - self.width = width - } - }} - -extension Operations.GetMetaDataByRatingKeyStream: Codable { - enum CodingKeys: String, CodingKey { - case bitDepth - case bitrate - case channels - case chromaLocation - case chromaSubsampling - case codec - case codedHeight - case codedWidth - case colorPrimaries - case colorRange - case colorSpace - case colorTrc - case `default` = "default" - case displayTitle - case extendedDisplayTitle - case frameRate - case hasScalingMatrix - case height - case id - case index - case language - case languageCode - case languageTag - case level - case profile - case refFrames - case samplingRate - case scanType - case selected - case streamIdentifier - case streamType - case width - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift deleted file mode 100644 index 01d0cf9..0000000 --- a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetaDataByRatingKeyWriter { - public let filter: String? - public let id: Int? - public let tag: String? - public let tagKey: String? - public let thumb: String? - - /// Creates an object with the specified parameters - /// - /// - public init(filter: String? = nil, id: Int? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) { - self.filter = filter - self.id = id - self.tag = tag - self.tagKey = tagKey - self.thumb = thumb - } - }} - -extension Operations.GetMetaDataByRatingKeyWriter: Codable { - enum CodingKeys: String, CodingKey { - case filter - case id - case tag - case tagKey - case thumb - } -} - diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift index 91ec7f6..d792b2b 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift index 67541c0..a7c5741 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift @@ -8,7 +8,7 @@ extension Operations { /// the ID of the playlist @DecimalSerialized public private(set) var playlistID: Double - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season @@ -20,7 +20,7 @@ extension Operations { /// Creates an object with the specified parameters /// /// - Parameter playlistID: the ID of the playlist - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryRequest.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryRequest.swift index de0a04b..19db843 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryRequest.swift @@ -5,7 +5,7 @@ import Foundation extension Operations { /// A model object public struct GetRecentlyAddedLibraryRequest: APIValue { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season @@ -33,7 +33,7 @@ extension Operations { /// Creates an object with the specified parameters /// - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift index 7bede59..c5d0e66 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift @@ -7,7 +7,7 @@ extension Operations { public struct GetRecentlyAddedRequest: APIValue { /// The content directory ID. public let contentDirectoryID: Int - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season @@ -36,7 +36,7 @@ extension Operations { /// Creates an object with the specified parameters /// /// - Parameter contentDirectoryID: The content directory ID. - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryQueryParamType.swift b/Sources/Plexswift/models/operations/GetSearchLibraryQueryParamType.swift index 9b0bad0..49c0162 100644 --- a/Sources/Plexswift/models/operations/GetSearchLibraryQueryParamType.swift +++ b/Sources/Plexswift/models/operations/GetSearchLibraryQueryParamType.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift b/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift index 0a403a2..579354f 100644 --- a/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift @@ -9,7 +9,7 @@ extension Operations { /// Note: This is unique in the context of the Plex server. /// public let sectionKey: Int - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season @@ -23,7 +23,7 @@ extension Operations { /// - Parameter sectionKey: The unique key of the Plex library. /// Note: This is unique in the context of the Plex server. /// - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift index abcb839..e4d9174 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift index b6a07c9..e0fe3d2 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift @@ -5,7 +5,7 @@ import Foundation extension Operations { /// A model object public struct GetTopWatchedContentRequest: APIValue { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season @@ -19,7 +19,7 @@ extension Operations { /// Creates an object with the specified parameters /// - /// - Parameter type: The type of media to retrieve. + /// - Parameter type: The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/Guids.swift b/Sources/Plexswift/models/operations/Guids.swift index ffb6091..ea08bdb 100644 --- a/Sources/Plexswift/models/operations/Guids.swift +++ b/Sources/Plexswift/models/operations/Guids.swift @@ -5,12 +5,14 @@ import Foundation extension Operations { /// A model object public struct Guids { - public let id: String? + /// The GUID value. + public let id: String /// Creates an object with the specified parameters /// + /// - Parameter id: The GUID value. /// - public init(id: String? = nil) { + public init(id: String) { self.id = id } }} diff --git a/Sources/Plexswift/models/operations/Producer.swift b/Sources/Plexswift/models/operations/Producer.swift index 7ea0bca..fdd999a 100644 --- a/Sources/Plexswift/models/operations/Producer.swift +++ b/Sources/Plexswift/models/operations/Producer.swift @@ -5,20 +5,34 @@ import Foundation extension Operations { /// A model object public struct Producer { - public let filter: String? - public let id: Int? - public let tag: String? - public let tagKey: String? + /// The filter string for the role. + public let filter: String + /// The unique role identifier. + public let id: Int + /// The actor's name. + public let tag: String + /// A key associated with the actor tag. + public let tagKey: String + /// The character name or role. + public let role: String? + /// URL for the role thumbnail image. public let thumb: String? /// Creates an object with the specified parameters /// + /// - Parameter filter: The filter string for the role. + /// - Parameter id: The unique role identifier. + /// - Parameter tag: The actor's name. + /// - Parameter tagKey: A key associated with the actor tag. + /// - Parameter role: The character name or role. + /// - Parameter thumb: URL for the role thumbnail image. /// - public init(filter: String? = nil, id: Int? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) { + public init(filter: String, id: Int, tag: String, tagKey: String, role: String? = nil, thumb: String? = nil) { self.filter = filter self.id = id self.tag = tag self.tagKey = tagKey + self.role = role self.thumb = thumb } }} @@ -29,6 +43,7 @@ extension Operations.Producer: Codable { case id case tag case tagKey + case role case thumb } } diff --git a/Sources/Plexswift/models/operations/QueryParamType.swift b/Sources/Plexswift/models/operations/QueryParamType.swift index 9f740a2..5b91252 100644 --- a/Sources/Plexswift/models/operations/QueryParamType.swift +++ b/Sources/Plexswift/models/operations/QueryParamType.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/Plexswift/models/operations/Rating.swift b/Sources/Plexswift/models/operations/Rating.swift new file mode 100644 index 0000000..7d1eae8 --- /dev/null +++ b/Sources/Plexswift/models/operations/Rating.swift @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Rating { + /// The image or reference for the rating. + public let image: String + /// The type of rating (e.g., audience, critic). + public let type: String + /// The rating value. + @DecimalSerialized + public private(set) var value: Double + + /// Creates an object with the specified parameters + /// + /// - Parameter image: The image or reference for the rating. + /// - Parameter type: The type of rating (e.g., audience, critic). + /// - Parameter value: The rating value. + /// + public init(image: String, type: String, value: Double) { + self.image = image + self.type = type + self._value = DecimalSerialized(wrappedValue: value) + } + }} + +extension Operations.Rating: Codable { + enum CodingKeys: String, CodingKey { + case image + case type + case value + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.image = try container.decode(String.self, forKey: .image) + self.type = try container.decode(String.self, forKey: .type) + self._value = try container.decode(DecimalSerialized.self, forKey: .value) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.image, forKey: .image) + try container.encode(self.type, forKey: .type) + try container.encode(self._value, forKey: .value) + } +} + +extension Operations.Rating { + var valueWrapper: DecimalSerialized { + return _value + } +} diff --git a/Sources/Plexswift/models/operations/Ratings.swift b/Sources/Plexswift/models/operations/Ratings.swift deleted file mode 100644 index 5298917..0000000 --- a/Sources/Plexswift/models/operations/Ratings.swift +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct Ratings { - public let image: String? - public let type: String? - @DecimalSerialized - public private(set) var value: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(image: String? = nil, type: String? = nil, value: Double? = nil) { - self.image = image - self.type = type - self._value = DecimalSerialized(wrappedValue: value) - } - }} - -extension Operations.Ratings: Codable { - enum CodingKeys: String, CodingKey { - case image - case type - case value - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.image = try container.decodeIfPresent(String.self, forKey: .image) - self.type = try container.decodeIfPresent(String.self, forKey: .type) - self._value = try container.decodeIfPresent(DecimalSerialized.self, forKey: .value) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.image, forKey: .image) - try container.encodeIfPresent(self.type, forKey: .type) - if self.value != nil { - try container.encode(self._value, forKey: .value) - } - } -} - -extension Operations.Ratings { - var valueWrapper: DecimalSerialized { - return _value - } -} diff --git a/Sources/Plexswift/models/operations/Similar.swift b/Sources/Plexswift/models/operations/Similar.swift new file mode 100644 index 0000000..3b1a4eb --- /dev/null +++ b/Sources/Plexswift/models/operations/Similar.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Similar { + /// The filter string for similar items. + public let filter: String + /// The unique similar item identifier. + public let id: Int + /// The tag or title of the similar content. + public let tag: String + + /// Creates an object with the specified parameters + /// + /// - Parameter filter: The filter string for similar items. + /// - Parameter id: The unique similar item identifier. + /// - Parameter tag: The tag or title of the similar content. + /// + public init(filter: String, id: Int, tag: String) { + self.filter = filter + self.id = id + self.tag = tag + } + }} + +extension Operations.Similar: Codable { + enum CodingKeys: String, CodingKey { + case filter + case id + case tag + } +} + diff --git a/Sources/Plexswift/models/operations/TypeModel.swift b/Sources/Plexswift/models/operations/TypeModel.swift index 48cbb14..6e3bfe8 100644 --- a/Sources/Plexswift/models/operations/TypeModel.swift +++ b/Sources/Plexswift/models/operations/TypeModel.swift @@ -3,7 +3,7 @@ import Foundation extension Operations { - /// The type of media to retrieve. + /// The type of media to retrieve or filter by. /// 1 = movie /// 2 = show /// 3 = season diff --git a/Sources/plexswift/PlexswiftAPI.swift b/Sources/plexswift/PlexswiftAPI.swift index e674a1c..0631fbd 100644 --- a/Sources/plexswift/PlexswiftAPI.swift +++ b/Sources/plexswift/PlexswiftAPI.swift @@ -743,8 +743,9 @@ public protocol SearchAPI { /// - ``getSearchLibrary(request:)`` /// - ``getGenresLibrary(request:)`` /// - ``getCountriesLibrary(request:)`` +/// - ``getActorsLibrary(request:)`` /// - ``getSearchAllLibraries(request:)`` -/// - ``getMetaDataByRatingKey(request:)`` +/// - ``getMediaMetaData(request:)`` /// - ``getMetadataChildren(request:)`` /// - ``getTopWatchedContent(request:)`` /// - ``getOnDeck()`` @@ -907,6 +908,14 @@ public protocol LibraryAPI { /// - Throws: An error of type ``PlexswiftError`` func getCountriesLibrary(request: Operations.GetCountriesLibraryRequest) async throws -> Response + /// Retrieves a list of all the actors that are found for the media in this library. + /// + /// + /// - Parameter request: A ``Operations/GetActorsLibraryRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetActorsLibraryResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getActorsLibrary(request: Operations.GetActorsLibraryRequest) async throws -> Response + /// Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. /// /// @@ -915,13 +924,13 @@ public protocol LibraryAPI { /// - Throws: An error of type ``PlexswiftError`` func getSearchAllLibraries(request: Operations.GetSearchAllLibrariesRequest) async throws -> Response - /// This endpoint will return the metadata of a library item specified with the ratingKey. + /// This endpoint will return all the (meta)data of a library item specified with by the ratingKey. /// /// - /// - Parameter request: A ``Operations/GetMetaDataByRatingKeyRequest`` object describing the input to the API operation - /// - Returns: A ``Operations/GetMetaDataByRatingKeyResponse`` object describing the result of the API operation + /// - Parameter request: A ``Operations/GetMediaMetaDataRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetMediaMetaDataResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response + func getMediaMetaData(request: Operations.GetMediaMetaDataRequest) async throws -> Response /// This endpoint will return the children of of a library item specified with the ratingKey. /// diff --git a/Sources/plexswift/internal/client/URLRequestBuilder.swift b/Sources/plexswift/internal/client/URLRequestBuilder.swift index 5ff80bc..fa1970a 100644 --- a/Sources/plexswift/internal/client/URLRequestBuilder.swift +++ b/Sources/plexswift/internal/client/URLRequestBuilder.swift @@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration { urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type") } - urlRequest.setValue("speakeasy-sdk/swift 0.9.11 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName) + urlRequest.setValue("speakeasy-sdk/swift 0.9.13 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName) addSecurityParameters(to: &urlRequest) diff --git a/codeSamples.yaml b/codeSamples.yaml index 472c80b..74943a6 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -566,33 +566,8 @@ actions: update: x-codeSamples: - lang: swift - label: key - source: |- - import Foundation - import Plexswift - - let client = Client(security: .accessToken("")) - - let response = try await client.library.getMetaDataByRatingKey( - request: Operations.GetMetaDataByRatingKeyRequest( - ratingKey: 9518 - ) - ) - - switch response.data { - case .object(let object): - // Handle response - break - case .badRequest(let badRequest): - // Handle response - break - case .unauthorized(let unauthorized): - // Handle response - break - case .empty: - // Handle empty response - break - } + label: data + source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getMediaMetaData(\n request: Operations.GetMediaMetaDataRequest(\n ratingKey: 9518, \n asyncAugmentMetadata: true, \n asyncCheckFiles: true, \n asyncRefreshAnalysis: true, \n asyncRefreshLocalMediaAgent: true, \n includeChapters: true, \n includeConcerts: true, \n includeExternalMedia: true, \n includeExtras: true, \n includeOnDeck: true, \n includePopularLeaves: true, \n includePreferences: true, \n includeReviews: true, \n includeStations: true\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] update: x-codeSamples: @@ -717,68 +692,24 @@ actions: - lang: swift label: details source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getLibraryDetails(\n request: Operations.GetLibraryDetailsRequest(\n sectionKey: 9518, \n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" + - target: $["paths"]["/library/sections/{sectionKey}/actor"]["get"] + update: + x-codeSamples: + - lang: swift + label: library + source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getActorsLibrary(\n request: Operations.GetActorsLibraryRequest(\n sectionKey: 9518, \n type: .tvShow\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" - target: $["paths"]["/library/sections/{sectionKey}/country"]["get"] update: x-codeSamples: - lang: swift label: library - source: |- - import Foundation - import Plexswift - - let client = Client(security: .accessToken("")) - - let response = try await client.library.getCountriesLibrary( - request: Operations.GetCountriesLibraryRequest( - sectionKey: 9518 - ) - ) - - switch response.data { - case .object(let object): - // Handle response - break - case .badRequest(let badRequest): - // Handle response - break - case .unauthorized(let unauthorized): - // Handle response - break - case .empty: - // Handle empty response - break - } + source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getCountriesLibrary(\n request: Operations.GetCountriesLibraryRequest(\n sectionKey: 9518, \n type: .tvShow\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" - target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"] update: x-codeSamples: - lang: swift label: library - source: |- - import Foundation - import Plexswift - - let client = Client(security: .accessToken("")) - - let response = try await client.library.getGenresLibrary( - request: Operations.GetGenresLibraryRequest( - sectionKey: 9518 - ) - ) - - switch response.data { - case .object(let object): - // Handle response - break - case .badRequest(let badRequest): - // Handle response - break - case .unauthorized(let unauthorized): - // Handle response - break - case .empty: - // Handle empty response - break - } + source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getGenresLibrary(\n request: Operations.GetGenresLibraryRequest(\n sectionKey: 9518, \n type: .tvShow\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" - target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"] update: x-codeSamples: @@ -796,7 +727,7 @@ actions: x-codeSamples: - lang: swift label: items - source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getLibraryItems(\n request: Operations.GetLibraryItemsRequest(\n sectionKey: 9518, \n tag: .edition, \n includeGuids: .enable, \n includeMeta: .enable, \n type: .tvShow, \n xPlexContainerSize: 50, \n xPlexContainerStart: 0\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" + source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\"))\n\nlet response = try await client.library.getLibraryItems(\n request: Operations.GetLibraryItemsRequest(\n sectionKey: 9518, \n tag: .edition, \n type: .tvShow, \n includeGuids: .enable, \n includeMeta: .enable, \n xPlexContainerSize: 50, \n xPlexContainerStart: 0\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}" - target: $["paths"]["/log"]["get"] update: x-codeSamples: