From dcdcafc044784ccfcb961e8cc35918c45cf3ce34 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 3 Apr 2025 00:29:22 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1 --- .speakeasy/gen.lock | 77 ++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README.md | 8 +- RELEASES.md | 12 +- build.gradle | 2 +- codeSamples.yaml | 118 ++++ .../operations/GetMediaArtsMediaContainer.md | 12 + .../models/operations/GetMediaArtsMetadata.md | 12 + docs/models/operations/GetMediaArtsRequest.md | 8 + .../models/operations/GetMediaArtsResponse.md | 11 + .../operations/GetMediaArtsResponseBody.md | 10 + .../GetMediaPostersMediaContainer.md | 12 + .../operations/GetMediaPostersMetadata.md | 12 + .../operations/GetMediaPostersRequest.md | 8 + .../operations/GetMediaPostersResponse.md | 11 + .../operations/GetMediaPostersResponseBody.md | 10 + .../models/operations/PostMediaArtsRequest.md | 10 + .../operations/PostMediaArtsResponse.md | 10 + .../operations/PostMediaPosterRequest.md | 10 + .../operations/PostMediaPosterResponse.md | 10 + docs/sdks/library/README.md | 202 ++++++ gradle.properties | 2 +- src/main/java/dev/plexapi/sdk/Activities.java | 2 - .../java/dev/plexapi/sdk/Authentication.java | 2 - src/main/java/dev/plexapi/sdk/Butler.java | 2 - src/main/java/dev/plexapi/sdk/Hubs.java | 2 - src/main/java/dev/plexapi/sdk/Library.java | 635 +++++++++++++++++- src/main/java/dev/plexapi/sdk/Log.java | 2 - src/main/java/dev/plexapi/sdk/Media.java | 2 - src/main/java/dev/plexapi/sdk/Playlists.java | 2 - src/main/java/dev/plexapi/sdk/Plex.java | 2 - src/main/java/dev/plexapi/sdk/PlexAPI.java | 2 - .../dev/plexapi/sdk/SDKConfiguration.java | 6 +- src/main/java/dev/plexapi/sdk/Search.java | 2 - .../java/dev/plexapi/sdk/SecuritySource.java | 2 - src/main/java/dev/plexapi/sdk/Server.java | 2 - src/main/java/dev/plexapi/sdk/Sessions.java | 2 - src/main/java/dev/plexapi/sdk/Statistics.java | 2 - src/main/java/dev/plexapi/sdk/Updater.java | 2 - src/main/java/dev/plexapi/sdk/Users.java | 2 - src/main/java/dev/plexapi/sdk/Video.java | 2 - src/main/java/dev/plexapi/sdk/Watchlist.java | 2 - .../GetMediaArtsMediaContainer.java | 253 +++++++ .../operations/GetMediaArtsMetadata.java | 293 ++++++++ .../operations/GetMediaArtsRequest.java | 99 +++ .../GetMediaArtsRequestBuilder.java | 30 + .../operations/GetMediaArtsResponse.java | 248 +++++++ .../operations/GetMediaArtsResponseBody.java | 113 ++++ .../GetMediaPostersMediaContainer.java | 253 +++++++ .../operations/GetMediaPostersMetadata.java | 293 ++++++++ .../operations/GetMediaPostersRequest.java | 99 +++ .../GetMediaPostersRequestBuilder.java | 30 + .../operations/GetMediaPostersResponse.java | 248 +++++++ .../GetMediaPostersResponseBody.java | 113 ++++ .../operations/PostMediaArtsRequest.java | 223 ++++++ .../PostMediaArtsRequestBuilder.java | 60 ++ .../operations/PostMediaArtsResponse.java | 180 +++++ .../operations/PostMediaPosterRequest.java | 223 ++++++ .../PostMediaPosterRequestBuilder.java | 60 ++ .../operations/PostMediaPosterResponse.java | 180 +++++ .../operations/SDKMethodInterfaces.java | 24 + .../java/dev/plexapi/sdk/utils/Constants.java | 10 + .../java/dev/plexapi/sdk/utils/Security.java | 58 ++ 64 files changed, 4288 insertions(+), 62 deletions(-) create mode 100644 docs/models/operations/GetMediaArtsMediaContainer.md create mode 100644 docs/models/operations/GetMediaArtsMetadata.md create mode 100644 docs/models/operations/GetMediaArtsRequest.md create mode 100644 docs/models/operations/GetMediaArtsResponse.md create mode 100644 docs/models/operations/GetMediaArtsResponseBody.md create mode 100644 docs/models/operations/GetMediaPostersMediaContainer.md create mode 100644 docs/models/operations/GetMediaPostersMetadata.md create mode 100644 docs/models/operations/GetMediaPostersRequest.md create mode 100644 docs/models/operations/GetMediaPostersResponse.md create mode 100644 docs/models/operations/GetMediaPostersResponseBody.md create mode 100644 docs/models/operations/PostMediaArtsRequest.md create mode 100644 docs/models/operations/PostMediaArtsResponse.md create mode 100644 docs/models/operations/PostMediaPosterRequest.md create mode 100644 docs/models/operations/PostMediaPosterResponse.md create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java create mode 100644 src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java create mode 100644 src/main/java/dev/plexapi/sdk/utils/Constants.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2cc2e6a1..b0d7e35d 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 1732900d-e173-47c1-a90d-d45182eb35d9 management: - docChecksum: 68de03e6e877c4fc50ebfdd47bb117ac + docChecksum: bef8e84d4427234ae3242e247056ab4d docVersion: 0.0.3 - speakeasyVersion: 1.526.6 - generationVersion: 2.563.1 - releaseVersion: 0.14.0 - configChecksum: 71169cb6f3e069af6b5d97957c9020e6 + speakeasyVersion: 1.528.1 + generationVersion: 2.565.1 + releaseVersion: 0.14.1 + configChecksum: 58108b7178b51424c8d3bbfce9fd15d3 repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.36.0 + core: 3.36.1 deprecations: 2.81.1 downloadStreams: 0.1.1 enums: 2.81.2 @@ -552,6 +552,11 @@ generatedFiles: - docs/models/operations/GetLibraryItemsType.md - docs/models/operations/GetLibraryItemsUltraBlurColors.md - docs/models/operations/GetLibraryItemsWriter.md + - docs/models/operations/GetMediaArtsMediaContainer.md + - docs/models/operations/GetMediaArtsMetadata.md + - docs/models/operations/GetMediaArtsRequest.md + - docs/models/operations/GetMediaArtsResponse.md + - docs/models/operations/GetMediaArtsResponseBody.md - docs/models/operations/GetMediaMetaDataCountry.md - docs/models/operations/GetMediaMetaDataDirector.md - docs/models/operations/GetMediaMetaDataGenre.md @@ -576,6 +581,11 @@ generatedFiles: - docs/models/operations/GetMediaMetaDataStream.md - docs/models/operations/GetMediaMetaDataUltraBlurColors.md - docs/models/operations/GetMediaMetaDataWriter.md + - docs/models/operations/GetMediaPostersMediaContainer.md + - docs/models/operations/GetMediaPostersMetadata.md + - docs/models/operations/GetMediaPostersRequest.md + - docs/models/operations/GetMediaPostersResponse.md + - docs/models/operations/GetMediaPostersResponseBody.md - docs/models/operations/GetMediaProvidersDirectory.md - docs/models/operations/GetMediaProvidersMediaContainer.md - docs/models/operations/GetMediaProvidersRequest.md @@ -836,6 +846,10 @@ generatedFiles: - docs/models/operations/Player.md - docs/models/operations/PlaylistType.md - docs/models/operations/PlexDevice.md + - docs/models/operations/PostMediaArtsRequest.md + - docs/models/operations/PostMediaArtsResponse.md + - docs/models/operations/PostMediaPosterRequest.md + - docs/models/operations/PostMediaPosterResponse.md - docs/models/operations/PostUsersSignInDataAuthenticationResponseStatus.md - docs/models/operations/PostUsersSignInDataAuthenticationStatus.md - docs/models/operations/PostUsersSignInDataAuthenticationSubscription.md @@ -1516,6 +1530,12 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataCountry.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataDirector.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java @@ -1541,6 +1561,12 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequest.java @@ -1843,6 +1869,12 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/Player.java - src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java - src/main/java/dev/plexapi/sdk/models/operations/PlexDevice.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationResponseStatus.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationStatus.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationSubscription.java @@ -1944,6 +1976,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/utils/BackoffStrategy.java - src/main/java/dev/plexapi/sdk/utils/BigDecimalString.java - src/main/java/dev/plexapi/sdk/utils/BigIntegerString.java + - src/main/java/dev/plexapi/sdk/utils/Constants.java - src/main/java/dev/plexapi/sdk/utils/Deserializers.java - src/main/java/dev/plexapi/sdk/utils/EventStream.java - src/main/java/dev/plexapi/sdk/utils/EventStreamLineReader.java @@ -2355,7 +2388,7 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": 1, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": true, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}, {"image": "imdb://image.rating", "value": 5.1, "type": "audience"}, {"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}]}, {"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": []}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": 1, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": true, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}, {"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}]}]}} + application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": 1, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": true, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}, {"image": "imdb://image.rating", "value": 5.1, "type": "audience"}, {"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}]}, {"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": []}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": 1, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": true, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": 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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": 1, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": true, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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", "headerCompression": true, "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, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "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"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}, {"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}]}]}} getLibraryHubs: speakeasy-default-get-library-hubs: parameters: @@ -3085,5 +3118,35 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-media-arts: + speakeasy-default-get-media-arts: + parameters: + path: + ratingKey: 16099 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}]}} + post-media-arts: + speakeasy-default-post-media-arts: + parameters: + path: + ratingKey: 2268 + query: + url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b" + get-media-posters: + speakeasy-default-get-media-posters: + parameters: + path: + ratingKey: 16099 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}]}} + post-media-poster: + speakeasy-default-post-media-poster: + parameters: + path: + ratingKey: 2268 + query: + url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b" examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 39f9637c..3eb14c8f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false java: - version: 0.14.0 + version: 0.14.1 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3f919e66..dfb391af 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.526.6 +speakeasyVersion: 1.528.1 sources: my-source: sourceNamespace: my-source @@ -8,19 +8,19 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf - sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 + sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5 + sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3 tags: - latest - - speakeasy-sdk-regen-1743440866 + - speakeasy-sdk-regen-1743640078 targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf - sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 + sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5 + sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3 codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:efd9a529c906a73b2d32257e52235b87cdb19f16486800f6eb2172eec9454726 + codeSamplesRevisionDigest: sha256:5ac1b6e0506bbf85ab353ce21dbf6646b6590efa4ba68ab778ba9836b378e0f6 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index da7827e3..0ef140b2 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.14.0' +implementation 'dev.plexapi:plexapi:0.14.1' ``` Maven: @@ -77,7 +77,7 @@ Maven: dev.plexapi plexapi - 0.14.0 + 0.14.1 ``` @@ -177,6 +177,10 @@ public class Application { * [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media * [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries * [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata +* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork +* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork +* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters +* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster * [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content diff --git a/RELEASES.md b/RELEASES.md index 07792d87..55d181c3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -288,4 +288,14 @@ Based on: ### Generated - [java v0.14.0] . ### Releases -- [Maven Central v0.14.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.0 - . \ No newline at end of file +- [Maven Central v0.14.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.0 - . + +## 2025-04-03 00:27:41 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.14.1] . +### Releases +- [Maven Central v0.14.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.1 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index f11d9113..ab93c5c7 100644 --- a/build.gradle +++ b/build.gradle @@ -103,7 +103,7 @@ publishing { // https://github.com/gradle/gradle/issues/18619 groupId = "dev.plexapi" artifactId = "plexapi" - version = "0.14.0" + version = "0.14.1" from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index 8da02166..5256df9b 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -882,6 +882,65 @@ actions: } } } + - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.GetMediaArtsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetMediaArtsResponse res = sdk.library().getMediaArts() + .ratingKey(16099L) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.PostMediaArtsResponse; + import java.lang.Exception; + import java.nio.charset.StandardCharsets; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + PostMediaArtsResponse res = sdk.library().postMediaArts() + .ratingKey(2268L) + .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + .requestBody("0xee51EFC6De".getBytes(StandardCharsets.UTF_8)) + .call(); + + // handle response + } + } - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] update: x-codeSamples: @@ -955,6 +1014,65 @@ actions: } } } + - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.GetMediaPostersResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetMediaPostersResponse res = sdk.library().getMediaPosters() + .ratingKey(16099L) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.PostMediaPosterResponse; + import java.lang.Exception; + import java.nio.charset.StandardCharsets; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + PostMediaPosterResponse res = sdk.library().postMediaPoster() + .ratingKey(2268L) + .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + .requestBody("0x7C3d45ad4B".getBytes(StandardCharsets.UTF_8)) + .call(); + + // handle response + } + } - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] update: x-codeSamples: diff --git a/docs/models/operations/GetMediaArtsMediaContainer.md b/docs/models/operations/GetMediaArtsMediaContainer.md new file mode 100644 index 00000000..cf6dc62b --- /dev/null +++ b/docs/models/operations/GetMediaArtsMediaContainer.md @@ -0,0 +1,12 @@ +# GetMediaArtsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | +| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `metadata` | List\<[GetMediaArtsMetadata](../../models/operations/GetMediaArtsMetadata.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsMetadata.md b/docs/models/operations/GetMediaArtsMetadata.md new file mode 100644 index 00000000..dfe0f2eb --- /dev/null +++ b/docs/models/operations/GetMediaArtsMetadata.md @@ -0,0 +1,12 @@ +# GetMediaArtsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | +| `provider` | *Optional\* | :heavy_minus_sign: | The provider of the artwork. | tmdb | +| `ratingKey` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | +| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true | +| `thumb` | *String* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsRequest.md b/docs/models/operations/GetMediaArtsRequest.md new file mode 100644 index 00000000..44e20b15 --- /dev/null +++ b/docs/models/operations/GetMediaArtsRequest.md @@ -0,0 +1,8 @@ +# GetMediaArtsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsResponse.md b/docs/models/operations/GetMediaArtsResponse.md new file mode 100644 index 00000000..949547d4 --- /dev/null +++ b/docs/models/operations/GetMediaArtsResponse.md @@ -0,0 +1,11 @@ +# GetMediaArtsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/GetMediaArtsResponseBody.md) | :heavy_minus_sign: | The available background artwork for the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsResponseBody.md b/docs/models/operations/GetMediaArtsResponseBody.md new file mode 100644 index 00000000..67846c85 --- /dev/null +++ b/docs/models/operations/GetMediaArtsResponseBody.md @@ -0,0 +1,10 @@ +# GetMediaArtsResponseBody + +The available background artwork for the library item. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetMediaArtsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersMediaContainer.md b/docs/models/operations/GetMediaPostersMediaContainer.md new file mode 100644 index 00000000..f965a9e4 --- /dev/null +++ b/docs/models/operations/GetMediaPostersMediaContainer.md @@ -0,0 +1,12 @@ +# GetMediaPostersMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | +| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `metadata` | List\<[GetMediaPostersMetadata](../../models/operations/GetMediaPostersMetadata.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersMetadata.md b/docs/models/operations/GetMediaPostersMetadata.md new file mode 100644 index 00000000..540626ae --- /dev/null +++ b/docs/models/operations/GetMediaPostersMetadata.md @@ -0,0 +1,12 @@ +# GetMediaPostersMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | +| `provider` | *Optional\* | :heavy_minus_sign: | The provider of the poster. | tmdb | +| `ratingKey` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | +| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true | +| `thumb` | *String* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersRequest.md b/docs/models/operations/GetMediaPostersRequest.md new file mode 100644 index 00000000..615c70bb --- /dev/null +++ b/docs/models/operations/GetMediaPostersRequest.md @@ -0,0 +1,8 @@ +# GetMediaPostersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersResponse.md b/docs/models/operations/GetMediaPostersResponse.md new file mode 100644 index 00000000..afd70df5 --- /dev/null +++ b/docs/models/operations/GetMediaPostersResponse.md @@ -0,0 +1,11 @@ +# GetMediaPostersResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/GetMediaPostersResponseBody.md) | :heavy_minus_sign: | The available posters for the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersResponseBody.md b/docs/models/operations/GetMediaPostersResponseBody.md new file mode 100644 index 00000000..e374c367 --- /dev/null +++ b/docs/models/operations/GetMediaPostersResponseBody.md @@ -0,0 +1,10 @@ +# GetMediaPostersResponseBody + +The available posters for the library item. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetMediaPostersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PostMediaArtsRequest.md b/docs/models/operations/PostMediaArtsRequest.md new file mode 100644 index 00000000..40e52dfc --- /dev/null +++ b/docs/models/operations/PostMediaArtsRequest.md @@ -0,0 +1,10 @@ +# PostMediaArtsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | +| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | +| `requestBody` | *Optional\* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/models/operations/PostMediaArtsResponse.md b/docs/models/operations/PostMediaArtsResponse.md new file mode 100644 index 00000000..9130b281 --- /dev/null +++ b/docs/models/operations/PostMediaArtsResponse.md @@ -0,0 +1,10 @@ +# PostMediaArtsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/PostMediaPosterRequest.md b/docs/models/operations/PostMediaPosterRequest.md new file mode 100644 index 00000000..3d1e8875 --- /dev/null +++ b/docs/models/operations/PostMediaPosterRequest.md @@ -0,0 +1,10 @@ +# PostMediaPosterRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | +| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | +| `requestBody` | *Optional\* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/models/operations/PostMediaPosterResponse.md b/docs/models/operations/PostMediaPosterResponse.md new file mode 100644 index 00000000..c8c49616 --- /dev/null +++ b/docs/models/operations/PostMediaPosterResponse.md @@ -0,0 +1,10 @@ +# PostMediaPosterResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 9dd0d634..0acabac5 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries * [getActorsLibrary](#getactorslibrary) - Get Actors of library media * [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries * [getMediaMetaData](#getmediametadata) - Get Media Metadata +* [getMediaArts](#getmediaarts) - Get Media Background Artwork +* [postMediaArts](#postmediaarts) - Upload Media Background Artwork +* [getMediaPosters](#getmediaposters) - Get Media Posters +* [postMediaPoster](#postmediaposter) - Upload Media Poster * [getMetadataChildren](#getmetadatachildren) - Get Items Children * [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content @@ -909,6 +913,204 @@ public class Application { | models/errors/GetMediaMetaDataUnauthorized | 401 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## getMediaArts + +Returns the background artwork for a library item. + +### Example Usage + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetMediaArtsResponse res = sdk.library().getMediaArts() + .ratingKey(16099L) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 | + +### Response + +**[GetMediaArtsResponse](../../models/operations/GetMediaArtsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## postMediaArts + +Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + +### Example Usage + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; +import java.lang.Exception; +import java.nio.charset.StandardCharsets; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + PostMediaArtsResponse res = sdk.library().postMediaArts() + .ratingKey(2268L) + .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + .requestBody("0xee51EFC6De".getBytes(StandardCharsets.UTF_8)) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | +| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | +| `requestBody` | *Optional\* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | + +### Response + +**[PostMediaArtsResponse](../../models/operations/PostMediaArtsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getMediaPosters + +Returns the available posters for a library item. + +### Example Usage + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetMediaPostersResponse res = sdk.library().getMediaPosters() + .ratingKey(16099L) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 | + +### Response + +**[GetMediaPostersResponse](../../models/operations/GetMediaPostersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## postMediaPoster + +Uploads a poster to a library item, either from a local file or a remote URL + +### Example Usage + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; +import java.lang.Exception; +import java.nio.charset.StandardCharsets; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + PostMediaPosterResponse res = sdk.library().postMediaPoster() + .ratingKey(2268L) + .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + .requestBody("0x7C3d45ad4B".getBytes(StandardCharsets.UTF_8)) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | +| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | +| `requestBody` | *Optional\* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | + +### Response + +**[PostMediaPosterResponse](../../models/operations/PostMediaPosterResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## getMetadataChildren This endpoint will return the children of of a library item specified with the ratingKey. diff --git a/gradle.properties b/gradle.properties index 8f1cd670..84e88f85 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ groupId=dev.plexapi artifactId=plexapi -version=0.14.0 \ No newline at end of file +version=0.14.1 \ No newline at end of file diff --git a/src/main/java/dev/plexapi/sdk/Activities.java b/src/main/java/dev/plexapi/sdk/Activities.java index 34df7aa8..c23a2bf2 100644 --- a/src/main/java/dev/plexapi/sdk/Activities.java +++ b/src/main/java/dev/plexapi/sdk/Activities.java @@ -30,8 +30,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. diff --git a/src/main/java/dev/plexapi/sdk/Authentication.java b/src/main/java/dev/plexapi/sdk/Authentication.java index d54619d9..de12e185 100644 --- a/src/main/java/dev/plexapi/sdk/Authentication.java +++ b/src/main/java/dev/plexapi/sdk/Authentication.java @@ -47,8 +47,6 @@ import java.util.HashMap; import java.util.List; import java.util.Optional; - - /** * API Calls regarding authentication for Plex Media Server */ diff --git a/src/main/java/dev/plexapi/sdk/Butler.java b/src/main/java/dev/plexapi/sdk/Butler.java index a908be3f..eb33357f 100644 --- a/src/main/java/dev/plexapi/sdk/Butler.java +++ b/src/main/java/dev/plexapi/sdk/Butler.java @@ -45,8 +45,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Butler is the task manager of the Plex Media Server Ecosystem. */ diff --git a/src/main/java/dev/plexapi/sdk/Hubs.java b/src/main/java/dev/plexapi/sdk/Hubs.java index 3d812a1f..a4c61cab 100644 --- a/src/main/java/dev/plexapi/sdk/Hubs.java +++ b/src/main/java/dev/plexapi/sdk/Hubs.java @@ -39,8 +39,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. */ diff --git a/src/main/java/dev/plexapi/sdk/Library.java b/src/main/java/dev/plexapi/sdk/Library.java index 9248b173..d4c344c5 100644 --- a/src/main/java/dev/plexapi/sdk/Library.java +++ b/src/main/java/dev/plexapi/sdk/Library.java @@ -74,10 +74,18 @@ import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequestBuilder; import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody; +import dev.plexapi.sdk.models.operations.GetMediaArtsRequest; +import dev.plexapi.sdk.models.operations.GetMediaArtsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; +import dev.plexapi.sdk.models.operations.GetMediaArtsResponseBody; import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequestBuilder; import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponseBody; +import dev.plexapi.sdk.models.operations.GetMediaPostersRequest; +import dev.plexapi.sdk.models.operations.GetMediaPostersRequestBuilder; +import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; +import dev.plexapi.sdk.models.operations.GetMediaPostersResponseBody; import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest; import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequestBuilder; import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; @@ -104,25 +112,32 @@ import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequestBuilder; import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody; import dev.plexapi.sdk.models.operations.IncludeDetails; +import dev.plexapi.sdk.models.operations.PostMediaArtsRequest; +import dev.plexapi.sdk.models.operations.PostMediaArtsRequestBuilder; +import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; +import dev.plexapi.sdk.models.operations.PostMediaPosterRequest; +import dev.plexapi.sdk.models.operations.PostMediaPosterRequestBuilder; +import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*; import dev.plexapi.sdk.utils.HTTPClient; import dev.plexapi.sdk.utils.HTTPRequest; import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.SerializedBody; +import dev.plexapi.sdk.utils.Utils.JsonShape; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Double; import java.lang.Exception; import java.lang.Long; +import java.lang.Object; import java.lang.String; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls interacting with Plex Media Server Libraries */ @@ -141,6 +156,10 @@ public class Library implements MethodCallGetActorsLibrary, MethodCallGetSearchAllLibraries, MethodCallGetMediaMetaData, + MethodCallGetMediaArts, + MethodCallPostMediaArts, + MethodCallGetMediaPosters, + MethodCallPostMediaPoster, MethodCallGetMetadataChildren, MethodCallGetTopWatchedContent { @@ -2860,6 +2879,618 @@ public class Library implements + /** + * Get Media Background Artwork + * + *

Returns the background artwork for a library item. + * + * @return The call builder + */ + public GetMediaArtsRequestBuilder getMediaArts() { + return new GetMediaArtsRequestBuilder(this); + } + + /** + * Get Media Background Artwork + * + *

Returns the background artwork for a library item. + * + * @param ratingKey the id of the library item to return the artwork of. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetMediaArtsResponse getMediaArts( + long ratingKey) throws Exception { + GetMediaArtsRequest request = + GetMediaArtsRequest + .builder() + .ratingKey(ratingKey) + .build(); + + String _baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + String _url = Utils.generateURL( + GetMediaArtsRequest.class, + _baseUrl, + "/library/metadata/{ratingKey}/arts", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + _baseUrl, + "get-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "get-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + _baseUrl, + "get-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "get-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetMediaArtsResponse.Builder _resBuilder = + GetMediaArtsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetMediaArtsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMediaArtsResponseBody _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withObject(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Upload Media Background Artwork + * + *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + * + * @return The call builder + */ + public PostMediaArtsRequestBuilder postMediaArts() { + return new PostMediaArtsRequestBuilder(this); + } + + /** + * Upload Media Background Artwork + * + *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + * + * @param ratingKey the id of the library item to return the posters of. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostMediaArtsResponse postMediaArts( + long ratingKey) throws Exception { + return postMediaArts(ratingKey, Optional.empty(), Optional.empty()); + } + + /** + * Upload Media Background Artwork + * + *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + * + * @param ratingKey the id of the library item to return the posters of. + * @param url The URL of the image, if uploading a remote image + * @param requestBody The contents of the image, if uploading a local file + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostMediaArtsResponse postMediaArts( + long ratingKey, + Optional url, + Optional requestBody) throws Exception { + PostMediaArtsRequest request = + PostMediaArtsRequest + .builder() + .ratingKey(ratingKey) + .url(url) + .requestBody(requestBody) + .build(); + + String _baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + String _url = Utils.generateURL( + PostMediaArtsRequest.class, + _baseUrl, + "/library/metadata/{ratingKey}/arts", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "raw", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "*/*") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + PostMediaArtsRequest.class, + request, + null)); + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + _baseUrl, + "post-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "post-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + _baseUrl, + "post-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "post-media-arts", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostMediaArtsResponse.Builder _resBuilder = + PostMediaArtsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + PostMediaArtsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get Media Posters + * + *

Returns the available posters for a library item. + * + * @return The call builder + */ + public GetMediaPostersRequestBuilder getMediaPosters() { + return new GetMediaPostersRequestBuilder(this); + } + + /** + * Get Media Posters + * + *

Returns the available posters for a library item. + * + * @param ratingKey the id of the library item to return the posters of. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetMediaPostersResponse getMediaPosters( + long ratingKey) throws Exception { + GetMediaPostersRequest request = + GetMediaPostersRequest + .builder() + .ratingKey(ratingKey) + .build(); + + String _baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + String _url = Utils.generateURL( + GetMediaPostersRequest.class, + _baseUrl, + "/library/metadata/{ratingKey}/posters", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + _baseUrl, + "get-media-posters", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "get-media-posters", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + _baseUrl, + "get-media-posters", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "get-media-posters", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetMediaPostersResponse.Builder _resBuilder = + GetMediaPostersResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetMediaPostersResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMediaPostersResponseBody _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withObject(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Upload Media Poster + * + *

Uploads a poster to a library item, either from a local file or a remote URL + * + * @return The call builder + */ + public PostMediaPosterRequestBuilder postMediaPoster() { + return new PostMediaPosterRequestBuilder(this); + } + + /** + * Upload Media Poster + * + *

Uploads a poster to a library item, either from a local file or a remote URL + * + * @param ratingKey the id of the library item to return the posters of. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostMediaPosterResponse postMediaPoster( + long ratingKey) throws Exception { + return postMediaPoster(ratingKey, Optional.empty(), Optional.empty()); + } + + /** + * Upload Media Poster + * + *

Uploads a poster to a library item, either from a local file or a remote URL + * + * @param ratingKey the id of the library item to return the posters of. + * @param url The URL of the image, if uploading a remote image + * @param requestBody The contents of the image, if uploading a local file + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostMediaPosterResponse postMediaPoster( + long ratingKey, + Optional url, + Optional requestBody) throws Exception { + PostMediaPosterRequest request = + PostMediaPosterRequest + .builder() + .ratingKey(ratingKey) + .url(url) + .requestBody(requestBody) + .build(); + + String _baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + String _url = Utils.generateURL( + PostMediaPosterRequest.class, + _baseUrl, + "/library/metadata/{ratingKey}/posters", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "raw", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "*/*") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + PostMediaPosterRequest.class, + request, + null)); + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + _baseUrl, + "post-media-poster", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "post-media-poster", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + _baseUrl, + "post-media-poster", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + _baseUrl, + "post-media-poster", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostMediaPosterResponse.Builder _resBuilder = + PostMediaPosterResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + PostMediaPosterResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + /** * Get Items Children * diff --git a/src/main/java/dev/plexapi/sdk/Log.java b/src/main/java/dev/plexapi/sdk/Log.java index 230c43f9..c6f97ed0 100644 --- a/src/main/java/dev/plexapi/sdk/Log.java +++ b/src/main/java/dev/plexapi/sdk/Log.java @@ -37,8 +37,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Submit logs to the Log Handler for Plex Media Server */ diff --git a/src/main/java/dev/plexapi/sdk/Media.java b/src/main/java/dev/plexapi/sdk/Media.java index efce05f8..a6c758cc 100644 --- a/src/main/java/dev/plexapi/sdk/Media.java +++ b/src/main/java/dev/plexapi/sdk/Media.java @@ -45,8 +45,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls interacting with Plex Media Server Media */ diff --git a/src/main/java/dev/plexapi/sdk/Playlists.java b/src/main/java/dev/plexapi/sdk/Playlists.java index 425d07df..18f48e1c 100644 --- a/src/main/java/dev/plexapi/sdk/Playlists.java +++ b/src/main/java/dev/plexapi/sdk/Playlists.java @@ -75,8 +75,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). * They can be organized in (optionally nesting) folders. diff --git a/src/main/java/dev/plexapi/sdk/Plex.java b/src/main/java/dev/plexapi/sdk/Plex.java index 8b577c7f..e017d6d6 100644 --- a/src/main/java/dev/plexapi/sdk/Plex.java +++ b/src/main/java/dev/plexapi/sdk/Plex.java @@ -61,8 +61,6 @@ import java.util.HashMap; import java.util.List; import java.util.Optional; - - /** * API Calls that perform operations directly against https://Plex.tv */ diff --git a/src/main/java/dev/plexapi/sdk/PlexAPI.java b/src/main/java/dev/plexapi/sdk/PlexAPI.java index 32bc91a2..1a332e1e 100644 --- a/src/main/java/dev/plexapi/sdk/PlexAPI.java +++ b/src/main/java/dev/plexapi/sdk/PlexAPI.java @@ -14,8 +14,6 @@ import java.util.Objects; import java.util.Optional; import java.util.function.Consumer; - - /** * Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server * diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index eff274b4..70cbe6e1 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -17,8 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Optional; - - class SDKConfiguration { public SecuritySource securitySource; @@ -44,8 +42,8 @@ class SDKConfiguration { } }; private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.0.3"; - public static final String SDK_VERSION = "0.14.0"; - public static final String GEN_VERSION = "2.563.1"; + public static final String SDK_VERSION = "0.14.1"; + public static final String GEN_VERSION = "2.565.1"; private static final String BASE_PACKAGE = "dev.plexapi.sdk"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/dev/plexapi/sdk/Search.java b/src/main/java/dev/plexapi/sdk/Search.java index ed198ed3..92c89930 100644 --- a/src/main/java/dev/plexapi/sdk/Search.java +++ b/src/main/java/dev/plexapi/sdk/Search.java @@ -37,8 +37,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls that perform search operations with Plex Media Server */ diff --git a/src/main/java/dev/plexapi/sdk/SecuritySource.java b/src/main/java/dev/plexapi/sdk/SecuritySource.java index 622efc75..38a43f5a 100644 --- a/src/main/java/dev/plexapi/sdk/SecuritySource.java +++ b/src/main/java/dev/plexapi/sdk/SecuritySource.java @@ -5,8 +5,6 @@ package dev.plexapi.sdk; import dev.plexapi.sdk.utils.HasSecurity; - - public interface SecuritySource { HasSecurity getSecurity(); diff --git a/src/main/java/dev/plexapi/sdk/Server.java b/src/main/java/dev/plexapi/sdk/Server.java index 0f0d0a34..b4e72bdb 100644 --- a/src/main/java/dev/plexapi/sdk/Server.java +++ b/src/main/java/dev/plexapi/sdk/Server.java @@ -65,8 +65,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * Operations against the Plex Media Server System. */ diff --git a/src/main/java/dev/plexapi/sdk/Sessions.java b/src/main/java/dev/plexapi/sdk/Sessions.java index c5a07882..6657ebb7 100644 --- a/src/main/java/dev/plexapi/sdk/Sessions.java +++ b/src/main/java/dev/plexapi/sdk/Sessions.java @@ -43,8 +43,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls that perform search operations with Plex Media Server Sessions */ diff --git a/src/main/java/dev/plexapi/sdk/Statistics.java b/src/main/java/dev/plexapi/sdk/Statistics.java index 8278ad87..04877d5b 100644 --- a/src/main/java/dev/plexapi/sdk/Statistics.java +++ b/src/main/java/dev/plexapi/sdk/Statistics.java @@ -39,8 +39,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls that perform operations with Plex Media Server Statistics */ diff --git a/src/main/java/dev/plexapi/sdk/Updater.java b/src/main/java/dev/plexapi/sdk/Updater.java index 3ca0c4f0..481c17f4 100644 --- a/src/main/java/dev/plexapi/sdk/Updater.java +++ b/src/main/java/dev/plexapi/sdk/Updater.java @@ -38,8 +38,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * This describes the API for searching and applying updates to the Plex Media Server. * Updates to the status can be observed via the Event API. diff --git a/src/main/java/dev/plexapi/sdk/Users.java b/src/main/java/dev/plexapi/sdk/Users.java index 50ced3a7..36d16de4 100644 --- a/src/main/java/dev/plexapi/sdk/Users.java +++ b/src/main/java/dev/plexapi/sdk/Users.java @@ -26,8 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Optional; - - public class Users implements MethodCallGetUsers { diff --git a/src/main/java/dev/plexapi/sdk/Video.java b/src/main/java/dev/plexapi/sdk/Video.java index 7f6311b2..b49a6657 100644 --- a/src/main/java/dev/plexapi/sdk/Video.java +++ b/src/main/java/dev/plexapi/sdk/Video.java @@ -30,8 +30,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; - - /** * API Calls that perform operations with Plex Media Server Videos */ diff --git a/src/main/java/dev/plexapi/sdk/Watchlist.java b/src/main/java/dev/plexapi/sdk/Watchlist.java index 6aafe50d..ddf9b1fa 100644 --- a/src/main/java/dev/plexapi/sdk/Watchlist.java +++ b/src/main/java/dev/plexapi/sdk/Watchlist.java @@ -27,8 +27,6 @@ import java.util.HashMap; import java.util.List; import java.util.Optional; - - /** * API Calls that perform operations with Plex Media Server Watchlists */ diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java new file mode 100644 index 00000000..06cec101 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +public class GetMediaArtsMediaContainer { + + /** + * Number of media items returned in this response. + */ + @JsonProperty("size") + private int size; + + /** + * The version number for media tags. + */ + @JsonProperty("mediaTagVersion") + private long mediaTagVersion; + + /** + * The prefix used for media tag resource paths. + */ + @JsonProperty("mediaTagPrefix") + private String mediaTagPrefix; + + /** + * An plugin identifier for the media container. + */ + @JsonProperty("identifier") + private String identifier; + + @JsonProperty("Metadata") + private List metadata; + + @JsonCreator + public GetMediaArtsMediaContainer( + @JsonProperty("size") int size, + @JsonProperty("mediaTagVersion") long mediaTagVersion, + @JsonProperty("mediaTagPrefix") String mediaTagPrefix, + @JsonProperty("identifier") String identifier, + @JsonProperty("Metadata") List metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.mediaTagVersion = mediaTagVersion; + this.mediaTagPrefix = mediaTagPrefix; + this.identifier = identifier; + this.metadata = metadata; + } + + /** + * Number of media items returned in this response. + */ + @JsonIgnore + public int size() { + return size; + } + + /** + * The version number for media tags. + */ + @JsonIgnore + public long mediaTagVersion() { + return mediaTagVersion; + } + + /** + * The prefix used for media tag resource paths. + */ + @JsonIgnore + public String mediaTagPrefix() { + return mediaTagPrefix; + } + + /** + * An plugin identifier for the media container. + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + @JsonIgnore + public List metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Number of media items returned in this response. + */ + public GetMediaArtsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The version number for media tags. + */ + public GetMediaArtsMediaContainer withMediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public GetMediaArtsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public GetMediaArtsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetMediaArtsMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaArtsMediaContainer other = (GetMediaArtsMediaContainer) o; + return + Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + Objects.deepEquals(this.identifier, other.identifier) && + Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Objects.hash( + size, + mediaTagVersion, + mediaTagPrefix, + identifier, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetMediaArtsMediaContainer.class, + "size", size, + "mediaTagVersion", mediaTagVersion, + "mediaTagPrefix", mediaTagPrefix, + "identifier", identifier, + "metadata", metadata); + } + + public final static class Builder { + + private Integer size; + + private Long mediaTagVersion; + + private String mediaTagPrefix; + + private String identifier; + + private List metadata; + + private Builder() { + // force use of static builder() method + } + + /** + * Number of media items returned in this response. + */ + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The version number for media tags. + */ + public Builder mediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder metadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetMediaArtsMediaContainer build() { + return new GetMediaArtsMediaContainer( + size, + mediaTagVersion, + mediaTagPrefix, + identifier, + metadata); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java new file mode 100644 index 00000000..48742d10 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java @@ -0,0 +1,293 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class GetMediaArtsMetadata { + + /** + * The URL of the artwork. + */ + @JsonProperty("key") + private String key; + + /** + * The provider of the artwork. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("provider") + private Optional provider; + + /** + * The URL of the artwork. + */ + @JsonProperty("ratingKey") + private String ratingKey; + + /** + * Whether this is the selected artwork. + */ + @JsonProperty("selected") + private boolean selected; + + /** + * The URL of the artwork thumbnail. + */ + @JsonProperty("thumb") + private String thumb; + + @JsonCreator + public GetMediaArtsMetadata( + @JsonProperty("key") String key, + @JsonProperty("provider") Optional provider, + @JsonProperty("ratingKey") String ratingKey, + @JsonProperty("selected") boolean selected, + @JsonProperty("thumb") String thumb) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(provider, "provider"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(thumb, "thumb"); + this.key = key; + this.provider = provider; + this.ratingKey = ratingKey; + this.selected = selected; + this.thumb = thumb; + } + + public GetMediaArtsMetadata( + String key, + String ratingKey, + boolean selected, + String thumb) { + this(key, Optional.empty(), ratingKey, selected, thumb); + } + + /** + * The URL of the artwork. + */ + @JsonIgnore + public String key() { + return key; + } + + /** + * The provider of the artwork. + */ + @JsonIgnore + public Optional provider() { + return provider; + } + + /** + * The URL of the artwork. + */ + @JsonIgnore + public String ratingKey() { + return ratingKey; + } + + /** + * Whether this is the selected artwork. + */ + @JsonIgnore + public boolean selected() { + return selected; + } + + /** + * The URL of the artwork thumbnail. + */ + @JsonIgnore + public String thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The URL of the artwork. + */ + public GetMediaArtsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The provider of the artwork. + */ + public GetMediaArtsMetadata withProvider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + /** + * The provider of the artwork. + */ + public GetMediaArtsMetadata withProvider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + /** + * The URL of the artwork. + */ + public GetMediaArtsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * Whether this is the selected artwork. + */ + public GetMediaArtsMetadata withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + /** + * The URL of the artwork thumbnail. + */ + public GetMediaArtsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaArtsMetadata other = (GetMediaArtsMetadata) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.provider, other.provider) && + Objects.deepEquals(this.ratingKey, other.ratingKey) && + Objects.deepEquals(this.selected, other.selected) && + Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + provider, + ratingKey, + selected, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMediaArtsMetadata.class, + "key", key, + "provider", provider, + "ratingKey", ratingKey, + "selected", selected, + "thumb", thumb); + } + + public final static class Builder { + + private String key; + + private Optional provider = Optional.empty(); + + private String ratingKey; + + private Boolean selected; + + private String thumb; + + private Builder() { + // force use of static builder() method + } + + /** + * The URL of the artwork. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The provider of the artwork. + */ + public Builder provider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + /** + * The provider of the artwork. + */ + public Builder provider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + /** + * The URL of the artwork. + */ + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * Whether this is the selected artwork. + */ + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + /** + * The URL of the artwork thumbnail. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMediaArtsMetadata build() { + return new GetMediaArtsMetadata( + key, + provider, + ratingKey, + selected, + thumb); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java new file mode 100644 index 00000000..1599b70d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +public class GetMediaArtsRequest { + + /** + * the id of the library item to return the artwork of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private long ratingKey; + + @JsonCreator + public GetMediaArtsRequest( + long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + } + + /** + * the id of the library item to return the artwork of. + */ + @JsonIgnore + public long ratingKey() { + return ratingKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the artwork of. + */ + public GetMediaArtsRequest withRatingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaArtsRequest other = (GetMediaArtsRequest) o; + return + Objects.deepEquals(this.ratingKey, other.ratingKey); + } + + @Override + public int hashCode() { + return Objects.hash( + ratingKey); + } + + @Override + public String toString() { + return Utils.toString(GetMediaArtsRequest.class, + "ratingKey", ratingKey); + } + + public final static class Builder { + + private Long ratingKey; + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the artwork of. + */ + public Builder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMediaArtsRequest build() { + return new GetMediaArtsRequest( + ratingKey); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java new file mode 100644 index 00000000..d91d322c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.lang.Long; + +public class GetMediaArtsRequestBuilder { + + private Long ratingKey; + private final SDKMethodInterfaces.MethodCallGetMediaArts sdk; + + public GetMediaArtsRequestBuilder(SDKMethodInterfaces.MethodCallGetMediaArts sdk) { + this.sdk = sdk; + } + + public GetMediaArtsRequestBuilder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMediaArtsResponse call() throws Exception { + + return sdk.getMediaArts( + ratingKey); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java new file mode 100644 index 00000000..f9bd7bdc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java @@ -0,0 +1,248 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + +public class GetMediaArtsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The available background artwork for the library item. + */ + private Optional object; + + @JsonCreator + public GetMediaArtsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public GetMediaArtsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The available background artwork for the library item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetMediaArtsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMediaArtsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMediaArtsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The available background artwork for the library item. + */ + public GetMediaArtsResponse withObject(GetMediaArtsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The available background artwork for the library item. + */ + public GetMediaArtsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaArtsResponse other = (GetMediaArtsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetMediaArtsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The available background artwork for the library item. + */ + public Builder object(GetMediaArtsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The available background artwork for the library item. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetMediaArtsResponse build() { + return new GetMediaArtsResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java new file mode 100644 index 00000000..2b72a9f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMediaArtsResponseBody + * + *

The available background artwork for the library item. + */ +public class GetMediaArtsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetMediaArtsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetMediaArtsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMediaArtsResponseBody withMediaContainer(GetMediaArtsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetMediaArtsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaArtsResponseBody other = (GetMediaArtsResponseBody) o; + return + Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetMediaArtsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetMediaArtsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetMediaArtsResponseBody build() { + return new GetMediaArtsResponseBody( + mediaContainer); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java new file mode 100644 index 00000000..3e137c49 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +public class GetMediaPostersMediaContainer { + + /** + * Number of media items returned in this response. + */ + @JsonProperty("size") + private int size; + + /** + * The version number for media tags. + */ + @JsonProperty("mediaTagVersion") + private long mediaTagVersion; + + /** + * The prefix used for media tag resource paths. + */ + @JsonProperty("mediaTagPrefix") + private String mediaTagPrefix; + + /** + * An plugin identifier for the media container. + */ + @JsonProperty("identifier") + private String identifier; + + @JsonProperty("Metadata") + private List metadata; + + @JsonCreator + public GetMediaPostersMediaContainer( + @JsonProperty("size") int size, + @JsonProperty("mediaTagVersion") long mediaTagVersion, + @JsonProperty("mediaTagPrefix") String mediaTagPrefix, + @JsonProperty("identifier") String identifier, + @JsonProperty("Metadata") List metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.mediaTagVersion = mediaTagVersion; + this.mediaTagPrefix = mediaTagPrefix; + this.identifier = identifier; + this.metadata = metadata; + } + + /** + * Number of media items returned in this response. + */ + @JsonIgnore + public int size() { + return size; + } + + /** + * The version number for media tags. + */ + @JsonIgnore + public long mediaTagVersion() { + return mediaTagVersion; + } + + /** + * The prefix used for media tag resource paths. + */ + @JsonIgnore + public String mediaTagPrefix() { + return mediaTagPrefix; + } + + /** + * An plugin identifier for the media container. + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + @JsonIgnore + public List metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Number of media items returned in this response. + */ + public GetMediaPostersMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The version number for media tags. + */ + public GetMediaPostersMediaContainer withMediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public GetMediaPostersMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public GetMediaPostersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetMediaPostersMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPostersMediaContainer other = (GetMediaPostersMediaContainer) o; + return + Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + Objects.deepEquals(this.identifier, other.identifier) && + Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Objects.hash( + size, + mediaTagVersion, + mediaTagPrefix, + identifier, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPostersMediaContainer.class, + "size", size, + "mediaTagVersion", mediaTagVersion, + "mediaTagPrefix", mediaTagPrefix, + "identifier", identifier, + "metadata", metadata); + } + + public final static class Builder { + + private Integer size; + + private Long mediaTagVersion; + + private String mediaTagPrefix; + + private String identifier; + + private List metadata; + + private Builder() { + // force use of static builder() method + } + + /** + * Number of media items returned in this response. + */ + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The version number for media tags. + */ + public Builder mediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder metadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetMediaPostersMediaContainer build() { + return new GetMediaPostersMediaContainer( + size, + mediaTagVersion, + mediaTagPrefix, + identifier, + metadata); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java new file mode 100644 index 00000000..4f716681 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java @@ -0,0 +1,293 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class GetMediaPostersMetadata { + + /** + * The URL of the poster. + */ + @JsonProperty("key") + private String key; + + /** + * The provider of the poster. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("provider") + private Optional provider; + + /** + * The URL of the poster. + */ + @JsonProperty("ratingKey") + private String ratingKey; + + /** + * Whether this is the selected poster. + */ + @JsonProperty("selected") + private boolean selected; + + /** + * The URL of the poster thumbnail. + */ + @JsonProperty("thumb") + private String thumb; + + @JsonCreator + public GetMediaPostersMetadata( + @JsonProperty("key") String key, + @JsonProperty("provider") Optional provider, + @JsonProperty("ratingKey") String ratingKey, + @JsonProperty("selected") boolean selected, + @JsonProperty("thumb") String thumb) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(provider, "provider"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(thumb, "thumb"); + this.key = key; + this.provider = provider; + this.ratingKey = ratingKey; + this.selected = selected; + this.thumb = thumb; + } + + public GetMediaPostersMetadata( + String key, + String ratingKey, + boolean selected, + String thumb) { + this(key, Optional.empty(), ratingKey, selected, thumb); + } + + /** + * The URL of the poster. + */ + @JsonIgnore + public String key() { + return key; + } + + /** + * The provider of the poster. + */ + @JsonIgnore + public Optional provider() { + return provider; + } + + /** + * The URL of the poster. + */ + @JsonIgnore + public String ratingKey() { + return ratingKey; + } + + /** + * Whether this is the selected poster. + */ + @JsonIgnore + public boolean selected() { + return selected; + } + + /** + * The URL of the poster thumbnail. + */ + @JsonIgnore + public String thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The URL of the poster. + */ + public GetMediaPostersMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The provider of the poster. + */ + public GetMediaPostersMetadata withProvider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + /** + * The provider of the poster. + */ + public GetMediaPostersMetadata withProvider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + /** + * The URL of the poster. + */ + public GetMediaPostersMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * Whether this is the selected poster. + */ + public GetMediaPostersMetadata withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + /** + * The URL of the poster thumbnail. + */ + public GetMediaPostersMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPostersMetadata other = (GetMediaPostersMetadata) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.provider, other.provider) && + Objects.deepEquals(this.ratingKey, other.ratingKey) && + Objects.deepEquals(this.selected, other.selected) && + Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + provider, + ratingKey, + selected, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPostersMetadata.class, + "key", key, + "provider", provider, + "ratingKey", ratingKey, + "selected", selected, + "thumb", thumb); + } + + public final static class Builder { + + private String key; + + private Optional provider = Optional.empty(); + + private String ratingKey; + + private Boolean selected; + + private String thumb; + + private Builder() { + // force use of static builder() method + } + + /** + * The URL of the poster. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The provider of the poster. + */ + public Builder provider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + /** + * The provider of the poster. + */ + public Builder provider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + /** + * The URL of the poster. + */ + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * Whether this is the selected poster. + */ + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + /** + * The URL of the poster thumbnail. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMediaPostersMetadata build() { + return new GetMediaPostersMetadata( + key, + provider, + ratingKey, + selected, + thumb); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java new file mode 100644 index 00000000..1e2906c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +public class GetMediaPostersRequest { + + /** + * the id of the library item to return the posters of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private long ratingKey; + + @JsonCreator + public GetMediaPostersRequest( + long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + } + + /** + * the id of the library item to return the posters of. + */ + @JsonIgnore + public long ratingKey() { + return ratingKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the posters of. + */ + public GetMediaPostersRequest withRatingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPostersRequest other = (GetMediaPostersRequest) o; + return + Objects.deepEquals(this.ratingKey, other.ratingKey); + } + + @Override + public int hashCode() { + return Objects.hash( + ratingKey); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPostersRequest.class, + "ratingKey", ratingKey); + } + + public final static class Builder { + + private Long ratingKey; + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the posters of. + */ + public Builder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMediaPostersRequest build() { + return new GetMediaPostersRequest( + ratingKey); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java new file mode 100644 index 00000000..963f7a54 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.lang.Long; + +public class GetMediaPostersRequestBuilder { + + private Long ratingKey; + private final SDKMethodInterfaces.MethodCallGetMediaPosters sdk; + + public GetMediaPostersRequestBuilder(SDKMethodInterfaces.MethodCallGetMediaPosters sdk) { + this.sdk = sdk; + } + + public GetMediaPostersRequestBuilder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMediaPostersResponse call() throws Exception { + + return sdk.getMediaPosters( + ratingKey); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java new file mode 100644 index 00000000..b8418b60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java @@ -0,0 +1,248 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + +public class GetMediaPostersResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The available posters for the library item. + */ + private Optional object; + + @JsonCreator + public GetMediaPostersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public GetMediaPostersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The available posters for the library item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetMediaPostersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMediaPostersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMediaPostersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The available posters for the library item. + */ + public GetMediaPostersResponse withObject(GetMediaPostersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The available posters for the library item. + */ + public GetMediaPostersResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPostersResponse other = (GetMediaPostersResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPostersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The available posters for the library item. + */ + public Builder object(GetMediaPostersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The available posters for the library item. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetMediaPostersResponse build() { + return new GetMediaPostersResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java new file mode 100644 index 00000000..98e8c4ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMediaPostersResponseBody + * + *

The available posters for the library item. + */ +public class GetMediaPostersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetMediaPostersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetMediaPostersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMediaPostersResponseBody withMediaContainer(GetMediaPostersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetMediaPostersResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPostersResponseBody other = (GetMediaPostersResponseBody) o; + return + Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPostersResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetMediaPostersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetMediaPostersResponseBody build() { + return new GetMediaPostersResponseBody( + mediaContainer); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java new file mode 100644 index 00000000..0bd0cf15 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java @@ -0,0 +1,223 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class PostMediaArtsRequest { + + /** + * the id of the library item to return the posters of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private long ratingKey; + + /** + * The URL of the image, if uploading a remote image + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + /** + * The contents of the image, if uploading a local file + */ + @SpeakeasyMetadata("request:mediaType=image/*") + private Optional requestBody; + + @JsonCreator + public PostMediaArtsRequest( + long ratingKey, + Optional url, + Optional requestBody) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(requestBody, "requestBody"); + this.ratingKey = ratingKey; + this.url = url; + this.requestBody = requestBody; + } + + public PostMediaArtsRequest( + long ratingKey) { + this(ratingKey, Optional.empty(), Optional.empty()); + } + + /** + * the id of the library item to return the posters of. + */ + @JsonIgnore + public long ratingKey() { + return ratingKey; + } + + /** + * The URL of the image, if uploading a remote image + */ + @JsonIgnore + public Optional url() { + return url; + } + + /** + * The contents of the image, if uploading a local file + */ + @JsonIgnore + public Optional requestBody() { + return requestBody; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the posters of. + */ + public PostMediaArtsRequest withRatingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public PostMediaArtsRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public PostMediaArtsRequest withUrl(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public PostMediaArtsRequest withRequestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public PostMediaArtsRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostMediaArtsRequest other = (PostMediaArtsRequest) o; + return + Objects.deepEquals(this.ratingKey, other.ratingKey) && + Objects.deepEquals(this.url, other.url) && + Objects.deepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Objects.hash( + ratingKey, + url, + requestBody); + } + + @Override + public String toString() { + return Utils.toString(PostMediaArtsRequest.class, + "ratingKey", ratingKey, + "url", url, + "requestBody", requestBody); + } + + public final static class Builder { + + private Long ratingKey; + + private Optional url = Optional.empty(); + + private Optional requestBody = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the posters of. + */ + public Builder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public Builder requestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostMediaArtsRequest build() { + return new PostMediaArtsRequest( + ratingKey, + url, + requestBody); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java new file mode 100644 index 00000000..d24053ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class PostMediaArtsRequestBuilder { + + private Long ratingKey; + private Optional url = Optional.empty(); + private Optional requestBody = Optional.empty(); + private final SDKMethodInterfaces.MethodCallPostMediaArts sdk; + + public PostMediaArtsRequestBuilder(SDKMethodInterfaces.MethodCallPostMediaArts sdk) { + this.sdk = sdk; + } + + public PostMediaArtsRequestBuilder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public PostMediaArtsRequestBuilder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.of(url); + return this; + } + + public PostMediaArtsRequestBuilder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public PostMediaArtsRequestBuilder requestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public PostMediaArtsRequestBuilder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostMediaArtsResponse call() throws Exception { + + return sdk.postMediaArts( + ratingKey, + url, + requestBody); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java new file mode 100644 index 00000000..80ac19f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Objects; + +public class PostMediaArtsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public PostMediaArtsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PostMediaArtsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostMediaArtsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostMediaArtsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostMediaArtsResponse other = (PostMediaArtsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PostMediaArtsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public PostMediaArtsResponse build() { + return new PostMediaArtsResponse( + contentType, + statusCode, + rawResponse); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java new file mode 100644 index 00000000..2615c346 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java @@ -0,0 +1,223 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class PostMediaPosterRequest { + + /** + * the id of the library item to return the posters of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private long ratingKey; + + /** + * The URL of the image, if uploading a remote image + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + /** + * The contents of the image, if uploading a local file + */ + @SpeakeasyMetadata("request:mediaType=image/*") + private Optional requestBody; + + @JsonCreator + public PostMediaPosterRequest( + long ratingKey, + Optional url, + Optional requestBody) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(requestBody, "requestBody"); + this.ratingKey = ratingKey; + this.url = url; + this.requestBody = requestBody; + } + + public PostMediaPosterRequest( + long ratingKey) { + this(ratingKey, Optional.empty(), Optional.empty()); + } + + /** + * the id of the library item to return the posters of. + */ + @JsonIgnore + public long ratingKey() { + return ratingKey; + } + + /** + * The URL of the image, if uploading a remote image + */ + @JsonIgnore + public Optional url() { + return url; + } + + /** + * The contents of the image, if uploading a local file + */ + @JsonIgnore + public Optional requestBody() { + return requestBody; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the posters of. + */ + public PostMediaPosterRequest withRatingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public PostMediaPosterRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public PostMediaPosterRequest withUrl(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public PostMediaPosterRequest withRequestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public PostMediaPosterRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostMediaPosterRequest other = (PostMediaPosterRequest) o; + return + Objects.deepEquals(this.ratingKey, other.ratingKey) && + Objects.deepEquals(this.url, other.url) && + Objects.deepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Objects.hash( + ratingKey, + url, + requestBody); + } + + @Override + public String toString() { + return Utils.toString(PostMediaPosterRequest.class, + "ratingKey", ratingKey, + "url", url, + "requestBody", requestBody); + } + + public final static class Builder { + + private Long ratingKey; + + private Optional url = Optional.empty(); + + private Optional requestBody = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the posters of. + */ + public Builder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The URL of the image, if uploading a remote image + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public Builder requestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * The contents of the image, if uploading a local file + */ + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostMediaPosterRequest build() { + return new PostMediaPosterRequest( + ratingKey, + url, + requestBody); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java new file mode 100644 index 00000000..f17dff69 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class PostMediaPosterRequestBuilder { + + private Long ratingKey; + private Optional url = Optional.empty(); + private Optional requestBody = Optional.empty(); + private final SDKMethodInterfaces.MethodCallPostMediaPoster sdk; + + public PostMediaPosterRequestBuilder(SDKMethodInterfaces.MethodCallPostMediaPoster sdk) { + this.sdk = sdk; + } + + public PostMediaPosterRequestBuilder ratingKey(long ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public PostMediaPosterRequestBuilder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.of(url); + return this; + } + + public PostMediaPosterRequestBuilder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public PostMediaPosterRequestBuilder requestBody(byte[] requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public PostMediaPosterRequestBuilder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostMediaPosterResponse call() throws Exception { + + return sdk.postMediaPoster( + ratingKey, + url, + requestBody); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java new file mode 100644 index 00000000..52b0c0fc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Objects; + +public class PostMediaPosterResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public PostMediaPosterResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PostMediaPosterResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostMediaPosterResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostMediaPosterResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostMediaPosterResponse other = (PostMediaPosterResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PostMediaPosterResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public PostMediaPosterResponse build() { + return new PostMediaPosterResponse( + contentType, + statusCode, + rawResponse); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java index aaa2b561..aacde83c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java @@ -270,6 +270,30 @@ public class SDKMethodInterfaces { GetMediaMetaDataRequest request) throws Exception; } + public interface MethodCallGetMediaArts { + GetMediaArtsResponse getMediaArts( + long ratingKey) throws Exception; + } + + public interface MethodCallPostMediaArts { + PostMediaArtsResponse postMediaArts( + long ratingKey, + Optional url, + Optional requestBody) throws Exception; + } + + public interface MethodCallGetMediaPosters { + GetMediaPostersResponse getMediaPosters( + long ratingKey) throws Exception; + } + + public interface MethodCallPostMediaPoster { + PostMediaPosterResponse postMediaPoster( + long ratingKey, + Optional url, + Optional requestBody) throws Exception; + } + public interface MethodCallGetMetadataChildren { GetMetadataChildrenResponse getMetadataChildren( double ratingKey, diff --git a/src/main/java/dev/plexapi/sdk/utils/Constants.java b/src/main/java/dev/plexapi/sdk/utils/Constants.java new file mode 100644 index 00000000..94bf7772 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/utils/Constants.java @@ -0,0 +1,10 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.utils; + +public final class Constants { + + public static final boolean HAS_CLIENT_CREDENTIALS_BASIC = false; + +} \ No newline at end of file diff --git a/src/main/java/dev/plexapi/sdk/utils/Security.java b/src/main/java/dev/plexapi/sdk/utils/Security.java index 6950ea13..a9dd6e40 100644 --- a/src/main/java/dev/plexapi/sdk/utils/Security.java +++ b/src/main/java/dev/plexapi/sdk/utils/Security.java @@ -7,8 +7,14 @@ import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Base64; +import java.util.Deque; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; import java.util.Optional; +import java.util.Set; import java.util.regex.Pattern; +import java.util.stream.Collectors; import java.util.stream.Stream; public final class Security { @@ -187,6 +193,58 @@ public final class Security { .getBytes(StandardCharsets.UTF_8))); } + public static Optional findComplexObjectWithNonEmptyAnnotatedField(Object object, String... regexes) { + if (object == null || object instanceof String) { + return Optional.empty(); + } + Deque stack = new LinkedList<>(); + // be defensive about circular references (not expected) + Set processed = new HashSet<>(); + stack.push(object); + processed.add(object); + while (!stack.isEmpty()) { + Object o = stack.pop(); + Field[] fields = o.getClass().getDeclaredFields(); + List annotatedFields = Arrays.stream(fields) // + .filter(f -> { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + return anns != null && anns.length > 0; + }) // + .collect(Collectors.toList()); + for (Field f : annotatedFields) { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + Object value = getUnwrappedFieldValue(o, f); + if (value != null && !(value instanceof String)) { + // we are looking for a complex object (so can't be a String) + boolean regexMatches = Arrays // + .stream(regexes) // + .allMatch(regex -> matches(anns, regex)); + if (regexMatches) { + return Optional.of(value); + } else if (!processed.contains(value)) { + stack.push(value); + processed.add(value); + } + } + } + } + return Optional.empty(); + } + + private static Object getUnwrappedFieldValue(Object o, Field f) { + try { + f.setAccessible(true); + Object value = f.get(o); + if (value != null && value instanceof Optional) { + return ((Optional) value).orElse(null); + } else { + return value; + } + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } + public static Stream findFieldsWhereMetadataContainsRegexes(Object o, String... regexes) { Field[] fields = o.getClass().getDeclaredFields(); return Arrays.stream(fields) //