diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eb37ab08..112ac17a 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: b2624bb972abebc11eff6d460c59de68 + docChecksum: 77bdddd188d0778dc73b7f7906e1677c docVersion: 0.0.3 - speakeasyVersion: 1.555.2 - generationVersion: 2.620.2 - releaseVersion: 0.17.0 - configChecksum: 452927d9308bb18bebc28339b8531c97 + speakeasyVersion: 1.557.0 + generationVersion: 2.623.0 + releaseVersion: 0.17.1 + configChecksum: f865745905f2269f88f086ce18e82519 repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.37.3 + core: 3.37.4 deprecations: 2.81.1 downloadStreams: 0.1.1 enums: 2.81.2 @@ -394,9 +394,7 @@ generatedFiles: - docs/models/operations/Director.md - docs/models/operations/Directory.md - docs/models/operations/Download.md - - docs/models/operations/EnableCreditsMarkerGeneration.md - docs/models/operations/EnablePaperTrailResponse.md - - docs/models/operations/EpisodeSort.md - docs/models/operations/Extras.md - docs/models/operations/Feature.md - docs/models/operations/Field.md @@ -492,17 +490,11 @@ generatedFiles: - docs/models/operations/GetLibraryItemsFieldType.md - docs/models/operations/GetLibraryItemsFilter.md - docs/models/operations/GetLibraryItemsGenre.md + - docs/models/operations/GetLibraryItemsGuids.md - docs/models/operations/GetLibraryItemsHasThumbnail.md - docs/models/operations/GetLibraryItemsImage.md - - docs/models/operations/GetLibraryItemsLibraryActiveDirection.md - - docs/models/operations/GetLibraryItemsLibraryDefaultDirection.md - - docs/models/operations/GetLibraryItemsLibraryField.md - - docs/models/operations/GetLibraryItemsLibraryFieldType.md - - docs/models/operations/GetLibraryItemsLibraryFilter.md - - docs/models/operations/GetLibraryItemsLibraryOperator.md - - docs/models/operations/GetLibraryItemsLibraryResponse200Type.md + - docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md - docs/models/operations/GetLibraryItemsLibraryResponseType.md - - docs/models/operations/GetLibraryItemsLibrarySort.md - docs/models/operations/GetLibraryItemsLibraryType.md - docs/models/operations/GetLibraryItemsLocation.md - docs/models/operations/GetLibraryItemsMedia.md @@ -511,15 +503,17 @@ generatedFiles: - docs/models/operations/GetLibraryItemsMetadata.md - docs/models/operations/GetLibraryItemsOperator.md - docs/models/operations/GetLibraryItemsOptimizedForStreaming.md + - docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md - docs/models/operations/GetLibraryItemsPart.md + - docs/models/operations/GetLibraryItemsProducer.md - docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md - docs/models/operations/GetLibraryItemsQueryParamType.md - docs/models/operations/GetLibraryItemsRequest.md - docs/models/operations/GetLibraryItemsResponse.md - docs/models/operations/GetLibraryItemsResponseBody.md - docs/models/operations/GetLibraryItemsRole.md + - docs/models/operations/GetLibraryItemsSimilar.md - docs/models/operations/GetLibraryItemsSort.md - - docs/models/operations/GetLibraryItemsStream.md - docs/models/operations/GetLibraryItemsType.md - docs/models/operations/GetLibraryItemsUltraBlurColors.md - docs/models/operations/GetLibraryItemsWriter.md @@ -545,6 +539,7 @@ generatedFiles: - docs/models/operations/GetLibrarySectionsAllOperator.md - docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming.md - docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.md + - docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md - docs/models/operations/GetLibrarySectionsAllPart.md - docs/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md - docs/models/operations/GetLibrarySectionsAllQueryParamType.md @@ -554,7 +549,6 @@ generatedFiles: - docs/models/operations/GetLibrarySectionsAllRole.md - docs/models/operations/GetLibrarySectionsAllSort.md - docs/models/operations/GetLibrarySectionsAllStream.md - - docs/models/operations/GetLibrarySectionsAllStreamType.md - docs/models/operations/GetLibrarySectionsAllType.md - docs/models/operations/GetLibrarySectionsAllUltraBlurColors.md - docs/models/operations/GetLibrarySectionsAllWriter.md @@ -563,8 +557,11 @@ generatedFiles: - docs/models/operations/GetMediaArtsRequest.md - docs/models/operations/GetMediaArtsResponse.md - docs/models/operations/GetMediaArtsResponseBody.md + - docs/models/operations/GetMediaMetaDataAttributes.md + - docs/models/operations/GetMediaMetaDataChapter.md - docs/models/operations/GetMediaMetaDataCountry.md - docs/models/operations/GetMediaMetaDataDirector.md + - docs/models/operations/GetMediaMetaDataExtras.md - docs/models/operations/GetMediaMetaDataGenre.md - docs/models/operations/GetMediaMetaDataGuids.md - docs/models/operations/GetMediaMetaDataHasThumbnail.md @@ -572,6 +569,7 @@ generatedFiles: - docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md - docs/models/operations/GetMediaMetaDataLibraryType.md - docs/models/operations/GetMediaMetaDataLocation.md + - docs/models/operations/GetMediaMetaDataMarker.md - docs/models/operations/GetMediaMetaDataMedia.md - docs/models/operations/GetMediaMetaDataMediaContainer.md - docs/models/operations/GetMediaMetaDataMetadata.md @@ -580,13 +578,13 @@ generatedFiles: - docs/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.md - docs/models/operations/GetMediaMetaDataPart.md - docs/models/operations/GetMediaMetaDataProducer.md + - docs/models/operations/GetMediaMetaDataRatings.md - docs/models/operations/GetMediaMetaDataRequest.md - docs/models/operations/GetMediaMetaDataResponse.md - docs/models/operations/GetMediaMetaDataResponseBody.md - docs/models/operations/GetMediaMetaDataRole.md - docs/models/operations/GetMediaMetaDataSimilar.md - docs/models/operations/GetMediaMetaDataStream.md - - docs/models/operations/GetMediaMetaDataStreamType.md - docs/models/operations/GetMediaMetaDataType.md - docs/models/operations/GetMediaMetaDataUltraBlurColors.md - docs/models/operations/GetMediaMetaDataWriter.md @@ -674,23 +672,23 @@ generatedFiles: - docs/models/operations/GetResourcesStatisticsRequest.md - docs/models/operations/GetResourcesStatisticsResponse.md - docs/models/operations/GetResourcesStatisticsResponseBody.md - - docs/models/operations/GetSearchAllLibrariesCollection.md - docs/models/operations/GetSearchAllLibrariesCountry.md - docs/models/operations/GetSearchAllLibrariesDirector.md - - docs/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md - - docs/models/operations/GetSearchAllLibrariesEpisodeSort.md + - docs/models/operations/GetSearchAllLibrariesDirectory.md - docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md - docs/models/operations/GetSearchAllLibrariesGenre.md + - docs/models/operations/GetSearchAllLibrariesGuids.md - docs/models/operations/GetSearchAllLibrariesHasThumbnail.md - docs/models/operations/GetSearchAllLibrariesImage.md + - docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md - docs/models/operations/GetSearchAllLibrariesLibraryType.md - docs/models/operations/GetSearchAllLibrariesLocation.md - docs/models/operations/GetSearchAllLibrariesMedia.md - docs/models/operations/GetSearchAllLibrariesMediaContainer.md - - docs/models/operations/GetSearchAllLibrariesMediaGuid.md - - docs/models/operations/GetSearchAllLibrariesMetaDataRating.md - docs/models/operations/GetSearchAllLibrariesMetadata.md - docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md + - docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md + - docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md - docs/models/operations/GetSearchAllLibrariesPart.md - docs/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md - docs/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md @@ -699,7 +697,6 @@ generatedFiles: - docs/models/operations/GetSearchAllLibrariesResponseBody.md - docs/models/operations/GetSearchAllLibrariesRole.md - docs/models/operations/GetSearchAllLibrariesShowOrdering.md - - docs/models/operations/GetSearchAllLibrariesStream.md - docs/models/operations/GetSearchAllLibrariesType.md - docs/models/operations/GetSearchAllLibrariesUltraBlurColors.md - docs/models/operations/GetSearchAllLibrariesWriter.md @@ -832,11 +829,9 @@ generatedFiles: - docs/models/operations/Marker.md - docs/models/operations/Media.md - docs/models/operations/MediaContainer.md - - docs/models/operations/MediaGuid.md - docs/models/operations/MediaProvider.md - docs/models/operations/MediaReviewsVisibility.md - docs/models/operations/Meta.md - - docs/models/operations/MetaDataRating.md - docs/models/operations/Metadata.md - docs/models/operations/MinSize.md - docs/models/operations/MyPlex.md @@ -929,7 +924,6 @@ generatedFiles: - docs/models/operations/StopTranscodeSessionRequest.md - docs/models/operations/StopTranscodeSessionResponse.md - docs/models/operations/Stream.md - - docs/models/operations/StreamType.md - docs/models/operations/Subscription.md - docs/models/operations/Tag.md - docs/models/operations/TaskName.md @@ -1365,10 +1359,8 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/Director.java - src/main/java/dev/plexapi/sdk/models/operations/Directory.java - src/main/java/dev/plexapi/sdk/models/operations/Download.java - - src/main/java/dev/plexapi/sdk/models/operations/EnableCreditsMarkerGeneration.java - src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/EpisodeSort.java - src/main/java/dev/plexapi/sdk/models/operations/Extras.java - src/main/java/dev/plexapi/sdk/models/operations/Feature.java - src/main/java/dev/plexapi/sdk/models/operations/Field.java @@ -1480,17 +1472,11 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFieldType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryActiveDirection.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFieldType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFilter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOperator.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java @@ -1499,7 +1485,9 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOperator.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java @@ -1507,8 +1495,8 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java - 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 @@ -1534,6 +1522,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOperator.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllPart.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamType.java @@ -1544,7 +1533,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRole.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllSort.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStreamType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllUltraBlurColors.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllWriter.java @@ -1554,8 +1542,11 @@ generatedFiles: - 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/GetMediaMetaDataAttributes.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.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/GetMediaMetaDataExtras.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGuids.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataHasThumbnail.java @@ -1563,6 +1554,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryType.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLocation.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java @@ -1571,6 +1563,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataProducer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponse.java @@ -1578,7 +1571,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRole.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataSimilar.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStreamType.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataType.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java @@ -1679,23 +1671,23 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCollection.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEpisodeSort.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesFlattenSeasons.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesImage.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryType.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaGuid.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetaDataRating.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.java @@ -1705,7 +1697,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesStream.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesType.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesUltraBlurColors.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java @@ -1865,11 +1856,9 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/Marker.java - src/main/java/dev/plexapi/sdk/models/operations/Media.java - src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/MediaGuid.java - src/main/java/dev/plexapi/sdk/models/operations/MediaProvider.java - src/main/java/dev/plexapi/sdk/models/operations/MediaReviewsVisibility.java - src/main/java/dev/plexapi/sdk/models/operations/Meta.java - - src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java - src/main/java/dev/plexapi/sdk/models/operations/Metadata.java - src/main/java/dev/plexapi/sdk/models/operations/MinSize.java - src/main/java/dev/plexapi/sdk/models/operations/MyPlex.java @@ -1974,7 +1963,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionResponse.java - src/main/java/dev/plexapi/sdk/models/operations/Stream.java - - src/main/java/dev/plexapi/sdk/models/operations/StreamType.java - src/main/java/dev/plexapi/sdk/models/operations/Subscription.java - src/main/java/dev/plexapi/sdk/models/operations/Tag.java - src/main/java/dev/plexapi/sdk/models/operations/TaskName.java @@ -2535,7 +2523,7 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"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}], "Sort": [{"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"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}], "size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"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"}]}], "FieldType": [{"type": "tag", "Operator": []}]}}} + application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "content": "secondary", "allowSync": false, "nocache": true, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "viewMode": "131131", "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "banner": "/library/metadata/58683/banner/1703239236", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "lastViewedAt": 1682752242, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "imdb://tt13015952"}], "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "showOrdering": "absolute", "flattenSeasons": "1", "skipChildren": false, "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "indexes": "sd", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "hasThumbnail": "1"}]}], "Genre": [{"id": 259, "tag": "Adventure"}], "Country": [{"id": 259, "tag": "United States of America"}], "Director": [{"id": 126522, "tag": "James Cameron"}], "Writer": [{"id": 126522, "tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "tag": "Mike Smith", "role": "Self", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg"}], "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Location": [{"path": "/TV Shows/House"}]}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"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"}]}], "FieldType": [{"type": "tag", "Operator": []}]}}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -2641,7 +2629,7 @@ examples: X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" responses: "200": - application/json: {"MediaContainer": {"size": 5709.89, "SearchResult": []}} + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "SearchResult": []}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2c47a496..e676eea1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -17,10 +17,11 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false java: - version: 0.17.0 + version: 0.17.1 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi + baseErrorName: PlexAPIError clientServerStatusCodesAsErrors: true companyEmail: lukeslakemail@gmail.com companyName: plexapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 45c873a2..1841b102 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.555.2 +speakeasyVersion: 1.557.0 sources: my-source: sourceNamespace: my-source @@ -8,19 +8,19 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0 - sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4 + sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df + sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b tags: - latest - - speakeasy-sdk-regen-1748997072 + - speakeasy-sdk-regen-1749429180 targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0 - sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4 + sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df + sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:2028a8fe95bd6176b8c2ff3a498715a0be7cb00919f7a1e7975778292621dce5 + codeSamplesRevisionDigest: sha256:9a3449eb22007686202d7d579803f2444900048695cc795361b72f801f88a98a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index eaedaa02..b5e3ec10 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.17.0' +implementation 'dev.plexapi:plexapi:0.17.1' ``` Maven: @@ -77,7 +77,7 @@ Maven: dev.plexapi plexapi - 0.17.0 + 0.17.1 ``` diff --git a/RELEASES.md b/RELEASES.md index c3bf6af3..51c21a02 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -358,4 +358,14 @@ Based on: ### Generated - [java v0.17.0] . ### Releases -- [Maven Central v0.17.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.17.0 - . \ No newline at end of file +- [Maven Central v0.17.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.17.0 - . + +## 2025-06-09 00:32:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.557.0 (2.623.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.17.1] . +### Releases +- [Maven Central v0.17.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.17.1 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0001cbc9..7d89b7ca 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.17.0" + version = "0.17.1" from components.java diff --git a/docs/models/operations/EnableCreditsMarkerGeneration.md b/docs/models/operations/EnableCreditsMarkerGeneration.md deleted file mode 100644 index 28df8b25..00000000 --- a/docs/models/operations/EnableCreditsMarkerGeneration.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnableCreditsMarkerGeneration - -Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Disabled` | 0 | \ No newline at end of file diff --git a/docs/models/operations/EpisodeSort.md b/docs/models/operations/EpisodeSort.md deleted file mode 100644 index efc3f8a6..00000000 --- a/docs/models/operations/EpisodeSort.md +++ /dev/null @@ -1,12 +0,0 @@ -# EpisodeSort - -Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `OldestFirst` | 0 | -| `NewestFirst` | 1 | \ No newline at end of file diff --git a/docs/models/operations/FlattenSeasons.md b/docs/models/operations/FlattenSeasons.md index 87fde5da..de372005 100644 --- a/docs/models/operations/FlattenSeasons.md +++ b/docs/models/operations/FlattenSeasons.md @@ -3,6 +3,7 @@ Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + ## Values | Name | Value | diff --git a/docs/models/operations/GetActorsLibraryMediaContainer.md b/docs/models/operations/GetActorsLibraryMediaContainer.md index eddd99f9..aa2ca471 100644 --- a/docs/models/operations/GetActorsLibraryMediaContainer.md +++ b/docs/models/operations/GetActorsLibraryMediaContainer.md @@ -16,5 +16,5 @@ | `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | | `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | | `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `viewMode` | *String* | :heavy_check_mark: | Identifier for the view mode. | 131131 | +| `viewMode` | *Optional\* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | | `directory` | List\<[GetActorsLibraryDirectory](../../models/operations/GetActorsLibraryDirectory.md)> | :heavy_minus_sign: | An array of actor entries for media items. | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsCollection.md b/docs/models/operations/GetLibraryItemsCollection.md index f3662615..9498e077 100644 --- a/docs/models/operations/GetLibraryItemsCollection.md +++ b/docs/models/operations/GetLibraryItemsCollection.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Working NL Subs | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `tag` | *String* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsCountry.md b/docs/models/operations/GetLibraryItemsCountry.md index 44f565f9..a7489084 100644 --- a/docs/models/operations/GetLibraryItemsCountry.md +++ b/docs/models/operations/GetLibraryItemsCountry.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsDirector.md b/docs/models/operations/GetLibraryItemsDirector.md index 80d0c014..7d272875 100644 --- a/docs/models/operations/GetLibraryItemsDirector.md +++ b/docs/models/operations/GetLibraryItemsDirector.md @@ -3,6 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | +| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsFilter.md b/docs/models/operations/GetLibraryItemsFilter.md index 37a3767c..50f40813 100644 --- a/docs/models/operations/GetLibraryItemsFilter.md +++ b/docs/models/operations/GetLibraryItemsFilter.md @@ -9,5 +9,4 @@ | `filterType` | *String* | :heavy_check_mark: | N/A | string | | `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | | `title` | *String* | :heavy_check_mark: | N/A | Genre | -| `type` | *String* | :heavy_check_mark: | N/A | filter | -| `advanced` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file +| `type` | *String* | :heavy_check_mark: | N/A | filter | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsGenre.md b/docs/models/operations/GetLibraryItemsGenre.md index f7d1d2d6..f1eccdca 100644 --- a/docs/models/operations/GetLibraryItemsGenre.md +++ b/docs/models/operations/GetLibraryItemsGenre.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsGuids.md b/docs/models/operations/GetLibraryItemsGuids.md new file mode 100644 index 00000000..26b40a0f --- /dev/null +++ b/docs/models/operations/GetLibraryItemsGuids.md @@ -0,0 +1,8 @@ +# GetLibraryItemsGuids + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsHasThumbnail.md b/docs/models/operations/GetLibraryItemsHasThumbnail.md index ae283db5..5fe35368 100644 --- a/docs/models/operations/GetLibraryItemsHasThumbnail.md +++ b/docs/models/operations/GetLibraryItemsHasThumbnail.md @@ -1,5 +1,8 @@ # GetLibraryItemsHasThumbnail +Indicates if the part has a thumbnail. + + ## Values diff --git a/docs/models/operations/GetLibraryItemsImage.md b/docs/models/operations/GetLibraryItemsImage.md index 1628d497..928613fa 100644 --- a/docs/models/operations/GetLibraryItemsImage.md +++ b/docs/models/operations/GetLibraryItemsImage.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [GetLibraryItemsLibraryResponse200Type](../../models/operations/GetLibraryItemsLibraryResponse200Type.md) | :heavy_check_mark: | N/A | background | -| `url` | *String* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | +| `type` | [GetLibraryItemsLibraryResponseType](../../models/operations/GetLibraryItemsLibraryResponseType.md) | :heavy_check_mark: | N/A | background | +| `url` | *String* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md b/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md deleted file mode 100644 index 82af1574..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryItemsLibraryActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryDefaultDirection.md b/docs/models/operations/GetLibraryItemsLibraryDefaultDirection.md deleted file mode 100644 index d2535c6c..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryDefaultDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryItemsLibraryDefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryField.md b/docs/models/operations/GetLibraryItemsLibraryField.md deleted file mode 100644 index e6e256a6..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryField.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsLibraryField - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `key` | *String* | :heavy_check_mark: | N/A | show.title | -| `title` | *String* | :heavy_check_mark: | N/A | Show Title | -| `type` | *String* | :heavy_check_mark: | N/A | string | -| `subType` | *Optional\* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryFieldType.md b/docs/models/operations/GetLibraryItemsLibraryFieldType.md deleted file mode 100644 index 44a34e0f..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryFieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsLibraryFieldType - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | *String* | :heavy_check_mark: | N/A | tag | -| `operator` | List\<[GetLibraryItemsLibraryOperator](../../models/operations/GetLibraryItemsLibraryOperator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryFilter.md b/docs/models/operations/GetLibraryItemsLibraryFilter.md deleted file mode 100644 index c5eddc05..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryItemsLibraryFilter - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `filter` | *String* | :heavy_check_mark: | N/A | genre | -| `filterType` | *String* | :heavy_check_mark: | N/A | string | -| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | -| `title` | *String* | :heavy_check_mark: | N/A | Genre | -| `type` | *String* | :heavy_check_mark: | N/A | filter | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryOperator.md b/docs/models/operations/GetLibraryItemsLibraryOperator.md deleted file mode 100644 index 6772cc0f..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryOperator.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsLibraryOperator - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *String* | :heavy_check_mark: | N/A | = | -| `title` | *String* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md b/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md new file mode 100644 index 00000000..a56a8e27 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md @@ -0,0 +1,5 @@ +# GetLibraryItemsLibraryOptimizedForStreaming + +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + + diff --git a/docs/models/operations/GetLibraryItemsLibraryResponse200Type.md b/docs/models/operations/GetLibraryItemsLibraryResponse200Type.md deleted file mode 100644 index b4e85e16..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryResponse200Type.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsLibraryResponse200Type - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `COVER_POSTER` | coverPoster | -| `BACKGROUND` | background | -| `SNAPSHOT` | snapshot | -| `CLEAR_LOGO` | clearLogo | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryResponseType.md b/docs/models/operations/GetLibraryItemsLibraryResponseType.md index c8dd8046..1573fa0c 100644 --- a/docs/models/operations/GetLibraryItemsLibraryResponseType.md +++ b/docs/models/operations/GetLibraryItemsLibraryResponseType.md @@ -1,14 +1,11 @@ # GetLibraryItemsLibraryResponseType -## Fields +## Values -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *String* | :heavy_check_mark: | N/A | show | -| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | List\<[GetLibraryItemsLibraryFilter](../../models/operations/GetLibraryItemsLibraryFilter.md)> | :heavy_minus_sign: | N/A | | -| `sort` | List\<[GetLibraryItemsLibrarySort](../../models/operations/GetLibraryItemsLibrarySort.md)> | :heavy_minus_sign: | N/A | | -| `field` | List\<[GetLibraryItemsLibraryField](../../models/operations/GetLibraryItemsLibraryField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Name | Value | +| -------------- | -------------- | +| `COVER_POSTER` | coverPoster | +| `BACKGROUND` | background | +| `SNAPSHOT` | snapshot | +| `CLEAR_LOGO` | clearLogo | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibrarySort.md b/docs/models/operations/GetLibraryItemsLibrarySort.md deleted file mode 100644 index 49e9f2eb..00000000 --- a/docs/models/operations/GetLibraryItemsLibrarySort.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetLibraryItemsLibrarySort - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `default_` | *Optional\* | :heavy_minus_sign: | N/A | asc | -| `active` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `activeDirection` | [Optional\](../../models/operations/GetLibraryItemsLibraryActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [Optional\](../../models/operations/GetLibraryItemsLibraryDefaultDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `descKey` | *Optional\* | :heavy_minus_sign: | N/A | titleSort:desc | -| `firstCharacterKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `key` | *String* | :heavy_check_mark: | N/A | titleSort | -| `title` | *String* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLibraryType.md b/docs/models/operations/GetLibraryItemsLibraryType.md index 0f6999d8..0e88b919 100644 --- a/docs/models/operations/GetLibraryItemsLibraryType.md +++ b/docs/models/operations/GetLibraryItemsLibraryType.md @@ -1,20 +1,14 @@ # GetLibraryItemsLibraryType -The type of media content in the Plex library. This can represent videos, music, or photos. +## Fields - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | +| `type` | *String* | :heavy_check_mark: | N/A | show | +| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | +| `active` | *boolean* | :heavy_check_mark: | N/A | false | +| `filter` | List\<[GetLibraryItemsFilter](../../models/operations/GetLibraryItemsFilter.md)> | :heavy_minus_sign: | N/A | | +| `sort` | List\<[GetLibraryItemsSort](../../models/operations/GetLibraryItemsSort.md)> | :heavy_minus_sign: | N/A | | +| `field` | List\<[GetLibraryItemsField](../../models/operations/GetLibraryItemsField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsLocation.md b/docs/models/operations/GetLibraryItemsLocation.md index 91fcabbf..1053cce9 100644 --- a/docs/models/operations/GetLibraryItemsLocation.md +++ b/docs/models/operations/GetLibraryItemsLocation.md @@ -1,8 +1,10 @@ # GetLibraryItemsLocation +The folder path for the media item. + ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `path` | *Optional\* | :heavy_minus_sign: | N/A | /TV Shows/House | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `path` | *String* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMedia.md b/docs/models/operations/GetLibraryItemsMedia.md index 9f4ae95d..72d7b7b3 100644 --- a/docs/models/operations/GetLibraryItemsMedia.md +++ b/docs/models/operations/GetLibraryItemsMedia.md @@ -3,23 +3,24 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `id` | *int* | :heavy_check_mark: | N/A | 119534 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 25025 | -| `width` | *Optional\* | :heavy_minus_sign: | N/A | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | N/A | 2072 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 1.85 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | dts | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | eac3 | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | 4k | -| `container` | *String* | :heavy_check_mark: | N/A | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | N/A | 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibraryItemsOptimizedForStreaming.md) | :heavy_minus_sign: | N/A | 1 | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `part` | List\<[GetLibraryItemsPart](../../models/operations/GetLibraryItemsPart.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | +| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | +| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | +| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | +| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | +| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | +| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | +| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | +| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | +| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | +| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | +| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibraryItemsOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | +| `part` | List\<[GetLibraryItemsPart](../../models/operations/GetLibraryItemsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMediaContainer.md b/docs/models/operations/GetLibraryItemsMediaContainer.md index 5c2c6e9c..bebb969a 100644 --- a/docs/models/operations/GetLibraryItemsMediaContainer.md +++ b/docs/models/operations/GetLibraryItemsMediaContainer.md @@ -1,33 +1,28 @@ # GetLibraryItemsMediaContainer -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `type` | List\<[GetLibraryItemsType](../../models/operations/GetLibraryItemsType.md)> | :heavy_minus_sign: | N/A | | -| `fieldType` | List\<[GetLibraryItemsFieldType](../../models/operations/GetLibraryItemsFieldType.md)> | :heavy_minus_sign: | N/A | | -| `size` | *int* | :heavy_check_mark: | N/A | 70 | -| `totalSize` | *int* | :heavy_check_mark: | N/A | 170 | -| `offset` | *int* | :heavy_check_mark: | N/A | 0 | -| `content` | *String* | :heavy_check_mark: | N/A | secondary | -| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true | -| `nocache` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg | -| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *long* | :heavy_check_mark: | N/A | 1 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | N/A | Movies | -| `librarySectionUUID` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 | -| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png | -| `title1` | *String* | :heavy_check_mark: | N/A | Movies | -| `title2` | *String* | :heavy_check_mark: | N/A | Recently Released | -| `viewGroup` | *String* | :heavy_check_mark: | N/A | movie | -| `viewMode` | *Optional\* | :heavy_minus_sign: | N/A | 65592 | -| `mixedParents` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `metadata` | List\<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | | +| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `totalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | +| `offset` | *long* | :heavy_check_mark: | Offset value for pagination. | 0 | +| `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | +| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | +| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | +| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | +| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | +| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | +| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | +| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | +| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | +| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | +| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | +| `viewMode` | *Optional\* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | +| `mixedParents` | *Optional\* | :heavy_minus_sign: | Indicates if the media container has mixed parents. | true | +| `metadata` | List\<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_check_mark: | An array of metadata items. | | | `meta` | [Optional\](../../models/operations/GetLibraryItemsMeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMeta.md b/docs/models/operations/GetLibraryItemsMeta.md index 990d8cbf..e409a70e 100644 --- a/docs/models/operations/GetLibraryItemsMeta.md +++ b/docs/models/operations/GetLibraryItemsMeta.md @@ -6,7 +6,7 @@ The Meta object is only included in the response if the `includeMeta` parameter ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | List\<[GetLibraryItemsLibraryResponseType](../../models/operations/GetLibraryItemsLibraryResponseType.md)> | :heavy_minus_sign: | N/A | -| `fieldType` | List\<[GetLibraryItemsLibraryFieldType](../../models/operations/GetLibraryItemsLibraryFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `type` | List\<[GetLibraryItemsLibraryType](../../models/operations/GetLibraryItemsLibraryType.md)> | :heavy_minus_sign: | N/A | +| `fieldType` | List\<[GetLibraryItemsFieldType](../../models/operations/GetLibraryItemsFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMetadata.md b/docs/models/operations/GetLibraryItemsMetadata.md index c565f0e1..117a9cb2 100644 --- a/docs/models/operations/GetLibraryItemsMetadata.md +++ b/docs/models/operations/GetLibraryItemsMetadata.md @@ -1,83 +1,88 @@ # GetLibraryItemsMetadata +Unknown + + ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item.
Note: This is always an integer, but is represented as a string in the API.
| 58683 | -| `key` | *String* | :heavy_check_mark: | N/A | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | 20th Century Studios | -| `skipChildren` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `type` | [GetLibraryItemsLibraryType](../../models/operations/GetLibraryItemsLibraryType.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie | -| `title` | *String* | :heavy_check_mark: | N/A | Avatar: The Way of Water | -| `slug` | *Optional\* | :heavy_minus_sign: | N/A | 4-for-texas | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *String* | :heavy_check_mark: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | 7.6 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `seasonCount` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | Return to Pandora. | -| `flattenSeasons` | [Optional\](../../models/operations/FlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 | -| `episodeSort` | [Optional\](../../models/operations/EpisodeSort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 | -| `enableCreditsMarkerGeneration` | [Optional\](../../models/operations/EnableCreditsMarkerGeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 | -| `showOrdering` | [Optional\](../../models/operations/ShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| absolute | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | -| `banner` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | -| `addedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | N/A | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58684 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 66 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `parentSlug` | *Optional\* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | -| `media` | List\<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| | -| `genre` | List\<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | | -| `collection` | List\<[GetLibraryItemsCollection](../../models/operations/GetLibraryItemsCollection.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[GetLibraryItemsLocation](../../models/operations/GetLibraryItemsLocation.md)> | :heavy_minus_sign: | N/A | | -| `mediaGuid` | List\<[MediaGuid](../../models/operations/MediaGuid.md)> | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | -| `ultraBlurColors` | [Optional\](../../models/operations/GetLibraryItemsUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `metaDataRating` | List\<[MetaDataRating](../../models/operations/MetaDataRating.md)> | :heavy_minus_sign: | N/A | | -| `image` | List\<[GetLibraryItemsImage](../../models/operations/GetLibraryItemsImage.md)> | :heavy_minus_sign: | N/A | | -| `titleSort` | *Optional\* | :heavy_minus_sign: | N/A | Whale | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1682752242 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | N/A | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `theme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | N/A | 0 | -| `childCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumExtras` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumPrimaryExtra` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent item.
| 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `parentStudio` | *Optional\* | :heavy_minus_sign: | N/A | UCP | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2010 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `parentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | +| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | +| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | +| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | +| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | +| `type` | [GetLibraryItemsType](../../models/operations/GetLibraryItemsType.md) | :heavy_check_mark: | N/A | movie | +| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | +| `banner` | *String* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | +| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | +| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | +| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| +| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | +| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | +| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | +| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | +| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | +| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | +| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | +| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | +| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | +| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | +| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | +| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | +| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | +| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | +| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | +| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | +| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | +| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | +| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | +| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | +| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | +| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | +| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | +| `image` | List\<[GetLibraryItemsImage](../../models/operations/GetLibraryItemsImage.md)> | :heavy_minus_sign: | N/A | | +| `ultraBlurColors` | [Optional\](../../models/operations/GetLibraryItemsUltraBlurColors.md) | :heavy_minus_sign: | N/A | | +| `guids` | List\<[GetLibraryItemsGuids](../../models/operations/GetLibraryItemsGuids.md)> | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | +| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | +| `showOrdering` | [Optional\](../../models/operations/ShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | +| `flattenSeasons` | [Optional\](../../models/operations/FlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | +| `media` | List\<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | | +| `genre` | List\<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | | +| `country` | List\<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | | +| `director` | List\<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List\<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | | +| `producer` | List\<[GetLibraryItemsProducer](../../models/operations/GetLibraryItemsProducer.md)> | :heavy_minus_sign: | N/A | | +| `collection` | List\<[GetLibraryItemsCollection](../../models/operations/GetLibraryItemsCollection.md)> | :heavy_minus_sign: | N/A | | +| `role` | List\<[GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | | +| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | N/A | | +| `similar` | List\<[GetLibraryItemsSimilar](../../models/operations/GetLibraryItemsSimilar.md)> | :heavy_minus_sign: | N/A | | +| `location` | List\<[GetLibraryItemsLocation](../../models/operations/GetLibraryItemsLocation.md)> | :heavy_minus_sign: | N/A | | +| `chapter` | List\<[Chapter](../../models/operations/Chapter.md)> | :heavy_minus_sign: | N/A | | +| `marker` | List\<[Marker](../../models/operations/Marker.md)> | :heavy_minus_sign: | N/A | | +| `extras` | [Optional\](../../models/operations/Extras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md b/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md index 8075b9e7..fc2f1197 100644 --- a/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md +++ b/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md @@ -1,9 +1,4 @@ # GetLibraryItemsOptimizedForStreaming +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md b/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md new file mode 100644 index 00000000..53890500 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md @@ -0,0 +1,9 @@ +# GetLibraryItemsOptimizedForStreaming1 + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsPart.md b/docs/models/operations/GetLibraryItemsPart.md index fb8017e5..d7fadb1a 100644 --- a/docs/models/operations/GetLibraryItemsPart.md +++ b/docs/models/operations/GetLibraryItemsPart.md @@ -3,18 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | N/A | 119542 | -| `key` | *String* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `file` | *String* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | -| `size` | *long* | :heavy_check_mark: | N/A | 36158371307 | -| `container` | *String* | :heavy_check_mark: | The container format of the media file.
| mkv | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `hasThumbnail` | [Optional\](../../models/operations/GetLibraryItemsHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[GetLibraryItemsStream](../../models/operations/GetLibraryItemsStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | +| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | +| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | +| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | +| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | +| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | +| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | +| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | +| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | +| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | +| `hasThumbnail` | [Optional\](../../models/operations/GetLibraryItemsHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsProducer.md b/docs/models/operations/GetLibraryItemsProducer.md new file mode 100644 index 00000000..4cc1691a --- /dev/null +++ b/docs/models/operations/GetLibraryItemsProducer.md @@ -0,0 +1,13 @@ +# GetLibraryItemsProducer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 | +| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 | +| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk | +| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 | +| `role` | *Optional\* | :heavy_minus_sign: | The character name or role. | Jimmy McGill | +| `thumb` | *Optional\* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRole.md b/docs/models/operations/GetLibraryItemsRole.md index 9a34cf43..f57ca5f1 100644 --- a/docs/models/operations/GetLibraryItemsRole.md +++ b/docs/models/operations/GetLibraryItemsRole.md @@ -3,11 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | The ID of the tag or actor. | 294129 | -| `filter` | *Optional\* | :heavy_minus_sign: | The filter used to find the actor or tag. | actor=294129 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The thumbnail of the actor | https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg | -| `tag` | *Optional\* | :heavy_minus_sign: | The name of the tag or actor. | Mike Smith | -| `tagKey` | *Optional\* | :heavy_minus_sign: | Unique identifier for the tag. | 668e7e7b22bcad9064350c91 | -| `role` | *Optional\* | :heavy_minus_sign: | The role of the actor or tag in the media. | Self | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | +| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | +| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsSimilar.md b/docs/models/operations/GetLibraryItemsSimilar.md new file mode 100644 index 00000000..5f1419fd --- /dev/null +++ b/docs/models/operations/GetLibraryItemsSimilar.md @@ -0,0 +1,10 @@ +# GetLibraryItemsSimilar + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `id` | *long* | :heavy_check_mark: | The unique similar item identifier. | 26 | +| `filter` | *String* | :heavy_check_mark: | The filter string for similar items. | similar=26 | +| `tag` | *String* | :heavy_check_mark: | The tag or title of the similar content. | Breaking Bad | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsStream.md b/docs/models/operations/GetLibraryItemsStream.md deleted file mode 100644 index bb30a78a..00000000 --- a/docs/models/operations/GetLibraryItemsStream.md +++ /dev/null @@ -1,45 +0,0 @@ -# GetLibraryItemsStream - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 272796 | -| `streamType` | *long* | :heavy_check_mark: | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this is the default stream | true | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is selected | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream | h264 | -| `index` | *long* | :heavy_check_mark: | The index of the stream | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | The bitrate of the stream in kbps | 6273 | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | The color primaries of the video stream | bt709 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | The color range of the video stream | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | The color space of the video stream | bt709 | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | The transfer characteristics (TRC) of the video stream | bt709 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | The bit depth of the video stream | 8 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | The chroma location of the video stream | left | -| `streamIdentifier` | *Optional\* | :heavy_minus_sign: | The identifier of the video stream | 2 | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | The chroma subsampling format | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | The coded height of the video stream | 1088 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | The coded width of the video stream | 1920 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | The frame rate of the video stream | 29.97 | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | Indicates if the stream has a scaling matrix | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `height` | *Optional\* | :heavy_minus_sign: | The height of the video stream | 1080 | -| `level` | *Optional\* | :heavy_minus_sign: | The level of the video codec | 40 | -| `profile` | *Optional\* | :heavy_minus_sign: | The profile of the video codec | main | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames | 4 | -| `scanType` | *Optional\* | :heavy_minus_sign: | The scan type (progressive or interlaced) | progressive | -| `width` | *Optional\* | :heavy_minus_sign: | The width of the video stream | 1920 | -| `displayTitle` | *Optional\* | :heavy_minus_sign: | Display title of the stream | 1080p (H.264) | -| `extendedDisplayTitle` | *Optional\* | :heavy_minus_sign: | Extended display title of the stream | 1080p (H.264) | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams) | 2 | -| `language` | *Optional\* | :heavy_minus_sign: | The language of the stream (for audio/subtitle streams) | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag of the stream | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | Language code of the stream | eng | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | The audio channel layout | stereo | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate of the audio stream in Hz | 48000 | -| `title` | *Optional\* | :heavy_minus_sign: | Title of the subtitle track (for subtitle streams) | English | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the subtitle stream can auto-sync | false | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsType.md b/docs/models/operations/GetLibraryItemsType.md index daf57e9f..d2d39f59 100644 --- a/docs/models/operations/GetLibraryItemsType.md +++ b/docs/models/operations/GetLibraryItemsType.md @@ -1,15 +1,20 @@ # GetLibraryItemsType +The type of media content in the Plex library. This can represent videos, music, or photos. -## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *String* | :heavy_check_mark: | N/A | filter | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | clip | -| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | List\<[GetLibraryItemsFilter](../../models/operations/GetLibraryItemsFilter.md)> | :heavy_minus_sign: | N/A | | -| `sort` | List\<[GetLibraryItemsSort](../../models/operations/GetLibraryItemsSort.md)> | :heavy_minus_sign: | N/A | | -| `field` | List\<[GetLibraryItemsField](../../models/operations/GetLibraryItemsField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| `Track` | track | +| `PhotoAlbum` | photoalbum | +| `Photo` | photo | +| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsWriter.md b/docs/models/operations/GetLibraryItemsWriter.md index 2a10fb5c..82e4461d 100644 --- a/docs/models/operations/GetLibraryItemsWriter.md +++ b/docs/models/operations/GetLibraryItemsWriter.md @@ -3,6 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | +| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllMediaContainer.md b/docs/models/operations/GetLibrarySectionsAllMediaContainer.md index 92d3eb00..1ee7ef1c 100644 --- a/docs/models/operations/GetLibrarySectionsAllMediaContainer.md +++ b/docs/models/operations/GetLibrarySectionsAllMediaContainer.md @@ -12,8 +12,8 @@ | `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | | `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | | `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *long* | :heavy_check_mark: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | TV Series | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | | `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | | `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | | `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | diff --git a/docs/models/operations/GetLibrarySectionsAllMetadata.md b/docs/models/operations/GetLibrarySectionsAllMetadata.md index c116bb2f..b6e33c66 100644 --- a/docs/models/operations/GetLibrarySectionsAllMetadata.md +++ b/docs/models/operations/GetLibrarySectionsAllMetadata.md @@ -31,7 +31,7 @@ Unknown | `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | | `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | | `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_check_mark: | The original release date of the media item. | 2022-12-14 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | | `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | | `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | | `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | diff --git a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md b/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md new file mode 100644 index 00000000..70e3903d --- /dev/null +++ b/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md @@ -0,0 +1,9 @@ +# GetLibrarySectionsAllOptimizedForStreamingLibrary1 + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllStream.md b/docs/models/operations/GetLibrarySectionsAllStream.md index 737ccf18..54efafbf 100644 --- a/docs/models/operations/GetLibrarySectionsAllStream.md +++ b/docs/models/operations/GetLibrarySectionsAllStream.md @@ -3,56 +3,56 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | [GetLibrarySectionsAllStreamType](../../models/operations/GetLibrarySectionsAllStreamType.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 | -| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | +| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | +| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | +| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | +| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | +| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | +| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | +| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | +| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | +| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | +| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | +| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | +| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | +| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | +| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | +| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | +| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | +| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | +| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | +| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | +| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | +| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | +| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | +| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | +| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | +| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | +| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | +| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | +| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | +| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | +| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | +| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | +| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | +| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | +| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | +| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | +| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | +| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | +| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | +| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | +| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | +| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | +| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | +| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | +| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllStreamType.md b/docs/models/operations/GetLibrarySectionsAllStreamType.md deleted file mode 100644 index 07e53458..00000000 --- a/docs/models/operations/GetLibrarySectionsAllStreamType.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetLibrarySectionsAllStreamType - -Stream type: - - 1 = video - - 2 = audio - - 3 = subtitle - - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Video` | 1 | -| `Audio` | 2 | -| `Subtitle` | 3 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataAttributes.md b/docs/models/operations/GetMediaMetaDataAttributes.md new file mode 100644 index 00000000..f3fe51a9 --- /dev/null +++ b/docs/models/operations/GetMediaMetaDataAttributes.md @@ -0,0 +1,11 @@ +# GetMediaMetaDataAttributes + +Attributes associated with the marker. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | The identifier for the attributes. | 306970 | +| `version` | *Optional\* | :heavy_minus_sign: | The version number of the marker attributes. | 4 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataChapter.md b/docs/models/operations/GetMediaMetaDataChapter.md new file mode 100644 index 00000000..c7bd8d81 --- /dev/null +++ b/docs/models/operations/GetMediaMetaDataChapter.md @@ -0,0 +1,15 @@ +# GetMediaMetaDataChapter + +The thumbnail for the chapter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *long* | :heavy_check_mark: | N/A | 4 | +| `filter` | *String* | :heavy_check_mark: | N/A | thumb=4 | +| `index` | *long* | :heavy_check_mark: | N/A | 1 | +| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 0 | +| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 100100 | +| `thumb` | *String* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataExtras.md b/docs/models/operations/GetMediaMetaDataExtras.md new file mode 100644 index 00000000..7e3449e5 --- /dev/null +++ b/docs/models/operations/GetMediaMetaDataExtras.md @@ -0,0 +1,8 @@ +# GetMediaMetaDataExtras + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `size` | *Optional\* | :heavy_minus_sign: | The size of the extras. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataHasThumbnail.md b/docs/models/operations/GetMediaMetaDataHasThumbnail.md index 94483bc0..fc2814d2 100644 --- a/docs/models/operations/GetMediaMetaDataHasThumbnail.md +++ b/docs/models/operations/GetMediaMetaDataHasThumbnail.md @@ -3,6 +3,7 @@ Indicates if the part has a thumbnail. + ## Values | Name | Value | diff --git a/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md b/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md index dd4392c2..03d6ddbf 100644 --- a/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md +++ b/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md @@ -2,3 +2,4 @@ Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + diff --git a/docs/models/operations/GetMediaMetaDataMarker.md b/docs/models/operations/GetMediaMetaDataMarker.md new file mode 100644 index 00000000..2c07a9a3 --- /dev/null +++ b/docs/models/operations/GetMediaMetaDataMarker.md @@ -0,0 +1,15 @@ +# GetMediaMetaDataMarker + +The final status of the marker + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | N/A | 306970 | +| `type` | *String* | :heavy_check_mark: | N/A | credits | +| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 4176050 | +| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 4393389 | +| `final_` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `attributes` | [Optional\](../../models/operations/GetMediaMetaDataAttributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMedia.md b/docs/models/operations/GetMediaMetaDataMedia.md index 6ab5bb91..10cafff1 100644 --- a/docs/models/operations/GetMediaMetaDataMedia.md +++ b/docs/models/operations/GetMediaMetaDataMedia.md @@ -3,24 +3,24 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | File container type. | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `part` | List\<[GetMediaMetaDataPart](../../models/operations/GetMediaMetaDataPart.md)> | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | +| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | +| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | +| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | +| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | +| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | +| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | +| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | +| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | +| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | +| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | +| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | +| `part` | List\<[GetMediaMetaDataPart](../../models/operations/GetMediaMetaDataPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMediaContainer.md b/docs/models/operations/GetMediaMetaDataMediaContainer.md index 9d970d30..279b92ba 100644 --- a/docs/models/operations/GetMediaMetaDataMediaContainer.md +++ b/docs/models/operations/GetMediaMetaDataMediaContainer.md @@ -8,8 +8,8 @@ | `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | | `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | | `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *long* | :heavy_check_mark: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | TV Series | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | | `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | | `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | | `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | diff --git a/docs/models/operations/GetMediaMetaDataMetadata.md b/docs/models/operations/GetMediaMetaDataMetadata.md index 8a2708e7..57312926 100644 --- a/docs/models/operations/GetMediaMetaDataMetadata.md +++ b/docs/models/operations/GetMediaMetaDataMetadata.md @@ -31,7 +31,7 @@ Unknown | `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | | `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | | `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_check_mark: | The original release date of the media item. | 2022-12-14 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | | `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | | `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | | `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | @@ -64,9 +64,9 @@ Unknown | `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | | `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_minus_sign: | N/A | | | `ultraBlurColors` | [Optional\](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies | -| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | +| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | | `guids` | List\<[GetMediaMetaDataGuids](../../models/operations/GetMediaMetaDataGuids.md)> | :heavy_minus_sign: | N/A | | | `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | | | `genre` | List\<[GetMediaMetaDataGenre](../../models/operations/GetMediaMetaDataGenre.md)> | :heavy_minus_sign: | N/A | | @@ -75,9 +75,9 @@ Unknown | `writer` | List\<[GetMediaMetaDataWriter](../../models/operations/GetMediaMetaDataWriter.md)> | :heavy_minus_sign: | N/A | | | `producer` | List\<[GetMediaMetaDataProducer](../../models/operations/GetMediaMetaDataProducer.md)> | :heavy_minus_sign: | N/A | | | `role` | List\<[GetMediaMetaDataRole](../../models/operations/GetMediaMetaDataRole.md)> | :heavy_minus_sign: | N/A | | -| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | N/A | | +| `ratings` | List\<[GetMediaMetaDataRatings](../../models/operations/GetMediaMetaDataRatings.md)> | :heavy_minus_sign: | N/A | | | `similar` | List\<[GetMediaMetaDataSimilar](../../models/operations/GetMediaMetaDataSimilar.md)> | :heavy_minus_sign: | N/A | | | `location` | List\<[GetMediaMetaDataLocation](../../models/operations/GetMediaMetaDataLocation.md)> | :heavy_minus_sign: | N/A | | -| `chapter` | List\<[Chapter](../../models/operations/Chapter.md)> | :heavy_minus_sign: | N/A | | -| `marker` | List\<[Marker](../../models/operations/Marker.md)> | :heavy_minus_sign: | N/A | | -| `extras` | [Optional\](../../models/operations/Extras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `chapter` | List\<[GetMediaMetaDataChapter](../../models/operations/GetMediaMetaDataChapter.md)> | :heavy_minus_sign: | N/A | | +| `marker` | List\<[GetMediaMetaDataMarker](../../models/operations/GetMediaMetaDataMarker.md)> | :heavy_minus_sign: | N/A | | +| `extras` | [Optional\](../../models/operations/GetMediaMetaDataExtras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataPart.md b/docs/models/operations/GetMediaMetaDataPart.md index 2784688d..7fb0565e 100644 --- a/docs/models/operations/GetMediaMetaDataPart.md +++ b/docs/models/operations/GetMediaMetaDataPart.md @@ -8,16 +8,16 @@ | `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | | `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | | `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *String* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | +| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | | `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | | `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *String* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *long* | :heavy_check_mark: | File size in bytes. | 30649952104 | +| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | +| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | | `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | | `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | | `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | | `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | | `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | | `hasThumbnail` | [Optional\](../../models/operations/GetMediaMetaDataHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[GetMediaMetaDataStream](../../models/operations/GetMediaMetaDataStream.md)> | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file +| `stream` | List\<[GetMediaMetaDataStream](../../models/operations/GetMediaMetaDataStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MetaDataRating.md b/docs/models/operations/GetMediaMetaDataRatings.md similarity index 83% rename from docs/models/operations/MetaDataRating.md rename to docs/models/operations/GetMediaMetaDataRatings.md index 33debb0a..83c7df05 100644 --- a/docs/models/operations/MetaDataRating.md +++ b/docs/models/operations/GetMediaMetaDataRatings.md @@ -1,10 +1,10 @@ -# MetaDataRating +# GetMediaMetaDataRatings ## Fields | Field | Type | Required | Description | Example | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *String* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating | -| `value` | *float* | :heavy_check_mark: | The value of the rating. | 3 | +| `image` | *String* | :heavy_check_mark: | The image or reference for the rating. | imdb://image.rating | +| `value` | *float* | :heavy_check_mark: | The rating value. | 9 | | `type` | *String* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataStream.md b/docs/models/operations/GetMediaMetaDataStream.md index fea71414..4adc8765 100644 --- a/docs/models/operations/GetMediaMetaDataStream.md +++ b/docs/models/operations/GetMediaMetaDataStream.md @@ -3,56 +3,56 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | [GetMediaMetaDataStreamType](../../models/operations/GetMediaMetaDataStreamType.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 | -| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | +| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | +| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | +| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | +| `codec` | *Optional\* | :heavy_minus_sign: | Codec used by the stream. | hevc | +| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | +| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | +| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | +| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | +| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | +| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | +| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | +| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | +| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | +| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | +| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | +| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | +| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | +| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | +| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | +| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | +| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | +| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | +| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | +| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | +| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | +| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | +| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | +| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | +| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | +| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | +| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | +| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | +| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | +| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | +| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | +| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | +| `displayTitle` | *Optional\* | :heavy_minus_sign: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `extendedDisplayTitle` | *Optional\* | :heavy_minus_sign: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | +| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | +| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | +| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | +| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | +| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | +| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | +| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataStreamType.md b/docs/models/operations/GetMediaMetaDataStreamType.md deleted file mode 100644 index fa56e9b9..00000000 --- a/docs/models/operations/GetMediaMetaDataStreamType.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetMediaMetaDataStreamType - -Stream type: - - 1 = video - - 2 = audio - - 3 = subtitle - - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Video` | 1 | -| `Audio` | 2 | -| `Subtitle` | 3 | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedMetadata.md b/docs/models/operations/GetRecentlyAddedMetadata.md index f86d4d9e..0e19fc73 100644 --- a/docs/models/operations/GetRecentlyAddedMetadata.md +++ b/docs/models/operations/GetRecentlyAddedMetadata.md @@ -32,11 +32,11 @@ Unknown | `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | | `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | | `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 | -| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | +| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | | `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_check_mark: | The original release date of the media item. | 2022-12-14 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | | `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | | `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | | `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | diff --git a/docs/models/operations/GetSearchAllLibrariesCollection.md b/docs/models/operations/GetSearchAllLibrariesCollection.md deleted file mode 100644 index ca2ae27b..00000000 --- a/docs/models/operations/GetSearchAllLibrariesCollection.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchAllLibrariesCollection - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Working NL Subs | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesCountry.md b/docs/models/operations/GetSearchAllLibrariesCountry.md index a2f4be2d..db23576f 100644 --- a/docs/models/operations/GetSearchAllLibrariesCountry.md +++ b/docs/models/operations/GetSearchAllLibrariesCountry.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesDirector.md b/docs/models/operations/GetSearchAllLibrariesDirector.md index ad87079a..a9d3c39f 100644 --- a/docs/models/operations/GetSearchAllLibrariesDirector.md +++ b/docs/models/operations/GetSearchAllLibrariesDirector.md @@ -3,6 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | +| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesDirectory.md b/docs/models/operations/GetSearchAllLibrariesDirectory.md new file mode 100644 index 00000000..ed824307 --- /dev/null +++ b/docs/models/operations/GetSearchAllLibrariesDirectory.md @@ -0,0 +1,20 @@ +# GetSearchAllLibrariesDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `key` | *String* | :heavy_check_mark: | The unique identifier path for the search result item. | /library/sections/3/all?actor=197429 | +| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 | +| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | +| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies | +| `librarySectionType` | *Optional\* | :heavy_minus_sign: | N/A | | +| `type` | *String* | :heavy_check_mark: | The type of the directory. | tag | +| `id` | *long* | :heavy_check_mark: | N/A | 197429 | +| `filter` | *Optional\* | :heavy_minus_sign: | The filter string used to query this specific item in the library. | actor=197429 | +| `tag` | *String* | :heavy_check_mark: | N/A | Ben Stiller | +| `tagType` | *Optional\* | :heavy_minus_sign: | The type of tag associated with this search result (e.g., Director, Actor). | | +| `tagKey` | *Optional\* | :heavy_minus_sign: | The unique identifier for the tag associated with this search result. | 5d776826999c64001ec2c606 | +| `thumb` | *Optional\* | :heavy_minus_sign: | The URL to the thumbnail image associated with this search result. | https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg | +| `count` | *Optional\* | :heavy_minus_sign: | The number of items associated with this search result. | 10 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md b/docs/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md deleted file mode 100644 index fe38091d..00000000 --- a/docs/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesEnableCreditsMarkerGeneration - -Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Disabled` | 0 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesEpisodeSort.md b/docs/models/operations/GetSearchAllLibrariesEpisodeSort.md deleted file mode 100644 index 34698ab5..00000000 --- a/docs/models/operations/GetSearchAllLibrariesEpisodeSort.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSearchAllLibrariesEpisodeSort - -Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `OldestFirst` | 0 | -| `NewestFirst` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md b/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md index dda35deb..00be6ad3 100644 --- a/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md +++ b/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md @@ -3,6 +3,7 @@ Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + ## Values | Name | Value | diff --git a/docs/models/operations/GetSearchAllLibrariesGenre.md b/docs/models/operations/GetSearchAllLibrariesGenre.md index 1327231a..72e39477 100644 --- a/docs/models/operations/GetSearchAllLibrariesGenre.md +++ b/docs/models/operations/GetSearchAllLibrariesGenre.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesGuids.md b/docs/models/operations/GetSearchAllLibrariesGuids.md new file mode 100644 index 00000000..1f235c9f --- /dev/null +++ b/docs/models/operations/GetSearchAllLibrariesGuids.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesGuids + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md b/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md index bfdb1514..b5f9278d 100644 --- a/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md +++ b/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md @@ -1,5 +1,8 @@ # GetSearchAllLibrariesHasThumbnail +Indicates if the part has a thumbnail. + + ## Values diff --git a/docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md b/docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md new file mode 100644 index 00000000..d53b0701 --- /dev/null +++ b/docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md @@ -0,0 +1,5 @@ +# GetSearchAllLibrariesLibraryOptimizedForStreaming + +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + + diff --git a/docs/models/operations/GetSearchAllLibrariesLocation.md b/docs/models/operations/GetSearchAllLibrariesLocation.md index 4028f8a3..8e977828 100644 --- a/docs/models/operations/GetSearchAllLibrariesLocation.md +++ b/docs/models/operations/GetSearchAllLibrariesLocation.md @@ -1,8 +1,10 @@ # GetSearchAllLibrariesLocation +The folder path for the media item. + ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `path` | *Optional\* | :heavy_minus_sign: | N/A | /TV Shows/House | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `path` | *String* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMedia.md b/docs/models/operations/GetSearchAllLibrariesMedia.md index 34efb238..b496bcd4 100644 --- a/docs/models/operations/GetSearchAllLibrariesMedia.md +++ b/docs/models/operations/GetSearchAllLibrariesMedia.md @@ -3,23 +3,24 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *int* | :heavy_check_mark: | N/A | 119534 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 25025 | -| `width` | *Optional\* | :heavy_minus_sign: | N/A | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | N/A | 2072 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 1.85 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | dts | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | eac3 | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | 4k | -| `container` | *String* | :heavy_check_mark: | N/A | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | N/A | 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetSearchAllLibrariesOptimizedForStreaming.md) | :heavy_minus_sign: | N/A | 1 | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `part` | List\<[GetSearchAllLibrariesPart](../../models/operations/GetSearchAllLibrariesPart.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | +| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | +| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | +| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | +| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | +| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | +| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | +| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | +| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | +| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | +| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | +| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetSearchAllLibrariesOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | +| `part` | List\<[GetSearchAllLibrariesPart](../../models/operations/GetSearchAllLibrariesPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMediaContainer.md b/docs/models/operations/GetSearchAllLibrariesMediaContainer.md index a1d5374c..f220aba3 100644 --- a/docs/models/operations/GetSearchAllLibrariesMediaContainer.md +++ b/docs/models/operations/GetSearchAllLibrariesMediaContainer.md @@ -3,7 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `size` | *double* | :heavy_check_mark: | N/A | -| `searchResult` | List\<[SearchResult](../../models/operations/SearchResult.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | +| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | +| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | +| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | +| `searchResult` | List\<[SearchResult](../../models/operations/SearchResult.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMediaGuid.md b/docs/models/operations/GetSearchAllLibrariesMediaGuid.md deleted file mode 100644 index 4ba35ba3..00000000 --- a/docs/models/operations/GetSearchAllLibrariesMediaGuid.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchAllLibrariesMediaGuid - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | Can be one of the following formats:
imdb://tt13015952, tmdb://2434012, tvdb://7945991
| imdb://tt13015952 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMetaDataRating.md b/docs/models/operations/GetSearchAllLibrariesMetaDataRating.md deleted file mode 100644 index 53c7bc91..00000000 --- a/docs/models/operations/GetSearchAllLibrariesMetaDataRating.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesMetaDataRating - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *String* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating | -| `value` | *float* | :heavy_check_mark: | The value of the rating. | 3 | -| `type` | *String* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMetadata.md b/docs/models/operations/GetSearchAllLibrariesMetadata.md index 3e3858a8..929f7516 100644 --- a/docs/models/operations/GetSearchAllLibrariesMetadata.md +++ b/docs/models/operations/GetSearchAllLibrariesMetadata.md @@ -1,83 +1,82 @@ # GetSearchAllLibrariesMetadata +Unknown + + ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item.
Note: This is always an integer, but is represented as a string in the API.
| 58683 | -| `key` | *String* | :heavy_check_mark: | N/A | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | 20th Century Studios | -| `skipChildren` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `type` | [GetSearchAllLibrariesType](../../models/operations/GetSearchAllLibrariesType.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie | -| `title` | *String* | :heavy_check_mark: | N/A | Avatar: The Way of Water | -| `slug` | *Optional\* | :heavy_minus_sign: | N/A | 4-for-texas | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *String* | :heavy_check_mark: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | 7.6 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `seasonCount` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | Return to Pandora. | -| `flattenSeasons` | [Optional\](../../models/operations/GetSearchAllLibrariesFlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 | -| `episodeSort` | [Optional\](../../models/operations/GetSearchAllLibrariesEpisodeSort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 | -| `enableCreditsMarkerGeneration` | [Optional\](../../models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 | -| `showOrdering` | [Optional\](../../models/operations/GetSearchAllLibrariesShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| absolute | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | -| `banner` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | -| `addedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | N/A | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/58684 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 66 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `parentSlug` | *Optional\* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | -| `media` | List\<[GetSearchAllLibrariesMedia](../../models/operations/GetSearchAllLibrariesMedia.md)> | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| | -| `genre` | List\<[GetSearchAllLibrariesGenre](../../models/operations/GetSearchAllLibrariesGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetSearchAllLibrariesCountry](../../models/operations/GetSearchAllLibrariesCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetSearchAllLibrariesDirector](../../models/operations/GetSearchAllLibrariesDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetSearchAllLibrariesWriter](../../models/operations/GetSearchAllLibrariesWriter.md)> | :heavy_minus_sign: | N/A | | -| `collection` | List\<[GetSearchAllLibrariesCollection](../../models/operations/GetSearchAllLibrariesCollection.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetSearchAllLibrariesRole](../../models/operations/GetSearchAllLibrariesRole.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[GetSearchAllLibrariesLocation](../../models/operations/GetSearchAllLibrariesLocation.md)> | :heavy_minus_sign: | N/A | | -| `mediaGuid` | List\<[GetSearchAllLibrariesMediaGuid](../../models/operations/GetSearchAllLibrariesMediaGuid.md)> | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | -| `ultraBlurColors` | [Optional\](../../models/operations/GetSearchAllLibrariesUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `metaDataRating` | List\<[GetSearchAllLibrariesMetaDataRating](../../models/operations/GetSearchAllLibrariesMetaDataRating.md)> | :heavy_minus_sign: | N/A | | -| `image` | List\<[GetSearchAllLibrariesImage](../../models/operations/GetSearchAllLibrariesImage.md)> | :heavy_minus_sign: | N/A | | -| `titleSort` | *Optional\* | :heavy_minus_sign: | N/A | Whale | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1682752242 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | N/A | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `theme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | N/A | 0 | -| `childCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumExtras` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumPrimaryExtra` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent item.
| 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `parentStudio` | *Optional\* | :heavy_minus_sign: | N/A | UCP | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2010 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `parentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | +| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | +| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | +| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | +| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | +| `type` | [GetSearchAllLibrariesType](../../models/operations/GetSearchAllLibrariesType.md) | :heavy_check_mark: | N/A | movie | +| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | +| `banner` | *String* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | +| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | +| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | +| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| +| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | +| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | +| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | +| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | +| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | +| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | +| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | +| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | +| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | +| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | +| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | +| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | +| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | +| `parentYear` | *Optional\* | :heavy_minus_sign: | The release year of the parent media item. | 2010 | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | +| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | +| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | +| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | +| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | +| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | +| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | +| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | +| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | +| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | +| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | +| `image` | List\<[GetSearchAllLibrariesImage](../../models/operations/GetSearchAllLibrariesImage.md)> | :heavy_minus_sign: | N/A | | +| `ultraBlurColors` | [Optional\](../../models/operations/GetSearchAllLibrariesUltraBlurColors.md) | :heavy_minus_sign: | N/A | | +| `guids` | List\<[GetSearchAllLibrariesGuids](../../models/operations/GetSearchAllLibrariesGuids.md)> | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | +| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | +| `showOrdering` | [Optional\](../../models/operations/GetSearchAllLibrariesShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | +| `flattenSeasons` | [Optional\](../../models/operations/GetSearchAllLibrariesFlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | +| `media` | List\<[GetSearchAllLibrariesMedia](../../models/operations/GetSearchAllLibrariesMedia.md)> | :heavy_minus_sign: | N/A | | +| `genre` | List\<[GetSearchAllLibrariesGenre](../../models/operations/GetSearchAllLibrariesGenre.md)> | :heavy_minus_sign: | N/A | | +| `country` | List\<[GetSearchAllLibrariesCountry](../../models/operations/GetSearchAllLibrariesCountry.md)> | :heavy_minus_sign: | N/A | | +| `director` | List\<[GetSearchAllLibrariesDirector](../../models/operations/GetSearchAllLibrariesDirector.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List\<[GetSearchAllLibrariesWriter](../../models/operations/GetSearchAllLibrariesWriter.md)> | :heavy_minus_sign: | N/A | | +| `role` | List\<[GetSearchAllLibrariesRole](../../models/operations/GetSearchAllLibrariesRole.md)> | :heavy_minus_sign: | N/A | | +| `location` | List\<[GetSearchAllLibrariesLocation](../../models/operations/GetSearchAllLibrariesLocation.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md index 0011a0e5..fa7e8b54 100644 --- a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md +++ b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md @@ -1,9 +1,4 @@ # GetSearchAllLibrariesOptimizedForStreaming +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md new file mode 100644 index 00000000..ff8e21af --- /dev/null +++ b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesOptimizedForStreaming1 + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md new file mode 100644 index 00000000..b078b22c --- /dev/null +++ b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesOptimizedForStreamingLibrary1 + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesPart.md b/docs/models/operations/GetSearchAllLibrariesPart.md index d67385be..9ba87c6e 100644 --- a/docs/models/operations/GetSearchAllLibrariesPart.md +++ b/docs/models/operations/GetSearchAllLibrariesPart.md @@ -3,18 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | N/A | 119542 | -| `key` | *String* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 11558112 | -| `file` | *String* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | -| `size` | *long* | :heavy_check_mark: | N/A | 36158371307 | -| `container` | *String* | :heavy_check_mark: | The container format of the media file.
| mkv | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `hasThumbnail` | [Optional\](../../models/operations/GetSearchAllLibrariesHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[GetSearchAllLibrariesStream](../../models/operations/GetSearchAllLibrariesStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | +| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | +| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | +| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | +| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | +| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | +| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | +| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | +| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | +| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | [Optional\](../../models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | +| `hasThumbnail` | [Optional\](../../models/operations/GetSearchAllLibrariesHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesRole.md b/docs/models/operations/GetSearchAllLibrariesRole.md index afab1cd2..985e03c9 100644 --- a/docs/models/operations/GetSearchAllLibrariesRole.md +++ b/docs/models/operations/GetSearchAllLibrariesRole.md @@ -3,11 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | The ID of the tag or actor. | 294129 | -| `filter` | *Optional\* | :heavy_minus_sign: | The filter used to find the actor or tag. | actor=294129 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The thumbnail of the actor | https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg | -| `tag` | *Optional\* | :heavy_minus_sign: | The name of the tag or actor. | Mike Smith | -| `tagKey` | *Optional\* | :heavy_minus_sign: | Unique identifier for the tag. | 668e7e7b22bcad9064350c91 | -| `role` | *Optional\* | :heavy_minus_sign: | The role of the actor or tag in the media. | Self | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | +| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | +| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesShowOrdering.md b/docs/models/operations/GetSearchAllLibrariesShowOrdering.md index a33274ed..6331527e 100644 --- a/docs/models/operations/GetSearchAllLibrariesShowOrdering.md +++ b/docs/models/operations/GetSearchAllLibrariesShowOrdering.md @@ -1,11 +1,12 @@ # GetSearchAllLibrariesShowOrdering Setting that indicates the episode ordering for the show. -None = Library default, -tmdbAiring = The Movie Database (Aired), -aired = TheTVDB (Aired), -dvd = TheTVDB (DVD), -absolute = TheTVDB (Absolute)). +Options: + - None = Library default + - tmdbAiring = The Movie Database (Aired) + - aired = TheTVDB (Aired) + - dvd = TheTVDB (DVD) + - absolute = TheTVDB (Absolute) diff --git a/docs/models/operations/GetSearchAllLibrariesStream.md b/docs/models/operations/GetSearchAllLibrariesStream.md deleted file mode 100644 index bf039c1c..00000000 --- a/docs/models/operations/GetSearchAllLibrariesStream.md +++ /dev/null @@ -1,45 +0,0 @@ -# GetSearchAllLibrariesStream - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 272796 | -| `streamType` | *long* | :heavy_check_mark: | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this is the default stream | true | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is selected | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream | h264 | -| `index` | *long* | :heavy_check_mark: | The index of the stream | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | The bitrate of the stream in kbps | 6273 | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | The color primaries of the video stream | bt709 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | The color range of the video stream | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | The color space of the video stream | bt709 | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | The transfer characteristics (TRC) of the video stream | bt709 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | The bit depth of the video stream | 8 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | The chroma location of the video stream | left | -| `streamIdentifier` | *Optional\* | :heavy_minus_sign: | The identifier of the video stream | 2 | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | The chroma subsampling format | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | The coded height of the video stream | 1088 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | The coded width of the video stream | 1920 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | The frame rate of the video stream | 29.97 | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | Indicates if the stream has a scaling matrix | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `height` | *Optional\* | :heavy_minus_sign: | The height of the video stream | 1080 | -| `level` | *Optional\* | :heavy_minus_sign: | The level of the video codec | 40 | -| `profile` | *Optional\* | :heavy_minus_sign: | The profile of the video codec | main | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames | 4 | -| `scanType` | *Optional\* | :heavy_minus_sign: | The scan type (progressive or interlaced) | progressive | -| `width` | *Optional\* | :heavy_minus_sign: | The width of the video stream | 1920 | -| `displayTitle` | *Optional\* | :heavy_minus_sign: | Display title of the stream | 1080p (H.264) | -| `extendedDisplayTitle` | *Optional\* | :heavy_minus_sign: | Extended display title of the stream | 1080p (H.264) | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams) | 2 | -| `language` | *Optional\* | :heavy_minus_sign: | The language of the stream (for audio/subtitle streams) | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag of the stream | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | Language code of the stream | eng | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | The audio channel layout | stereo | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate of the audio stream in Hz | 48000 | -| `title` | *Optional\* | :heavy_minus_sign: | Title of the subtitle track (for subtitle streams) | English | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the subtitle stream can auto-sync | false | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesWriter.md b/docs/models/operations/GetSearchAllLibrariesWriter.md index de9de149..255e7879 100644 --- a/docs/models/operations/GetSearchAllLibrariesWriter.md +++ b/docs/models/operations/GetSearchAllLibrariesWriter.md @@ -3,6 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | +| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | +| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/MediaGuid.md b/docs/models/operations/MediaGuid.md deleted file mode 100644 index 1586aa87..00000000 --- a/docs/models/operations/MediaGuid.md +++ /dev/null @@ -1,8 +0,0 @@ -# MediaGuid - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | Can be one of the following formats:
imdb://tt13015952, tmdb://2434012, tvdb://7945991
| imdb://tt13015952 | \ No newline at end of file diff --git a/docs/models/operations/SearchResult.md b/docs/models/operations/SearchResult.md index c29277f9..63ccef4b 100644 --- a/docs/models/operations/SearchResult.md +++ b/docs/models/operations/SearchResult.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `score` | *float* | :heavy_check_mark: | N/A | -| `metadata` | [GetSearchAllLibrariesMetadata](../../models/operations/GetSearchAllLibrariesMetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `score` | *float* | :heavy_check_mark: | The score of the search result, typically a float value between 0 and 1. | 0.92 | +| `directory` | [Optional\](../../models/operations/GetSearchAllLibrariesDirectory.md) | :heavy_minus_sign: | N/A | | +| `metadata` | [Optional\](../../models/operations/GetSearchAllLibrariesMetadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ShowOrdering.md b/docs/models/operations/ShowOrdering.md index b0ee15cc..2965ddfe 100644 --- a/docs/models/operations/ShowOrdering.md +++ b/docs/models/operations/ShowOrdering.md @@ -1,11 +1,12 @@ # ShowOrdering Setting that indicates the episode ordering for the show. -None = Library default, -tmdbAiring = The Movie Database (Aired), -aired = TheTVDB (Aired), -dvd = TheTVDB (DVD), -absolute = TheTVDB (Absolute)). +Options: + - None = Library default + - tmdbAiring = The Movie Database (Aired) + - aired = TheTVDB (Aired) + - dvd = TheTVDB (DVD) + - absolute = TheTVDB (Absolute) diff --git a/docs/models/operations/Stream.md b/docs/models/operations/Stream.md index f097f72b..36638128 100644 --- a/docs/models/operations/Stream.md +++ b/docs/models/operations/Stream.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | [StreamType](../../models/operations/StreamType.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 | +| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | | `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | | `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | | `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | diff --git a/docs/models/operations/StreamType.md b/docs/models/operations/StreamType.md deleted file mode 100644 index d953cedf..00000000 --- a/docs/models/operations/StreamType.md +++ /dev/null @@ -1,16 +0,0 @@ -# StreamType - -Stream type: - - 1 = video - - 2 = audio - - 3 = subtitle - - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Video` | 1 | -| `Audio` | 2 | -| `Subtitle` | 3 | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 83715b57..68cb4b13 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ groupId=dev.plexapi artifactId=plexapi -version=0.17.0 \ No newline at end of file +version=0.17.1 \ No newline at end of file diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index c6b3439a..8dda11ff 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -21,8 +21,8 @@ public 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.17.0"; - public static final String GEN_VERSION = "2.620.2"; + public static final String SDK_VERSION = "0.17.1"; + public static final String GEN_VERSION = "2.623.0"; 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/models/operations/EnableCreditsMarkerGeneration.java b/src/main/java/dev/plexapi/sdk/models/operations/EnableCreditsMarkerGeneration.java deleted file mode 100644 index 58415c0c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/EnableCreditsMarkerGeneration.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * EnableCreditsMarkerGeneration - * - *

Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ -@JsonDeserialize(using = EnableCreditsMarkerGeneration._Deserializer.class) -@JsonSerialize(using = EnableCreditsMarkerGeneration._Serializer.class) -public class EnableCreditsMarkerGeneration { - - public static final EnableCreditsMarkerGeneration LibraryDefault = new EnableCreditsMarkerGeneration("-1"); - public static final EnableCreditsMarkerGeneration Disabled = new EnableCreditsMarkerGeneration("0"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private EnableCreditsMarkerGeneration(String value) { - this.value = value; - } - - /** - * Returns a EnableCreditsMarkerGeneration with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as EnableCreditsMarkerGeneration - */ - public static EnableCreditsMarkerGeneration of(String value) { - synchronized (EnableCreditsMarkerGeneration.class) { - return values.computeIfAbsent(value, v -> new EnableCreditsMarkerGeneration(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - EnableCreditsMarkerGeneration other = (EnableCreditsMarkerGeneration) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "EnableCreditsMarkerGeneration [value=" + value + "]"; - } - - // return an array just like an enum - public static EnableCreditsMarkerGeneration[] values() { - synchronized (EnableCreditsMarkerGeneration.class) { - return values.values().toArray(new EnableCreditsMarkerGeneration[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("-1", LibraryDefault); - map.put("0", Disabled); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("-1", EnableCreditsMarkerGenerationEnum.LibraryDefault); - map.put("0", EnableCreditsMarkerGenerationEnum.Disabled); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(EnableCreditsMarkerGeneration.class); - } - - @Override - public void serialize(EnableCreditsMarkerGeneration value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(EnableCreditsMarkerGeneration.class); - } - - @Override - public EnableCreditsMarkerGeneration deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return EnableCreditsMarkerGeneration.of(v); - } - } - - public enum EnableCreditsMarkerGenerationEnum { - - LibraryDefault("-1"), - Disabled("0"),; - - private final String value; - - private EnableCreditsMarkerGenerationEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EpisodeSort.java b/src/main/java/dev/plexapi/sdk/models/operations/EpisodeSort.java deleted file mode 100644 index ccaa0cfa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/EpisodeSort.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * EpisodeSort - * - *

Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ -@JsonDeserialize(using = EpisodeSort._Deserializer.class) -@JsonSerialize(using = EpisodeSort._Serializer.class) -public class EpisodeSort { - - public static final EpisodeSort LibraryDefault = new EpisodeSort("-1"); - public static final EpisodeSort OldestFirst = new EpisodeSort("0"); - public static final EpisodeSort NewestFirst = new EpisodeSort("1"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private EpisodeSort(String value) { - this.value = value; - } - - /** - * Returns a EpisodeSort with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as EpisodeSort - */ - public static EpisodeSort of(String value) { - synchronized (EpisodeSort.class) { - return values.computeIfAbsent(value, v -> new EpisodeSort(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - EpisodeSort other = (EpisodeSort) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "EpisodeSort [value=" + value + "]"; - } - - // return an array just like an enum - public static EpisodeSort[] values() { - synchronized (EpisodeSort.class) { - return values.values().toArray(new EpisodeSort[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("-1", LibraryDefault); - map.put("0", OldestFirst); - map.put("1", NewestFirst); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("-1", EpisodeSortEnum.LibraryDefault); - map.put("0", EpisodeSortEnum.OldestFirst); - map.put("1", EpisodeSortEnum.NewestFirst); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(EpisodeSort.class); - } - - @Override - public void serialize(EpisodeSort value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(EpisodeSort.class); - } - - @Override - public EpisodeSort deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return EpisodeSort.of(v); - } - } - - public enum EpisodeSortEnum { - - LibraryDefault("-1"), - OldestFirst("0"), - NewestFirst("1"),; - - private final String value; - - private EpisodeSortEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java index 961de22e..14f4edcd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java @@ -90,8 +90,9 @@ public class GetActorsLibraryMediaContainer { /** * Identifier for the view mode. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewMode") - private String viewMode; + private Optional viewMode; /** * An array of actor entries for media items. @@ -113,7 +114,7 @@ public class GetActorsLibraryMediaContainer { @JsonProperty("title1") String title1, @JsonProperty("title2") String title2, @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("viewMode") String viewMode, + @JsonProperty("viewMode") Optional viewMode, @JsonProperty("Directory") Optional> directory) { Utils.checkNotNull(size, "size"); Utils.checkNotNull(allowSync, "allowSync"); @@ -154,9 +155,8 @@ public class GetActorsLibraryMediaContainer { String thumb, String title1, String title2, - String viewGroup, - String viewMode) { - this(size, allowSync, art, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, viewMode, Optional.empty()); + String viewGroup) { + this(size, allowSync, art, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty()); } /** @@ -251,7 +251,7 @@ public class GetActorsLibraryMediaContainer { * Identifier for the view mode. */ @JsonIgnore - public String viewMode() { + public Optional viewMode() { return viewMode; } @@ -371,6 +371,15 @@ public class GetActorsLibraryMediaContainer { * Identifier for the view mode. */ public GetActorsLibraryMediaContainer withViewMode(String viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + /** + * Identifier for the view mode. + */ + public GetActorsLibraryMediaContainer withViewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; @@ -480,7 +489,7 @@ public class GetActorsLibraryMediaContainer { private String viewGroup; - private String viewMode; + private Optional viewMode = Optional.empty(); private Optional> directory = Optional.empty(); @@ -591,6 +600,15 @@ public class GetActorsLibraryMediaContainer { * Identifier for the view mode. */ public Builder viewMode(String viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + /** + * Identifier for the view mode. + */ + public Builder viewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java index 7eaab8f1..2108205f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java @@ -5,34 +5,32 @@ 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.util.Objects; -import java.util.Optional; public class GetLibraryItemsCollection { - @JsonInclude(Include.NON_ABSENT) + /** + * The user-made collection this media item belongs to + */ @JsonProperty("tag") - private Optional tag; + private String tag; @JsonCreator public GetLibraryItemsCollection( - @JsonProperty("tag") Optional tag) { + @JsonProperty("tag") String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; } - - public GetLibraryItemsCollection() { - this(Optional.empty()); - } + /** + * The user-made collection this media item belongs to + */ @JsonIgnore - public Optional tag() { + public String tag() { return tag; } @@ -40,13 +38,10 @@ public class GetLibraryItemsCollection { return new Builder(); } + /** + * The user-made collection this media item belongs to + */ public GetLibraryItemsCollection withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - public GetLibraryItemsCollection withTag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -80,19 +75,16 @@ public class GetLibraryItemsCollection { public final static class Builder { - private Optional tag = Optional.empty(); + private String tag; private Builder() { // force use of static builder() method } + /** + * The user-made collection this media item belongs to + */ public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - public Builder tag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java index bb4e31d0..af998bf5 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java @@ -5,34 +5,52 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; -import java.util.Optional; public class GetLibraryItemsCountry { - @JsonInclude(Include.NON_ABSENT) + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonProperty("id") + private int id; + + /** + * The country of origin of this media item + */ @JsonProperty("tag") - private Optional tag; + private String tag; @JsonCreator public GetLibraryItemsCountry( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + this.id = id; this.tag = tag; } - - public GetLibraryItemsCountry() { - this(Optional.empty()); + + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonIgnore + public int id() { + return id; } + /** + * The country of origin of this media item + */ @JsonIgnore - public Optional tag() { + public String tag() { return tag; } @@ -40,13 +58,20 @@ public class GetLibraryItemsCountry { return new Builder(); } - public GetLibraryItemsCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public GetLibraryItemsCountry withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetLibraryItemsCountry withTag(Optional tag) { + /** + * The country of origin of this media item + */ + public GetLibraryItemsCountry withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -63,36 +88,48 @@ public class GetLibraryItemsCountry { } GetLibraryItemsCountry other = (GetLibraryItemsCountry) o; return + Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.tag, other.tag); } @Override public int hashCode() { return Objects.hash( + id, tag); } @Override public String toString() { return Utils.toString(GetLibraryItemsCountry.class, + "id", id, "tag", tag); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The country of origin of this media item + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -100,6 +137,7 @@ public class GetLibraryItemsCountry { public GetLibraryItemsCountry build() { return new GetLibraryItemsCountry( + id, tag); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java index 0fe5567c..5f80985b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java @@ -9,6 +9,7 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -16,42 +17,108 @@ import java.util.Optional; public class GetLibraryItemsDirector { - @JsonInclude(Include.NON_ABSENT) + /** + * Unique identifier for the director. + */ + @JsonProperty("id") + private int id; + + /** + * The role of Director + */ @JsonProperty("tag") - private Optional tag; + private String tag; + + /** + * The absolute URL of the thumbnail image for the director. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; @JsonCreator public GetLibraryItemsDirector( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; this.tag = tag; + this.thumb = thumb; } - public GetLibraryItemsDirector() { - this(Optional.empty()); + public GetLibraryItemsDirector( + int id, + String tag) { + this(id, tag, Optional.empty()); } + /** + * Unique identifier for the director. + */ @JsonIgnore - public Optional tag() { + public int id() { + return id; + } + + /** + * The role of Director + */ + @JsonIgnore + public String tag() { return tag; } + /** + * The absolute URL of the thumbnail image for the director. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } - public GetLibraryItemsDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the director. + */ + public GetLibraryItemsDirector withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetLibraryItemsDirector withTag(Optional tag) { + /** + * The role of Director + */ + public GetLibraryItemsDirector withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + /** + * The absolute URL of the thumbnail image for the director. + */ + public GetLibraryItemsDirector withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public GetLibraryItemsDirector withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -63,44 +130,80 @@ public class GetLibraryItemsDirector { } GetLibraryItemsDirector other = (GetLibraryItemsDirector) o; return - Objects.deepEquals(this.tag, other.tag); + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( - tag); + id, + tag, + thumb); } @Override public String toString() { return Utils.toString(GetLibraryItemsDirector.class, - "tag", tag); + "id", id, + "tag", tag, + "thumb", thumb); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the director. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The role of Director + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetLibraryItemsDirector build() { return new GetLibraryItemsDirector( - tag); + id, + tag, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java index 1f1377e6..938d5860 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java @@ -5,15 +5,11 @@ 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 GetLibraryItemsFilter { @@ -32,39 +28,23 @@ public class GetLibraryItemsFilter { @JsonProperty("type") private String type; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("advanced") - private Optional advanced; - @JsonCreator public GetLibraryItemsFilter( @JsonProperty("filter") String filter, @JsonProperty("filterType") String filterType, @JsonProperty("key") String key, @JsonProperty("title") String title, - @JsonProperty("type") String type, - @JsonProperty("advanced") Optional advanced) { + @JsonProperty("type") String type) { Utils.checkNotNull(filter, "filter"); Utils.checkNotNull(filterType, "filterType"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(title, "title"); Utils.checkNotNull(type, "type"); - Utils.checkNotNull(advanced, "advanced"); this.filter = filter; this.filterType = filterType; this.key = key; this.title = title; this.type = type; - this.advanced = advanced; - } - - public GetLibraryItemsFilter( - String filter, - String filterType, - String key, - String title, - String type) { - this(filter, filterType, key, title, type, Optional.empty()); } @JsonIgnore @@ -92,11 +72,6 @@ public class GetLibraryItemsFilter { return type; } - @JsonIgnore - public Optional advanced() { - return advanced; - } - public final static Builder builder() { return new Builder(); } @@ -131,18 +106,6 @@ public class GetLibraryItemsFilter { return this; } - public GetLibraryItemsFilter withAdvanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public GetLibraryItemsFilter withAdvanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - @Override public boolean equals(java.lang.Object o) { @@ -158,8 +121,7 @@ public class GetLibraryItemsFilter { Objects.deepEquals(this.filterType, other.filterType) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.advanced, other.advanced); + Objects.deepEquals(this.type, other.type); } @Override @@ -169,8 +131,7 @@ public class GetLibraryItemsFilter { filterType, key, title, - type, - advanced); + type); } @Override @@ -180,8 +141,7 @@ public class GetLibraryItemsFilter { "filterType", filterType, "key", key, "title", title, - "type", type, - "advanced", advanced); + "type", type); } public final static class Builder { @@ -195,8 +155,6 @@ public class GetLibraryItemsFilter { private String title; private String type; - - private Optional advanced = Optional.empty(); private Builder() { // force use of static builder() method @@ -231,18 +189,6 @@ public class GetLibraryItemsFilter { this.type = type; return this; } - - public Builder advanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public Builder advanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } public GetLibraryItemsFilter build() { return new GetLibraryItemsFilter( @@ -250,8 +196,7 @@ public class GetLibraryItemsFilter { filterType, key, title, - type, - advanced); + type); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java index 15c7ecee..139a629d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java @@ -5,34 +5,52 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; -import java.util.Optional; public class GetLibraryItemsGenre { - @JsonInclude(Include.NON_ABSENT) + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonProperty("id") + private int id; + + /** + * The genre name of this media-item + */ @JsonProperty("tag") - private Optional tag; + private String tag; @JsonCreator public GetLibraryItemsGenre( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + this.id = id; this.tag = tag; } - - public GetLibraryItemsGenre() { - this(Optional.empty()); + + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonIgnore + public int id() { + return id; } + /** + * The genre name of this media-item + */ @JsonIgnore - public Optional tag() { + public String tag() { return tag; } @@ -40,13 +58,20 @@ public class GetLibraryItemsGenre { return new Builder(); } - public GetLibraryItemsGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public GetLibraryItemsGenre withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetLibraryItemsGenre withTag(Optional tag) { + /** + * The genre name of this media-item + */ + public GetLibraryItemsGenre withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -63,36 +88,48 @@ public class GetLibraryItemsGenre { } GetLibraryItemsGenre other = (GetLibraryItemsGenre) o; return + Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.tag, other.tag); } @Override public int hashCode() { return Objects.hash( + id, tag); } @Override public String toString() { return Utils.toString(GetLibraryItemsGenre.class, + "id", id, "tag", tag); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The genre name of this media-item + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -100,6 +137,7 @@ public class GetLibraryItemsGenre { public GetLibraryItemsGenre build() { return new GetLibraryItemsGenre( + id, tag); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaGuid.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java similarity index 71% rename from src/main/java/dev/plexapi/sdk/models/operations/MediaGuid.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java index aaab6172..cca3c22f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/MediaGuid.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java @@ -11,25 +11,23 @@ import java.lang.Override; import java.lang.String; import java.util.Objects; -public class MediaGuid { +public class GetLibraryItemsGuids { /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ @JsonProperty("id") private String id; @JsonCreator - public MediaGuid( + public GetLibraryItemsGuids( @JsonProperty("id") String id) { Utils.checkNotNull(id, "id"); this.id = id; } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ @JsonIgnore public String id() { @@ -41,10 +39,9 @@ public class MediaGuid { } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ - public MediaGuid withId(String id) { + public GetLibraryItemsGuids withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; @@ -59,7 +56,7 @@ public class MediaGuid { if (o == null || getClass() != o.getClass()) { return false; } - MediaGuid other = (MediaGuid) o; + GetLibraryItemsGuids other = (GetLibraryItemsGuids) o; return Objects.deepEquals(this.id, other.id); } @@ -72,7 +69,7 @@ public class MediaGuid { @Override public String toString() { - return Utils.toString(MediaGuid.class, + return Utils.toString(GetLibraryItemsGuids.class, "id", id); } @@ -85,8 +82,7 @@ public class MediaGuid { } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ public Builder id(String id) { Utils.checkNotNull(id, "id"); @@ -94,8 +90,8 @@ public class MediaGuid { return this; } - public MediaGuid build() { - return new MediaGuid( + public GetLibraryItemsGuids build() { + return new GetLibraryItemsGuids( id); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java index 0c632694..1bc92777 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java @@ -8,6 +8,11 @@ import java.lang.String; import java.util.Objects; import java.util.Optional; +/** + * GetLibraryItemsHasThumbnail + * + *

Indicates if the part has a thumbnail. + */ public enum GetLibraryItemsHasThumbnail { False("0"), True("1"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java index 945426f6..f6b31848 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java @@ -17,7 +17,7 @@ public class GetLibraryItemsImage { private String alt; @JsonProperty("type") - private GetLibraryItemsLibraryResponse200Type type; + private GetLibraryItemsLibraryResponseType type; @JsonProperty("url") private String url; @@ -25,7 +25,7 @@ public class GetLibraryItemsImage { @JsonCreator public GetLibraryItemsImage( @JsonProperty("alt") String alt, - @JsonProperty("type") GetLibraryItemsLibraryResponse200Type type, + @JsonProperty("type") GetLibraryItemsLibraryResponseType type, @JsonProperty("url") String url) { Utils.checkNotNull(alt, "alt"); Utils.checkNotNull(type, "type"); @@ -41,7 +41,7 @@ public class GetLibraryItemsImage { } @JsonIgnore - public GetLibraryItemsLibraryResponse200Type type() { + public GetLibraryItemsLibraryResponseType type() { return type; } @@ -60,7 +60,7 @@ public class GetLibraryItemsImage { return this; } - public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponse200Type type) { + public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponseType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -108,7 +108,7 @@ public class GetLibraryItemsImage { private String alt; - private GetLibraryItemsLibraryResponse200Type type; + private GetLibraryItemsLibraryResponseType type; private String url; @@ -122,7 +122,7 @@ public class GetLibraryItemsImage { return this; } - public Builder type(GetLibraryItemsLibraryResponse200Type type) { + public Builder type(GetLibraryItemsLibraryResponseType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryActiveDirection.java deleted file mode 100644 index 67a49890..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryActiveDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsLibraryActiveDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibraryItemsLibraryActiveDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - private GetLibraryItemsLibraryActiveDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibraryItemsLibraryActiveDirection o: GetLibraryItemsLibraryActiveDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java deleted file mode 100644 index 98e448cf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsLibraryDefaultDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibraryItemsLibraryDefaultDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - private GetLibraryItemsLibraryDefaultDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibraryItemsLibraryDefaultDirection o: GetLibraryItemsLibraryDefaultDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java deleted file mode 100644 index fae5069c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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.util.Objects; -import java.util.Optional; - -public class GetLibraryItemsLibraryField { - - @JsonProperty("key") - private String key; - - @JsonProperty("title") - private String title; - - @JsonProperty("type") - private String type; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subType") - private Optional subType; - - @JsonCreator - public GetLibraryItemsLibraryField( - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type, - @JsonProperty("subType") Optional subType) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subType, "subType"); - this.key = key; - this.title = title; - this.type = type; - this.subType = subType; - } - - public GetLibraryItemsLibraryField( - String key, - String title, - String type) { - this(key, title, type, Optional.empty()); - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional subType() { - return subType; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibraryField withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsLibraryField withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsLibraryField withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsLibraryField withSubType(String subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = Optional.ofNullable(subType); - return this; - } - - public GetLibraryItemsLibraryField withSubType(Optional subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = subType; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryField other = (GetLibraryItemsLibraryField) o; - return - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Objects.hash( - key, - title, - type, - subType); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryField.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - public final static class Builder { - - private String key; - - private String title; - - private String type; - - private Optional subType = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Builder subType(String subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = Optional.ofNullable(subType); - return this; - } - - public Builder subType(Optional subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = subType; - return this; - } - - public GetLibraryItemsLibraryField build() { - return new GetLibraryItemsLibraryField( - key, - title, - type, - subType); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFieldType.java deleted file mode 100644 index b8c0b9ae..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFieldType.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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.Override; -import java.lang.String; -import java.util.List; -import java.util.Objects; - -public class GetLibraryItemsLibraryFieldType { - - @JsonProperty("type") - private String type; - - @JsonProperty("Operator") - private List operator; - - @JsonCreator - public GetLibraryItemsLibraryFieldType( - @JsonProperty("type") String type, - @JsonProperty("Operator") List operator) { - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(operator, "operator"); - this.type = type; - this.operator = operator; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public List operator() { - return operator; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibraryFieldType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsLibraryFieldType withOperator(List operator) { - Utils.checkNotNull(operator, "operator"); - this.operator = operator; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryFieldType other = (GetLibraryItemsLibraryFieldType) o; - return - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Objects.hash( - type, - operator); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryFieldType.class, - "type", type, - "operator", operator); - } - - public final static class Builder { - - private String type; - - private List operator; - - private Builder() { - // force use of static builder() method - } - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Builder operator(List operator) { - Utils.checkNotNull(operator, "operator"); - this.operator = operator; - return this; - } - - public GetLibraryItemsLibraryFieldType build() { - return new GetLibraryItemsLibraryFieldType( - type, - operator); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFilter.java deleted file mode 100644 index 934dfb11..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFilter.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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.Override; -import java.lang.String; -import java.util.Objects; - -public class GetLibraryItemsLibraryFilter { - - @JsonProperty("filter") - private String filter; - - @JsonProperty("filterType") - private String filterType; - - @JsonProperty("key") - private String key; - - @JsonProperty("title") - private String title; - - @JsonProperty("type") - private String type; - - @JsonCreator - public GetLibraryItemsLibraryFilter( - @JsonProperty("filter") String filter, - @JsonProperty("filterType") String filterType, - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type) { - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(filterType, "filterType"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - this.filter = filter; - this.filterType = filterType; - this.key = key; - this.title = title; - this.type = type; - } - - @JsonIgnore - public String filter() { - return filter; - } - - @JsonIgnore - public String filterType() { - return filterType; - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public String type() { - return type; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibraryFilter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryItemsLibraryFilter withFilterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - return this; - } - - public GetLibraryItemsLibraryFilter withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsLibraryFilter withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsLibraryFilter withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryFilter other = (GetLibraryItemsLibraryFilter) o; - return - Objects.deepEquals(this.filter, other.filter) && - Objects.deepEquals(this.filterType, other.filterType) && - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Objects.hash( - filter, - filterType, - key, - title, - type); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type); - } - - public final static class Builder { - - private String filter; - - private String filterType; - - private String key; - - private String title; - - private String type; - - private Builder() { - // force use of static builder() method - } - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public Builder filterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - return this; - } - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsLibraryFilter build() { - return new GetLibraryItemsLibraryFilter( - filter, - filterType, - key, - title, - type); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOperator.java deleted file mode 100644 index ed9f9438..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOperator.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.Override; -import java.lang.String; -import java.util.Objects; - -public class GetLibraryItemsLibraryOperator { - - @JsonProperty("key") - private String key; - - @JsonProperty("title") - private String title; - - @JsonCreator - public GetLibraryItemsLibraryOperator( - @JsonProperty("key") String key, - @JsonProperty("title") String title) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.key = key; - this.title = title; - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibraryOperator withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsLibraryOperator withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryOperator other = (GetLibraryItemsLibraryOperator) o; - return - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Objects.hash( - key, - title); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryOperator.class, - "key", key, - "title", title); - } - - public final static class Builder { - - private String key; - - private String title; - - private Builder() { - // force use of static builder() method - } - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsLibraryOperator build() { - return new GetLibraryItemsLibraryOperator( - key, - title); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java new file mode 100644 index 00000000..6b4373f5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; + +/** + * GetLibraryItemsLibraryOptimizedForStreaming + * + *

Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ +@JsonDeserialize(using = GetLibraryItemsLibraryOptimizedForStreaming._Deserializer.class) +public class GetLibraryItemsLibraryOptimizedForStreaming { + + @JsonValue + private TypedObject value; + + private GetLibraryItemsLibraryOptimizedForStreaming(TypedObject value) { + this.value = value; + } + + public static GetLibraryItemsLibraryOptimizedForStreaming of(GetLibraryItemsOptimizedForStreaming1 value) { + Utils.checkNotNull(value, "value"); + return new GetLibraryItemsLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static GetLibraryItemsLibraryOptimizedForStreaming of(boolean value) { + Utils.checkNotNull(value, "value"); + return new GetLibraryItemsLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *

    + *
  • {@code dev.plexapi.sdk.models.operations.GetLibraryItemsOptimizedForStreaming1}
  • + *
  • {@code boolean}
  • + *
+ * + *

Use {@code instanceof} to determine what type is returned. For example: + * + *

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsLibraryOptimizedForStreaming other = (GetLibraryItemsLibraryOptimizedForStreaming) o; + return Objects.deepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(GetLibraryItemsLibraryOptimizedForStreaming.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsLibraryOptimizedForStreaming.class, + "value", value); + } + +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java deleted file mode 100644 index 23e40950..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -@JsonDeserialize(using = GetLibraryItemsLibraryResponse200Type._Deserializer.class) -@JsonSerialize(using = GetLibraryItemsLibraryResponse200Type._Serializer.class) -public class GetLibraryItemsLibraryResponse200Type { - - public static final GetLibraryItemsLibraryResponse200Type COVER_POSTER = new GetLibraryItemsLibraryResponse200Type("coverPoster"); - public static final GetLibraryItemsLibraryResponse200Type BACKGROUND = new GetLibraryItemsLibraryResponse200Type("background"); - public static final GetLibraryItemsLibraryResponse200Type SNAPSHOT = new GetLibraryItemsLibraryResponse200Type("snapshot"); - public static final GetLibraryItemsLibraryResponse200Type CLEAR_LOGO = new GetLibraryItemsLibraryResponse200Type("clearLogo"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetLibraryItemsLibraryResponse200Type(String value) { - this.value = value; - } - - /** - * Returns a GetLibraryItemsLibraryResponse200Type with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibraryItemsLibraryResponse200Type - */ - public static GetLibraryItemsLibraryResponse200Type of(String value) { - synchronized (GetLibraryItemsLibraryResponse200Type.class) { - return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryResponse200Type(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibraryItemsLibraryResponse200Type other = (GetLibraryItemsLibraryResponse200Type) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibraryItemsLibraryResponse200Type [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibraryItemsLibraryResponse200Type[] values() { - synchronized (GetLibraryItemsLibraryResponse200Type.class) { - return values.values().toArray(new GetLibraryItemsLibraryResponse200Type[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("coverPoster", COVER_POSTER); - map.put("background", BACKGROUND); - map.put("snapshot", SNAPSHOT); - map.put("clearLogo", CLEAR_LOGO); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("coverPoster", GetLibraryItemsLibraryResponse200TypeEnum.COVER_POSTER); - map.put("background", GetLibraryItemsLibraryResponse200TypeEnum.BACKGROUND); - map.put("snapshot", GetLibraryItemsLibraryResponse200TypeEnum.SNAPSHOT); - map.put("clearLogo", GetLibraryItemsLibraryResponse200TypeEnum.CLEAR_LOGO); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibraryItemsLibraryResponse200Type.class); - } - - @Override - public void serialize(GetLibraryItemsLibraryResponse200Type value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibraryItemsLibraryResponse200Type.class); - } - - @Override - public GetLibraryItemsLibraryResponse200Type deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibraryItemsLibraryResponse200Type.of(v); - } - } - - public enum GetLibraryItemsLibraryResponse200TypeEnum { - - COVER_POSTER("coverPoster"), - BACKGROUND("background"), - SNAPSHOT("snapshot"), - CLEAR_LOGO("clearLogo"),; - - private final String value; - - private GetLibraryItemsLibraryResponse200TypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java index 848b048b..0fa8dfa3 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java @@ -3,314 +3,185 @@ */ 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 com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.Objects; import java.util.Optional; +/** + *

Wrapper class for an "open" enum. "Open" enums are those that are expected + * to evolve (particularly with the addition of enum members over time). If an + * open enum is used then the appearance of unexpected enum values (say in a + * response from an updated an API) will not bring about a runtime error thus + * ensuring that non-updated client versions can continue to work without error. + * + *

Note that instances are immutable and are singletons (an internal thread-safe + * cache is maintained to ensure that). As a consequence instances created with the + * same value will satisfy reference equality (via {@code ==}). + * + *

This class is intended to emulate an enum (in terms of common usage and with + * reference equality) but with the ability to carry unknown values. Unfortunately + * Java does not permit the use of an instance in a switch expression but you can + * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). + * + */ +@JsonDeserialize(using = GetLibraryItemsLibraryResponseType._Deserializer.class) +@JsonSerialize(using = GetLibraryItemsLibraryResponseType._Serializer.class) public class GetLibraryItemsLibraryResponseType { - @JsonProperty("key") - private String key; + public static final GetLibraryItemsLibraryResponseType COVER_POSTER = new GetLibraryItemsLibraryResponseType("coverPoster"); + public static final GetLibraryItemsLibraryResponseType BACKGROUND = new GetLibraryItemsLibraryResponseType("background"); + public static final GetLibraryItemsLibraryResponseType SNAPSHOT = new GetLibraryItemsLibraryResponseType("snapshot"); + public static final GetLibraryItemsLibraryResponseType CLEAR_LOGO = new GetLibraryItemsLibraryResponseType("clearLogo"); - @JsonProperty("type") - private String type; + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); - @JsonProperty("title") - private String title; + private final String value; - @JsonProperty("active") - private boolean active; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Filter") - private Optional> filter; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Sort") - private Optional> sort; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Field") - private Optional> field; - - @JsonCreator - public GetLibraryItemsLibraryResponseType( - @JsonProperty("key") String key, - @JsonProperty("type") String type, - @JsonProperty("title") String title, - @JsonProperty("active") boolean active, - @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(field, "field"); - this.key = key; - this.type = type; - this.title = title; - this.active = active; - this.filter = filter; - this.sort = sort; - this.field = field; - } - - public GetLibraryItemsLibraryResponseType( - String key, - String type, - String title, - boolean active) { - this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); + private GetLibraryItemsLibraryResponseType(String value) { + this.value = value; } - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public boolean active() { - return active; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> filter() { - return (Optional>) filter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> sort() { - return (Optional>) sort; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> field() { - return (Optional>) field; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibraryResponseType withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsLibraryResponseType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsLibraryResponseType withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsLibraryResponseType withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public GetLibraryItemsLibraryResponseType withFilter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public GetLibraryItemsLibraryResponseType withFilter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryItemsLibraryResponseType withSort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public GetLibraryItemsLibraryResponseType withSort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetLibraryItemsLibraryResponseType withField(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public GetLibraryItemsLibraryResponseType withField(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; + /** + * Returns a GetLibraryItemsLibraryResponseType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as GetLibraryItemsLibraryResponseType + */ + public static GetLibraryItemsLibraryResponseType of(String value) { + synchronized (GetLibraryItemsLibraryResponseType.class) { + return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryResponseType(v)); } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryResponseType other = (GetLibraryItemsLibraryResponseType) o; - return - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.active, other.active) && - Objects.deepEquals(this.filter, other.filter) && - Objects.deepEquals(this.sort, other.sort) && - Objects.deepEquals(this.field, other.field); } - + + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + @Override public int hashCode() { - return Objects.hash( - key, - type, - title, - active, - filter, - sort, - field); + return Objects.hash(value); } - + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + GetLibraryItemsLibraryResponseType other = (GetLibraryItemsLibraryResponseType) obj; + return Objects.equals(value, other.value); + } + @Override public String toString() { - return Utils.toString(GetLibraryItemsLibraryResponseType.class, - "key", key, - "type", type, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); + return "GetLibraryItemsLibraryResponseType [value=" + value + "]"; + } + + // return an array just like an enum + public static GetLibraryItemsLibraryResponseType[] values() { + synchronized (GetLibraryItemsLibraryResponseType.class) { + return values.values().toArray(new GetLibraryItemsLibraryResponseType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("coverPoster", COVER_POSTER); + map.put("background", BACKGROUND); + map.put("snapshot", SNAPSHOT); + map.put("clearLogo", CLEAR_LOGO); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("coverPoster", GetLibraryItemsLibraryResponseTypeEnum.COVER_POSTER); + map.put("background", GetLibraryItemsLibraryResponseTypeEnum.BACKGROUND); + map.put("snapshot", GetLibraryItemsLibraryResponseTypeEnum.SNAPSHOT); + map.put("clearLogo", GetLibraryItemsLibraryResponseTypeEnum.CLEAR_LOGO); + return map; } - public final static class Builder { - - private String key; - - private String type; - - private String title; - - private Boolean active; - - private Optional> filter = Optional.empty(); - - private Optional> sort = Optional.empty(); - - private Optional> field = Optional.empty(); - - private Builder() { - // force use of static builder() method + @SuppressWarnings("serial") + public static final class _Serializer extends StdSerializer { + + protected _Serializer() { + super(GetLibraryItemsLibraryResponseType.class); } - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; + @Override + public void serialize(GetLibraryItemsLibraryResponseType value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeObject(value.value); + } + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends StdDeserializer { + + protected _Deserializer() { + super(GetLibraryItemsLibraryResponseType.class); } - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; + @Override + public GetLibraryItemsLibraryResponseType deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String v = p.readValueAs(new TypeReference() {}); + // use the factory method to ensure we get singletons + return GetLibraryItemsLibraryResponseType.of(v); + } + } + + public enum GetLibraryItemsLibraryResponseTypeEnum { + + COVER_POSTER("coverPoster"), + BACKGROUND("background"), + SNAPSHOT("snapshot"), + CLEAR_LOGO("clearLogo"),; + + private final String value; + + private GetLibraryItemsLibraryResponseTypeEnum(String value) { + this.value = value; } - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public Builder filter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public Builder filter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public Builder sort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public Builder sort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public Builder field(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public Builder field(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - public GetLibraryItemsLibraryResponseType build() { - return new GetLibraryItemsLibraryResponseType( - key, - type, - title, - active, - filter, - sort, - field); + public String value() { + return value; } } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java deleted file mode 100644 index 00a50e28..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * 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 com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Objects; -import java.util.Optional; - -public class GetLibraryItemsLibrarySort { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional active; - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("activeDirection") - private Optional activeDirection; - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultDirection") - private Optional defaultDirection; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("descKey") - private Optional descKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("firstCharacterKey") - private Optional firstCharacterKey; - - @JsonProperty("key") - private String key; - - @JsonProperty("title") - private String title; - - @JsonCreator - public GetLibraryItemsLibrarySort( - @JsonProperty("default") Optional default_, - @JsonProperty("active") Optional active, - @JsonProperty("activeDirection") Optional activeDirection, - @JsonProperty("defaultDirection") Optional defaultDirection, - @JsonProperty("descKey") Optional descKey, - @JsonProperty("firstCharacterKey") Optional firstCharacterKey, - @JsonProperty("key") String key, - @JsonProperty("title") String title) { - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(activeDirection, "activeDirection"); - Utils.checkNotNull(defaultDirection, "defaultDirection"); - Utils.checkNotNull(descKey, "descKey"); - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.default_ = default_; - this.active = active; - this.activeDirection = activeDirection; - this.defaultDirection = defaultDirection; - this.descKey = descKey; - this.firstCharacterKey = firstCharacterKey; - this.key = key; - this.title = title; - } - - public GetLibraryItemsLibrarySort( - String key, - String title) { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, title); - } - - @JsonIgnore - public Optional default_() { - return default_; - } - - @JsonIgnore - public Optional active() { - return active; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional activeDirection() { - return (Optional) activeDirection; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional defaultDirection() { - return (Optional) defaultDirection; - } - - @JsonIgnore - public Optional descKey() { - return descKey; - } - - @JsonIgnore - public Optional firstCharacterKey() { - return firstCharacterKey; - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsLibrarySort withDefault(String default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - public GetLibraryItemsLibrarySort withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - public GetLibraryItemsLibrarySort withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - public GetLibraryItemsLibrarySort withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsLibrarySort withActiveDirection(GetLibraryItemsLibraryActiveDirection activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = Optional.ofNullable(activeDirection); - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsLibrarySort withActiveDirection(Optional activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = activeDirection; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsLibrarySort withDefaultDirection(GetLibraryItemsLibraryDefaultDirection defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = Optional.ofNullable(defaultDirection); - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsLibrarySort withDefaultDirection(Optional defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = defaultDirection; - return this; - } - - public GetLibraryItemsLibrarySort withDescKey(String descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = Optional.ofNullable(descKey); - return this; - } - - public GetLibraryItemsLibrarySort withDescKey(Optional descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = descKey; - return this; - } - - public GetLibraryItemsLibrarySort withFirstCharacterKey(String firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); - return this; - } - - public GetLibraryItemsLibrarySort withFirstCharacterKey(Optional firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = firstCharacterKey; - return this; - } - - public GetLibraryItemsLibrarySort withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsLibrarySort withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibrarySort other = (GetLibraryItemsLibrarySort) o; - return - Objects.deepEquals(this.default_, other.default_) && - Objects.deepEquals(this.active, other.active) && - Objects.deepEquals(this.activeDirection, other.activeDirection) && - Objects.deepEquals(this.defaultDirection, other.defaultDirection) && - Objects.deepEquals(this.descKey, other.descKey) && - Objects.deepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Objects.hash( - default_, - active, - activeDirection, - defaultDirection, - descKey, - firstCharacterKey, - key, - title); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibrarySort.class, - "default_", default_, - "active", active, - "activeDirection", activeDirection, - "defaultDirection", defaultDirection, - "descKey", descKey, - "firstCharacterKey", firstCharacterKey, - "key", key, - "title", title); - } - - public final static class Builder { - - private Optional default_ = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional activeDirection; - - private Optional defaultDirection; - - private Optional descKey = Optional.empty(); - - private Optional firstCharacterKey = Optional.empty(); - - private String key; - - private String title; - - private Builder() { - // force use of static builder() method - } - - public Builder default_(String default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - public Builder active(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public Builder activeDirection(GetLibraryItemsLibraryActiveDirection activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = Optional.ofNullable(activeDirection); - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public Builder activeDirection(Optional activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = activeDirection; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public Builder defaultDirection(GetLibraryItemsLibraryDefaultDirection defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = Optional.ofNullable(defaultDirection); - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public Builder defaultDirection(Optional defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = defaultDirection; - return this; - } - - public Builder descKey(String descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = Optional.ofNullable(descKey); - return this; - } - - public Builder descKey(Optional descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = descKey; - return this; - } - - public Builder firstCharacterKey(String firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); - return this; - } - - public Builder firstCharacterKey(Optional firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = firstCharacterKey; - return this; - } - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsLibrarySort build() { - if (activeDirection == null) { - activeDirection = _SINGLETON_VALUE_ActiveDirection.value(); - } - if (defaultDirection == null) { - defaultDirection = _SINGLETON_VALUE_DefaultDirection.value(); - } - return new GetLibraryItemsLibrarySort( - default_, - active, - activeDirection, - defaultDirection, - descKey, - firstCharacterKey, - key, - title); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_ActiveDirection = - new LazySingletonValue<>( - "activeDirection", - "\"asc\"", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultDirection = - new LazySingletonValue<>( - "defaultDirection", - "\"asc\"", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java index 8779e1f1..67e59eb3 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java @@ -3,214 +3,314 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; +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.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; +import java.util.List; import java.util.Objects; import java.util.Optional; -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * GetLibraryItemsLibraryType - * - *

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetLibraryItemsLibraryType._Deserializer.class) -@JsonSerialize(using = GetLibraryItemsLibraryType._Serializer.class) public class GetLibraryItemsLibraryType { - public static final GetLibraryItemsLibraryType Movie = new GetLibraryItemsLibraryType("movie"); - public static final GetLibraryItemsLibraryType TvShow = new GetLibraryItemsLibraryType("show"); - public static final GetLibraryItemsLibraryType Season = new GetLibraryItemsLibraryType("season"); - public static final GetLibraryItemsLibraryType Episode = new GetLibraryItemsLibraryType("episode"); - public static final GetLibraryItemsLibraryType Artist = new GetLibraryItemsLibraryType("artist"); - public static final GetLibraryItemsLibraryType Album = new GetLibraryItemsLibraryType("album"); - public static final GetLibraryItemsLibraryType Track = new GetLibraryItemsLibraryType("track"); - public static final GetLibraryItemsLibraryType PhotoAlbum = new GetLibraryItemsLibraryType("photoalbum"); - public static final GetLibraryItemsLibraryType Photo = new GetLibraryItemsLibraryType("photo"); - public static final GetLibraryItemsLibraryType Collection = new GetLibraryItemsLibraryType("collection"); + @JsonProperty("key") + private String key; - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); + @JsonProperty("type") + private String type; - private final String value; + @JsonProperty("title") + private String title; - private GetLibraryItemsLibraryType(String value) { - this.value = value; + @JsonProperty("active") + private boolean active; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Field") + private Optional> field; + + @JsonCreator + public GetLibraryItemsLibraryType( + @JsonProperty("key") String key, + @JsonProperty("type") String type, + @JsonProperty("title") String title, + @JsonProperty("active") boolean active, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("Field") Optional> field) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(active, "active"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(field, "field"); + this.key = key; + this.type = type; + this.title = title; + this.active = active; + this.filter = filter; + this.sort = sort; + this.field = field; + } + + public GetLibraryItemsLibraryType( + String key, + String type, + String title, + boolean active) { + this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); } - /** - * Returns a GetLibraryItemsLibraryType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibraryItemsLibraryType - */ - public static GetLibraryItemsLibraryType of(String value) { - synchronized (GetLibraryItemsLibraryType.class) { - return values.computeIfAbsent(value, v -> new GetLibraryItemsLibraryType(v)); + @JsonIgnore + public String key() { + return key; + } + + @JsonIgnore + public String type() { + return type; + } + + @JsonIgnore + public String title() { + return title; + } + + @JsonIgnore + public boolean active() { + return active; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> field() { + return (Optional>) field; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsLibraryType withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryItemsLibraryType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryItemsLibraryType withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryItemsLibraryType withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public GetLibraryItemsLibraryType withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetLibraryItemsLibraryType withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetLibraryItemsLibraryType withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public GetLibraryItemsLibraryType withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public GetLibraryItemsLibraryType withField(List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public GetLibraryItemsLibraryType withField(Optional> field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsLibraryType other = (GetLibraryItemsLibraryType) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.title, other.title) && + Objects.deepEquals(this.active, other.active) && + Objects.deepEquals(this.filter, other.filter) && + Objects.deepEquals(this.sort, other.sort) && + Objects.deepEquals(this.field, other.field); } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - + @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibraryItemsLibraryType other = (GetLibraryItemsLibraryType) obj; - return Objects.equals(value, other.value); - } - + @Override public String toString() { - return "GetLibraryItemsLibraryType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibraryItemsLibraryType[] values() { - synchronized (GetLibraryItemsLibraryType.class) { - return values.values().toArray(new GetLibraryItemsLibraryType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetLibraryItemsLibraryTypeEnum.Movie); - map.put("show", GetLibraryItemsLibraryTypeEnum.TvShow); - map.put("season", GetLibraryItemsLibraryTypeEnum.Season); - map.put("episode", GetLibraryItemsLibraryTypeEnum.Episode); - map.put("artist", GetLibraryItemsLibraryTypeEnum.Artist); - map.put("album", GetLibraryItemsLibraryTypeEnum.Album); - map.put("track", GetLibraryItemsLibraryTypeEnum.Track); - map.put("photoalbum", GetLibraryItemsLibraryTypeEnum.PhotoAlbum); - map.put("photo", GetLibraryItemsLibraryTypeEnum.Photo); - map.put("collection", GetLibraryItemsLibraryTypeEnum.Collection); - return map; + return Utils.toString(GetLibraryItemsLibraryType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibraryItemsLibraryType.class); + public final static class Builder { + + private String key; + + private String type; + + private String title; + + private Boolean active; + + private Optional> filter = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional> field = Optional.empty(); + + private Builder() { + // force use of static builder() method } - @Override - public void serialize(GetLibraryItemsLibraryType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibraryItemsLibraryType.class); + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; } - @Override - public GetLibraryItemsLibraryType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibraryItemsLibraryType.of(v); - } - } - - public enum GetLibraryItemsLibraryTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetLibraryItemsLibraryTypeEnum(String value) { - this.value = value; + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; } - public String value() { - return value; + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder active(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public Builder field(List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public Builder field(Optional> field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + public GetLibraryItemsLibraryType build() { + return new GetLibraryItemsLibraryType( + key, + type, + title, + active, + filter, + sort, + field); } } } - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java index 670843de..a6d7794b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java @@ -5,34 +5,31 @@ 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.util.Objects; -import java.util.Optional; +/** + * GetLibraryItemsLocation + * + *

The folder path for the media item. + */ public class GetLibraryItemsLocation { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("path") - private Optional path; + private String path; @JsonCreator public GetLibraryItemsLocation( - @JsonProperty("path") Optional path) { + @JsonProperty("path") String path) { Utils.checkNotNull(path, "path"); this.path = path; } - - public GetLibraryItemsLocation() { - this(Optional.empty()); - } @JsonIgnore - public Optional path() { + public String path() { return path; } @@ -41,12 +38,6 @@ public class GetLibraryItemsLocation { } public GetLibraryItemsLocation withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = Optional.ofNullable(path); - return this; - } - - public GetLibraryItemsLocation withPath(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; @@ -80,19 +71,13 @@ public class GetLibraryItemsLocation { public final static class Builder { - private Optional path = Optional.empty(); + private String path; private Builder() { // force use of static builder() method } public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = Optional.ofNullable(path); - return this; - } - - public Builder path(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java index 7bad4712..224b999f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java @@ -8,12 +8,11 @@ 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 com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; -import java.lang.Double; +import java.lang.Float; import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -23,103 +22,162 @@ import java.util.Optional; public class GetLibraryItemsMedia { + /** + * Unique media identifier. + */ @JsonProperty("id") - private int id; + private long id; + /** + * Duration of the media in milliseconds. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; + /** + * Bitrate in bits per second. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("bitrate") private Optional bitrate; + /** + * Video width in pixels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("width") private Optional width; + /** + * Video height in pixels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("height") private Optional height; + /** + * Aspect ratio of the video. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("aspectRatio") - private Optional aspectRatio; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; + private Optional aspectRatio; + /** + * Number of audio channels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioChannels") private Optional audioChannels; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayOffset") + private Optional displayOffset; + + /** + * Audio codec used. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioCodec") private Optional audioCodec; + /** + * Video codec used. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoCodec") private Optional videoCodec; + /** + * Video resolution (e.g., 4k). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoResolution") private Optional videoResolution; + /** + * Container format of the media. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") - private String container; + private Optional container; + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoFrameRate") private Optional videoFrameRate; + /** + * Video profile (e.g., main 10). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoProfile") private Optional videoProfile; + /** + * Indicates whether voice activity is detected. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasVoiceActivity") private Optional hasVoiceActivity; + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") private Optional optimizedForStreaming; + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Part") - private List part; + private Optional> part; @JsonCreator public GetLibraryItemsMedia( - @JsonProperty("id") int id, + @JsonProperty("id") long id, @JsonProperty("duration") Optional duration, @JsonProperty("bitrate") Optional bitrate, @JsonProperty("width") Optional width, @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("aspectRatio") Optional aspectRatio, @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("displayOffset") Optional displayOffset, @JsonProperty("audioCodec") Optional audioCodec, @JsonProperty("videoCodec") Optional videoCodec, @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") String container, + @JsonProperty("container") Optional container, @JsonProperty("videoFrameRate") Optional videoFrameRate, @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") List part) { + @JsonProperty("Part") Optional> part) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(bitrate, "bitrate"); Utils.checkNotNull(width, "width"); Utils.checkNotNull(height, "height"); Utils.checkNotNull(aspectRatio, "aspectRatio"); - Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(displayOffset, "displayOffset"); Utils.checkNotNull(audioCodec, "audioCodec"); Utils.checkNotNull(videoCodec, "videoCodec"); Utils.checkNotNull(videoResolution, "videoResolution"); @@ -127,6 +185,7 @@ public class GetLibraryItemsMedia { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(part, "part"); @@ -136,8 +195,8 @@ public class GetLibraryItemsMedia { this.width = width; this.height = height; this.aspectRatio = aspectRatio; - this.audioProfile = audioProfile; this.audioChannels = audioChannels; + this.displayOffset = displayOffset; this.audioCodec = audioCodec; this.videoCodec = videoCodec; this.videoResolution = videoResolution; @@ -145,299 +204,475 @@ public class GetLibraryItemsMedia { this.videoFrameRate = videoFrameRate; this.videoProfile = videoProfile; this.hasVoiceActivity = hasVoiceActivity; + this.audioProfile = audioProfile; this.optimizedForStreaming = optimizedForStreaming; this.has64bitOffsets = has64bitOffsets; this.part = part; } public GetLibraryItemsMedia( - int id, - String container, - List part) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), container, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), part); + long id) { + this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * Unique media identifier. + */ @JsonIgnore - public int id() { + public long id() { return id; } + /** + * Duration of the media in milliseconds. + */ @JsonIgnore public Optional duration() { return duration; } + /** + * Bitrate in bits per second. + */ @JsonIgnore public Optional bitrate() { return bitrate; } + /** + * Video width in pixels. + */ @JsonIgnore public Optional width() { return width; } + /** + * Video height in pixels. + */ @JsonIgnore public Optional height() { return height; } + /** + * Aspect ratio of the video. + */ @JsonIgnore - public Optional aspectRatio() { + public Optional aspectRatio() { return aspectRatio; } - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - + /** + * Number of audio channels. + */ @JsonIgnore public Optional audioChannels() { return audioChannels; } + @JsonIgnore + public Optional displayOffset() { + return displayOffset; + } + + /** + * Audio codec used. + */ @JsonIgnore public Optional audioCodec() { return audioCodec; } + /** + * Video codec used. + */ @JsonIgnore public Optional videoCodec() { return videoCodec; } + /** + * Video resolution (e.g., 4k). + */ @JsonIgnore public Optional videoResolution() { return videoResolution; } + /** + * Container format of the media. + */ @JsonIgnore - public String container() { + public Optional container() { return container; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ @JsonIgnore public Optional videoFrameRate() { return videoFrameRate; } + /** + * Video profile (e.g., main 10). + */ @JsonIgnore public Optional videoProfile() { return videoProfile; } + /** + * Indicates whether voice activity is detected. + */ @JsonIgnore public Optional hasVoiceActivity() { return hasVoiceActivity; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + @JsonIgnore + public Optional audioProfile() { + return audioProfile; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @SuppressWarnings("unchecked") @JsonIgnore public Optional optimizedForStreaming() { return (Optional) optimizedForStreaming; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonIgnore public Optional has64bitOffsets() { return has64bitOffsets; } + @SuppressWarnings("unchecked") @JsonIgnore - public List part() { - return part; + public Optional> part() { + return (Optional>) part; } public final static Builder builder() { return new Builder(); } - public GetLibraryItemsMedia withId(int id) { + /** + * Unique media identifier. + */ + public GetLibraryItemsMedia withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Duration of the media in milliseconds. + */ public GetLibraryItemsMedia withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the media in milliseconds. + */ public GetLibraryItemsMedia withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * Bitrate in bits per second. + */ public GetLibraryItemsMedia withBitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } + /** + * Bitrate in bits per second. + */ public GetLibraryItemsMedia withBitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } + /** + * Video width in pixels. + */ public GetLibraryItemsMedia withWidth(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } + /** + * Video width in pixels. + */ public GetLibraryItemsMedia withWidth(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } + /** + * Video height in pixels. + */ public GetLibraryItemsMedia withHeight(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } + /** + * Video height in pixels. + */ public GetLibraryItemsMedia withHeight(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } - public GetLibraryItemsMedia withAspectRatio(double aspectRatio) { + /** + * Aspect ratio of the video. + */ + public GetLibraryItemsMedia withAspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } - public GetLibraryItemsMedia withAspectRatio(Optional aspectRatio) { + /** + * Aspect ratio of the video. + */ + public GetLibraryItemsMedia withAspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public GetLibraryItemsMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - public GetLibraryItemsMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - + /** + * Number of audio channels. + */ public GetLibraryItemsMedia withAudioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } + /** + * Number of audio channels. + */ public GetLibraryItemsMedia withAudioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } + public GetLibraryItemsMedia withDisplayOffset(int displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = Optional.ofNullable(displayOffset); + return this; + } + + public GetLibraryItemsMedia withDisplayOffset(Optional displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = displayOffset; + return this; + } + + /** + * Audio codec used. + */ public GetLibraryItemsMedia withAudioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } + /** + * Audio codec used. + */ public GetLibraryItemsMedia withAudioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } + /** + * Video codec used. + */ public GetLibraryItemsMedia withVideoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } + /** + * Video codec used. + */ public GetLibraryItemsMedia withVideoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } + /** + * Video resolution (e.g., 4k). + */ public GetLibraryItemsMedia withVideoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } + /** + * Video resolution (e.g., 4k). + */ public GetLibraryItemsMedia withVideoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } + /** + * Container format of the media. + */ public GetLibraryItemsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the media. + */ + public GetLibraryItemsMedia withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public GetLibraryItemsMedia withVideoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public GetLibraryItemsMedia withVideoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } + /** + * Video profile (e.g., main 10). + */ public GetLibraryItemsMedia withVideoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } + /** + * Video profile (e.g., main 10). + */ public GetLibraryItemsMedia withVideoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } + /** + * Indicates whether voice activity is detected. + */ public GetLibraryItemsMedia withHasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } + /** + * Indicates whether voice activity is detected. + */ public GetLibraryItemsMedia withHasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public GetLibraryItemsMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public GetLibraryItemsMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public GetLibraryItemsMedia withOptimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public GetLibraryItemsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetLibraryItemsMedia withHas64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetLibraryItemsMedia withHas64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; @@ -445,6 +680,12 @@ public class GetLibraryItemsMedia { } public GetLibraryItemsMedia withPart(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetLibraryItemsMedia withPart(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; @@ -467,8 +708,8 @@ public class GetLibraryItemsMedia { Objects.deepEquals(this.width, other.width) && Objects.deepEquals(this.height, other.height) && Objects.deepEquals(this.aspectRatio, other.aspectRatio) && - Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.audioChannels, other.audioChannels) && + Objects.deepEquals(this.displayOffset, other.displayOffset) && Objects.deepEquals(this.audioCodec, other.audioCodec) && Objects.deepEquals(this.videoCodec, other.videoCodec) && Objects.deepEquals(this.videoResolution, other.videoResolution) && @@ -476,6 +717,7 @@ public class GetLibraryItemsMedia { Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && + Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.part, other.part); @@ -490,8 +732,8 @@ public class GetLibraryItemsMedia { width, height, aspectRatio, - audioProfile, audioChannels, + displayOffset, audioCodec, videoCodec, videoResolution, @@ -499,6 +741,7 @@ public class GetLibraryItemsMedia { videoFrameRate, videoProfile, hasVoiceActivity, + audioProfile, optimizedForStreaming, has64bitOffsets, part); @@ -513,8 +756,8 @@ public class GetLibraryItemsMedia { "width", width, "height", height, "aspectRatio", aspectRatio, - "audioProfile", audioProfile, "audioChannels", audioChannels, + "displayOffset", displayOffset, "audioCodec", audioCodec, "videoCodec", videoCodec, "videoResolution", videoResolution, @@ -522,6 +765,7 @@ public class GetLibraryItemsMedia { "videoFrameRate", videoFrameRate, "videoProfile", videoProfile, "hasVoiceActivity", hasVoiceActivity, + "audioProfile", audioProfile, "optimizedForStreaming", optimizedForStreaming, "has64bitOffsets", has64bitOffsets, "part", part); @@ -529,7 +773,7 @@ public class GetLibraryItemsMedia { public final static class Builder { - private Integer id; + private Long id; private Optional duration = Optional.empty(); @@ -539,19 +783,19 @@ public class GetLibraryItemsMedia { private Optional height = Optional.empty(); - private Optional aspectRatio = Optional.empty(); - - private Optional audioProfile = Optional.empty(); + private Optional aspectRatio = Optional.empty(); private Optional audioChannels = Optional.empty(); + private Optional displayOffset = Optional.empty(); + private Optional audioCodec = Optional.empty(); private Optional videoCodec = Optional.empty(); private Optional videoResolution = Optional.empty(); - private String container; + private Optional container = Optional.empty(); private Optional videoFrameRate = Optional.empty(); @@ -559,202 +803,323 @@ public class GetLibraryItemsMedia { private Optional hasVoiceActivity = Optional.empty(); - private Optional optimizedForStreaming; + private Optional audioProfile = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); - private List part; + private Optional> part = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(int id) { + /** + * Unique media identifier. + */ + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Duration of the media in milliseconds. + */ public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the media in milliseconds. + */ public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * Bitrate in bits per second. + */ public Builder bitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } + /** + * Bitrate in bits per second. + */ public Builder bitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } + /** + * Video width in pixels. + */ public Builder width(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } + /** + * Video width in pixels. + */ public Builder width(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } + /** + * Video height in pixels. + */ public Builder height(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } + /** + * Video height in pixels. + */ public Builder height(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } - public Builder aspectRatio(double aspectRatio) { + /** + * Aspect ratio of the video. + */ + public Builder aspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } - public Builder aspectRatio(Optional aspectRatio) { + /** + * Aspect ratio of the video. + */ + public Builder aspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - + /** + * Number of audio channels. + */ public Builder audioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } + /** + * Number of audio channels. + */ public Builder audioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } + public Builder displayOffset(int displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = Optional.ofNullable(displayOffset); + return this; + } + + public Builder displayOffset(Optional displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = displayOffset; + return this; + } + + /** + * Audio codec used. + */ public Builder audioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } + /** + * Audio codec used. + */ public Builder audioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } + /** + * Video codec used. + */ public Builder videoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } + /** + * Video codec used. + */ public Builder videoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } + /** + * Video resolution (e.g., 4k). + */ public Builder videoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } + /** + * Video resolution (e.g., 4k). + */ public Builder videoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } + /** + * Container format of the media. + */ public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the media. + */ + public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public Builder videoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public Builder videoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } + /** + * Video profile (e.g., main 10). + */ public Builder videoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } + /** + * Video profile (e.g., main 10). + */ public Builder videoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } + /** + * Indicates whether voice activity is detected. + */ public Builder hasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } + /** + * Indicates whether voice activity is detected. + */ public Builder hasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public Builder optimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; @@ -762,15 +1127,18 @@ public class GetLibraryItemsMedia { } public Builder part(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; } public GetLibraryItemsMedia build() { - if (optimizedForStreaming == null) { - optimizedForStreaming = _SINGLETON_VALUE_OptimizedForStreaming.value(); - } return new GetLibraryItemsMedia( id, duration, @@ -778,8 +1146,8 @@ public class GetLibraryItemsMedia { width, height, aspectRatio, - audioProfile, audioChannels, + displayOffset, audioCodec, videoCodec, videoResolution, @@ -787,15 +1155,10 @@ public class GetLibraryItemsMedia { videoFrameRate, videoProfile, hasVoiceActivity, + audioProfile, optimizedForStreaming, has64bitOffsets, part); } - - private static final LazySingletonValue> _SINGLETON_VALUE_OptimizedForStreaming = - new LazySingletonValue<>( - "optimizedForStreaming", - "0", - new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java index b2a9f15c..1bb84d77 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java @@ -19,84 +19,132 @@ import java.util.List; import java.util.Objects; import java.util.Optional; -/** - * GetLibraryItemsMediaContainer - * - *

The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ public class GetLibraryItemsMediaContainer { - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Type") - private Optional> type; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("FieldType") - private Optional> fieldType; - + /** + * Number of media items returned in this response. + */ @JsonProperty("size") private int size; + /** + * Total number of media items in the library. + */ @JsonProperty("totalSize") private int totalSize; + /** + * Offset value for pagination. + */ @JsonProperty("offset") - private int offset; + private long offset; + /** + * The content type or mode. + */ @JsonProperty("content") private String content; + /** + * Indicates whether syncing is allowed. + */ @JsonProperty("allowSync") private boolean allowSync; - @JsonInclude(Include.NON_ABSENT) + /** + * Specifies whether caching is disabled. + */ @JsonProperty("nocache") - private Optional nocache; + private boolean nocache; + /** + * URL for the background artwork of the media container. + */ @JsonProperty("art") private String art; + /** + * An plugin identifier for the media container. + */ @JsonProperty("identifier") private String identifier; + /** + * The unique identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private long librarySectionID; + private Optional librarySectionID; + /** + * The title of the library section. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionTitle") - private String librarySectionTitle; + private Optional librarySectionTitle; + /** + * The universally unique identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionUUID") - private String librarySectionUUID; + private Optional librarySectionUUID; + /** + * The prefix used for media tag resource paths. + */ @JsonProperty("mediaTagPrefix") private String mediaTagPrefix; + /** + * The version number for media tags. + */ @JsonProperty("mediaTagVersion") - private int mediaTagVersion; + private long mediaTagVersion; + /** + * URL for the thumbnail image of the media container. + */ @JsonProperty("thumb") private String thumb; + /** + * The primary title of the media container. + */ @JsonProperty("title1") private String title1; + /** + * The secondary title of the media container. + */ @JsonProperty("title2") private String title2; + /** + * Identifier for the view group layout. + */ @JsonProperty("viewGroup") private String viewGroup; + /** + * Identifier for the view mode. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewMode") - private Optional viewMode; + private Optional viewMode; + /** + * Indicates if the media container has mixed parents. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("mixedParents") private Optional mixedParents; - @JsonInclude(Include.NON_ABSENT) + /** + * An array of metadata items. + */ @JsonProperty("Metadata") - private Optional> metadata; + private List metadata; /** * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. @@ -107,31 +155,27 @@ public class GetLibraryItemsMediaContainer { @JsonCreator public GetLibraryItemsMediaContainer( - @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType, @JsonProperty("size") int size, @JsonProperty("totalSize") int totalSize, - @JsonProperty("offset") int offset, + @JsonProperty("offset") long offset, @JsonProperty("content") String content, @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("nocache") Optional nocache, + @JsonProperty("nocache") boolean nocache, @JsonProperty("art") String art, @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionTitle") String librarySectionTitle, - @JsonProperty("librarySectionUUID") String librarySectionUUID, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") int mediaTagVersion, + @JsonProperty("mediaTagVersion") long mediaTagVersion, @JsonProperty("thumb") String thumb, @JsonProperty("title1") String title1, @JsonProperty("title2") String title2, @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("viewMode") Optional viewMode, + @JsonProperty("viewMode") Optional viewMode, @JsonProperty("mixedParents") Optional mixedParents, - @JsonProperty("Metadata") Optional> metadata, + @JsonProperty("Metadata") List metadata, @JsonProperty("Meta") Optional meta) { - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(fieldType, "fieldType"); Utils.checkNotNull(size, "size"); Utils.checkNotNull(totalSize, "totalSize"); Utils.checkNotNull(offset, "offset"); @@ -153,8 +197,6 @@ public class GetLibraryItemsMediaContainer { Utils.checkNotNull(mixedParents, "mixedParents"); Utils.checkNotNull(metadata, "metadata"); Utils.checkNotNull(meta, "meta"); - this.type = type; - this.fieldType = fieldType; this.size = size; this.totalSize = totalSize; this.offset = offset; @@ -181,134 +223,180 @@ public class GetLibraryItemsMediaContainer { public GetLibraryItemsMediaContainer( int size, int totalSize, - int offset, + long offset, String content, boolean allowSync, + boolean nocache, String art, String identifier, - long librarySectionID, - String librarySectionTitle, - String librarySectionUUID, String mediaTagPrefix, - int mediaTagVersion, + long mediaTagVersion, String thumb, String title1, String title2, - String viewGroup) { - this(Optional.empty(), Optional.empty(), size, totalSize, offset, content, allowSync, Optional.empty(), art, identifier, librarySectionID, librarySectionTitle, librarySectionUUID, mediaTagPrefix, mediaTagVersion, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> type() { - return (Optional>) type; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; + String viewGroup, + List metadata) { + this(size, totalSize, offset, content, allowSync, nocache, art, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty(), metadata, Optional.empty()); } + /** + * Number of media items returned in this response. + */ @JsonIgnore public int size() { return size; } + /** + * Total number of media items in the library. + */ @JsonIgnore public int totalSize() { return totalSize; } + /** + * Offset value for pagination. + */ @JsonIgnore - public int offset() { + public long offset() { return offset; } + /** + * The content type or mode. + */ @JsonIgnore public String content() { return content; } + /** + * Indicates whether syncing is allowed. + */ @JsonIgnore public boolean allowSync() { return allowSync; } + /** + * Specifies whether caching is disabled. + */ @JsonIgnore - public Optional nocache() { + public boolean nocache() { return nocache; } + /** + * URL for the background artwork of the media container. + */ @JsonIgnore public String art() { return art; } + /** + * An plugin identifier for the media container. + */ @JsonIgnore public String identifier() { return identifier; } + /** + * The unique identifier for the library section. + */ @JsonIgnore - public long librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } + /** + * The title of the library section. + */ @JsonIgnore - public String librarySectionTitle() { + public Optional librarySectionTitle() { return librarySectionTitle; } + /** + * The universally unique identifier for the library section. + */ @JsonIgnore - public String librarySectionUUID() { + public Optional librarySectionUUID() { return librarySectionUUID; } + /** + * The prefix used for media tag resource paths. + */ @JsonIgnore public String mediaTagPrefix() { return mediaTagPrefix; } + /** + * The version number for media tags. + */ @JsonIgnore - public int mediaTagVersion() { + public long mediaTagVersion() { return mediaTagVersion; } + /** + * URL for the thumbnail image of the media container. + */ @JsonIgnore public String thumb() { return thumb; } + /** + * The primary title of the media container. + */ @JsonIgnore public String title1() { return title1; } + /** + * The secondary title of the media container. + */ @JsonIgnore public String title2() { return title2; } + /** + * Identifier for the view group layout. + */ @JsonIgnore public String viewGroup() { return viewGroup; } + /** + * Identifier for the view mode. + */ @JsonIgnore - public Optional viewMode() { + public Optional viewMode() { return viewMode; } + /** + * Indicates if the media container has mixed parents. + */ @JsonIgnore public Optional mixedParents() { return mixedParents; } - @SuppressWarnings("unchecked") + /** + * An array of metadata items. + */ @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; + public List metadata() { + return metadata; } /** @@ -324,169 +412,226 @@ public class GetLibraryItemsMediaContainer { return new Builder(); } - public GetLibraryItemsMediaContainer withType(List type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - public GetLibraryItemsMediaContainer withType(Optional> type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsMediaContainer withFieldType(List fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = Optional.ofNullable(fieldType); - return this; - } - - public GetLibraryItemsMediaContainer withFieldType(Optional> fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = fieldType; - return this; - } - + /** + * Number of media items returned in this response. + */ public GetLibraryItemsMediaContainer withSize(int size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * Total number of media items in the library. + */ public GetLibraryItemsMediaContainer withTotalSize(int totalSize) { Utils.checkNotNull(totalSize, "totalSize"); this.totalSize = totalSize; return this; } - public GetLibraryItemsMediaContainer withOffset(int offset) { + /** + * Offset value for pagination. + */ + public GetLibraryItemsMediaContainer withOffset(long offset) { Utils.checkNotNull(offset, "offset"); this.offset = offset; return this; } + /** + * The content type or mode. + */ public GetLibraryItemsMediaContainer withContent(String content) { Utils.checkNotNull(content, "content"); this.content = content; return this; } + /** + * Indicates whether syncing is allowed. + */ public GetLibraryItemsMediaContainer withAllowSync(boolean allowSync) { Utils.checkNotNull(allowSync, "allowSync"); this.allowSync = allowSync; return this; } + /** + * Specifies whether caching is disabled. + */ public GetLibraryItemsMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - public GetLibraryItemsMediaContainer withNocache(Optional nocache) { Utils.checkNotNull(nocache, "nocache"); this.nocache = nocache; return this; } + /** + * URL for the background artwork of the media container. + */ public GetLibraryItemsMediaContainer withArt(String art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } + /** + * An plugin identifier for the media container. + */ public GetLibraryItemsMediaContainer withIdentifier(String identifier) { Utils.checkNotNull(identifier, "identifier"); this.identifier = identifier; return this; } + /** + * The unique identifier for the library section. + */ public GetLibraryItemsMediaContainer withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public GetLibraryItemsMediaContainer withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; } + /** + * The title of the library section. + */ public GetLibraryItemsMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetLibraryItemsMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; } + /** + * The universally unique identifier for the library section. + */ public GetLibraryItemsMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public GetLibraryItemsMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); this.librarySectionUUID = librarySectionUUID; return this; } + /** + * The prefix used for media tag resource paths. + */ public GetLibraryItemsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); this.mediaTagPrefix = mediaTagPrefix; return this; } - public GetLibraryItemsMediaContainer withMediaTagVersion(int mediaTagVersion) { + /** + * The version number for media tags. + */ + public GetLibraryItemsMediaContainer withMediaTagVersion(long mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = mediaTagVersion; return this; } + /** + * URL for the thumbnail image of the media container. + */ public GetLibraryItemsMediaContainer withThumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The primary title of the media container. + */ public GetLibraryItemsMediaContainer withTitle1(String title1) { Utils.checkNotNull(title1, "title1"); this.title1 = title1; return this; } + /** + * The secondary title of the media container. + */ public GetLibraryItemsMediaContainer withTitle2(String title2) { Utils.checkNotNull(title2, "title2"); this.title2 = title2; return this; } + /** + * Identifier for the view group layout. + */ public GetLibraryItemsMediaContainer withViewGroup(String viewGroup) { Utils.checkNotNull(viewGroup, "viewGroup"); this.viewGroup = viewGroup; return this; } - public GetLibraryItemsMediaContainer withViewMode(int viewMode) { + /** + * Identifier for the view mode. + */ + public GetLibraryItemsMediaContainer withViewMode(String viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = Optional.ofNullable(viewMode); return this; } - public GetLibraryItemsMediaContainer withViewMode(Optional viewMode) { + /** + * Identifier for the view mode. + */ + public GetLibraryItemsMediaContainer withViewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; } + /** + * Indicates if the media container has mixed parents. + */ public GetLibraryItemsMediaContainer withMixedParents(boolean mixedParents) { Utils.checkNotNull(mixedParents, "mixedParents"); this.mixedParents = Optional.ofNullable(mixedParents); return this; } + /** + * Indicates if the media container has mixed parents. + */ public GetLibraryItemsMediaContainer withMixedParents(Optional mixedParents) { Utils.checkNotNull(mixedParents, "mixedParents"); this.mixedParents = mixedParents; return this; } + /** + * An array of metadata items. + */ public GetLibraryItemsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public GetLibraryItemsMediaContainer withMetadata(Optional> metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; @@ -521,8 +666,6 @@ public class GetLibraryItemsMediaContainer { } GetLibraryItemsMediaContainer other = (GetLibraryItemsMediaContainer) o; return - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.fieldType, other.fieldType) && Objects.deepEquals(this.size, other.size) && Objects.deepEquals(this.totalSize, other.totalSize) && Objects.deepEquals(this.offset, other.offset) && @@ -549,8 +692,6 @@ public class GetLibraryItemsMediaContainer { @Override public int hashCode() { return Objects.hash( - type, - fieldType, size, totalSize, offset, @@ -577,8 +718,6 @@ public class GetLibraryItemsMediaContainer { @Override public String toString() { return Utils.toString(GetLibraryItemsMediaContainer.class, - "type", type, - "fieldType", fieldType, "size", size, "totalSize", totalSize, "offset", offset, @@ -604,35 +743,31 @@ public class GetLibraryItemsMediaContainer { public final static class Builder { - private Optional> type = Optional.empty(); - - private Optional> fieldType = Optional.empty(); - private Integer size; private Integer totalSize; - private Integer offset; + private Long offset; private String content; private Boolean allowSync; - private Optional nocache = Optional.empty(); + private Boolean nocache; private String art; private String identifier; - private Long librarySectionID; + private Optional librarySectionID = Optional.empty(); - private String librarySectionTitle; + private Optional librarySectionTitle = Optional.empty(); - private String librarySectionUUID; + private Optional librarySectionUUID = Optional.empty(); private String mediaTagPrefix; - private Integer mediaTagVersion; + private Long mediaTagVersion; private String thumb; @@ -642,11 +777,11 @@ public class GetLibraryItemsMediaContainer { private String viewGroup; - private Optional viewMode = Optional.empty(); + private Optional viewMode = Optional.empty(); private Optional mixedParents = Optional.empty(); - private Optional> metadata = Optional.empty(); + private List metadata; private Optional meta = Optional.empty(); @@ -654,169 +789,226 @@ public class GetLibraryItemsMediaContainer { // force use of static builder() method } - public Builder type(List type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - public Builder type(Optional> type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Builder fieldType(List fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = Optional.ofNullable(fieldType); - return this; - } - - public Builder fieldType(Optional> fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = fieldType; - return this; - } - + /** + * Number of media items returned in this response. + */ public Builder size(int size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * Total number of media items in the library. + */ public Builder totalSize(int totalSize) { Utils.checkNotNull(totalSize, "totalSize"); this.totalSize = totalSize; return this; } - public Builder offset(int offset) { + /** + * Offset value for pagination. + */ + public Builder offset(long offset) { Utils.checkNotNull(offset, "offset"); this.offset = offset; return this; } + /** + * The content type or mode. + */ public Builder content(String content) { Utils.checkNotNull(content, "content"); this.content = content; return this; } + /** + * Indicates whether syncing is allowed. + */ public Builder allowSync(boolean allowSync) { Utils.checkNotNull(allowSync, "allowSync"); this.allowSync = allowSync; return this; } + /** + * Specifies whether caching is disabled. + */ public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - public Builder nocache(Optional nocache) { Utils.checkNotNull(nocache, "nocache"); this.nocache = nocache; return this; } + /** + * URL for the background artwork of the media container. + */ public Builder art(String art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } + /** + * An plugin identifier for the media container. + */ public Builder identifier(String identifier) { Utils.checkNotNull(identifier, "identifier"); this.identifier = identifier; return this; } + /** + * The unique identifier for the library section. + */ public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; } + /** + * The title of the library section. + */ public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; } + /** + * The universally unique identifier for the library section. + */ public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public Builder librarySectionUUID(Optional librarySectionUUID) { Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); this.librarySectionUUID = librarySectionUUID; return this; } + /** + * The prefix used for media tag resource paths. + */ public Builder mediaTagPrefix(String mediaTagPrefix) { Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); this.mediaTagPrefix = mediaTagPrefix; return this; } - public Builder mediaTagVersion(int mediaTagVersion) { + /** + * The version number for media tags. + */ + public Builder mediaTagVersion(long mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = mediaTagVersion; return this; } + /** + * URL for the thumbnail image of the media container. + */ public Builder thumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The primary title of the media container. + */ public Builder title1(String title1) { Utils.checkNotNull(title1, "title1"); this.title1 = title1; return this; } + /** + * The secondary title of the media container. + */ public Builder title2(String title2) { Utils.checkNotNull(title2, "title2"); this.title2 = title2; return this; } + /** + * Identifier for the view group layout. + */ public Builder viewGroup(String viewGroup) { Utils.checkNotNull(viewGroup, "viewGroup"); this.viewGroup = viewGroup; return this; } - public Builder viewMode(int viewMode) { + /** + * Identifier for the view mode. + */ + public Builder viewMode(String viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = Optional.ofNullable(viewMode); return this; } - public Builder viewMode(Optional viewMode) { + /** + * Identifier for the view mode. + */ + public Builder viewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; } + /** + * Indicates if the media container has mixed parents. + */ public Builder mixedParents(boolean mixedParents) { Utils.checkNotNull(mixedParents, "mixedParents"); this.mixedParents = Optional.ofNullable(mixedParents); return this; } + /** + * Indicates if the media container has mixed parents. + */ public Builder mixedParents(Optional mixedParents) { Utils.checkNotNull(mixedParents, "mixedParents"); this.mixedParents = mixedParents; return this; } + /** + * An array of metadata items. + */ public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public Builder metadata(Optional> metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; @@ -842,8 +1034,6 @@ public class GetLibraryItemsMediaContainer { public GetLibraryItemsMediaContainer build() { return new GetLibraryItemsMediaContainer( - type, - fieldType, size, totalSize, offset, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java index b2101118..473e70cc 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java @@ -25,16 +25,16 @@ public class GetLibraryItemsMeta { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Type") - private Optional> type; + private Optional> type; @JsonInclude(Include.NON_ABSENT) @JsonProperty("FieldType") - private Optional> fieldType; + private Optional> fieldType; @JsonCreator public GetLibraryItemsMeta( - @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType) { + @JsonProperty("Type") Optional> type, + @JsonProperty("FieldType") Optional> fieldType) { Utils.checkNotNull(type, "type"); Utils.checkNotNull(fieldType, "fieldType"); this.type = type; @@ -47,39 +47,39 @@ public class GetLibraryItemsMeta { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> type() { - return (Optional>) type; + public Optional> type() { + return (Optional>) type; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; + public Optional> fieldType() { + return (Optional>) fieldType; } public final static Builder builder() { return new Builder(); } - public GetLibraryItemsMeta withType(List type) { + public GetLibraryItemsMeta withType(List type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } - public GetLibraryItemsMeta withType(Optional> type) { + public GetLibraryItemsMeta withType(Optional> type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } - public GetLibraryItemsMeta withFieldType(List fieldType) { + public GetLibraryItemsMeta withFieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } - public GetLibraryItemsMeta withFieldType(Optional> fieldType) { + public GetLibraryItemsMeta withFieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; @@ -116,33 +116,33 @@ public class GetLibraryItemsMeta { public final static class Builder { - private Optional> type = Optional.empty(); + private Optional> type = Optional.empty(); - private Optional> fieldType = Optional.empty(); + private Optional> fieldType = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder type(List type) { + public Builder type(List type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } - public Builder type(Optional> type) { + public Builder type(Optional> type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } - public Builder fieldType(List fieldType) { + public Builder fieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } - public Builder fieldType(Optional> fieldType) { + public Builder fieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java index bf6f78be..1f85f48a 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Double; +import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Override; @@ -21,137 +22,166 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +/** + * GetLibraryItemsMetadata + * + *

Unknown + */ public class GetLibraryItemsMetadata { /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ @JsonProperty("ratingKey") private String ratingKey; + /** + * The unique key for the media item. + */ @JsonProperty("key") private String key; + /** + * The globally unique identifier for the media item. + */ @JsonProperty("guid") private String guid; + /** + * A URL‐friendly version of the media title. + */ + @JsonProperty("slug") + private String slug; + + /** + * The studio that produced the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("studio") private Optional studio; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipChildren") - private Optional skipChildren; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; + @JsonProperty("type") + private GetLibraryItemsType type; /** - * The type of media content in the Plex library. This can represent videos, music, or photos. + * The title of the media item. */ - @JsonProperty("type") - private GetLibraryItemsLibraryType type; - @JsonProperty("title") private String title; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("slug") - private Optional slug; + /** + * The banner image URL for the media item. + */ + @JsonProperty("banner") + private String banner; + /** + * The sort title used for ordering media items. + */ + @JsonProperty("titleSort") + private String titleSort; + + /** + * The content rating for the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("contentRating") private Optional contentRating; + /** + * A synopsis of the media item. + */ @JsonProperty("summary") private String summary; - @JsonInclude(Include.NON_ABSENT) + /** + * The critic rating for the media item. + */ @JsonProperty("rating") - private Optional rating; + private float rating; - @JsonInclude(Include.NON_ABSENT) + /** + * The audience rating for the media item. + */ @JsonProperty("audienceRating") - private Optional audienceRating; + private double audienceRating; + /** + * The release year of the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("year") private Optional year; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("seasonCount") - private Optional seasonCount; - - @JsonInclude(Include.NON_ABSENT) + /** + * A brief tagline for the media item. + */ @JsonProperty("tagline") - private Optional tagline; + private String tagline; /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("flattenSeasons") - private Optional flattenSeasons; - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("episodeSort") - private Optional episodeSort; - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("enableCreditsMarkerGeneration") - private Optional enableCreditsMarkerGeneration; - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("showOrdering") - private Optional showOrdering; - - @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumb") - private Optional thumb; + private String thumb; - @JsonInclude(Include.NON_ABSENT) + /** + * The art image URL for the media item. + */ @JsonProperty("art") - private Optional art; + private String art; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("banner") - private Optional banner; + /** + * The theme URL for the media item. + */ + @JsonProperty("theme") + private String theme; + /** + * The index position of the media item. + */ + @JsonProperty("index") + private int index; + + /** + * The number of leaf items (end nodes) under this media item. + */ @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + /** + * The number of leaf items that have been viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * The number of child items associated with this media item. + */ + @JsonProperty("childCount") + private int childCount; + + /** + * The total number of seasons (for TV shows). + */ + @JsonProperty("seasonCount") + private int seasonCount; + + /** + * The duration of the media item in milliseconds. + */ @JsonProperty("duration") - private Optional duration; + private int duration; + /** + * The original release date of the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") private Optional originallyAvailableAt; - /** - * Unix epoch datetime in seconds - */ @JsonProperty("addedAt") private long addedAt; @@ -162,61 +192,262 @@ public class GetLibraryItemsMetadata { @JsonProperty("updatedAt") private Optional updatedAt; + /** + * The URL for the audience rating image. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audienceRatingImage") private Optional audienceRatingImage; + /** + * The source from which chapter data is derived. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("chapterSource") private Optional chapterSource; + /** + * The primary extra key associated with this media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("primaryExtraKey") private Optional primaryExtraKey; + /** + * The original title of the media item (if different). + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; + @JsonProperty("originalTitle") + private Optional originalTitle; + /** + * The rating key of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The rating key of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentRatingKey") private Optional grandparentRatingKey; + /** + * The GUID of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + /** + * The GUID of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentGuid") private Optional grandparentGuid; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentSlug") - private Optional parentSlug; - + /** + * The slug for the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentSlug") private Optional grandparentSlug; + /** + * The key of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; + @JsonProperty("grandparentKey") + private Optional grandparentKey; + /** + * The key of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The title of the grandparent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + /** + * The thumbnail URL for the grandparent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The theme URL for the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentTheme") private Optional grandparentTheme; /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The title of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * The index position of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The thumbnail URL for the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The URL for the rating image. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * The number of times this media item has been viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * The current playback offset (in milliseconds). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + /** + * The number of times this media item has been skipped. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipCount") + private Optional skipCount; + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * The Unix timestamp representing the last time the item was rated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastRatedAt") + private Optional lastRatedAt; + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAtAccuracy") + private Optional createdAtAccuracy; + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAtTZOffset") + private Optional createdAtTZOffset; + + /** + * Unix timestamp for when the media item was last viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("UltraBlurColors") + private Optional ultraBlurColors; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guids; + + /** + * The identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + /** + * The title of the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + /** + * The key corresponding to the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("showOrdering") + private Optional showOrdering; + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("flattenSeasons") + private Optional flattenSeasons; + + /** + * Indicates whether child items should be skipped. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Media") private Optional> media; @@ -237,6 +468,10 @@ public class GetLibraryItemsMetadata { @JsonProperty("Writer") private Optional> writer; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Producer") + private Optional> producer; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Collection") private Optional> collection; @@ -245,223 +480,133 @@ public class GetLibraryItemsMetadata { @JsonProperty("Role") private Optional> role; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratings; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Similar") + private Optional> similar; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Location") private Optional> location; - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> mediaGuid; + @JsonProperty("Chapter") + private Optional> chapter; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; + @JsonProperty("Marker") + private Optional> marker; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Rating") - private Optional> metaDataRating; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("titleSort") - private Optional titleSort; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("theme") - private Optional theme; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("childCount") - private Optional childCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPremiumExtras") - private Optional hasPremiumExtras; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPremiumPrimaryExtra") - private Optional hasPremiumPrimaryExtra; - - /** - * The rating key of the parent item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentStudio") - private Optional parentStudio; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTheme") - private Optional parentTheme; + @JsonProperty("Extras") + private Optional extras; @JsonCreator public GetLibraryItemsMetadata( @JsonProperty("ratingKey") String ratingKey, @JsonProperty("key") String key, @JsonProperty("guid") String guid, + @JsonProperty("slug") String slug, @JsonProperty("studio") Optional studio, - @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("type") GetLibraryItemsLibraryType type, + @JsonProperty("type") GetLibraryItemsType type, @JsonProperty("title") String title, - @JsonProperty("slug") Optional slug, + @JsonProperty("banner") String banner, + @JsonProperty("titleSort") String titleSort, @JsonProperty("contentRating") Optional contentRating, @JsonProperty("summary") String summary, - @JsonProperty("rating") Optional rating, - @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("rating") float rating, + @JsonProperty("audienceRating") double audienceRating, @JsonProperty("year") Optional year, - @JsonProperty("seasonCount") Optional seasonCount, - @JsonProperty("tagline") Optional tagline, - @JsonProperty("flattenSeasons") Optional flattenSeasons, - @JsonProperty("episodeSort") Optional episodeSort, - @JsonProperty("enableCreditsMarkerGeneration") Optional enableCreditsMarkerGeneration, - @JsonProperty("showOrdering") Optional showOrdering, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("art") Optional art, - @JsonProperty("banner") Optional banner, - @JsonProperty("duration") Optional duration, + @JsonProperty("tagline") String tagline, + @JsonProperty("thumb") String thumb, + @JsonProperty("art") String art, + @JsonProperty("theme") String theme, + @JsonProperty("index") int index, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("childCount") int childCount, + @JsonProperty("seasonCount") int seasonCount, + @JsonProperty("duration") int duration, @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, @JsonProperty("addedAt") long addedAt, @JsonProperty("updatedAt") Optional updatedAt, @JsonProperty("audienceRatingImage") Optional audienceRatingImage, @JsonProperty("chapterSource") Optional chapterSource, @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentRatingKey") Optional parentRatingKey, @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("parentGuid") Optional parentGuid, @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("grandparentSlug") Optional grandparentSlug, @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("parentKey") Optional parentKey, @JsonProperty("grandparentTitle") Optional grandparentTitle, @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("parentSlug") Optional parentSlug, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentArt") Optional grandparentArt, @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("skipCount") Optional skipCount, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("lastRatedAt") Optional lastRatedAt, + @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, + @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("Image") Optional> image, + @JsonProperty("UltraBlurColors") Optional ultraBlurColors, + @JsonProperty("Guid") Optional> guids, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("showOrdering") Optional showOrdering, + @JsonProperty("flattenSeasons") Optional flattenSeasons, + @JsonProperty("skipChildren") Optional skipChildren, @JsonProperty("Media") Optional> media, @JsonProperty("Genre") Optional> genre, @JsonProperty("Country") Optional> country, @JsonProperty("Director") Optional> director, @JsonProperty("Writer") Optional> writer, + @JsonProperty("Producer") Optional> producer, @JsonProperty("Collection") Optional> collection, @JsonProperty("Role") Optional> role, + @JsonProperty("Rating") Optional> ratings, + @JsonProperty("Similar") Optional> similar, @JsonProperty("Location") Optional> location, - @JsonProperty("Guid") Optional> mediaGuid, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Rating") Optional> metaDataRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("titleSort") Optional titleSort, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("index") Optional index, - @JsonProperty("theme") Optional theme, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") Optional childCount, - @JsonProperty("hasPremiumExtras") Optional hasPremiumExtras, - @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentStudio") Optional parentStudio, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTheme") Optional parentTheme) { + @JsonProperty("Chapter") Optional> chapter, + @JsonProperty("Marker") Optional> marker, + @JsonProperty("Extras") Optional extras) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(slug, "slug"); Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(skipChildren, "skipChildren"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); Utils.checkNotNull(type, "type"); Utils.checkNotNull(title, "title"); - Utils.checkNotNull(slug, "slug"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(titleSort, "titleSort"); Utils.checkNotNull(contentRating, "contentRating"); Utils.checkNotNull(summary, "summary"); Utils.checkNotNull(rating, "rating"); Utils.checkNotNull(audienceRating, "audienceRating"); Utils.checkNotNull(year, "year"); - Utils.checkNotNull(seasonCount, "seasonCount"); Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - Utils.checkNotNull(episodeSort, "episodeSort"); - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - Utils.checkNotNull(showOrdering, "showOrdering"); Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(art, "art"); - Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(childCount, "childCount"); + Utils.checkNotNull(seasonCount, "seasonCount"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); Utils.checkNotNull(addedAt, "addedAt"); @@ -469,75 +614,77 @@ public class GetLibraryItemsMetadata { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); Utils.checkNotNull(chapterSource, "chapterSource"); Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(parentGuid, "parentGuid"); Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(grandparentSlug, "grandparentSlug"); Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(parentKey, "parentKey"); Utils.checkNotNull(grandparentTitle, "grandparentTitle"); Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(parentSlug, "parentSlug"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(skipCount, "skipCount"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + Utils.checkNotNull(guids, "guids"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(showOrdering, "showOrdering"); + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + Utils.checkNotNull(skipChildren, "skipChildren"); Utils.checkNotNull(media, "media"); Utils.checkNotNull(genre, "genre"); Utils.checkNotNull(country, "country"); Utils.checkNotNull(director, "director"); Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(producer, "producer"); Utils.checkNotNull(collection, "collection"); Utils.checkNotNull(role, "role"); + Utils.checkNotNull(ratings, "ratings"); + Utils.checkNotNull(similar, "similar"); Utils.checkNotNull(location, "location"); - Utils.checkNotNull(mediaGuid, "mediaGuid"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(metaDataRating, "metaDataRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTheme, "parentTheme"); + Utils.checkNotNull(chapter, "chapter"); + Utils.checkNotNull(marker, "marker"); + Utils.checkNotNull(extras, "extras"); this.ratingKey = ratingKey; this.key = key; this.guid = guid; + this.slug = slug; this.studio = studio; - this.skipChildren = skipChildren; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionKey = librarySectionKey; this.type = type; this.title = title; - this.slug = slug; + this.banner = banner; + this.titleSort = titleSort; this.contentRating = contentRating; this.summary = summary; this.rating = rating; this.audienceRating = audienceRating; this.year = year; - this.seasonCount = seasonCount; this.tagline = tagline; - this.flattenSeasons = flattenSeasons; - this.episodeSort = episodeSort; - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - this.showOrdering = showOrdering; this.thumb = thumb; this.art = art; - this.banner = banner; + this.theme = theme; + this.index = index; + this.leafCount = leafCount; + this.viewedLeafCount = viewedLeafCount; + this.childCount = childCount; + this.seasonCount = seasonCount; this.duration = duration; this.originallyAvailableAt = originallyAvailableAt; this.addedAt = addedAt; @@ -545,229 +692,277 @@ public class GetLibraryItemsMetadata { this.audienceRatingImage = audienceRatingImage; this.chapterSource = chapterSource; this.primaryExtraKey = primaryExtraKey; - this.ratingImage = ratingImage; + this.originalTitle = originalTitle; + this.parentRatingKey = parentRatingKey; this.grandparentRatingKey = grandparentRatingKey; + this.parentGuid = parentGuid; this.grandparentGuid = grandparentGuid; + this.grandparentSlug = grandparentSlug; this.grandparentKey = grandparentKey; + this.parentKey = parentKey; this.grandparentTitle = grandparentTitle; this.grandparentThumb = grandparentThumb; - this.parentSlug = parentSlug; - this.grandparentSlug = grandparentSlug; - this.grandparentArt = grandparentArt; this.grandparentTheme = grandparentTheme; + this.grandparentArt = grandparentArt; + this.parentTitle = parentTitle; + this.parentIndex = parentIndex; + this.parentThumb = parentThumb; + this.ratingImage = ratingImage; + this.viewCount = viewCount; + this.viewOffset = viewOffset; + this.skipCount = skipCount; + this.subtype = subtype; + this.lastRatedAt = lastRatedAt; + this.createdAtAccuracy = createdAtAccuracy; + this.createdAtTZOffset = createdAtTZOffset; + this.lastViewedAt = lastViewedAt; + this.userRating = userRating; + this.image = image; + this.ultraBlurColors = ultraBlurColors; + this.guids = guids; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionKey = librarySectionKey; + this.showOrdering = showOrdering; + this.flattenSeasons = flattenSeasons; + this.skipChildren = skipChildren; this.media = media; this.genre = genre; this.country = country; this.director = director; this.writer = writer; + this.producer = producer; this.collection = collection; this.role = role; + this.ratings = ratings; + this.similar = similar; this.location = location; - this.mediaGuid = mediaGuid; - this.ultraBlurColors = ultraBlurColors; - this.metaDataRating = metaDataRating; - this.image = image; - this.titleSort = titleSort; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.originalTitle = originalTitle; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.index = index; - this.theme = theme; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.hasPremiumExtras = hasPremiumExtras; - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - this.parentRatingKey = parentRatingKey; - this.parentGuid = parentGuid; - this.parentStudio = parentStudio; - this.parentKey = parentKey; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentYear = parentYear; - this.parentThumb = parentThumb; - this.parentTheme = parentTheme; + this.chapter = chapter; + this.marker = marker; + this.extras = extras; } public GetLibraryItemsMetadata( String ratingKey, String key, String guid, - GetLibraryItemsLibraryType type, + String slug, + GetLibraryItemsType type, String title, + String banner, + String titleSort, String summary, + float rating, + double audienceRating, + String tagline, + String thumb, + String art, + String theme, + int index, + int childCount, + int seasonCount, + int duration, long addedAt) { - this(ratingKey, key, guid, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), type, title, Optional.empty(), Optional.empty(), summary, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(ratingKey, key, guid, slug, Optional.empty(), type, title, banner, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ @JsonIgnore public String ratingKey() { return ratingKey; } + /** + * The unique key for the media item. + */ @JsonIgnore public String key() { return key; } + /** + * The globally unique identifier for the media item. + */ @JsonIgnore public String guid() { return guid; } + /** + * A URL‐friendly version of the media title. + */ + @JsonIgnore + public String slug() { + return slug; + } + + /** + * The studio that produced the media item. + */ @JsonIgnore public Optional studio() { return studio; } @JsonIgnore - public Optional skipChildren() { - return skipChildren; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ - @JsonIgnore - public GetLibraryItemsLibraryType type() { + public GetLibraryItemsType type() { return type; } + /** + * The title of the media item. + */ @JsonIgnore public String title() { return title; } + /** + * The banner image URL for the media item. + */ @JsonIgnore - public Optional slug() { - return slug; + public String banner() { + return banner; } + /** + * The sort title used for ordering media items. + */ + @JsonIgnore + public String titleSort() { + return titleSort; + } + + /** + * The content rating for the media item. + */ @JsonIgnore public Optional contentRating() { return contentRating; } + /** + * A synopsis of the media item. + */ @JsonIgnore public String summary() { return summary; } + /** + * The critic rating for the media item. + */ @JsonIgnore - public Optional rating() { + public float rating() { return rating; } + /** + * The audience rating for the media item. + */ @JsonIgnore - public Optional audienceRating() { + public double audienceRating() { return audienceRating; } + /** + * The release year of the media item. + */ @JsonIgnore public Optional year() { return year; } + /** + * A brief tagline for the media item. + */ @JsonIgnore - public Optional seasonCount() { - return seasonCount; - } - - @JsonIgnore - public Optional tagline() { + public String tagline() { return tagline; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional flattenSeasons() { - return (Optional) flattenSeasons; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional episodeSort() { - return (Optional) episodeSort; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional enableCreditsMarkerGeneration() { - return (Optional) enableCreditsMarkerGeneration; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional showOrdering() { - return (Optional) showOrdering; - } - - @JsonIgnore - public Optional thumb() { + public String thumb() { return thumb; } + /** + * The art image URL for the media item. + */ @JsonIgnore - public Optional art() { + public String art() { return art; } + /** + * The theme URL for the media item. + */ @JsonIgnore - public Optional banner() { - return banner; + public String theme() { + return theme; } + /** + * The index position of the media item. + */ @JsonIgnore - public Optional duration() { + public int index() { + return index; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + /** + * The number of leaf items that have been viewed. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * The number of child items associated with this media item. + */ + @JsonIgnore + public int childCount() { + return childCount; + } + + /** + * The total number of seasons (for TV shows). + */ + @JsonIgnore + public int seasonCount() { + return seasonCount; + } + + /** + * The duration of the media item in milliseconds. + */ + @JsonIgnore + public int duration() { return duration; } + /** + * The original release date of the media item. + */ @JsonIgnore public Optional originallyAvailableAt() { return originallyAvailableAt; } - /** - * Unix epoch datetime in seconds - */ @JsonIgnore public long addedAt() { return addedAt; @@ -781,74 +976,304 @@ public class GetLibraryItemsMetadata { return updatedAt; } + /** + * The URL for the audience rating image. + */ @JsonIgnore public Optional audienceRatingImage() { return audienceRatingImage; } + /** + * The source from which chapter data is derived. + */ @JsonIgnore public Optional chapterSource() { return chapterSource; } + /** + * The primary extra key associated with this media item. + */ @JsonIgnore public Optional primaryExtraKey() { return primaryExtraKey; } + /** + * The original title of the media item (if different). + */ @JsonIgnore - public Optional ratingImage() { - return ratingImage; + public Optional originalTitle() { + return originalTitle; } + /** + * The rating key of the parent media item. + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The rating key of the grandparent media item. + */ @JsonIgnore public Optional grandparentRatingKey() { return grandparentRatingKey; } + /** + * The GUID of the parent media item. + */ + @JsonIgnore + public Optional parentGuid() { + return parentGuid; + } + + /** + * The GUID of the grandparent media item. + */ @JsonIgnore public Optional grandparentGuid() { return grandparentGuid; } - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - @JsonIgnore - public Optional parentSlug() { - return parentSlug; - } - + /** + * The slug for the grandparent media item. + */ @JsonIgnore public Optional grandparentSlug() { return grandparentSlug; } + /** + * The key of the grandparent media item. + */ @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; + public Optional grandparentKey() { + return grandparentKey; } + /** + * The key of the parent media item. + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The title of the grandparent media item. + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The theme URL for the grandparent media item. + */ @JsonIgnore public Optional grandparentTheme() { return grandparentTheme; } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The title of the parent media item. + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * The index position of the parent media item. + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The thumbnail URL for the parent media item. + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The URL for the rating image. + */ + @JsonIgnore + public Optional ratingImage() { + return ratingImage; + } + + /** + * The number of times this media item has been viewed. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * The current playback offset (in milliseconds). + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + /** + * The number of times this media item has been skipped. + */ + @JsonIgnore + public Optional skipCount() { + return skipCount; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + @JsonIgnore + public Optional subtype() { + return subtype; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + @JsonIgnore + public Optional lastRatedAt() { + return lastRatedAt; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + @JsonIgnore + public Optional createdAtAccuracy() { + return createdAtAccuracy; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + @JsonIgnore + public Optional createdAtTZOffset() { + return createdAtTZOffset; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ultraBlurColors() { + return (Optional) ultraBlurColors; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guids() { + return (Optional>) guids; + } + + /** + * The identifier for the library section. + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The title of the library section. + */ + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + /** + * The key corresponding to the library section. + */ + @JsonIgnore + public Optional librarySectionKey() { + return librarySectionKey; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional showOrdering() { + return (Optional) showOrdering; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional flattenSeasons() { + return (Optional) flattenSeasons; + } + + /** + * Indicates whether child items should be skipped. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> media() { @@ -879,6 +1304,12 @@ public class GetLibraryItemsMetadata { return (Optional>) writer; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> producer() { + return (Optional>) producer; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> collection() { @@ -891,150 +1322,40 @@ public class GetLibraryItemsMetadata { return (Optional>) role; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratings() { + return (Optional>) ratings; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> similar() { + return (Optional>) similar; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> location() { return (Optional>) location; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional> mediaGuid() { - return (Optional>) mediaGuid; + public Optional> chapter() { + return (Optional>) chapter; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; + public Optional> marker() { + return (Optional>) marker; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional> metaDataRating() { - return (Optional>) metaDataRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @JsonIgnore - public Optional titleSort() { - return titleSort; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional theme() { - return theme; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - @JsonIgnore - public Optional childCount() { - return childCount; - } - - @JsonIgnore - public Optional hasPremiumExtras() { - return hasPremiumExtras; - } - - @JsonIgnore - public Optional hasPremiumPrimaryExtra() { - return hasPremiumPrimaryExtra; - } - - /** - * The rating key of the parent item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - @JsonIgnore - public Optional parentStudio() { - return parentStudio; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional parentTheme() { - return parentTheme; + public Optional extras() { + return (Optional) extras; } public final static Builder builder() { @@ -1042,8 +1363,7 @@ public class GetLibraryItemsMetadata { } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ public GetLibraryItemsMetadata withRatingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); @@ -1051,328 +1371,273 @@ public class GetLibraryItemsMetadata { return this; } + /** + * The unique key for the media item. + */ public GetLibraryItemsMetadata withKey(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + /** + * The globally unique identifier for the media item. + */ public GetLibraryItemsMetadata withGuid(String guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; } + /** + * A URL‐friendly version of the media title. + */ + public GetLibraryItemsMetadata withSlug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + /** + * The studio that produced the media item. + */ public GetLibraryItemsMetadata withStudio(String studio) { Utils.checkNotNull(studio, "studio"); this.studio = Optional.ofNullable(studio); return this; } + /** + * The studio that produced the media item. + */ public GetLibraryItemsMetadata withStudio(Optional studio) { Utils.checkNotNull(studio, "studio"); this.studio = studio; return this; } - public GetLibraryItemsMetadata withSkipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - public GetLibraryItemsMetadata withSkipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - public GetLibraryItemsMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ - public GetLibraryItemsMetadata withType(GetLibraryItemsLibraryType type) { + public GetLibraryItemsMetadata withType(GetLibraryItemsType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * The title of the media item. + */ public GetLibraryItemsMetadata withTitle(String title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public GetLibraryItemsMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); + /** + * The banner image URL for the media item. + */ + public GetLibraryItemsMetadata withBanner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; return this; } - public GetLibraryItemsMetadata withSlug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; + /** + * The sort title used for ordering media items. + */ + public GetLibraryItemsMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; return this; } + /** + * The content rating for the media item. + */ public GetLibraryItemsMetadata withContentRating(String contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } + /** + * The content rating for the media item. + */ public GetLibraryItemsMetadata withContentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } + /** + * A synopsis of the media item. + */ public GetLibraryItemsMetadata withSummary(String summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; } - public GetLibraryItemsMetadata withRating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - public GetLibraryItemsMetadata withRating(Optional rating) { + /** + * The critic rating for the media item. + */ + public GetLibraryItemsMetadata withRating(float rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; return this; } + /** + * The audience rating for the media item. + */ public GetLibraryItemsMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - public GetLibraryItemsMetadata withAudienceRating(Optional audienceRating) { Utils.checkNotNull(audienceRating, "audienceRating"); this.audienceRating = audienceRating; return this; } + /** + * The release year of the media item. + */ public GetLibraryItemsMetadata withYear(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } + /** + * The release year of the media item. + */ public GetLibraryItemsMetadata withYear(Optional year) { Utils.checkNotNull(year, "year"); this.year = year; return this; } - public GetLibraryItemsMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = Optional.ofNullable(seasonCount); - return this; - } - - public GetLibraryItemsMetadata withSeasonCount(Optional seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - + /** + * A brief tagline for the media item. + */ public GetLibraryItemsMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - public GetLibraryItemsMetadata withTagline(Optional tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = tagline; return this; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - public GetLibraryItemsMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetLibraryItemsMetadata withFlattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public GetLibraryItemsMetadata withEpisodeSort(EpisodeSort episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = Optional.ofNullable(episodeSort); - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public GetLibraryItemsMetadata withEpisodeSort(Optional episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = episodeSort; - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(EnableCreditsMarkerGeneration enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration); - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public GetLibraryItemsMetadata withEnableCreditsMarkerGeneration(Optional enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public GetLibraryItemsMetadata withShowOrdering(ShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public GetLibraryItemsMetadata withShowOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - public GetLibraryItemsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - public GetLibraryItemsMetadata withThumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The art image URL for the media item. + */ public GetLibraryItemsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - public GetLibraryItemsMetadata withArt(Optional art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } - public GetLibraryItemsMetadata withBanner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * The theme URL for the media item. + */ + public GetLibraryItemsMetadata withTheme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; return this; } - public GetLibraryItemsMetadata withBanner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * The index position of the media item. + */ + public GetLibraryItemsMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The number of leaf items (end nodes) under this media item. + */ + public GetLibraryItemsMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + public GetLibraryItemsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public GetLibraryItemsMetadata withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public GetLibraryItemsMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * The number of child items associated with this media item. + */ + public GetLibraryItemsMetadata withChildCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + /** + * The total number of seasons (for TV shows). + */ + public GetLibraryItemsMetadata withSeasonCount(int seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = seasonCount; + return this; + } + + /** + * The duration of the media item in milliseconds. + */ public GetLibraryItemsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public GetLibraryItemsMetadata withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * The original release date of the media item. + */ public GetLibraryItemsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } + /** + * The original release date of the media item. + */ public GetLibraryItemsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - /** - * Unix epoch datetime in seconds - */ public GetLibraryItemsMetadata withAddedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; @@ -1397,156 +1662,252 @@ public class GetLibraryItemsMetadata { return this; } + /** + * The URL for the audience rating image. + */ public GetLibraryItemsMetadata withAudienceRatingImage(String audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); return this; } + /** + * The URL for the audience rating image. + */ public GetLibraryItemsMetadata withAudienceRatingImage(Optional audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = audienceRatingImage; return this; } + /** + * The source from which chapter data is derived. + */ public GetLibraryItemsMetadata withChapterSource(String chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = Optional.ofNullable(chapterSource); return this; } + /** + * The source from which chapter data is derived. + */ public GetLibraryItemsMetadata withChapterSource(Optional chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = chapterSource; return this; } + /** + * The primary extra key associated with this media item. + */ public GetLibraryItemsMetadata withPrimaryExtraKey(String primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); return this; } + /** + * The primary extra key associated with this media item. + */ public GetLibraryItemsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = primaryExtraKey; return this; } - public GetLibraryItemsMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); + /** + * The original title of the media item (if different). + */ + public GetLibraryItemsMetadata withOriginalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); return this; } - public GetLibraryItemsMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; + /** + * The original title of the media item (if different). + */ + public GetLibraryItemsMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; return this; } + /** + * The rating key of the parent media item. + */ + public GetLibraryItemsMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The rating key of the parent media item. + */ + public GetLibraryItemsMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The rating key of the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentRatingKey(String grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); return this; } + /** + * The rating key of the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = grandparentRatingKey; return this; } + /** + * The GUID of the parent media item. + */ + public GetLibraryItemsMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + /** + * The GUID of the parent media item. + */ + public GetLibraryItemsMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + /** + * The GUID of the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentGuid(String grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = Optional.ofNullable(grandparentGuid); return this; } + /** + * The GUID of the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentGuid(Optional grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = grandparentGuid; return this; } - public GetLibraryItemsMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - public GetLibraryItemsMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public GetLibraryItemsMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - public GetLibraryItemsMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public GetLibraryItemsMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - public GetLibraryItemsMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public GetLibraryItemsMetadata withParentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - public GetLibraryItemsMetadata withParentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - + /** + * The slug for the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); return this; } + /** + * The slug for the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentSlug(Optional grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = grandparentSlug; return this; } - public GetLibraryItemsMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); + /** + * The key of the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); return this; } - public GetLibraryItemsMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; + /** + * The key of the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; return this; } + /** + * The key of the parent media item. + */ + public GetLibraryItemsMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The key of the parent media item. + */ + public GetLibraryItemsMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The title of the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The title of the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The theme URL for the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentTheme(String grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = Optional.ofNullable(grandparentTheme); return this; } + /** + * The theme URL for the grandparent media item. + */ public GetLibraryItemsMetadata withGrandparentTheme(Optional grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = grandparentTheme; @@ -1554,17 +1915,419 @@ public class GetLibraryItemsMetadata { } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + public GetLibraryItemsMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The art URL for the grandparent media item. + */ + public GetLibraryItemsMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The title of the parent media item. + */ + public GetLibraryItemsMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The title of the parent media item. + */ + public GetLibraryItemsMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * The index position of the parent media item. + */ + public GetLibraryItemsMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The index position of the parent media item. + */ + public GetLibraryItemsMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public GetLibraryItemsMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public GetLibraryItemsMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The URL for the rating image. + */ + public GetLibraryItemsMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * The URL for the rating image. + */ + public GetLibraryItemsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public GetLibraryItemsMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public GetLibraryItemsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public GetLibraryItemsMetadata withViewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public GetLibraryItemsMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public GetLibraryItemsMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public GetLibraryItemsMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public GetLibraryItemsMetadata withSubtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public GetLibraryItemsMetadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public GetLibraryItemsMetadata withLastRatedAt(long lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public GetLibraryItemsMetadata withLastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public GetLibraryItemsMetadata withCreatedAtAccuracy(String createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public GetLibraryItemsMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = createdAtAccuracy; + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public GetLibraryItemsMetadata withCreatedAtTZOffset(String createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public GetLibraryItemsMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = createdAtTZOffset; + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public GetLibraryItemsMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public GetLibraryItemsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public GetLibraryItemsMetadata withUserRating(float userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public GetLibraryItemsMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public GetLibraryItemsMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public GetLibraryItemsMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public GetLibraryItemsMetadata withUltraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + public GetLibraryItemsMetadata withUltraBlurColors(Optional ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + public GetLibraryItemsMetadata withGuids(List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public GetLibraryItemsMetadata withGuids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + /** + * The identifier for the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetLibraryItemsMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public GetLibraryItemsMetadata withShowOrdering(ShowOrdering showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = Optional.ofNullable(showOrdering); + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public GetLibraryItemsMetadata withShowOrdering(Optional showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = showOrdering; + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public GetLibraryItemsMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public GetLibraryItemsMetadata withFlattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public GetLibraryItemsMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public GetLibraryItemsMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + public GetLibraryItemsMetadata withMedia(List media) { Utils.checkNotNull(media, "media"); this.media = Optional.ofNullable(media); return this; } - /** - * The Media object is only included when type query is `4` or higher. - */ public GetLibraryItemsMetadata withMedia(Optional> media) { Utils.checkNotNull(media, "media"); this.media = media; @@ -1619,6 +2382,18 @@ public class GetLibraryItemsMetadata { return this; } + public GetLibraryItemsMetadata withProducer(List producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = Optional.ofNullable(producer); + return this; + } + + public GetLibraryItemsMetadata withProducer(Optional> producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = producer; + return this; + } + public GetLibraryItemsMetadata withCollection(List collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -1643,6 +2418,30 @@ public class GetLibraryItemsMetadata { return this; } + public GetLibraryItemsMetadata withRatings(List ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = Optional.ofNullable(ratings); + return this; + } + + public GetLibraryItemsMetadata withRatings(Optional> ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = ratings; + return this; + } + + public GetLibraryItemsMetadata withSimilar(List similar) { + Utils.checkNotNull(similar, "similar"); + this.similar = Optional.ofNullable(similar); + return this; + } + + public GetLibraryItemsMetadata withSimilar(Optional> similar) { + Utils.checkNotNull(similar, "similar"); + this.similar = similar; + return this; + } + public GetLibraryItemsMetadata withLocation(List location) { Utils.checkNotNull(location, "location"); this.location = Optional.ofNullable(location); @@ -1655,327 +2454,39 @@ public class GetLibraryItemsMetadata { return this; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public GetLibraryItemsMetadata withMediaGuid(List mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = Optional.ofNullable(mediaGuid); + public GetLibraryItemsMetadata withChapter(List chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = Optional.ofNullable(chapter); return this; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public GetLibraryItemsMetadata withMediaGuid(Optional> mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = mediaGuid; + public GetLibraryItemsMetadata withChapter(Optional> chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = chapter; return this; } - public GetLibraryItemsMetadata withUltraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + public GetLibraryItemsMetadata withMarker(List marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = Optional.ofNullable(marker); return this; } - public GetLibraryItemsMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; + public GetLibraryItemsMetadata withMarker(Optional> marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; return this; } - public GetLibraryItemsMetadata withMetaDataRating(List metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = Optional.ofNullable(metaDataRating); + public GetLibraryItemsMetadata withExtras(Extras extras) { + Utils.checkNotNull(extras, "extras"); + this.extras = Optional.ofNullable(extras); return this; } - public GetLibraryItemsMetadata withMetaDataRating(Optional> metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = metaDataRating; - return this; - } - - public GetLibraryItemsMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public GetLibraryItemsMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetLibraryItemsMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - public GetLibraryItemsMetadata withTitleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public GetLibraryItemsMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - public GetLibraryItemsMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetLibraryItemsMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - public GetLibraryItemsMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetLibraryItemsMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - public GetLibraryItemsMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - public GetLibraryItemsMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - public GetLibraryItemsMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - public GetLibraryItemsMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - public GetLibraryItemsMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public GetLibraryItemsMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - public GetLibraryItemsMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetLibraryItemsMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); - return this; - } - - public GetLibraryItemsMetadata withTheme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - public GetLibraryItemsMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - public GetLibraryItemsMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetLibraryItemsMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - public GetLibraryItemsMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public GetLibraryItemsMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - public GetLibraryItemsMetadata withChildCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public GetLibraryItemsMetadata withHasPremiumExtras(String hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); - return this; - } - - public GetLibraryItemsMetadata withHasPremiumExtras(Optional hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = hasPremiumExtras; - return this; - } - - public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); - return this; - } - - public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - return this; - } - - /** - * The rating key of the parent item. - */ - public GetLibraryItemsMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent item. - */ - public GetLibraryItemsMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public GetLibraryItemsMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - public GetLibraryItemsMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public GetLibraryItemsMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - public GetLibraryItemsMetadata withParentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public GetLibraryItemsMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - public GetLibraryItemsMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetLibraryItemsMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - public GetLibraryItemsMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetLibraryItemsMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - public GetLibraryItemsMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetLibraryItemsMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - public GetLibraryItemsMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetLibraryItemsMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - public GetLibraryItemsMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetLibraryItemsMetadata withParentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - public GetLibraryItemsMetadata withParentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; + public GetLibraryItemsMetadata withExtras(Optional extras) { + Utils.checkNotNull(extras, "extras"); + this.extras = extras; return this; } @@ -1993,28 +2504,26 @@ public class GetLibraryItemsMetadata { Objects.deepEquals(this.ratingKey, other.ratingKey) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.guid, other.guid) && + Objects.deepEquals(this.slug, other.slug) && Objects.deepEquals(this.studio, other.studio) && - Objects.deepEquals(this.skipChildren, other.skipChildren) && - Objects.deepEquals(this.librarySectionID, other.librarySectionID) && - Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && Objects.deepEquals(this.type, other.type) && Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.slug, other.slug) && + Objects.deepEquals(this.banner, other.banner) && + Objects.deepEquals(this.titleSort, other.titleSort) && Objects.deepEquals(this.contentRating, other.contentRating) && Objects.deepEquals(this.summary, other.summary) && Objects.deepEquals(this.rating, other.rating) && Objects.deepEquals(this.audienceRating, other.audienceRating) && Objects.deepEquals(this.year, other.year) && - Objects.deepEquals(this.seasonCount, other.seasonCount) && Objects.deepEquals(this.tagline, other.tagline) && - Objects.deepEquals(this.flattenSeasons, other.flattenSeasons) && - Objects.deepEquals(this.episodeSort, other.episodeSort) && - Objects.deepEquals(this.enableCreditsMarkerGeneration, other.enableCreditsMarkerGeneration) && - Objects.deepEquals(this.showOrdering, other.showOrdering) && Objects.deepEquals(this.thumb, other.thumb) && Objects.deepEquals(this.art, other.art) && - Objects.deepEquals(this.banner, other.banner) && + Objects.deepEquals(this.theme, other.theme) && + Objects.deepEquals(this.index, other.index) && + Objects.deepEquals(this.leafCount, other.leafCount) && + Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Objects.deepEquals(this.childCount, other.childCount) && + Objects.deepEquals(this.seasonCount, other.seasonCount) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && Objects.deepEquals(this.addedAt, other.addedAt) && @@ -2022,50 +2531,54 @@ public class GetLibraryItemsMetadata { Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && Objects.deepEquals(this.chapterSource, other.chapterSource) && Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.originalTitle, other.originalTitle) && + Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Objects.deepEquals(this.parentGuid, other.parentGuid) && Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + Objects.deepEquals(this.grandparentSlug, other.grandparentSlug) && Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + Objects.deepEquals(this.parentKey, other.parentKey) && Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && - Objects.deepEquals(this.parentSlug, other.parentSlug) && - Objects.deepEquals(this.grandparentSlug, other.grandparentSlug) && - Objects.deepEquals(this.grandparentArt, other.grandparentArt) && Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) && + Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + Objects.deepEquals(this.parentTitle, other.parentTitle) && + Objects.deepEquals(this.parentIndex, other.parentIndex) && + Objects.deepEquals(this.parentThumb, other.parentThumb) && + Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.viewCount, other.viewCount) && + Objects.deepEquals(this.viewOffset, other.viewOffset) && + Objects.deepEquals(this.skipCount, other.skipCount) && + Objects.deepEquals(this.subtype, other.subtype) && + Objects.deepEquals(this.lastRatedAt, other.lastRatedAt) && + Objects.deepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && + Objects.deepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && + Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + Objects.deepEquals(this.userRating, other.userRating) && + Objects.deepEquals(this.image, other.image) && + Objects.deepEquals(this.ultraBlurColors, other.ultraBlurColors) && + Objects.deepEquals(this.guids, other.guids) && + Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + Objects.deepEquals(this.showOrdering, other.showOrdering) && + Objects.deepEquals(this.flattenSeasons, other.flattenSeasons) && + Objects.deepEquals(this.skipChildren, other.skipChildren) && Objects.deepEquals(this.media, other.media) && Objects.deepEquals(this.genre, other.genre) && Objects.deepEquals(this.country, other.country) && Objects.deepEquals(this.director, other.director) && Objects.deepEquals(this.writer, other.writer) && + Objects.deepEquals(this.producer, other.producer) && Objects.deepEquals(this.collection, other.collection) && Objects.deepEquals(this.role, other.role) && + Objects.deepEquals(this.ratings, other.ratings) && + Objects.deepEquals(this.similar, other.similar) && Objects.deepEquals(this.location, other.location) && - Objects.deepEquals(this.mediaGuid, other.mediaGuid) && - Objects.deepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Objects.deepEquals(this.metaDataRating, other.metaDataRating) && - Objects.deepEquals(this.image, other.image) && - Objects.deepEquals(this.titleSort, other.titleSort) && - Objects.deepEquals(this.viewCount, other.viewCount) && - Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && - Objects.deepEquals(this.originalTitle, other.originalTitle) && - Objects.deepEquals(this.viewOffset, other.viewOffset) && - Objects.deepEquals(this.skipCount, other.skipCount) && - Objects.deepEquals(this.index, other.index) && - Objects.deepEquals(this.theme, other.theme) && - Objects.deepEquals(this.leafCount, other.leafCount) && - Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Objects.deepEquals(this.childCount, other.childCount) && - Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) && - Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && - Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && - Objects.deepEquals(this.parentGuid, other.parentGuid) && - Objects.deepEquals(this.parentStudio, other.parentStudio) && - Objects.deepEquals(this.parentKey, other.parentKey) && - Objects.deepEquals(this.parentTitle, other.parentTitle) && - Objects.deepEquals(this.parentIndex, other.parentIndex) && - Objects.deepEquals(this.parentYear, other.parentYear) && - Objects.deepEquals(this.parentThumb, other.parentThumb) && - Objects.deepEquals(this.parentTheme, other.parentTheme); + Objects.deepEquals(this.chapter, other.chapter) && + Objects.deepEquals(this.marker, other.marker) && + Objects.deepEquals(this.extras, other.extras); } @Override @@ -2074,28 +2587,26 @@ public class GetLibraryItemsMetadata { ratingKey, key, guid, + slug, studio, - skipChildren, - librarySectionID, - librarySectionTitle, - librarySectionKey, type, title, - slug, + banner, + titleSort, contentRating, summary, rating, audienceRating, year, - seasonCount, tagline, - flattenSeasons, - episodeSort, - enableCreditsMarkerGeneration, - showOrdering, thumb, art, - banner, + theme, + index, + leafCount, + viewedLeafCount, + childCount, + seasonCount, duration, originallyAvailableAt, addedAt, @@ -2103,50 +2614,54 @@ public class GetLibraryItemsMetadata { audienceRatingImage, chapterSource, primaryExtraKey, - ratingImage, + originalTitle, + parentRatingKey, grandparentRatingKey, + parentGuid, grandparentGuid, + grandparentSlug, grandparentKey, + parentKey, grandparentTitle, grandparentThumb, - parentSlug, - grandparentSlug, - grandparentArt, grandparentTheme, + grandparentArt, + parentTitle, + parentIndex, + parentThumb, + ratingImage, + viewCount, + viewOffset, + skipCount, + subtype, + lastRatedAt, + createdAtAccuracy, + createdAtTZOffset, + lastViewedAt, + userRating, + image, + ultraBlurColors, + guids, + librarySectionID, + librarySectionTitle, + librarySectionKey, + showOrdering, + flattenSeasons, + skipChildren, media, genre, country, director, writer, + producer, collection, role, + ratings, + similar, location, - mediaGuid, - ultraBlurColors, - metaDataRating, - image, - titleSort, - viewCount, - lastViewedAt, - originalTitle, - viewOffset, - skipCount, - index, - theme, - leafCount, - viewedLeafCount, - childCount, - hasPremiumExtras, - hasPremiumPrimaryExtra, - parentRatingKey, - parentGuid, - parentStudio, - parentKey, - parentTitle, - parentIndex, - parentYear, - parentThumb, - parentTheme); + chapter, + marker, + extras); } @Override @@ -2155,28 +2670,26 @@ public class GetLibraryItemsMetadata { "ratingKey", ratingKey, "key", key, "guid", guid, + "slug", slug, "studio", studio, - "skipChildren", skipChildren, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionKey", librarySectionKey, "type", type, "title", title, - "slug", slug, + "banner", banner, + "titleSort", titleSort, "contentRating", contentRating, "summary", summary, "rating", rating, "audienceRating", audienceRating, "year", year, - "seasonCount", seasonCount, "tagline", tagline, - "flattenSeasons", flattenSeasons, - "episodeSort", episodeSort, - "enableCreditsMarkerGeneration", enableCreditsMarkerGeneration, - "showOrdering", showOrdering, "thumb", thumb, "art", art, - "banner", banner, + "theme", theme, + "index", index, + "leafCount", leafCount, + "viewedLeafCount", viewedLeafCount, + "childCount", childCount, + "seasonCount", seasonCount, "duration", duration, "originallyAvailableAt", originallyAvailableAt, "addedAt", addedAt, @@ -2184,50 +2697,54 @@ public class GetLibraryItemsMetadata { "audienceRatingImage", audienceRatingImage, "chapterSource", chapterSource, "primaryExtraKey", primaryExtraKey, - "ratingImage", ratingImage, + "originalTitle", originalTitle, + "parentRatingKey", parentRatingKey, "grandparentRatingKey", grandparentRatingKey, + "parentGuid", parentGuid, "grandparentGuid", grandparentGuid, + "grandparentSlug", grandparentSlug, "grandparentKey", grandparentKey, + "parentKey", parentKey, "grandparentTitle", grandparentTitle, "grandparentThumb", grandparentThumb, - "parentSlug", parentSlug, - "grandparentSlug", grandparentSlug, - "grandparentArt", grandparentArt, "grandparentTheme", grandparentTheme, + "grandparentArt", grandparentArt, + "parentTitle", parentTitle, + "parentIndex", parentIndex, + "parentThumb", parentThumb, + "ratingImage", ratingImage, + "viewCount", viewCount, + "viewOffset", viewOffset, + "skipCount", skipCount, + "subtype", subtype, + "lastRatedAt", lastRatedAt, + "createdAtAccuracy", createdAtAccuracy, + "createdAtTZOffset", createdAtTZOffset, + "lastViewedAt", lastViewedAt, + "userRating", userRating, + "image", image, + "ultraBlurColors", ultraBlurColors, + "guids", guids, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionKey", librarySectionKey, + "showOrdering", showOrdering, + "flattenSeasons", flattenSeasons, + "skipChildren", skipChildren, "media", media, "genre", genre, "country", country, "director", director, "writer", writer, + "producer", producer, "collection", collection, "role", role, + "ratings", ratings, + "similar", similar, "location", location, - "mediaGuid", mediaGuid, - "ultraBlurColors", ultraBlurColors, - "metaDataRating", metaDataRating, - "image", image, - "titleSort", titleSort, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "originalTitle", originalTitle, - "viewOffset", viewOffset, - "skipCount", skipCount, - "index", index, - "theme", theme, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "hasPremiumExtras", hasPremiumExtras, - "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, - "parentRatingKey", parentRatingKey, - "parentGuid", parentGuid, - "parentStudio", parentStudio, - "parentKey", parentKey, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentYear", parentYear, - "parentThumb", parentThumb, - "parentTheme", parentTheme); + "chapter", chapter, + "marker", marker, + "extras", extras); } public final static class Builder { @@ -2238,51 +2755,47 @@ public class GetLibraryItemsMetadata { private String guid; + private String slug; + private Optional studio = Optional.empty(); - private Optional skipChildren = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private GetLibraryItemsLibraryType type; + private GetLibraryItemsType type; private String title; - private Optional slug = Optional.empty(); + private String banner; + + private String titleSort; private Optional contentRating = Optional.empty(); private String summary; - private Optional rating = Optional.empty(); + private Float rating; - private Optional audienceRating = Optional.empty(); + private Double audienceRating; private Optional year = Optional.empty(); - private Optional seasonCount = Optional.empty(); + private String tagline; - private Optional tagline = Optional.empty(); + private String thumb; - private Optional flattenSeasons = Optional.empty(); + private String art; - private Optional episodeSort = Optional.empty(); + private String theme; - private Optional enableCreditsMarkerGeneration = Optional.empty(); + private Integer index; - private Optional showOrdering = Optional.empty(); + private Optional leafCount = Optional.empty(); - private Optional thumb = Optional.empty(); + private Optional viewedLeafCount = Optional.empty(); - private Optional art = Optional.empty(); + private Integer childCount; - private Optional banner = Optional.empty(); + private Integer seasonCount; - private Optional duration = Optional.empty(); + private Integer duration; private Optional originallyAvailableAt = Optional.empty(); @@ -2296,25 +2809,73 @@ public class GetLibraryItemsMetadata { private Optional primaryExtraKey = Optional.empty(); - private Optional ratingImage = Optional.empty(); + private Optional originalTitle = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); private Optional grandparentRatingKey = Optional.empty(); + private Optional parentGuid = Optional.empty(); + private Optional grandparentGuid = Optional.empty(); + private Optional grandparentSlug = Optional.empty(); + private Optional grandparentKey = Optional.empty(); + private Optional parentKey = Optional.empty(); + private Optional grandparentTitle = Optional.empty(); private Optional grandparentThumb = Optional.empty(); - private Optional parentSlug = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); + private Optional grandparentTheme = Optional.empty(); private Optional grandparentArt = Optional.empty(); - private Optional grandparentTheme = Optional.empty(); + private Optional parentTitle = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional skipCount = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional lastRatedAt = Optional.empty(); + + private Optional createdAtAccuracy = Optional.empty(); + + private Optional createdAtTZOffset = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional ultraBlurColors = Optional.empty(); + + private Optional> guids = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional showOrdering = Optional.empty(); + + private Optional flattenSeasons = Optional.empty(); + + private Optional skipChildren = Optional.empty(); private Optional> media = Optional.empty(); @@ -2326,71 +2887,30 @@ public class GetLibraryItemsMetadata { private Optional> writer = Optional.empty(); + private Optional> producer = Optional.empty(); + private Optional> collection = Optional.empty(); private Optional> role = Optional.empty(); + private Optional> ratings = Optional.empty(); + + private Optional> similar = Optional.empty(); + private Optional> location = Optional.empty(); - private Optional> mediaGuid = Optional.empty(); + private Optional> chapter = Optional.empty(); - private Optional ultraBlurColors = Optional.empty(); + private Optional> marker = Optional.empty(); - private Optional> metaDataRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional titleSort = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional theme = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional childCount = Optional.empty(); - - private Optional hasPremiumExtras = Optional.empty(); - - private Optional hasPremiumPrimaryExtra = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentStudio = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional parentTheme = Optional.empty(); + private Optional extras = Optional.empty(); private Builder() { // force use of static builder() method } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ public Builder ratingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); @@ -2398,328 +2918,273 @@ public class GetLibraryItemsMetadata { return this; } + /** + * The unique key for the media item. + */ public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + /** + * The globally unique identifier for the media item. + */ public Builder guid(String guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; } + /** + * A URL‐friendly version of the media title. + */ + public Builder slug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + /** + * The studio that produced the media item. + */ public Builder studio(String studio) { Utils.checkNotNull(studio, "studio"); this.studio = Optional.ofNullable(studio); return this; } + /** + * The studio that produced the media item. + */ public Builder studio(Optional studio) { Utils.checkNotNull(studio, "studio"); this.studio = studio; return this; } - public Builder skipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - public Builder skipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ - public Builder type(GetLibraryItemsLibraryType type) { + public Builder type(GetLibraryItemsType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * The title of the media item. + */ public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); + /** + * The banner image URL for the media item. + */ + public Builder banner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; return this; } - public Builder slug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; + /** + * The sort title used for ordering media items. + */ + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; return this; } + /** + * The content rating for the media item. + */ public Builder contentRating(String contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } + /** + * The content rating for the media item. + */ public Builder contentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } + /** + * A synopsis of the media item. + */ public Builder summary(String summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; } - public Builder rating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - public Builder rating(Optional rating) { + /** + * The critic rating for the media item. + */ + public Builder rating(float rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; return this; } + /** + * The audience rating for the media item. + */ public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - public Builder audienceRating(Optional audienceRating) { Utils.checkNotNull(audienceRating, "audienceRating"); this.audienceRating = audienceRating; return this; } + /** + * The release year of the media item. + */ public Builder year(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } + /** + * The release year of the media item. + */ public Builder year(Optional year) { Utils.checkNotNull(year, "year"); this.year = year; return this; } - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = Optional.ofNullable(seasonCount); - return this; - } - - public Builder seasonCount(Optional seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - + /** + * A brief tagline for the media item. + */ public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - public Builder tagline(Optional tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = tagline; return this; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - public Builder flattenSeasons(FlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public Builder episodeSort(EpisodeSort episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = Optional.ofNullable(episodeSort); - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public Builder episodeSort(Optional episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = episodeSort; - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public Builder enableCreditsMarkerGeneration(EnableCreditsMarkerGeneration enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration); - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public Builder enableCreditsMarkerGeneration(Optional enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public Builder showOrdering(ShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public Builder showOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - public Builder thumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The art image URL for the media item. + */ public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - public Builder art(Optional art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } - public Builder banner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * The theme URL for the media item. + */ + public Builder theme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; return this; } - public Builder banner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * The index position of the media item. + */ + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The number of leaf items (end nodes) under this media item. + */ + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public Builder viewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * The number of child items associated with this media item. + */ + public Builder childCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + /** + * The total number of seasons (for TV shows). + */ + public Builder seasonCount(int seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = seasonCount; + return this; + } + + /** + * The duration of the media item in milliseconds. + */ public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * The original release date of the media item. + */ public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } + /** + * The original release date of the media item. + */ public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - /** - * Unix epoch datetime in seconds - */ public Builder addedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; @@ -2744,156 +3209,252 @@ public class GetLibraryItemsMetadata { return this; } + /** + * The URL for the audience rating image. + */ public Builder audienceRatingImage(String audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); return this; } + /** + * The URL for the audience rating image. + */ public Builder audienceRatingImage(Optional audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = audienceRatingImage; return this; } + /** + * The source from which chapter data is derived. + */ public Builder chapterSource(String chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = Optional.ofNullable(chapterSource); return this; } + /** + * The source from which chapter data is derived. + */ public Builder chapterSource(Optional chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = chapterSource; return this; } + /** + * The primary extra key associated with this media item. + */ public Builder primaryExtraKey(String primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); return this; } + /** + * The primary extra key associated with this media item. + */ public Builder primaryExtraKey(Optional primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = primaryExtraKey; return this; } - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); + /** + * The original title of the media item (if different). + */ + public Builder originalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); return this; } - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; + /** + * The original title of the media item (if different). + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; return this; } + /** + * The rating key of the parent media item. + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The rating key of the parent media item. + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The rating key of the grandparent media item. + */ public Builder grandparentRatingKey(String grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); return this; } + /** + * The rating key of the grandparent media item. + */ public Builder grandparentRatingKey(Optional grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = grandparentRatingKey; return this; } + /** + * The GUID of the parent media item. + */ + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + /** + * The GUID of the parent media item. + */ + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + /** + * The GUID of the grandparent media item. + */ public Builder grandparentGuid(String grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = Optional.ofNullable(grandparentGuid); return this; } + /** + * The GUID of the grandparent media item. + */ public Builder grandparentGuid(Optional grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = grandparentGuid; return this; } - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public Builder parentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - public Builder parentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - + /** + * The slug for the grandparent media item. + */ public Builder grandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); return this; } + /** + * The slug for the grandparent media item. + */ public Builder grandparentSlug(Optional grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = grandparentSlug; return this; } - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); + /** + * The key of the grandparent media item. + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); return this; } - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; + /** + * The key of the grandparent media item. + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; return this; } + /** + * The key of the parent media item. + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The key of the parent media item. + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The title of the grandparent media item. + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The title of the grandparent media item. + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The theme URL for the grandparent media item. + */ public Builder grandparentTheme(String grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = Optional.ofNullable(grandparentTheme); return this; } + /** + * The theme URL for the grandparent media item. + */ public Builder grandparentTheme(Optional grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = grandparentTheme; @@ -2901,17 +3462,419 @@ public class GetLibraryItemsMetadata { } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The art URL for the grandparent media item. + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The title of the parent media item. + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The title of the parent media item. + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * The index position of the parent media item. + */ + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The index position of the parent media item. + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The URL for the rating image. + */ + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * The URL for the rating image. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public Builder viewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public Builder skipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public Builder skipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public Builder subtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public Builder lastRatedAt(long lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public Builder lastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public Builder createdAtAccuracy(String createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public Builder createdAtAccuracy(Optional createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = createdAtAccuracy; + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public Builder createdAtTZOffset(String createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public Builder createdAtTZOffset(Optional createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = createdAtTZOffset; + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public Builder userRating(float userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public Builder image(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public Builder image(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public Builder ultraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + public Builder ultraBlurColors(Optional ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + public Builder guids(List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public Builder guids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public Builder showOrdering(ShowOrdering showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = Optional.ofNullable(showOrdering); + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public Builder showOrdering(Optional showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = showOrdering; + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public Builder flattenSeasons(FlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public Builder flattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + public Builder media(List media) { Utils.checkNotNull(media, "media"); this.media = Optional.ofNullable(media); return this; } - /** - * The Media object is only included when type query is `4` or higher. - */ public Builder media(Optional> media) { Utils.checkNotNull(media, "media"); this.media = media; @@ -2966,6 +3929,18 @@ public class GetLibraryItemsMetadata { return this; } + public Builder producer(List producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = Optional.ofNullable(producer); + return this; + } + + public Builder producer(Optional> producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = producer; + return this; + } + public Builder collection(List collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -2990,6 +3965,30 @@ public class GetLibraryItemsMetadata { return this; } + public Builder ratings(List ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = Optional.ofNullable(ratings); + return this; + } + + public Builder ratings(Optional> ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = ratings; + return this; + } + + public Builder similar(List similar) { + Utils.checkNotNull(similar, "similar"); + this.similar = Optional.ofNullable(similar); + return this; + } + + public Builder similar(Optional> similar) { + Utils.checkNotNull(similar, "similar"); + this.similar = similar; + return this; + } + public Builder location(List location) { Utils.checkNotNull(location, "location"); this.location = Optional.ofNullable(location); @@ -3002,327 +4001,39 @@ public class GetLibraryItemsMetadata { return this; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public Builder mediaGuid(List mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = Optional.ofNullable(mediaGuid); + public Builder chapter(List chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = Optional.ofNullable(chapter); return this; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public Builder mediaGuid(Optional> mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = mediaGuid; + public Builder chapter(Optional> chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = chapter; return this; } - public Builder ultraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + public Builder marker(List marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = Optional.ofNullable(marker); return this; } - public Builder ultraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; + public Builder marker(Optional> marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; return this; } - public Builder metaDataRating(List metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = Optional.ofNullable(metaDataRating); + public Builder extras(Extras extras) { + Utils.checkNotNull(extras, "extras"); + this.extras = Optional.ofNullable(extras); return this; } - public Builder metaDataRating(Optional> metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = metaDataRating; - return this; - } - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - public Builder titleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - public Builder index(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); - return this; - } - - public Builder theme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - public Builder childCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public Builder hasPremiumExtras(String hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); - return this; - } - - public Builder hasPremiumExtras(Optional hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = hasPremiumExtras; - return this; - } - - public Builder hasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); - return this; - } - - public Builder hasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - return this; - } - - /** - * The rating key of the parent item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public Builder parentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - public Builder parentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public Builder parentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - public Builder parentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public Builder parentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - public Builder parentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; + public Builder extras(Optional extras) { + Utils.checkNotNull(extras, "extras"); + this.extras = extras; return this; } @@ -3331,28 +4042,26 @@ public class GetLibraryItemsMetadata { ratingKey, key, guid, + slug, studio, - skipChildren, - librarySectionID, - librarySectionTitle, - librarySectionKey, type, title, - slug, + banner, + titleSort, contentRating, summary, rating, audienceRating, year, - seasonCount, tagline, - flattenSeasons, - episodeSort, - enableCreditsMarkerGeneration, - showOrdering, thumb, art, - banner, + theme, + index, + leafCount, + viewedLeafCount, + childCount, + seasonCount, duration, originallyAvailableAt, addedAt, @@ -3360,50 +4069,54 @@ public class GetLibraryItemsMetadata { audienceRatingImage, chapterSource, primaryExtraKey, - ratingImage, + originalTitle, + parentRatingKey, grandparentRatingKey, + parentGuid, grandparentGuid, + grandparentSlug, grandparentKey, + parentKey, grandparentTitle, grandparentThumb, - parentSlug, - grandparentSlug, - grandparentArt, grandparentTheme, + grandparentArt, + parentTitle, + parentIndex, + parentThumb, + ratingImage, + viewCount, + viewOffset, + skipCount, + subtype, + lastRatedAt, + createdAtAccuracy, + createdAtTZOffset, + lastViewedAt, + userRating, + image, + ultraBlurColors, + guids, + librarySectionID, + librarySectionTitle, + librarySectionKey, + showOrdering, + flattenSeasons, + skipChildren, media, genre, country, director, writer, + producer, collection, role, + ratings, + similar, location, - mediaGuid, - ultraBlurColors, - metaDataRating, - image, - titleSort, - viewCount, - lastViewedAt, - originalTitle, - viewOffset, - skipCount, - index, - theme, - leafCount, - viewedLeafCount, - childCount, - hasPremiumExtras, - hasPremiumPrimaryExtra, - parentRatingKey, - parentGuid, - parentStudio, - parentKey, - parentTitle, - parentIndex, - parentYear, - parentThumb, - parentTheme); + chapter, + marker, + extras); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java index 5e0a804d..3bedc304 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java @@ -4,31 +4,98 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; -import java.util.Optional; -public enum GetLibraryItemsOptimizedForStreaming { - Disable(0), - Enable(1); +/** + * GetLibraryItemsOptimizedForStreaming + * + *

Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ +@JsonDeserialize(using = GetLibraryItemsOptimizedForStreaming._Deserializer.class) +public class GetLibraryItemsOptimizedForStreaming { @JsonValue - private final int value; - - private GetLibraryItemsOptimizedForStreaming(int value) { + private TypedObject value; + + private GetLibraryItemsOptimizedForStreaming(TypedObject value) { this.value = value; } - - public int value() { - return value; + + public static GetLibraryItemsOptimizedForStreaming of(OptimizedForStreaming1 value) { + Utils.checkNotNull(value, "value"); + return new GetLibraryItemsOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static GetLibraryItemsOptimizedForStreaming of(boolean value) { + Utils.checkNotNull(value, "value"); + return new GetLibraryItemsOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } - public static Optional fromValue(int value) { - for (GetLibraryItemsOptimizedForStreaming o: GetLibraryItemsOptimizedForStreaming.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } + /** + * Returns an instance of one of these types: + *

    + *
  • {@code dev.plexapi.sdk.models.operations.OptimizedForStreaming1}
  • + *
  • {@code boolean}
  • + *
+ * + *

Use {@code instanceof} to determine what type is returned. For example: + * + *

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; } - return Optional.empty(); + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsOptimizedForStreaming other = (GetLibraryItemsOptimizedForStreaming) o; + return Objects.deepEquals(this.value.value(), other.value.value()); } + + @Override + public int hashCode() { + return Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(GetLibraryItemsOptimizedForStreaming.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsOptimizedForStreaming.class, + "value", value); + } + } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java new file mode 100644 index 00000000..e122fe9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public enum GetLibraryItemsOptimizedForStreaming1 { + ZERO(0), + ONE(1); + + @JsonValue + private final int value; + + private GetLibraryItemsOptimizedForStreaming1(int value) { + this.value = value; + } + + public int value() { + return value; + } + + public static Optional fromValue(int value) { + for (GetLibraryItemsOptimizedForStreaming1 o: GetLibraryItemsOptimizedForStreaming1.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java index 64fe154e..c29ba79e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java @@ -17,34 +17,84 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; import java.util.Objects; import java.util.Optional; public class GetLibraryItemsPart { + /** + * Indicates if the part is accessible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accessible") + private Optional accessible; + + /** + * Indicates if the part exists. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("exists") + private Optional exists; + + /** + * Unique part identifier. + */ @JsonProperty("id") - private int id; + private long id; + /** + * Key to access this part. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private String key; + private Optional key; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("indexes") + private Optional indexes; + + /** + * Duration of the part in milliseconds. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; + /** + * File path for the part. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("file") - private String file; - - @JsonProperty("size") - private long size; + private Optional file; /** - * The container format of the media file. + * File size in bytes. */ - @JsonProperty("container") - private String container; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("packetLength") + private Optional packetLength; + + /** + * Container format of the part. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + /** + * Video profile for the part. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioProfile") private Optional audioProfile; @@ -53,111 +103,156 @@ public class GetLibraryItemsPart { @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; + private Optional optimizedForStreaming; @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasThumbnail") private Optional hasThumbnail; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - @JsonCreator public GetLibraryItemsPart( - @JsonProperty("id") int id, - @JsonProperty("key") String key, + @JsonProperty("accessible") Optional accessible, + @JsonProperty("exists") Optional exists, + @JsonProperty("id") long id, + @JsonProperty("key") Optional key, + @JsonProperty("indexes") Optional indexes, @JsonProperty("duration") Optional duration, - @JsonProperty("file") String file, - @JsonProperty("size") long size, - @JsonProperty("container") String container, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("packetLength") Optional packetLength, + @JsonProperty("container") Optional container, + @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("Stream") Optional> stream) { + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("hasThumbnail") Optional hasThumbnail) { + Utils.checkNotNull(accessible, "accessible"); + Utils.checkNotNull(exists, "exists"); Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); + Utils.checkNotNull(indexes, "indexes"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(file, "file"); Utils.checkNotNull(size, "size"); + Utils.checkNotNull(packetLength, "packetLength"); Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(indexes, "indexes"); Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(stream, "stream"); + this.accessible = accessible; + this.exists = exists; this.id = id; this.key = key; + this.indexes = indexes; this.duration = duration; this.file = file; this.size = size; + this.packetLength = packetLength; this.container = container; + this.videoProfile = videoProfile; this.audioProfile = audioProfile; this.has64bitOffsets = has64bitOffsets; this.optimizedForStreaming = optimizedForStreaming; - this.videoProfile = videoProfile; - this.indexes = indexes; this.hasThumbnail = hasThumbnail; - this.stream = stream; } public GetLibraryItemsPart( - int id, - String key, - String file, - long size, - String container) { - this(id, key, Optional.empty(), file, size, container, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + long id) { + this(Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * Indicates if the part is accessible. + */ @JsonIgnore - public int id() { + public Optional accessible() { + return accessible; + } + + /** + * Indicates if the part exists. + */ + @JsonIgnore + public Optional exists() { + return exists; + } + + /** + * Unique part identifier. + */ + @JsonIgnore + public long id() { return id; } + /** + * Key to access this part. + */ @JsonIgnore - public String key() { + public Optional key() { return key; } + @JsonIgnore + public Optional indexes() { + return indexes; + } + + /** + * Duration of the part in milliseconds. + */ @JsonIgnore public Optional duration() { return duration; } + /** + * File path for the part. + */ @JsonIgnore - public String file() { + public Optional file() { return file; } + /** + * File size in bytes. + */ @JsonIgnore - public long size() { + public Optional size() { return size; } + @JsonIgnore + public Optional packetLength() { + return packetLength; + } + /** - * The container format of the media file. + * Container format of the part. */ @JsonIgnore - public String container() { + public Optional container() { return container; } + /** + * Video profile for the part. + */ + @JsonIgnore + public Optional videoProfile() { + return videoProfile; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ @JsonIgnore public Optional audioProfile() { return audioProfile; @@ -168,19 +263,13 @@ public class GetLibraryItemsPart { return has64bitOffsets; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional optimizedForStreaming() { - return optimizedForStreaming; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @JsonIgnore - public Optional indexes() { - return indexes; + public Optional optimizedForStreaming() { + return (Optional) optimizedForStreaming; } @SuppressWarnings("unchecked") @@ -189,67 +278,199 @@ public class GetLibraryItemsPart { return (Optional) hasThumbnail; } - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - public final static Builder builder() { return new Builder(); } - public GetLibraryItemsPart withId(int id) { + /** + * Indicates if the part is accessible. + */ + public GetLibraryItemsPart withAccessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = Optional.ofNullable(accessible); + return this; + } + + /** + * Indicates if the part is accessible. + */ + public GetLibraryItemsPart withAccessible(Optional accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Indicates if the part exists. + */ + public GetLibraryItemsPart withExists(boolean exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = Optional.ofNullable(exists); + return this; + } + + /** + * Indicates if the part exists. + */ + public GetLibraryItemsPart withExists(Optional exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = exists; + return this; + } + + /** + * Unique part identifier. + */ + public GetLibraryItemsPart withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Key to access this part. + */ public GetLibraryItemsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public GetLibraryItemsPart withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + public GetLibraryItemsPart withIndexes(String indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = Optional.ofNullable(indexes); + return this; + } + + public GetLibraryItemsPart withIndexes(Optional indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = indexes; + return this; + } + + /** + * Duration of the part in milliseconds. + */ public GetLibraryItemsPart withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the part in milliseconds. + */ public GetLibraryItemsPart withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * File path for the part. + */ public GetLibraryItemsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public GetLibraryItemsPart withFile(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } + /** + * File size in bytes. + */ public GetLibraryItemsPart withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public GetLibraryItemsPart withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + public GetLibraryItemsPart withPacketLength(int packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = Optional.ofNullable(packetLength); + return this; + } + + public GetLibraryItemsPart withPacketLength(Optional packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = packetLength; + return this; + } + /** - * The container format of the media file. + * Container format of the part. */ public GetLibraryItemsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the part. + */ + public GetLibraryItemsPart withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Video profile for the part. + */ + public GetLibraryItemsPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + /** + * Video profile for the part. + */ + public GetLibraryItemsPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public GetLibraryItemsPart withAudioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public GetLibraryItemsPart withAudioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; @@ -268,42 +489,24 @@ public class GetLibraryItemsPart { return this; } - public GetLibraryItemsPart withOptimizedForStreaming(boolean optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public GetLibraryItemsPart withOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public GetLibraryItemsPart withOptimizedForStreaming(Optional optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public GetLibraryItemsPart withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } - public GetLibraryItemsPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - public GetLibraryItemsPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public GetLibraryItemsPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public GetLibraryItemsPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - public GetLibraryItemsPart withHasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); @@ -316,18 +519,6 @@ public class GetLibraryItemsPart { return this; } - public GetLibraryItemsPart withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - public GetLibraryItemsPart withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - @Override public boolean equals(java.lang.Object o) { @@ -339,140 +530,288 @@ public class GetLibraryItemsPart { } GetLibraryItemsPart other = (GetLibraryItemsPart) o; return + Objects.deepEquals(this.accessible, other.accessible) && + Objects.deepEquals(this.exists, other.exists) && Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.indexes, other.indexes) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.file, other.file) && Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.packetLength, other.packetLength) && Objects.deepEquals(this.container, other.container) && + Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Objects.deepEquals(this.videoProfile, other.videoProfile) && - Objects.deepEquals(this.indexes, other.indexes) && - Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && - Objects.deepEquals(this.stream, other.stream); + Objects.deepEquals(this.hasThumbnail, other.hasThumbnail); } @Override public int hashCode() { return Objects.hash( + accessible, + exists, id, key, + indexes, duration, file, size, + packetLength, container, + videoProfile, audioProfile, has64bitOffsets, optimizedForStreaming, - videoProfile, - indexes, - hasThumbnail, - stream); + hasThumbnail); } @Override public String toString() { return Utils.toString(GetLibraryItemsPart.class, + "accessible", accessible, + "exists", exists, "id", id, "key", key, + "indexes", indexes, "duration", duration, "file", file, "size", size, + "packetLength", packetLength, "container", container, + "videoProfile", videoProfile, "audioProfile", audioProfile, "has64bitOffsets", has64bitOffsets, "optimizedForStreaming", optimizedForStreaming, - "videoProfile", videoProfile, - "indexes", indexes, - "hasThumbnail", hasThumbnail, - "stream", stream); + "hasThumbnail", hasThumbnail); } public final static class Builder { - private Integer id; + private Optional accessible = Optional.empty(); - private String key; + private Optional exists = Optional.empty(); + + private Long id; + + private Optional key = Optional.empty(); + + private Optional indexes = Optional.empty(); private Optional duration = Optional.empty(); - private String file; + private Optional file = Optional.empty(); - private Long size; + private Optional size = Optional.empty(); - private String container; + private Optional packetLength = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoProfile = Optional.empty(); private Optional audioProfile = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); - private Optional optimizedForStreaming = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional indexes = Optional.empty(); + private Optional optimizedForStreaming = Optional.empty(); private Optional hasThumbnail; - - private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(int id) { + /** + * Indicates if the part is accessible. + */ + public Builder accessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = Optional.ofNullable(accessible); + return this; + } + + /** + * Indicates if the part is accessible. + */ + public Builder accessible(Optional accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Indicates if the part exists. + */ + public Builder exists(boolean exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = Optional.ofNullable(exists); + return this; + } + + /** + * Indicates if the part exists. + */ + public Builder exists(Optional exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = exists; + return this; + } + + /** + * Unique part identifier. + */ + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Key to access this part. + */ public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + public Builder indexes(String indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = Optional.ofNullable(indexes); + return this; + } + + public Builder indexes(Optional indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = indexes; + return this; + } + + /** + * Duration of the part in milliseconds. + */ public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the part in milliseconds. + */ public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * File path for the part. + */ public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public Builder file(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } + /** + * File size in bytes. + */ public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + public Builder packetLength(int packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = Optional.ofNullable(packetLength); + return this; + } + + public Builder packetLength(Optional packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = packetLength; + return this; + } + /** - * The container format of the media file. + * Container format of the part. */ public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the part. + */ + public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Video profile for the part. + */ + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + /** + * Video profile for the part. + */ + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public Builder audioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public Builder audioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; @@ -491,42 +830,24 @@ public class GetLibraryItemsPart { return this; } - public Builder optimizedForStreaming(boolean optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public Builder optimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public Builder optimizedForStreaming(Optional optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - public Builder hasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); @@ -538,37 +859,27 @@ public class GetLibraryItemsPart { this.hasThumbnail = hasThumbnail; return this; } - - public Builder stream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - public Builder stream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } public GetLibraryItemsPart build() { if (hasThumbnail == null) { hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); } return new GetLibraryItemsPart( + accessible, + exists, id, key, + indexes, duration, file, size, + packetLength, container, + videoProfile, audioProfile, has64bitOffsets, optimizedForStreaming, - videoProfile, - indexes, - hasThumbnail, - stream); + hasThumbnail); } private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java new file mode 100644 index 00000000..f8139843 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java @@ -0,0 +1,353 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class GetLibraryItemsProducer { + + /** + * The unique role identifier. + */ + @JsonProperty("id") + private long id; + + /** + * The filter string for the role. + */ + @JsonProperty("filter") + private String filter; + + /** + * The actor's name. + */ + @JsonProperty("tag") + private String tag; + + /** + * A key associated with the actor tag. + */ + @JsonProperty("tagKey") + private String tagKey; + + /** + * The character name or role. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("role") + private Optional role; + + /** + * URL for the role thumbnail image. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonCreator + public GetLibraryItemsProducer( + @JsonProperty("id") long id, + @JsonProperty("filter") String filter, + @JsonProperty("tag") String tag, + @JsonProperty("tagKey") String tagKey, + @JsonProperty("role") Optional role, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagKey = tagKey; + this.role = role; + this.thumb = thumb; + } + + public GetLibraryItemsProducer( + long id, + String filter, + String tag, + String tagKey) { + this(id, filter, tag, tagKey, Optional.empty(), Optional.empty()); + } + + /** + * The unique role identifier. + */ + @JsonIgnore + public long id() { + return id; + } + + /** + * The filter string for the role. + */ + @JsonIgnore + public String filter() { + return filter; + } + + /** + * The actor's name. + */ + @JsonIgnore + public String tag() { + return tag; + } + + /** + * A key associated with the actor tag. + */ + @JsonIgnore + public String tagKey() { + return tagKey; + } + + /** + * The character name or role. + */ + @JsonIgnore + public Optional role() { + return role; + } + + /** + * URL for the role thumbnail image. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The unique role identifier. + */ + public GetLibraryItemsProducer withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string for the role. + */ + public GetLibraryItemsProducer withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * The actor's name. + */ + public GetLibraryItemsProducer withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * A key associated with the actor tag. + */ + public GetLibraryItemsProducer withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The character name or role. + */ + public GetLibraryItemsProducer withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The character name or role. + */ + public GetLibraryItemsProducer withRole(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * URL for the role thumbnail image. + */ + public GetLibraryItemsProducer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * URL for the role thumbnail image. + */ + public GetLibraryItemsProducer withThumb(Optional 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; + } + GetLibraryItemsProducer other = (GetLibraryItemsProducer) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.filter, other.filter) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.tagKey, other.tagKey) && + Objects.deepEquals(this.role, other.role) && + Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + filter, + tag, + tagKey, + role, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsProducer.class, + "id", id, + "filter", filter, + "tag", tag, + "tagKey", tagKey, + "role", role, + "thumb", thumb); + } + + public final static class Builder { + + private Long id; + + private String filter; + + private String tag; + + private String tagKey; + + private Optional role = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The unique role identifier. + */ + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string for the role. + */ + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * The actor's name. + */ + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * A key associated with the actor tag. + */ + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The character name or role. + */ + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The character name or role. + */ + public Builder role(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * URL for the role thumbnail image. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * URL for the role thumbnail image. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibraryItemsProducer build() { + return new GetLibraryItemsProducer( + id, + filter, + tag, + tagKey, + role, + thumb); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java index 5ac431fd..2445b477 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java @@ -9,7 +9,7 @@ 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.Long; +import java.lang.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -18,217 +18,112 @@ import java.util.Optional; public class GetLibraryItemsRole { /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; + private int id; /** - * The filter used to find the actor or tag. + * The display tag for the actor (typically the actor's name). */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - /** - * The thumbnail of the actor - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - /** - * The name of the tag or actor. - */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("tag") - private Optional tag; + private String tag; /** - * Unique identifier for the tag. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("role") private Optional role; + /** + * The absolute URL of the thumbnail image for the actor. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + @JsonCreator public GetLibraryItemsRole( - @JsonProperty("id") Optional id, - @JsonProperty("filter") Optional filter, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("tag") Optional tag, - @JsonProperty("tagKey") Optional tagKey, - @JsonProperty("role") Optional role) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("role") Optional role, + @JsonProperty("thumb") Optional thumb) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); Utils.checkNotNull(role, "role"); + Utils.checkNotNull(thumb, "thumb"); this.id = id; - this.filter = filter; - this.thumb = thumb; this.tag = tag; - this.tagKey = tagKey; this.role = role; + this.thumb = thumb; } - public GetLibraryItemsRole() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public GetLibraryItemsRole( + int id, + String tag) { + this(id, tag, Optional.empty(), Optional.empty()); } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ @JsonIgnore - public Optional id() { + public int id() { return id; } /** - * The filter used to find the actor or tag. + * The display tag for the actor (typically the actor's name). */ @JsonIgnore - public Optional filter() { - return filter; - } - - /** - * The thumbnail of the actor - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - /** - * The name of the tag or actor. - */ - @JsonIgnore - public Optional tag() { + public String tag() { return tag; } /** - * Unique identifier for the tag. - */ - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ @JsonIgnore public Optional role() { return role; } + /** + * The absolute URL of the thumbnail image for the actor. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - public GetLibraryItemsRole withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * The ID of the tag or actor. - */ - public GetLibraryItemsRole withId(Optional id) { + public GetLibraryItemsRole withId(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** - * The filter used to find the actor or tag. - */ - public GetLibraryItemsRole withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * The filter used to find the actor or tag. - */ - public GetLibraryItemsRole withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The thumbnail of the actor - */ - public GetLibraryItemsRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The thumbnail of the actor - */ - public GetLibraryItemsRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The name of the tag or actor. + * The display tag for the actor (typically the actor's name). */ public GetLibraryItemsRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - /** - * The name of the tag or actor. - */ - public GetLibraryItemsRole withTag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** - * Unique identifier for the tag. - */ - public GetLibraryItemsRole withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * Unique identifier for the tag. - */ - public GetLibraryItemsRole withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public GetLibraryItemsRole withRole(String role) { Utils.checkNotNull(role, "role"); @@ -237,7 +132,7 @@ public class GetLibraryItemsRole { } /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public GetLibraryItemsRole withRole(Optional role) { Utils.checkNotNull(role, "role"); @@ -245,6 +140,24 @@ public class GetLibraryItemsRole { return this; } + /** + * The absolute URL of the thumbnail image for the actor. + */ + public GetLibraryItemsRole withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public GetLibraryItemsRole withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -257,145 +170,64 @@ public class GetLibraryItemsRole { GetLibraryItemsRole other = (GetLibraryItemsRole) o; return Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.filter, other.filter) && - Objects.deepEquals(this.thumb, other.thumb) && Objects.deepEquals(this.tag, other.tag) && - Objects.deepEquals(this.tagKey, other.tagKey) && - Objects.deepEquals(this.role, other.role); + Objects.deepEquals(this.role, other.role) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( id, - filter, - thumb, tag, - tagKey, - role); + role, + thumb); } @Override public String toString() { return Utils.toString(GetLibraryItemsRole.class, "id", id, - "filter", filter, - "thumb", thumb, "tag", tag, - "tagKey", tagKey, - "role", role); + "role", role, + "thumb", thumb); } public final static class Builder { - private Optional id = Optional.empty(); + private Integer id; - private Optional filter = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional tag = Optional.empty(); - - private Optional tagKey = Optional.empty(); + private String tag; private Optional role = Optional.empty(); + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * The ID of the tag or actor. - */ - public Builder id(Optional id) { + public Builder id(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** - * The filter used to find the actor or tag. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * The filter used to find the actor or tag. - */ - public Builder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The thumbnail of the actor - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The thumbnail of the actor - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The name of the tag or actor. + * The display tag for the actor (typically the actor's name). */ public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - /** - * The name of the tag or actor. - */ - public Builder tag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** - * Unique identifier for the tag. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * Unique identifier for the tag. - */ - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public Builder role(String role) { Utils.checkNotNull(role, "role"); @@ -404,22 +236,38 @@ public class GetLibraryItemsRole { } /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public Builder role(Optional role) { Utils.checkNotNull(role, "role"); this.role = role; return this; } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetLibraryItemsRole build() { return new GetLibraryItemsRole( id, - filter, - thumb, tag, - tagKey, - role); + role, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java new file mode 100644 index 00000000..8eb13128 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java @@ -0,0 +1,181 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +public class GetLibraryItemsSimilar { + + /** + * The unique similar item identifier. + */ + @JsonProperty("id") + private long id; + + /** + * The filter string for similar items. + */ + @JsonProperty("filter") + private String filter; + + /** + * The tag or title of the similar content. + */ + @JsonProperty("tag") + private String tag; + + @JsonCreator + public GetLibraryItemsSimilar( + @JsonProperty("id") long id, + @JsonProperty("filter") String filter, + @JsonProperty("tag") String tag) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + this.id = id; + this.filter = filter; + this.tag = tag; + } + + /** + * The unique similar item identifier. + */ + @JsonIgnore + public long id() { + return id; + } + + /** + * The filter string for similar items. + */ + @JsonIgnore + public String filter() { + return filter; + } + + /** + * The tag or title of the similar content. + */ + @JsonIgnore + public String tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The unique similar item identifier. + */ + public GetLibraryItemsSimilar withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string for similar items. + */ + public GetLibraryItemsSimilar withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * The tag or title of the similar content. + */ + public GetLibraryItemsSimilar withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsSimilar other = (GetLibraryItemsSimilar) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.filter, other.filter) && + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + filter, + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsSimilar.class, + "id", id, + "filter", filter, + "tag", tag); + } + + public final static class Builder { + + private Long id; + + private String filter; + + private String tag; + + private Builder() { + // force use of static builder() method + } + + /** + * The unique similar item identifier. + */ + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string for similar items. + */ + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * The tag or title of the similar content. + */ + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsSimilar build() { + return new GetLibraryItemsSimilar( + id, + filter, + tag); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java deleted file mode 100644 index 30cf46f0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java +++ /dev/null @@ -1,2209 +0,0 @@ -/* - * 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.Double; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -public class GetLibraryItemsStream { - - @JsonProperty("id") - private long id; - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - @JsonProperty("streamType") - private long streamType; - - /** - * Indicates if this is the default stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - /** - * Indicates if the stream is selected - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - /** - * Codec used by the stream - */ - @JsonProperty("codec") - private String codec; - - /** - * The index of the stream - */ - @JsonProperty("index") - private long index; - - /** - * The bitrate of the stream in kbps - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * The color primaries of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorPrimaries") - private Optional colorPrimaries; - - /** - * The color range of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorRange") - private Optional colorRange; - - /** - * The color space of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorSpace") - private Optional colorSpace; - - /** - * The transfer characteristics (TRC) of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorTrc") - private Optional colorTrc; - - /** - * The bit depth of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - /** - * The chroma location of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - /** - * The identifier of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamIdentifier") - private Optional streamIdentifier; - - /** - * The chroma subsampling format - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - /** - * The coded height of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - /** - * The coded width of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; - - /** - * The frame rate of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("frameRate") - private Optional frameRate; - - /** - * Indicates if the stream has a scaling matrix - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasScalingMatrix") - private Optional hasScalingMatrix; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hearingImpaired") - private Optional hearingImpaired; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("closedCaptions") - private Optional closedCaptions; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("embeddedInVideo") - private Optional embeddedInVideo; - - /** - * The height of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * The level of the video codec - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; - - /** - * The profile of the video codec - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - /** - * Number of reference frames - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refFrames") - private Optional refFrames; - - /** - * The scan type (progressive or interlaced) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanType") - private Optional scanType; - - /** - * The width of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Display title of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayTitle") - private Optional displayTitle; - - /** - * Extended display title of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("extendedDisplayTitle") - private Optional extendedDisplayTitle; - - /** - * Number of audio channels (for audio streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - /** - * The language of the stream (for audio/subtitle streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - /** - * Language tag of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageTag") - private Optional languageTag; - - /** - * Language code of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageCode") - private Optional languageCode; - - /** - * The audio channel layout - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - /** - * Sampling rate of the audio stream in Hz - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - /** - * Title of the subtitle track (for subtitle streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - /** - * Indicates if the subtitle stream can auto-sync - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canAutoSync") - private Optional canAutoSync; - - @JsonCreator - public GetLibraryItemsStream( - @JsonProperty("id") long id, - @JsonProperty("streamType") long streamType, - @JsonProperty("default") Optional default_, - @JsonProperty("selected") Optional selected, - @JsonProperty("codec") String codec, - @JsonProperty("index") long index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("colorPrimaries") Optional colorPrimaries, - @JsonProperty("colorRange") Optional colorRange, - @JsonProperty("colorSpace") Optional colorSpace, - @JsonProperty("colorTrc") Optional colorTrc, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("streamIdentifier") Optional streamIdentifier, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, - @JsonProperty("frameRate") Optional frameRate, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("hearingImpaired") Optional hearingImpaired, - @JsonProperty("closedCaptions") Optional closedCaptions, - @JsonProperty("embeddedInVideo") Optional embeddedInVideo, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("profile") Optional profile, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("scanType") Optional scanType, - @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") Optional displayTitle, - @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, - @JsonProperty("channels") Optional channels, - @JsonProperty("language") Optional language, - @JsonProperty("languageTag") Optional languageTag, - @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("title") Optional title, - @JsonProperty("canAutoSync") Optional canAutoSync) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(streamType, "streamType"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - Utils.checkNotNull(colorRange, "colorRange"); - Utils.checkNotNull(colorSpace, "colorSpace"); - Utils.checkNotNull(colorTrc, "colorTrc"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); - Utils.checkNotNull(frameRate, "frameRate"); - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - Utils.checkNotNull(closedCaptions, "closedCaptions"); - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(refFrames, "refFrames"); - Utils.checkNotNull(scanType, "scanType"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(languageTag, "languageTag"); - Utils.checkNotNull(languageCode, "languageCode"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.id = id; - this.streamType = streamType; - this.default_ = default_; - this.selected = selected; - this.codec = codec; - this.index = index; - this.bitrate = bitrate; - this.colorPrimaries = colorPrimaries; - this.colorRange = colorRange; - this.colorSpace = colorSpace; - this.colorTrc = colorTrc; - this.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.streamIdentifier = streamIdentifier; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; - this.frameRate = frameRate; - this.hasScalingMatrix = hasScalingMatrix; - this.hearingImpaired = hearingImpaired; - this.closedCaptions = closedCaptions; - this.embeddedInVideo = embeddedInVideo; - this.height = height; - this.level = level; - this.profile = profile; - this.refFrames = refFrames; - this.scanType = scanType; - this.width = width; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.channels = channels; - this.language = language; - this.languageTag = languageTag; - this.languageCode = languageCode; - this.audioChannelLayout = audioChannelLayout; - this.samplingRate = samplingRate; - this.title = title; - this.canAutoSync = canAutoSync; - } - - public GetLibraryItemsStream( - long id, - long streamType, - String codec, - long index) { - this(id, streamType, Optional.empty(), Optional.empty(), codec, index, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public long id() { - return id; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - @JsonIgnore - public long streamType() { - return streamType; - } - - /** - * Indicates if this is the default stream - */ - @JsonIgnore - public Optional default_() { - return default_; - } - - /** - * Indicates if the stream is selected - */ - @JsonIgnore - public Optional selected() { - return selected; - } - - /** - * Codec used by the stream - */ - @JsonIgnore - public String codec() { - return codec; - } - - /** - * The index of the stream - */ - @JsonIgnore - public long index() { - return index; - } - - /** - * The bitrate of the stream in kbps - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * The color primaries of the video stream - */ - @JsonIgnore - public Optional colorPrimaries() { - return colorPrimaries; - } - - /** - * The color range of the video stream - */ - @JsonIgnore - public Optional colorRange() { - return colorRange; - } - - /** - * The color space of the video stream - */ - @JsonIgnore - public Optional colorSpace() { - return colorSpace; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - @JsonIgnore - public Optional colorTrc() { - return colorTrc; - } - - /** - * The bit depth of the video stream - */ - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - /** - * The chroma location of the video stream - */ - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - /** - * The identifier of the video stream - */ - @JsonIgnore - public Optional streamIdentifier() { - return streamIdentifier; - } - - /** - * The chroma subsampling format - */ - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - /** - * The coded height of the video stream - */ - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - /** - * The coded width of the video stream - */ - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - - /** - * The frame rate of the video stream - */ - @JsonIgnore - public Optional frameRate() { - return frameRate; - } - - /** - * Indicates if the stream has a scaling matrix - */ - @JsonIgnore - public Optional hasScalingMatrix() { - return hasScalingMatrix; - } - - @JsonIgnore - public Optional hearingImpaired() { - return hearingImpaired; - } - - @JsonIgnore - public Optional closedCaptions() { - return closedCaptions; - } - - @JsonIgnore - public Optional embeddedInVideo() { - return embeddedInVideo; - } - - /** - * The height of the video stream - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * The level of the video codec - */ - @JsonIgnore - public Optional level() { - return level; - } - - /** - * The profile of the video codec - */ - @JsonIgnore - public Optional profile() { - return profile; - } - - /** - * Number of reference frames - */ - @JsonIgnore - public Optional refFrames() { - return refFrames; - } - - /** - * The scan type (progressive or interlaced) - */ - @JsonIgnore - public Optional scanType() { - return scanType; - } - - /** - * The width of the video stream - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Display title of the stream - */ - @JsonIgnore - public Optional displayTitle() { - return displayTitle; - } - - /** - * Extended display title of the stream - */ - @JsonIgnore - public Optional extendedDisplayTitle() { - return extendedDisplayTitle; - } - - /** - * Number of audio channels (for audio streams) - */ - @JsonIgnore - public Optional channels() { - return channels; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - @JsonIgnore - public Optional language() { - return language; - } - - /** - * Language tag of the stream - */ - @JsonIgnore - public Optional languageTag() { - return languageTag; - } - - /** - * Language code of the stream - */ - @JsonIgnore - public Optional languageCode() { - return languageCode; - } - - /** - * The audio channel layout - */ - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - /** - * Sampling rate of the audio stream in Hz - */ - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - @JsonIgnore - public Optional title() { - return title; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - @JsonIgnore - public Optional canAutoSync() { - return canAutoSync; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsStream withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - public GetLibraryItemsStream withStreamType(long streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - - /** - * Indicates if this is the default stream - */ - public GetLibraryItemsStream withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this is the default stream - */ - public GetLibraryItemsStream withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Indicates if the stream is selected - */ - public GetLibraryItemsStream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if the stream is selected - */ - public GetLibraryItemsStream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * Codec used by the stream - */ - public GetLibraryItemsStream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * The index of the stream - */ - public GetLibraryItemsStream withIndex(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public GetLibraryItemsStream withBitrate(long bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public GetLibraryItemsStream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * The color primaries of the video stream - */ - public GetLibraryItemsStream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * The color primaries of the video stream - */ - public GetLibraryItemsStream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * The color range of the video stream - */ - public GetLibraryItemsStream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * The color range of the video stream - */ - public GetLibraryItemsStream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * The color space of the video stream - */ - public GetLibraryItemsStream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * The color space of the video stream - */ - public GetLibraryItemsStream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public GetLibraryItemsStream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public GetLibraryItemsStream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * The bit depth of the video stream - */ - public GetLibraryItemsStream withBitDepth(long bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * The bit depth of the video stream - */ - public GetLibraryItemsStream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * The chroma location of the video stream - */ - public GetLibraryItemsStream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * The chroma location of the video stream - */ - public GetLibraryItemsStream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * The identifier of the video stream - */ - public GetLibraryItemsStream withStreamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - /** - * The identifier of the video stream - */ - public GetLibraryItemsStream withStreamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - /** - * The chroma subsampling format - */ - public GetLibraryItemsStream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * The chroma subsampling format - */ - public GetLibraryItemsStream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * The coded height of the video stream - */ - public GetLibraryItemsStream withCodedHeight(long codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * The coded height of the video stream - */ - public GetLibraryItemsStream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * The coded width of the video stream - */ - public GetLibraryItemsStream withCodedWidth(long codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * The coded width of the video stream - */ - public GetLibraryItemsStream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - /** - * The frame rate of the video stream - */ - public GetLibraryItemsStream withFrameRate(double frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * The frame rate of the video stream - */ - public GetLibraryItemsStream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public GetLibraryItemsStream withHasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public GetLibraryItemsStream withHasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public GetLibraryItemsStream withHearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - public GetLibraryItemsStream withHearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - public GetLibraryItemsStream withClosedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - public GetLibraryItemsStream withClosedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - public GetLibraryItemsStream withEmbeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - public GetLibraryItemsStream withEmbeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * The height of the video stream - */ - public GetLibraryItemsStream withHeight(long height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * The height of the video stream - */ - public GetLibraryItemsStream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * The level of the video codec - */ - public GetLibraryItemsStream withLevel(long level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * The level of the video codec - */ - public GetLibraryItemsStream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * The profile of the video codec - */ - public GetLibraryItemsStream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * The profile of the video codec - */ - public GetLibraryItemsStream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * Number of reference frames - */ - public GetLibraryItemsStream withRefFrames(long refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - /** - * Number of reference frames - */ - public GetLibraryItemsStream withRefFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public GetLibraryItemsStream withScanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public GetLibraryItemsStream withScanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - /** - * The width of the video stream - */ - public GetLibraryItemsStream withWidth(long width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * The width of the video stream - */ - public GetLibraryItemsStream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title of the stream - */ - public GetLibraryItemsStream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - /** - * Display title of the stream - */ - public GetLibraryItemsStream withDisplayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title of the stream - */ - public GetLibraryItemsStream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - /** - * Extended display title of the stream - */ - public GetLibraryItemsStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public GetLibraryItemsStream withChannels(long channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public GetLibraryItemsStream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public GetLibraryItemsStream withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public GetLibraryItemsStream withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag of the stream - */ - public GetLibraryItemsStream withLanguageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag of the stream - */ - public GetLibraryItemsStream withLanguageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * Language code of the stream - */ - public GetLibraryItemsStream withLanguageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * Language code of the stream - */ - public GetLibraryItemsStream withLanguageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * The audio channel layout - */ - public GetLibraryItemsStream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * The audio channel layout - */ - public GetLibraryItemsStream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public GetLibraryItemsStream withSamplingRate(long samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public GetLibraryItemsStream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public GetLibraryItemsStream withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public GetLibraryItemsStream withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public GetLibraryItemsStream withCanAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public GetLibraryItemsStream withCanAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsStream other = (GetLibraryItemsStream) o; - return - Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.streamType, other.streamType) && - Objects.deepEquals(this.default_, other.default_) && - Objects.deepEquals(this.selected, other.selected) && - Objects.deepEquals(this.codec, other.codec) && - Objects.deepEquals(this.index, other.index) && - Objects.deepEquals(this.bitrate, other.bitrate) && - Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) && - Objects.deepEquals(this.colorRange, other.colorRange) && - Objects.deepEquals(this.colorSpace, other.colorSpace) && - Objects.deepEquals(this.colorTrc, other.colorTrc) && - Objects.deepEquals(this.bitDepth, other.bitDepth) && - Objects.deepEquals(this.chromaLocation, other.chromaLocation) && - Objects.deepEquals(this.streamIdentifier, other.streamIdentifier) && - Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Objects.deepEquals(this.codedHeight, other.codedHeight) && - Objects.deepEquals(this.codedWidth, other.codedWidth) && - Objects.deepEquals(this.frameRate, other.frameRate) && - Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && - Objects.deepEquals(this.hearingImpaired, other.hearingImpaired) && - Objects.deepEquals(this.closedCaptions, other.closedCaptions) && - Objects.deepEquals(this.embeddedInVideo, other.embeddedInVideo) && - Objects.deepEquals(this.height, other.height) && - Objects.deepEquals(this.level, other.level) && - Objects.deepEquals(this.profile, other.profile) && - Objects.deepEquals(this.refFrames, other.refFrames) && - Objects.deepEquals(this.scanType, other.scanType) && - Objects.deepEquals(this.width, other.width) && - Objects.deepEquals(this.displayTitle, other.displayTitle) && - Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Objects.deepEquals(this.channels, other.channels) && - Objects.deepEquals(this.language, other.language) && - Objects.deepEquals(this.languageTag, other.languageTag) && - Objects.deepEquals(this.languageCode, other.languageCode) && - Objects.deepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Objects.deepEquals(this.samplingRate, other.samplingRate) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.canAutoSync, other.canAutoSync); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - streamType, - default_, - selected, - codec, - index, - bitrate, - colorPrimaries, - colorRange, - colorSpace, - colorTrc, - bitDepth, - chromaLocation, - streamIdentifier, - chromaSubsampling, - codedHeight, - codedWidth, - frameRate, - hasScalingMatrix, - hearingImpaired, - closedCaptions, - embeddedInVideo, - height, - level, - profile, - refFrames, - scanType, - width, - displayTitle, - extendedDisplayTitle, - channels, - language, - languageTag, - languageCode, - audioChannelLayout, - samplingRate, - title, - canAutoSync); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsStream.class, - "id", id, - "streamType", streamType, - "default_", default_, - "selected", selected, - "codec", codec, - "index", index, - "bitrate", bitrate, - "colorPrimaries", colorPrimaries, - "colorRange", colorRange, - "colorSpace", colorSpace, - "colorTrc", colorTrc, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "streamIdentifier", streamIdentifier, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, - "frameRate", frameRate, - "hasScalingMatrix", hasScalingMatrix, - "hearingImpaired", hearingImpaired, - "closedCaptions", closedCaptions, - "embeddedInVideo", embeddedInVideo, - "height", height, - "level", level, - "profile", profile, - "refFrames", refFrames, - "scanType", scanType, - "width", width, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "channels", channels, - "language", language, - "languageTag", languageTag, - "languageCode", languageCode, - "audioChannelLayout", audioChannelLayout, - "samplingRate", samplingRate, - "title", title, - "canAutoSync", canAutoSync); - } - - public final static class Builder { - - private Long id; - - private Long streamType; - - private Optional default_ = Optional.empty(); - - private Optional selected = Optional.empty(); - - private String codec; - - private Long index; - - private Optional bitrate = Optional.empty(); - - private Optional colorPrimaries = Optional.empty(); - - private Optional colorRange = Optional.empty(); - - private Optional colorSpace = Optional.empty(); - - private Optional colorTrc = Optional.empty(); - - private Optional bitDepth = Optional.empty(); - - private Optional chromaLocation = Optional.empty(); - - private Optional streamIdentifier = Optional.empty(); - - private Optional chromaSubsampling = Optional.empty(); - - private Optional codedHeight = Optional.empty(); - - private Optional codedWidth = Optional.empty(); - - private Optional frameRate = Optional.empty(); - - private Optional hasScalingMatrix = Optional.empty(); - - private Optional hearingImpaired = Optional.empty(); - - private Optional closedCaptions = Optional.empty(); - - private Optional embeddedInVideo = Optional.empty(); - - private Optional height = Optional.empty(); - - private Optional level = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional refFrames = Optional.empty(); - - private Optional scanType = Optional.empty(); - - private Optional width = Optional.empty(); - - private Optional displayTitle = Optional.empty(); - - private Optional extendedDisplayTitle = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional languageTag = Optional.empty(); - - private Optional languageCode = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional canAutoSync = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - public Builder streamType(long streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - - /** - * Indicates if this is the default stream - */ - public Builder default_(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this is the default stream - */ - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Indicates if the stream is selected - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if the stream is selected - */ - public Builder selected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * Codec used by the stream - */ - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * The index of the stream - */ - public Builder index(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public Builder bitrate(long bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * The color primaries of the video stream - */ - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * The color primaries of the video stream - */ - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * The color range of the video stream - */ - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * The color range of the video stream - */ - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * The color space of the video stream - */ - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * The color space of the video stream - */ - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * The bit depth of the video stream - */ - public Builder bitDepth(long bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * The bit depth of the video stream - */ - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * The chroma location of the video stream - */ - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * The chroma location of the video stream - */ - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * The identifier of the video stream - */ - public Builder streamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - /** - * The identifier of the video stream - */ - public Builder streamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - /** - * The chroma subsampling format - */ - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * The chroma subsampling format - */ - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * The coded height of the video stream - */ - public Builder codedHeight(long codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * The coded height of the video stream - */ - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * The coded width of the video stream - */ - public Builder codedWidth(long codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * The coded width of the video stream - */ - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - /** - * The frame rate of the video stream - */ - public Builder frameRate(double frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * The frame rate of the video stream - */ - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public Builder hasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public Builder hasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public Builder hearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - public Builder hearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - public Builder closedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - public Builder closedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - public Builder embeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - public Builder embeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * The height of the video stream - */ - public Builder height(long height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * The height of the video stream - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * The level of the video codec - */ - public Builder level(long level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * The level of the video codec - */ - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * The profile of the video codec - */ - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * The profile of the video codec - */ - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * Number of reference frames - */ - public Builder refFrames(long refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - /** - * Number of reference frames - */ - public Builder refFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public Builder scanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public Builder scanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - /** - * The width of the video stream - */ - public Builder width(long width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * The width of the video stream - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title of the stream - */ - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - /** - * Display title of the stream - */ - public Builder displayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title of the stream - */ - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - /** - * Extended display title of the stream - */ - public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public Builder channels(long channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public Builder channels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public Builder language(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag of the stream - */ - public Builder languageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag of the stream - */ - public Builder languageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * Language code of the stream - */ - public Builder languageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * Language code of the stream - */ - public Builder languageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * The audio channel layout - */ - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * The audio channel layout - */ - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public Builder samplingRate(long samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public Builder samplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public Builder canAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public Builder canAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - public GetLibraryItemsStream build() { - return new GetLibraryItemsStream( - id, - streamType, - default_, - selected, - codec, - index, - bitrate, - colorPrimaries, - colorRange, - colorSpace, - colorTrc, - bitDepth, - chromaLocation, - streamIdentifier, - chromaSubsampling, - codedHeight, - codedWidth, - frameRate, - hasScalingMatrix, - hearingImpaired, - closedCaptions, - embeddedInVideo, - height, - level, - profile, - refFrames, - scanType, - width, - displayTitle, - extendedDisplayTitle, - channels, - language, - languageTag, - languageCode, - audioChannelLayout, - samplingRate, - title, - canAutoSync); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java index c20fd06a..4ad02227 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java @@ -3,356 +3,214 @@ */ 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 com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.Objects; import java.util.Optional; +/** + *

Wrapper class for an "open" enum. "Open" enums are those that are expected + * to evolve (particularly with the addition of enum members over time). If an + * open enum is used then the appearance of unexpected enum values (say in a + * response from an updated an API) will not bring about a runtime error thus + * ensuring that non-updated client versions can continue to work without error. + * + *

Note that instances are immutable and are singletons (an internal thread-safe + * cache is maintained to ensure that). As a consequence instances created with the + * same value will satisfy reference equality (via {@code ==}). + * + *

This class is intended to emulate an enum (in terms of common usage and with + * reference equality) but with the ability to carry unknown values. Unfortunately + * Java does not permit the use of an instance in a switch expression but you can + * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). + * + */ +/** + * GetLibraryItemsType + * + *

The type of media content in the Plex library. This can represent videos, music, or photos. + */ +@JsonDeserialize(using = GetLibraryItemsType._Deserializer.class) +@JsonSerialize(using = GetLibraryItemsType._Serializer.class) public class GetLibraryItemsType { - @JsonProperty("key") - private String key; + public static final GetLibraryItemsType Movie = new GetLibraryItemsType("movie"); + public static final GetLibraryItemsType TvShow = new GetLibraryItemsType("show"); + public static final GetLibraryItemsType Season = new GetLibraryItemsType("season"); + public static final GetLibraryItemsType Episode = new GetLibraryItemsType("episode"); + public static final GetLibraryItemsType Artist = new GetLibraryItemsType("artist"); + public static final GetLibraryItemsType Album = new GetLibraryItemsType("album"); + public static final GetLibraryItemsType Track = new GetLibraryItemsType("track"); + public static final GetLibraryItemsType PhotoAlbum = new GetLibraryItemsType("photoalbum"); + public static final GetLibraryItemsType Photo = new GetLibraryItemsType("photo"); + public static final GetLibraryItemsType Collection = new GetLibraryItemsType("collection"); - @JsonProperty("type") - private String type; + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; + private final String value; - @JsonProperty("title") - private String title; - - @JsonProperty("active") - private boolean active; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Filter") - private Optional> filter; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Sort") - private Optional> sort; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Field") - private Optional> field; - - @JsonCreator - public GetLibraryItemsType( - @JsonProperty("key") String key, - @JsonProperty("type") String type, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("title") String title, - @JsonProperty("active") boolean active, - @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(field, "field"); - this.key = key; - this.type = type; - this.subtype = subtype; - this.title = title; - this.active = active; - this.filter = filter; - this.sort = sort; - this.field = field; - } - - public GetLibraryItemsType( - String key, - String type, - String title, - boolean active) { - this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty()); + private GetLibraryItemsType(String value) { + this.value = value; } - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public boolean active() { - return active; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> filter() { - return (Optional>) filter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> sort() { - return (Optional>) sort; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> field() { - return (Optional>) field; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetLibraryItemsType withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsType withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - public GetLibraryItemsType withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - public GetLibraryItemsType withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsType withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public GetLibraryItemsType withFilter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public GetLibraryItemsType withFilter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryItemsType withSort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public GetLibraryItemsType withSort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetLibraryItemsType withField(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public GetLibraryItemsType withField(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; + /** + * Returns a GetLibraryItemsType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as GetLibraryItemsType + */ + public static GetLibraryItemsType of(String value) { + synchronized (GetLibraryItemsType.class) { + return values.computeIfAbsent(value, v -> new GetLibraryItemsType(v)); } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsType other = (GetLibraryItemsType) o; - return - Objects.deepEquals(this.key, other.key) && - Objects.deepEquals(this.type, other.type) && - Objects.deepEquals(this.subtype, other.subtype) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.active, other.active) && - Objects.deepEquals(this.filter, other.filter) && - Objects.deepEquals(this.sort, other.sort) && - Objects.deepEquals(this.field, other.field); } - + + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + @Override public int hashCode() { - return Objects.hash( - key, - type, - subtype, - title, - active, - filter, - sort, - field); + return Objects.hash(value); } - + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + GetLibraryItemsType other = (GetLibraryItemsType) obj; + return Objects.equals(value, other.value); + } + @Override public String toString() { - return Utils.toString(GetLibraryItemsType.class, - "key", key, - "type", type, - "subtype", subtype, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); + return "GetLibraryItemsType [value=" + value + "]"; + } + + // return an array just like an enum + public static GetLibraryItemsType[] values() { + synchronized (GetLibraryItemsType.class) { + return values.values().toArray(new GetLibraryItemsType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("movie", Movie); + map.put("show", TvShow); + map.put("season", Season); + map.put("episode", Episode); + map.put("artist", Artist); + map.put("album", Album); + map.put("track", Track); + map.put("photoalbum", PhotoAlbum); + map.put("photo", Photo); + map.put("collection", Collection); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("movie", GetLibraryItemsTypeEnum.Movie); + map.put("show", GetLibraryItemsTypeEnum.TvShow); + map.put("season", GetLibraryItemsTypeEnum.Season); + map.put("episode", GetLibraryItemsTypeEnum.Episode); + map.put("artist", GetLibraryItemsTypeEnum.Artist); + map.put("album", GetLibraryItemsTypeEnum.Album); + map.put("track", GetLibraryItemsTypeEnum.Track); + map.put("photoalbum", GetLibraryItemsTypeEnum.PhotoAlbum); + map.put("photo", GetLibraryItemsTypeEnum.Photo); + map.put("collection", GetLibraryItemsTypeEnum.Collection); + return map; } - public final static class Builder { - - private String key; - - private String type; - - private Optional subtype = Optional.empty(); - - private String title; - - private Boolean active; - - private Optional> filter = Optional.empty(); - - private Optional> sort = Optional.empty(); - - private Optional> field = Optional.empty(); - - private Builder() { - // force use of static builder() method + @SuppressWarnings("serial") + public static final class _Serializer extends StdSerializer { + + protected _Serializer() { + super(GetLibraryItemsType.class); } - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; + @Override + public void serialize(GetLibraryItemsType value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeObject(value.value); + } + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends StdDeserializer { + + protected _Deserializer() { + super(GetLibraryItemsType.class); } - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; + @Override + public GetLibraryItemsType deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String v = p.readValueAs(new TypeReference() {}); + // use the factory method to ensure we get singletons + return GetLibraryItemsType.of(v); + } + } + + public enum GetLibraryItemsTypeEnum { + + Movie("movie"), + TvShow("show"), + Season("season"), + Episode("episode"), + Artist("artist"), + Album("album"), + Track("track"), + PhotoAlbum("photoalbum"), + Photo("photo"), + Collection("collection"),; + + private final String value; + + private GetLibraryItemsTypeEnum(String value) { + this.value = value; } - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public Builder filter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public Builder filter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public Builder sort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public Builder sort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public Builder field(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public Builder field(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - public GetLibraryItemsType build() { - return new GetLibraryItemsType( - key, - type, - subtype, - title, - active, - filter, - sort, - field); + public String value() { + return value; } } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java index cad56832..5c4d5256 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java @@ -9,6 +9,7 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -16,42 +17,108 @@ import java.util.Optional; public class GetLibraryItemsWriter { - @JsonInclude(Include.NON_ABSENT) + /** + * Unique identifier for the writer. + */ + @JsonProperty("id") + private int id; + + /** + * The role of Writer + */ @JsonProperty("tag") - private Optional tag; + private String tag; + + /** + * The absolute URL of the thumbnail image for the writer. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; @JsonCreator public GetLibraryItemsWriter( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; this.tag = tag; + this.thumb = thumb; } - public GetLibraryItemsWriter() { - this(Optional.empty()); + public GetLibraryItemsWriter( + int id, + String tag) { + this(id, tag, Optional.empty()); } + /** + * Unique identifier for the writer. + */ @JsonIgnore - public Optional tag() { + public int id() { + return id; + } + + /** + * The role of Writer + */ + @JsonIgnore + public String tag() { return tag; } + /** + * The absolute URL of the thumbnail image for the writer. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } - public GetLibraryItemsWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the writer. + */ + public GetLibraryItemsWriter withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetLibraryItemsWriter withTag(Optional tag) { + /** + * The role of Writer + */ + public GetLibraryItemsWriter withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + /** + * The absolute URL of the thumbnail image for the writer. + */ + public GetLibraryItemsWriter withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public GetLibraryItemsWriter withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -63,44 +130,80 @@ public class GetLibraryItemsWriter { } GetLibraryItemsWriter other = (GetLibraryItemsWriter) o; return - Objects.deepEquals(this.tag, other.tag); + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( - tag); + id, + tag, + thumb); } @Override public String toString() { return Utils.toString(GetLibraryItemsWriter.class, - "tag", tag); + "id", id, + "tag", tag, + "thumb", thumb); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the writer. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The role of Writer + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetLibraryItemsWriter build() { return new GetLibraryItemsWriter( - tag); + id, + tag, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java index c580fed7..0e51f584 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java @@ -32,9 +32,9 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming { this.value = value; } - public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreaming1 value) { + public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreamingLibrary1 value) { Utils.checkNotNull(value, "value"); - return new GetLibrarySectionsAllLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + return new GetLibrarySectionsAllLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } public static GetLibrarySectionsAllLibraryOptimizedForStreaming of(boolean value) { @@ -45,7 +45,7 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming { /** * Returns an instance of one of these types: *

    - *
  • {@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreaming1}
  • + *
  • {@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1}
  • *
  • {@code boolean}
  • *
* @@ -87,7 +87,7 @@ public class GetLibrarySectionsAllLibraryOptimizedForStreaming { public _Deserializer() { super(GetLibrarySectionsAllLibraryOptimizedForStreaming.class, false, TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java index 83a9c79f..4e861039 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java @@ -66,14 +66,16 @@ public class GetLibrarySectionsAllMediaContainer { /** * The unique identifier for the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private long librarySectionID; + private Optional librarySectionID; /** * The title of the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionTitle") - private String librarySectionTitle; + private Optional librarySectionTitle; /** * The universally unique identifier for the library section. @@ -147,8 +149,8 @@ public class GetLibrarySectionsAllMediaContainer { @JsonProperty("art") String art, @JsonProperty("content") String content, @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionTitle") String librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, @JsonProperty("librarySectionUUID") Optional librarySectionUUID, @JsonProperty("mediaTagPrefix") String mediaTagPrefix, @JsonProperty("mediaTagVersion") long mediaTagVersion, @@ -207,8 +209,6 @@ public class GetLibrarySectionsAllMediaContainer { String art, String content, String identifier, - long librarySectionID, - String librarySectionTitle, String mediaTagPrefix, long mediaTagVersion, String thumb, @@ -216,7 +216,7 @@ public class GetLibrarySectionsAllMediaContainer { String title1, String title2, String viewGroup) { - this(size, totalSize, offset, allowSync, art, content, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, nocache, title1, title2, viewGroup, Optional.empty(), Optional.empty()); + this(size, totalSize, offset, allowSync, art, content, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, nocache, title1, title2, viewGroup, Optional.empty(), Optional.empty()); } /** @@ -279,7 +279,7 @@ public class GetLibrarySectionsAllMediaContainer { * The unique identifier for the library section. */ @JsonIgnore - public long librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } @@ -287,7 +287,7 @@ public class GetLibrarySectionsAllMediaContainer { * The title of the library section. */ @JsonIgnore - public String librarySectionTitle() { + public Optional librarySectionTitle() { return librarySectionTitle; } @@ -444,6 +444,15 @@ public class GetLibrarySectionsAllMediaContainer { * The unique identifier for the library section. */ public GetLibrarySectionsAllMediaContainer withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public GetLibrarySectionsAllMediaContainer withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -453,6 +462,15 @@ public class GetLibrarySectionsAllMediaContainer { * The title of the library section. */ public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -671,9 +689,9 @@ public class GetLibrarySectionsAllMediaContainer { private String identifier; - private Long librarySectionID; + private Optional librarySectionID = Optional.empty(); - private String librarySectionTitle; + private Optional librarySectionTitle = Optional.empty(); private Optional librarySectionUUID = Optional.empty(); @@ -766,6 +784,15 @@ public class GetLibrarySectionsAllMediaContainer { * The unique identifier for the library section. */ public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -775,6 +802,15 @@ public class GetLibrarySectionsAllMediaContainer { * The title of the library section. */ public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java index 1feb15fe..d4eb172b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java @@ -171,8 +171,9 @@ public class GetLibrarySectionsAllMetadata { /** * The original release date of the media item. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt; @JsonProperty("addedAt") private long addedAt; @@ -445,7 +446,7 @@ public class GetLibrarySectionsAllMetadata { @JsonProperty("childCount") int childCount, @JsonProperty("seasonCount") int seasonCount, @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, @JsonProperty("addedAt") long addedAt, @JsonProperty("updatedAt") Optional updatedAt, @JsonProperty("audienceRatingImage") Optional audienceRatingImage, @@ -635,9 +636,8 @@ public class GetLibrarySectionsAllMetadata { int childCount, int seasonCount, int duration, - LocalDate originallyAvailableAt, long addedAt) { - this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, originallyAvailableAt, addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -825,7 +825,7 @@ public class GetLibrarySectionsAllMetadata { * The original release date of the media item. */ @JsonIgnore - public LocalDate originallyAvailableAt() { + public Optional originallyAvailableAt() { return originallyAvailableAt; } @@ -1383,6 +1383,15 @@ public class GetLibrarySectionsAllMetadata { * The original release date of the media item. */ public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; @@ -2299,7 +2308,7 @@ public class GetLibrarySectionsAllMetadata { private Integer duration; - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt = Optional.empty(); private Long addedAt; @@ -2638,6 +2647,15 @@ public class GetLibrarySectionsAllMetadata { * The original release date of the media item. */ public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java index e12fb875..efb9fb7e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java @@ -32,9 +32,9 @@ public class GetLibrarySectionsAllOptimizedForStreaming { this.value = value; } - public static GetLibrarySectionsAllOptimizedForStreaming of(OptimizedForStreaming1 value) { + public static GetLibrarySectionsAllOptimizedForStreaming of(GetLibrarySectionsAllOptimizedForStreaming1 value) { Utils.checkNotNull(value, "value"); - return new GetLibrarySectionsAllOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + return new GetLibrarySectionsAllOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } public static GetLibrarySectionsAllOptimizedForStreaming of(boolean value) { @@ -45,7 +45,7 @@ public class GetLibrarySectionsAllOptimizedForStreaming { /** * Returns an instance of one of these types: *
    - *
  • {@code dev.plexapi.sdk.models.operations.OptimizedForStreaming1}
  • + *
  • {@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreaming1}
  • *
  • {@code boolean}
  • *
* @@ -87,7 +87,7 @@ public class GetLibrarySectionsAllOptimizedForStreaming { public _Deserializer() { super(GetLibrarySectionsAllOptimizedForStreaming.class, false, TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java new file mode 100644 index 00000000..b1145a95 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public enum GetLibrarySectionsAllOptimizedForStreamingLibrary1 { + ZERO(0), + ONE(1); + + @JsonValue + private final int value; + + private GetLibrarySectionsAllOptimizedForStreamingLibrary1(int value) { + this.value = value; + } + + public int value() { + return value; + } + + public static Optional fromValue(int value) { + for (GetLibrarySectionsAllOptimizedForStreamingLibrary1 o: GetLibrarySectionsAllOptimizedForStreamingLibrary1.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java index 1f53cdd9..3fe32634 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java @@ -8,6 +8,8 @@ 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 com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Float; @@ -28,12 +30,12 @@ public class GetLibrarySectionsAllStream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonProperty("streamType") - private GetLibrarySectionsAllStreamType streamType; + private long streamType; /** * Format of the stream (e.g., srt). @@ -363,7 +365,6 @@ public class GetLibrarySectionsAllStream { @JsonCreator public GetLibrarySectionsAllStream( @JsonProperty("id") long id, - @JsonProperty("streamType") GetLibrarySectionsAllStreamType streamType, @JsonProperty("format") Optional format, @JsonProperty("default") Optional default_, @JsonProperty("codec") String codec, @@ -414,7 +415,6 @@ public class GetLibrarySectionsAllStream { @JsonProperty("dub") Optional dub, @JsonProperty("title") Optional title) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(streamType, "streamType"); Utils.checkNotNull(format, "format"); Utils.checkNotNull(default_, "default_"); Utils.checkNotNull(codec, "codec"); @@ -465,7 +465,7 @@ public class GetLibrarySectionsAllStream { Utils.checkNotNull(dub, "dub"); Utils.checkNotNull(title, "title"); this.id = id; - this.streamType = streamType; + this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); this.format = format; this.default_ = default_; this.codec = codec; @@ -519,11 +519,10 @@ public class GetLibrarySectionsAllStream { public GetLibrarySectionsAllStream( long id, - GetLibrarySectionsAllStreamType streamType, String codec, String displayTitle, String extendedDisplayTitle) { - this(id, streamType, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -536,12 +535,12 @@ public class GetLibrarySectionsAllStream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonIgnore - public GetLibrarySectionsAllStreamType streamType() { + public long streamType() { return streamType; } @@ -935,18 +934,6 @@ public class GetLibrarySectionsAllStream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public GetLibrarySectionsAllStream withStreamType(GetLibrarySectionsAllStreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -1952,8 +1939,6 @@ public class GetLibrarySectionsAllStream { private Long id; - private GetLibrarySectionsAllStreamType streamType; - private Optional format = Optional.empty(); private Optional default_ = Optional.empty(); @@ -2065,18 +2050,6 @@ public class GetLibrarySectionsAllStream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public Builder streamType(GetLibrarySectionsAllStreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -2905,7 +2878,6 @@ public class GetLibrarySectionsAllStream { public GetLibrarySectionsAllStream build() { return new GetLibrarySectionsAllStream( id, - streamType, format, default_, codec, @@ -2956,5 +2928,11 @@ public class GetLibrarySectionsAllStream { dub, title); } + + private static final LazySingletonValue _SINGLETON_VALUE_StreamType = + new LazySingletonValue<>( + "streamType", + "1", + new TypeReference() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStreamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStreamType.java deleted file mode 100644 index 7d593763..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStreamType.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * GetLibrarySectionsAllStreamType - * - *

Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ -@JsonDeserialize(using = GetLibrarySectionsAllStreamType._Deserializer.class) -@JsonSerialize(using = GetLibrarySectionsAllStreamType._Serializer.class) -public class GetLibrarySectionsAllStreamType { - - public static final GetLibrarySectionsAllStreamType Video = new GetLibrarySectionsAllStreamType(1); - public static final GetLibrarySectionsAllStreamType Audio = new GetLibrarySectionsAllStreamType(2); - public static final GetLibrarySectionsAllStreamType Subtitle = new GetLibrarySectionsAllStreamType(3); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final int value; - - private GetLibrarySectionsAllStreamType(int value) { - this.value = value; - } - - /** - * Returns a GetLibrarySectionsAllStreamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibrarySectionsAllStreamType - */ - public static GetLibrarySectionsAllStreamType of(int value) { - synchronized (GetLibrarySectionsAllStreamType.class) { - return values.computeIfAbsent(value, v -> new GetLibrarySectionsAllStreamType(v)); - } - } - - public int value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibrarySectionsAllStreamType other = (GetLibrarySectionsAllStreamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibrarySectionsAllStreamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibrarySectionsAllStreamType[] values() { - synchronized (GetLibrarySectionsAllStreamType.class) { - return values.values().toArray(new GetLibrarySectionsAllStreamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1, Video); - map.put(2, Audio); - map.put(3, Subtitle); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1, GetLibrarySectionsAllStreamTypeEnum.Video); - map.put(2, GetLibrarySectionsAllStreamTypeEnum.Audio); - map.put(3, GetLibrarySectionsAllStreamTypeEnum.Subtitle); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibrarySectionsAllStreamType.class); - } - - @Override - public void serialize(GetLibrarySectionsAllStreamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibrarySectionsAllStreamType.class); - } - - @Override - public GetLibrarySectionsAllStreamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - int v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibrarySectionsAllStreamType.of(v); - } - } - - public enum GetLibrarySectionsAllStreamTypeEnum { - - Video(1), - Audio(2), - Subtitle(3),; - - private final int value; - - private GetLibrarySectionsAllStreamTypeEnum(int value) { - this.value = value; - } - - public int value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java new file mode 100644 index 00000000..15a801fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java @@ -0,0 +1,172 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMediaMetaDataAttributes + * + *

Attributes associated with the marker. + */ +public class GetMediaMetaDataAttributes { + + /** + * The identifier for the attributes. + */ + @JsonProperty("id") + private long id; + + /** + * The version number of the marker attributes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonCreator + public GetMediaMetaDataAttributes( + @JsonProperty("id") long id, + @JsonProperty("version") Optional version) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(version, "version"); + this.id = id; + this.version = version; + } + + public GetMediaMetaDataAttributes( + long id) { + this(id, Optional.empty()); + } + + /** + * The identifier for the attributes. + */ + @JsonIgnore + public long id() { + return id; + } + + /** + * The version number of the marker attributes. + */ + @JsonIgnore + public Optional version() { + return version; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The identifier for the attributes. + */ + public GetMediaMetaDataAttributes withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The version number of the marker attributes. + */ + public GetMediaMetaDataAttributes withVersion(long version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version number of the marker attributes. + */ + public GetMediaMetaDataAttributes withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaMetaDataAttributes other = (GetMediaMetaDataAttributes) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + version); + } + + @Override + public String toString() { + return Utils.toString(GetMediaMetaDataAttributes.class, + "id", id, + "version", version); + } + + public final static class Builder { + + private Long id; + + private Optional version = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier for the attributes. + */ + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The version number of the marker attributes. + */ + public Builder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version number of the marker attributes. + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public GetMediaMetaDataAttributes build() { + return new GetMediaMetaDataAttributes( + id, + version); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java new file mode 100644 index 00000000..ccd28d89 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java @@ -0,0 +1,237 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * GetMediaMetaDataChapter + * + *

The thumbnail for the chapter + */ +public class GetMediaMetaDataChapter { + + @JsonProperty("id") + private long id; + + @JsonProperty("filter") + private String filter; + + @JsonProperty("index") + private long index; + + @JsonProperty("startTimeOffset") + private long startTimeOffset; + + @JsonProperty("endTimeOffset") + private long endTimeOffset; + + @JsonProperty("thumb") + private String thumb; + + @JsonCreator + public GetMediaMetaDataChapter( + @JsonProperty("id") long id, + @JsonProperty("filter") String filter, + @JsonProperty("index") long index, + @JsonProperty("startTimeOffset") long startTimeOffset, + @JsonProperty("endTimeOffset") long endTimeOffset, + @JsonProperty("thumb") String thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.index = index; + this.startTimeOffset = startTimeOffset; + this.endTimeOffset = endTimeOffset; + this.thumb = thumb; + } + + @JsonIgnore + public long id() { + return id; + } + + @JsonIgnore + public String filter() { + return filter; + } + + @JsonIgnore + public long index() { + return index; + } + + @JsonIgnore + public long startTimeOffset() { + return startTimeOffset; + } + + @JsonIgnore + public long endTimeOffset() { + return endTimeOffset; + } + + @JsonIgnore + public String thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMediaMetaDataChapter withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMediaMetaDataChapter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMediaMetaDataChapter withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetMediaMetaDataChapter withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public GetMediaMetaDataChapter withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public GetMediaMetaDataChapter 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; + } + GetMediaMetaDataChapter other = (GetMediaMetaDataChapter) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.filter, other.filter) && + Objects.deepEquals(this.index, other.index) && + Objects.deepEquals(this.startTimeOffset, other.startTimeOffset) && + Objects.deepEquals(this.endTimeOffset, other.endTimeOffset) && + Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + filter, + index, + startTimeOffset, + endTimeOffset, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMediaMetaDataChapter.class, + "id", id, + "filter", filter, + "index", index, + "startTimeOffset", startTimeOffset, + "endTimeOffset", endTimeOffset, + "thumb", thumb); + } + + public final static class Builder { + + private Long id; + + private String filter; + + private Long index; + + private Long startTimeOffset; + + private Long endTimeOffset; + + private String thumb; + + private Builder() { + // force use of static builder() method + } + + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMediaMetaDataChapter build() { + return new GetMediaMetaDataChapter( + id, + filter, + index, + startTimeOffset, + endTimeOffset, + thumb); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java new file mode 100644 index 00000000..ea6365c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java @@ -0,0 +1,125 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class GetMediaMetaDataExtras { + + /** + * The size of the extras. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonCreator + public GetMediaMetaDataExtras( + @JsonProperty("size") Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + } + + public GetMediaMetaDataExtras() { + this(Optional.empty()); + } + + /** + * The size of the extras. + */ + @JsonIgnore + public Optional size() { + return size; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The size of the extras. + */ + public GetMediaMetaDataExtras withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The size of the extras. + */ + public GetMediaMetaDataExtras withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaMetaDataExtras other = (GetMediaMetaDataExtras) o; + return + Objects.deepEquals(this.size, other.size); + } + + @Override + public int hashCode() { + return Objects.hash( + size); + } + + @Override + public String toString() { + return Utils.toString(GetMediaMetaDataExtras.class, + "size", size); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The size of the extras. + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The size of the extras. + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetMediaMetaDataExtras build() { + return new GetMediaMetaDataExtras( + size); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java new file mode 100644 index 00000000..f0467634 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java @@ -0,0 +1,295 @@ +/* + * 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.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMediaMetaDataMarker + * + *

The final status of the marker + */ +public class GetMediaMetaDataMarker { + + @JsonProperty("id") + private long id; + + @JsonProperty("type") + private String type; + + @JsonProperty("startTimeOffset") + private long startTimeOffset; + + @JsonProperty("endTimeOffset") + private long endTimeOffset; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("final") + private Optional final_; + + /** + * Attributes associated with the marker. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Attributes") + private Optional attributes; + + @JsonCreator + public GetMediaMetaDataMarker( + @JsonProperty("id") long id, + @JsonProperty("type") String type, + @JsonProperty("startTimeOffset") long startTimeOffset, + @JsonProperty("endTimeOffset") long endTimeOffset, + @JsonProperty("final") Optional final_, + @JsonProperty("Attributes") Optional attributes) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(final_, "final_"); + Utils.checkNotNull(attributes, "attributes"); + this.id = id; + this.type = type; + this.startTimeOffset = startTimeOffset; + this.endTimeOffset = endTimeOffset; + this.final_ = final_; + this.attributes = attributes; + } + + public GetMediaMetaDataMarker( + long id, + String type, + long startTimeOffset, + long endTimeOffset) { + this(id, type, startTimeOffset, endTimeOffset, Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public long id() { + return id; + } + + @JsonIgnore + public String type() { + return type; + } + + @JsonIgnore + public long startTimeOffset() { + return startTimeOffset; + } + + @JsonIgnore + public long endTimeOffset() { + return endTimeOffset; + } + + @JsonIgnore + public Optional final_() { + return final_; + } + + /** + * Attributes associated with the marker. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional attributes() { + return (Optional) attributes; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMediaMetaDataMarker withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMediaMetaDataMarker withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetMediaMetaDataMarker withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public GetMediaMetaDataMarker withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public GetMediaMetaDataMarker withFinal(boolean final_) { + Utils.checkNotNull(final_, "final_"); + this.final_ = Optional.ofNullable(final_); + return this; + } + + public GetMediaMetaDataMarker withFinal(Optional final_) { + Utils.checkNotNull(final_, "final_"); + this.final_ = final_; + return this; + } + + /** + * Attributes associated with the marker. + */ + public GetMediaMetaDataMarker withAttributes(GetMediaMetaDataAttributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + * Attributes associated with the marker. + */ + public GetMediaMetaDataMarker withAttributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaMetaDataMarker other = (GetMediaMetaDataMarker) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.startTimeOffset, other.startTimeOffset) && + Objects.deepEquals(this.endTimeOffset, other.endTimeOffset) && + Objects.deepEquals(this.final_, other.final_) && + Objects.deepEquals(this.attributes, other.attributes); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + startTimeOffset, + endTimeOffset, + final_, + attributes); + } + + @Override + public String toString() { + return Utils.toString(GetMediaMetaDataMarker.class, + "id", id, + "type", type, + "startTimeOffset", startTimeOffset, + "endTimeOffset", endTimeOffset, + "final_", final_, + "attributes", attributes); + } + + public final static class Builder { + + private Long id; + + private String type; + + private Long startTimeOffset; + + private Long endTimeOffset; + + private Optional final_ = Optional.empty(); + + private Optional attributes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public Builder final_(boolean final_) { + Utils.checkNotNull(final_, "final_"); + this.final_ = Optional.ofNullable(final_); + return this; + } + + public Builder final_(Optional final_) { + Utils.checkNotNull(final_, "final_"); + this.final_ = final_; + return this; + } + + /** + * Attributes associated with the marker. + */ + public Builder attributes(GetMediaMetaDataAttributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + * Attributes associated with the marker. + */ + public Builder attributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + public GetMediaMetaDataMarker build() { + return new GetMediaMetaDataMarker( + id, + type, + startTimeOffset, + endTimeOffset, + final_, + attributes); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java index 9567a956..6aba67c2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java @@ -96,7 +96,7 @@ public class GetMediaMetaDataMedia { private Optional videoResolution; /** - * File container type. + * Container format of the media. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") @@ -137,13 +137,14 @@ public class GetMediaMetaDataMedia { @JsonProperty("optimizedForStreaming") private Optional optimizedForStreaming; + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; - /** - * An array of parts for this media item. - */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("Part") private Optional> part; @@ -300,7 +301,7 @@ public class GetMediaMetaDataMedia { } /** - * File container type. + * Container format of the media. */ @JsonIgnore public Optional container() { @@ -348,14 +349,15 @@ public class GetMediaMetaDataMedia { return (Optional) optimizedForStreaming; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonIgnore public Optional has64bitOffsets() { return has64bitOffsets; } - /** - * An array of parts for this media item. - */ @SuppressWarnings("unchecked") @JsonIgnore public Optional> part() { @@ -550,7 +552,7 @@ public class GetMediaMetaDataMedia { } /** - * File container type. + * Container format of the media. */ public GetMediaMetaDataMedia withContainer(String container) { Utils.checkNotNull(container, "container"); @@ -559,7 +561,7 @@ public class GetMediaMetaDataMedia { } /** - * File container type. + * Container format of the media. */ public GetMediaMetaDataMedia withContainer(Optional container) { Utils.checkNotNull(container, "container"); @@ -657,30 +659,32 @@ public class GetMediaMetaDataMedia { return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetMediaMetaDataMedia withHas64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetMediaMetaDataMedia withHas64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; return this; } - /** - * An array of parts for this media item. - */ public GetMediaMetaDataMedia withPart(List part) { Utils.checkNotNull(part, "part"); this.part = Optional.ofNullable(part); return this; } - /** - * An array of parts for this media item. - */ public GetMediaMetaDataMedia withPart(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; @@ -995,7 +999,7 @@ public class GetMediaMetaDataMedia { } /** - * File container type. + * Container format of the media. */ public Builder container(String container) { Utils.checkNotNull(container, "container"); @@ -1004,7 +1008,7 @@ public class GetMediaMetaDataMedia { } /** - * File container type. + * Container format of the media. */ public Builder container(Optional container) { Utils.checkNotNull(container, "container"); @@ -1102,30 +1106,32 @@ public class GetMediaMetaDataMedia { return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; return this; } - /** - * An array of parts for this media item. - */ public Builder part(List part) { Utils.checkNotNull(part, "part"); this.part = Optional.ofNullable(part); return this; } - /** - * An array of parts for this media item. - */ public Builder part(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java index 9167e256..cb78276e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java @@ -41,14 +41,16 @@ public class GetMediaMetaDataMediaContainer { /** * The unique identifier for the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private long librarySectionID; + private Optional librarySectionID; /** * The title of the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionTitle") - private String librarySectionTitle; + private Optional librarySectionTitle; /** * The universally unique identifier for the library section. @@ -80,8 +82,8 @@ public class GetMediaMetaDataMediaContainer { @JsonProperty("size") int size, @JsonProperty("allowSync") boolean allowSync, @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionTitle") String librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, @JsonProperty("librarySectionUUID") Optional librarySectionUUID, @JsonProperty("mediaTagPrefix") String mediaTagPrefix, @JsonProperty("mediaTagVersion") long mediaTagVersion, @@ -110,12 +112,10 @@ public class GetMediaMetaDataMediaContainer { int size, boolean allowSync, String identifier, - long librarySectionID, - String librarySectionTitle, String mediaTagPrefix, long mediaTagVersion, List metadata) { - this(size, allowSync, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, metadata); + this(size, allowSync, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, metadata); } /** @@ -146,7 +146,7 @@ public class GetMediaMetaDataMediaContainer { * The unique identifier for the library section. */ @JsonIgnore - public long librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } @@ -154,7 +154,7 @@ public class GetMediaMetaDataMediaContainer { * The title of the library section. */ @JsonIgnore - public String librarySectionTitle() { + public Optional librarySectionTitle() { return librarySectionTitle; } @@ -225,6 +225,15 @@ public class GetMediaMetaDataMediaContainer { * The unique identifier for the library section. */ public GetMediaMetaDataMediaContainer withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public GetMediaMetaDataMediaContainer withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -234,6 +243,15 @@ public class GetMediaMetaDataMediaContainer { * The title of the library section. */ public GetMediaMetaDataMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetMediaMetaDataMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -342,9 +360,9 @@ public class GetMediaMetaDataMediaContainer { private String identifier; - private Long librarySectionID; + private Optional librarySectionID = Optional.empty(); - private String librarySectionTitle; + private Optional librarySectionTitle = Optional.empty(); private Optional librarySectionUUID = Optional.empty(); @@ -389,6 +407,15 @@ public class GetMediaMetaDataMediaContainer { * The unique identifier for the library section. */ public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -398,6 +425,15 @@ public class GetMediaMetaDataMediaContainer { * The title of the library section. */ public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java index 6eff9ea2..575a4409 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java @@ -171,8 +171,9 @@ public class GetMediaMetaDataMetadata { /** * The original release date of the media item. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt; @JsonProperty("addedAt") private long addedAt; @@ -391,20 +392,23 @@ public class GetMediaMetaDataMetadata { /** * The identifier for the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private long librarySectionID; + private Optional librarySectionID; /** * The title of the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionTitle") - private String librarySectionTitle; + private Optional librarySectionTitle; /** * The key corresponding to the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionKey") - private String librarySectionKey; + private Optional librarySectionKey; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Guid") @@ -440,7 +444,7 @@ public class GetMediaMetaDataMetadata { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Rating") - private Optional> ratings; + private Optional> ratings; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Similar") @@ -452,15 +456,15 @@ public class GetMediaMetaDataMetadata { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Chapter") - private Optional> chapter; + private Optional> chapter; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Marker") - private Optional> marker; + private Optional> marker; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Extras") - private Optional extras; + private Optional extras; @JsonCreator public GetMediaMetaDataMetadata( @@ -487,7 +491,7 @@ public class GetMediaMetaDataMetadata { @JsonProperty("childCount") int childCount, @JsonProperty("seasonCount") int seasonCount, @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, @JsonProperty("addedAt") long addedAt, @JsonProperty("updatedAt") Optional updatedAt, @JsonProperty("audienceRatingImage") Optional audienceRatingImage, @@ -520,9 +524,9 @@ public class GetMediaMetaDataMetadata { @JsonProperty("userRating") Optional userRating, @JsonProperty("Image") Optional> image, @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionTitle") String librarySectionTitle, - @JsonProperty("librarySectionKey") String librarySectionKey, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionKey") Optional librarySectionKey, @JsonProperty("Guid") Optional> guids, @JsonProperty("Media") Optional> media, @JsonProperty("Genre") Optional> genre, @@ -531,12 +535,12 @@ public class GetMediaMetaDataMetadata { @JsonProperty("Writer") Optional> writer, @JsonProperty("Producer") Optional> producer, @JsonProperty("Role") Optional> role, - @JsonProperty("Rating") Optional> ratings, + @JsonProperty("Rating") Optional> ratings, @JsonProperty("Similar") Optional> similar, @JsonProperty("Location") Optional> location, - @JsonProperty("Chapter") Optional> chapter, - @JsonProperty("Marker") Optional> marker, - @JsonProperty("Extras") Optional extras) { + @JsonProperty("Chapter") Optional> chapter, + @JsonProperty("Marker") Optional> marker, + @JsonProperty("Extras") Optional extras) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(guid, "guid"); @@ -704,12 +708,8 @@ public class GetMediaMetaDataMetadata { int childCount, int seasonCount, int duration, - LocalDate originallyAvailableAt, - long addedAt, - long librarySectionID, - String librarySectionTitle, - String librarySectionKey) { - this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, originallyAvailableAt, addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), librarySectionID, librarySectionTitle, librarySectionKey, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + long addedAt) { + this(ratingKey, key, guid, slug, Optional.empty(), type, title, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -897,7 +897,7 @@ public class GetMediaMetaDataMetadata { * The original release date of the media item. */ @JsonIgnore - public LocalDate originallyAvailableAt() { + public Optional originallyAvailableAt() { return originallyAvailableAt; } @@ -1154,7 +1154,7 @@ public class GetMediaMetaDataMetadata { * The identifier for the library section. */ @JsonIgnore - public long librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } @@ -1162,7 +1162,7 @@ public class GetMediaMetaDataMetadata { * The title of the library section. */ @JsonIgnore - public String librarySectionTitle() { + public Optional librarySectionTitle() { return librarySectionTitle; } @@ -1170,7 +1170,7 @@ public class GetMediaMetaDataMetadata { * The key corresponding to the library section. */ @JsonIgnore - public String librarySectionKey() { + public Optional librarySectionKey() { return librarySectionKey; } @@ -1224,8 +1224,8 @@ public class GetMediaMetaDataMetadata { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> ratings() { - return (Optional>) ratings; + public Optional> ratings() { + return (Optional>) ratings; } @SuppressWarnings("unchecked") @@ -1242,20 +1242,20 @@ public class GetMediaMetaDataMetadata { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> chapter() { - return (Optional>) chapter; + public Optional> chapter() { + return (Optional>) chapter; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional> marker() { - return (Optional>) marker; + public Optional> marker() { + return (Optional>) marker; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional extras() { - return (Optional) extras; + public Optional extras() { + return (Optional) extras; } public final static Builder builder() { @@ -1515,6 +1515,15 @@ public class GetMediaMetaDataMetadata { * The original release date of the media item. */ public GetMediaMetaDataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public GetMediaMetaDataMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; @@ -2076,6 +2085,15 @@ public class GetMediaMetaDataMetadata { * The identifier for the library section. */ public GetMediaMetaDataMetadata withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public GetMediaMetaDataMetadata withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -2085,6 +2103,15 @@ public class GetMediaMetaDataMetadata { * The title of the library section. */ public GetMediaMetaDataMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetMediaMetaDataMetadata withLibrarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -2094,6 +2121,15 @@ public class GetMediaMetaDataMetadata { * The key corresponding to the library section. */ public GetMediaMetaDataMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetMediaMetaDataMetadata withLibrarySectionKey(Optional librarySectionKey) { Utils.checkNotNull(librarySectionKey, "librarySectionKey"); this.librarySectionKey = librarySectionKey; return this; @@ -2195,13 +2231,13 @@ public class GetMediaMetaDataMetadata { return this; } - public GetMediaMetaDataMetadata withRatings(List ratings) { + public GetMediaMetaDataMetadata withRatings(List ratings) { Utils.checkNotNull(ratings, "ratings"); this.ratings = Optional.ofNullable(ratings); return this; } - public GetMediaMetaDataMetadata withRatings(Optional> ratings) { + public GetMediaMetaDataMetadata withRatings(Optional> ratings) { Utils.checkNotNull(ratings, "ratings"); this.ratings = ratings; return this; @@ -2231,37 +2267,37 @@ public class GetMediaMetaDataMetadata { return this; } - public GetMediaMetaDataMetadata withChapter(List chapter) { + public GetMediaMetaDataMetadata withChapter(List chapter) { Utils.checkNotNull(chapter, "chapter"); this.chapter = Optional.ofNullable(chapter); return this; } - public GetMediaMetaDataMetadata withChapter(Optional> chapter) { + public GetMediaMetaDataMetadata withChapter(Optional> chapter) { Utils.checkNotNull(chapter, "chapter"); this.chapter = chapter; return this; } - public GetMediaMetaDataMetadata withMarker(List marker) { + public GetMediaMetaDataMetadata withMarker(List marker) { Utils.checkNotNull(marker, "marker"); this.marker = Optional.ofNullable(marker); return this; } - public GetMediaMetaDataMetadata withMarker(Optional> marker) { + public GetMediaMetaDataMetadata withMarker(Optional> marker) { Utils.checkNotNull(marker, "marker"); this.marker = marker; return this; } - public GetMediaMetaDataMetadata withExtras(Extras extras) { + public GetMediaMetaDataMetadata withExtras(GetMediaMetaDataExtras extras) { Utils.checkNotNull(extras, "extras"); this.extras = Optional.ofNullable(extras); return this; } - public GetMediaMetaDataMetadata withExtras(Optional extras) { + public GetMediaMetaDataMetadata withExtras(Optional extras) { Utils.checkNotNull(extras, "extras"); this.extras = extras; return this; @@ -2557,7 +2593,7 @@ public class GetMediaMetaDataMetadata { private Integer duration; - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt = Optional.empty(); private Long addedAt; @@ -2623,11 +2659,11 @@ public class GetMediaMetaDataMetadata { private Optional ultraBlurColors = Optional.empty(); - private Long librarySectionID; + private Optional librarySectionID = Optional.empty(); - private String librarySectionTitle; + private Optional librarySectionTitle = Optional.empty(); - private String librarySectionKey; + private Optional librarySectionKey = Optional.empty(); private Optional> guids = Optional.empty(); @@ -2645,17 +2681,17 @@ public class GetMediaMetaDataMetadata { private Optional> role = Optional.empty(); - private Optional> ratings = Optional.empty(); + private Optional> ratings = Optional.empty(); private Optional> similar = Optional.empty(); private Optional> location = Optional.empty(); - private Optional> chapter = Optional.empty(); + private Optional> chapter = Optional.empty(); - private Optional> marker = Optional.empty(); + private Optional> marker = Optional.empty(); - private Optional extras = Optional.empty(); + private Optional extras = Optional.empty(); private Builder() { // force use of static builder() method @@ -2914,6 +2950,15 @@ public class GetMediaMetaDataMetadata { * The original release date of the media item. */ public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; @@ -3475,6 +3520,15 @@ public class GetMediaMetaDataMetadata { * The identifier for the library section. */ public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -3484,6 +3538,15 @@ public class GetMediaMetaDataMetadata { * The title of the library section. */ public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -3493,6 +3556,15 @@ public class GetMediaMetaDataMetadata { * The key corresponding to the library section. */ public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(Optional librarySectionKey) { Utils.checkNotNull(librarySectionKey, "librarySectionKey"); this.librarySectionKey = librarySectionKey; return this; @@ -3594,13 +3666,13 @@ public class GetMediaMetaDataMetadata { return this; } - public Builder ratings(List ratings) { + public Builder ratings(List ratings) { Utils.checkNotNull(ratings, "ratings"); this.ratings = Optional.ofNullable(ratings); return this; } - public Builder ratings(Optional> ratings) { + public Builder ratings(Optional> ratings) { Utils.checkNotNull(ratings, "ratings"); this.ratings = ratings; return this; @@ -3630,37 +3702,37 @@ public class GetMediaMetaDataMetadata { return this; } - public Builder chapter(List chapter) { + public Builder chapter(List chapter) { Utils.checkNotNull(chapter, "chapter"); this.chapter = Optional.ofNullable(chapter); return this; } - public Builder chapter(Optional> chapter) { + public Builder chapter(Optional> chapter) { Utils.checkNotNull(chapter, "chapter"); this.chapter = chapter; return this; } - public Builder marker(List marker) { + public Builder marker(List marker) { Utils.checkNotNull(marker, "marker"); this.marker = Optional.ofNullable(marker); return this; } - public Builder marker(Optional> marker) { + public Builder marker(Optional> marker) { Utils.checkNotNull(marker, "marker"); this.marker = marker; return this; } - public Builder extras(Extras extras) { + public Builder extras(GetMediaMetaDataExtras extras) { Utils.checkNotNull(extras, "extras"); this.extras = Optional.ofNullable(extras); return this; } - public Builder extras(Optional extras) { + public Builder extras(Optional extras) { Utils.checkNotNull(extras, "extras"); this.extras = extras; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java index 5cab9de1..b3885460 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java @@ -46,8 +46,9 @@ public class GetMediaMetaDataPart { /** * Key to access this part. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private String key; + private Optional key; @JsonInclude(Include.NON_ABSENT) @JsonProperty("indexes") @@ -63,14 +64,16 @@ public class GetMediaMetaDataPart { /** * File path for the part. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("file") - private String file; + private Optional file; /** * File size in bytes. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") - private long size; + private Optional size; @JsonInclude(Include.NON_ABSENT) @JsonProperty("packetLength") @@ -112,9 +115,6 @@ public class GetMediaMetaDataPart { @JsonProperty("hasThumbnail") private Optional hasThumbnail; - /** - * An array of streams for this part. - */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("Stream") private Optional> stream; @@ -124,11 +124,11 @@ public class GetMediaMetaDataPart { @JsonProperty("accessible") Optional accessible, @JsonProperty("exists") Optional exists, @JsonProperty("id") long id, - @JsonProperty("key") String key, + @JsonProperty("key") Optional key, @JsonProperty("indexes") Optional indexes, @JsonProperty("duration") Optional duration, - @JsonProperty("file") String file, - @JsonProperty("size") long size, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, @JsonProperty("packetLength") Optional packetLength, @JsonProperty("container") Optional container, @JsonProperty("videoProfile") Optional videoProfile, @@ -172,11 +172,8 @@ public class GetMediaMetaDataPart { } public GetMediaMetaDataPart( - long id, - String key, - String file, - long size) { - this(Optional.empty(), Optional.empty(), id, key, Optional.empty(), Optional.empty(), file, size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + long id) { + this(Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -207,7 +204,7 @@ public class GetMediaMetaDataPart { * Key to access this part. */ @JsonIgnore - public String key() { + public Optional key() { return key; } @@ -228,7 +225,7 @@ public class GetMediaMetaDataPart { * File path for the part. */ @JsonIgnore - public String file() { + public Optional file() { return file; } @@ -236,7 +233,7 @@ public class GetMediaMetaDataPart { * File size in bytes. */ @JsonIgnore - public long size() { + public Optional size() { return size; } @@ -289,9 +286,6 @@ public class GetMediaMetaDataPart { return (Optional) hasThumbnail; } - /** - * An array of streams for this part. - */ @SuppressWarnings("unchecked") @JsonIgnore public Optional> stream() { @@ -351,6 +345,15 @@ public class GetMediaMetaDataPart { * Key to access this part. */ public GetMediaMetaDataPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public GetMediaMetaDataPart withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; @@ -390,6 +393,15 @@ public class GetMediaMetaDataPart { * File path for the part. */ public GetMediaMetaDataPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public GetMediaMetaDataPart withFile(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; @@ -399,6 +411,15 @@ public class GetMediaMetaDataPart { * File size in bytes. */ public GetMediaMetaDataPart withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public GetMediaMetaDataPart withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; @@ -512,18 +533,12 @@ public class GetMediaMetaDataPart { return this; } - /** - * An array of streams for this part. - */ public GetMediaMetaDataPart withStream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } - /** - * An array of streams for this part. - */ public GetMediaMetaDataPart withStream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; @@ -609,15 +624,15 @@ public class GetMediaMetaDataPart { private Long id; - private String key; + private Optional key = Optional.empty(); private Optional indexes = Optional.empty(); private Optional duration = Optional.empty(); - private String file; + private Optional file = Optional.empty(); - private Long size; + private Optional size = Optional.empty(); private Optional packetLength = Optional.empty(); @@ -688,6 +703,15 @@ public class GetMediaMetaDataPart { * Key to access this part. */ public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; @@ -727,6 +751,15 @@ public class GetMediaMetaDataPart { * File path for the part. */ public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public Builder file(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; @@ -736,6 +769,15 @@ public class GetMediaMetaDataPart { * File size in bytes. */ public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; @@ -849,18 +891,12 @@ public class GetMediaMetaDataPart { return this; } - /** - * An array of streams for this part. - */ public Builder stream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } - /** - * An array of streams for this part. - */ public Builder stream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java similarity index 81% rename from src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java index f998c456..b5f2fb27 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java @@ -12,16 +12,16 @@ import java.lang.Override; import java.lang.String; import java.util.Objects; -public class MetaDataRating { +public class GetMediaMetaDataRatings { /** - * A URI or path to the rating image. + * The image or reference for the rating. */ @JsonProperty("image") private String image; /** - * The value of the rating. + * The rating value. */ @JsonProperty("value") private float value; @@ -33,7 +33,7 @@ public class MetaDataRating { private String type; @JsonCreator - public MetaDataRating( + public GetMediaMetaDataRatings( @JsonProperty("image") String image, @JsonProperty("value") float value, @JsonProperty("type") String type) { @@ -46,7 +46,7 @@ public class MetaDataRating { } /** - * A URI or path to the rating image. + * The image or reference for the rating. */ @JsonIgnore public String image() { @@ -54,7 +54,7 @@ public class MetaDataRating { } /** - * The value of the rating. + * The rating value. */ @JsonIgnore public float value() { @@ -74,18 +74,18 @@ public class MetaDataRating { } /** - * A URI or path to the rating image. + * The image or reference for the rating. */ - public MetaDataRating withImage(String image) { + public GetMediaMetaDataRatings withImage(String image) { Utils.checkNotNull(image, "image"); this.image = image; return this; } /** - * The value of the rating. + * The rating value. */ - public MetaDataRating withValue(float value) { + public GetMediaMetaDataRatings withValue(float value) { Utils.checkNotNull(value, "value"); this.value = value; return this; @@ -94,7 +94,7 @@ public class MetaDataRating { /** * The type of rating (e.g., audience, critic). */ - public MetaDataRating withType(String type) { + public GetMediaMetaDataRatings withType(String type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -109,7 +109,7 @@ public class MetaDataRating { if (o == null || getClass() != o.getClass()) { return false; } - MetaDataRating other = (MetaDataRating) o; + GetMediaMetaDataRatings other = (GetMediaMetaDataRatings) o; return Objects.deepEquals(this.image, other.image) && Objects.deepEquals(this.value, other.value) && @@ -126,7 +126,7 @@ public class MetaDataRating { @Override public String toString() { - return Utils.toString(MetaDataRating.class, + return Utils.toString(GetMediaMetaDataRatings.class, "image", image, "value", value, "type", type); @@ -145,7 +145,7 @@ public class MetaDataRating { } /** - * A URI or path to the rating image. + * The image or reference for the rating. */ public Builder image(String image) { Utils.checkNotNull(image, "image"); @@ -154,7 +154,7 @@ public class MetaDataRating { } /** - * The value of the rating. + * The rating value. */ public Builder value(float value) { Utils.checkNotNull(value, "value"); @@ -171,8 +171,8 @@ public class MetaDataRating { return this; } - public MetaDataRating build() { - return new MetaDataRating( + public GetMediaMetaDataRatings build() { + return new GetMediaMetaDataRatings( image, value, type); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java index 9a70c2fe..cb5edf78 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java @@ -8,6 +8,8 @@ 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 com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Float; @@ -28,12 +30,12 @@ public class GetMediaMetaDataStream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonProperty("streamType") - private GetMediaMetaDataStreamType streamType; + private long streamType; /** * Format of the stream (e.g., srt). @@ -52,8 +54,9 @@ public class GetMediaMetaDataStream { /** * Codec used by the stream. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("codec") - private String codec; + private Optional codec; /** * Index of the stream. @@ -291,14 +294,16 @@ public class GetMediaMetaDataStream { /** * Display title for the stream. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("displayTitle") - private String displayTitle; + private Optional displayTitle; /** * Extended display title for the stream. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("extendedDisplayTitle") - private String extendedDisplayTitle; + private Optional extendedDisplayTitle; /** * Indicates if this stream is selected (applicable for audio streams). @@ -363,10 +368,9 @@ public class GetMediaMetaDataStream { @JsonCreator public GetMediaMetaDataStream( @JsonProperty("id") long id, - @JsonProperty("streamType") GetMediaMetaDataStreamType streamType, @JsonProperty("format") Optional format, @JsonProperty("default") Optional default_, - @JsonProperty("codec") String codec, + @JsonProperty("codec") Optional codec, @JsonProperty("index") Optional index, @JsonProperty("bitrate") Optional bitrate, @JsonProperty("language") Optional language, @@ -402,8 +406,8 @@ public class GetMediaMetaDataStream { @JsonProperty("embeddedInVideo") Optional embeddedInVideo, @JsonProperty("refFrames") Optional refFrames, @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") String displayTitle, - @JsonProperty("extendedDisplayTitle") String extendedDisplayTitle, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, @JsonProperty("selected") Optional selected, @JsonProperty("forced") Optional forced, @JsonProperty("channels") Optional channels, @@ -414,7 +418,6 @@ public class GetMediaMetaDataStream { @JsonProperty("dub") Optional dub, @JsonProperty("title") Optional title) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(streamType, "streamType"); Utils.checkNotNull(format, "format"); Utils.checkNotNull(default_, "default_"); Utils.checkNotNull(codec, "codec"); @@ -465,7 +468,7 @@ public class GetMediaMetaDataStream { Utils.checkNotNull(dub, "dub"); Utils.checkNotNull(title, "title"); this.id = id; - this.streamType = streamType; + this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); this.format = format; this.default_ = default_; this.codec = codec; @@ -518,12 +521,8 @@ public class GetMediaMetaDataStream { } public GetMediaMetaDataStream( - long id, - GetMediaMetaDataStreamType streamType, - String codec, - String displayTitle, - String extendedDisplayTitle) { - this(id, streamType, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + long id) { + this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -536,12 +535,12 @@ public class GetMediaMetaDataStream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonIgnore - public GetMediaMetaDataStreamType streamType() { + public long streamType() { return streamType; } @@ -565,7 +564,7 @@ public class GetMediaMetaDataStream { * Codec used by the stream. */ @JsonIgnore - public String codec() { + public Optional codec() { return codec; } @@ -841,7 +840,7 @@ public class GetMediaMetaDataStream { * Display title for the stream. */ @JsonIgnore - public String displayTitle() { + public Optional displayTitle() { return displayTitle; } @@ -849,7 +848,7 @@ public class GetMediaMetaDataStream { * Extended display title for the stream. */ @JsonIgnore - public String extendedDisplayTitle() { + public Optional extendedDisplayTitle() { return extendedDisplayTitle; } @@ -935,18 +934,6 @@ public class GetMediaMetaDataStream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public GetMediaMetaDataStream withStreamType(GetMediaMetaDataStreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -987,6 +974,15 @@ public class GetMediaMetaDataStream { * Codec used by the stream. */ public GetMediaMetaDataStream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + /** + * Codec used by the stream. + */ + public GetMediaMetaDataStream withCodec(Optional codec) { Utils.checkNotNull(codec, "codec"); this.codec = codec; return this; @@ -1602,6 +1598,15 @@ public class GetMediaMetaDataStream { * Display title for the stream. */ public GetMediaMetaDataStream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + /** + * Display title for the stream. + */ + public GetMediaMetaDataStream withDisplayTitle(Optional displayTitle) { Utils.checkNotNull(displayTitle, "displayTitle"); this.displayTitle = displayTitle; return this; @@ -1611,6 +1616,15 @@ public class GetMediaMetaDataStream { * Extended display title for the stream. */ public GetMediaMetaDataStream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + /** + * Extended display title for the stream. + */ + public GetMediaMetaDataStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); this.extendedDisplayTitle = extendedDisplayTitle; return this; @@ -1952,13 +1966,11 @@ public class GetMediaMetaDataStream { private Long id; - private GetMediaMetaDataStreamType streamType; - private Optional format = Optional.empty(); private Optional default_ = Optional.empty(); - private String codec; + private Optional codec = Optional.empty(); private Optional index = Optional.empty(); @@ -2030,9 +2042,9 @@ public class GetMediaMetaDataStream { private Optional width = Optional.empty(); - private String displayTitle; + private Optional displayTitle = Optional.empty(); - private String extendedDisplayTitle; + private Optional extendedDisplayTitle = Optional.empty(); private Optional selected = Optional.empty(); @@ -2065,18 +2077,6 @@ public class GetMediaMetaDataStream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public Builder streamType(GetMediaMetaDataStreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -2117,6 +2117,15 @@ public class GetMediaMetaDataStream { * Codec used by the stream. */ public Builder codec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + /** + * Codec used by the stream. + */ + public Builder codec(Optional codec) { Utils.checkNotNull(codec, "codec"); this.codec = codec; return this; @@ -2732,6 +2741,15 @@ public class GetMediaMetaDataStream { * Display title for the stream. */ public Builder displayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + /** + * Display title for the stream. + */ + public Builder displayTitle(Optional displayTitle) { Utils.checkNotNull(displayTitle, "displayTitle"); this.displayTitle = displayTitle; return this; @@ -2741,6 +2759,15 @@ public class GetMediaMetaDataStream { * Extended display title for the stream. */ public Builder extendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + /** + * Extended display title for the stream. + */ + public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); this.extendedDisplayTitle = extendedDisplayTitle; return this; @@ -2905,7 +2932,6 @@ public class GetMediaMetaDataStream { public GetMediaMetaDataStream build() { return new GetMediaMetaDataStream( id, - streamType, format, default_, codec, @@ -2956,5 +2982,11 @@ public class GetMediaMetaDataStream { dub, title); } + + private static final LazySingletonValue _SINGLETON_VALUE_StreamType = + new LazySingletonValue<>( + "streamType", + "1", + new TypeReference() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStreamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStreamType.java deleted file mode 100644 index cd0d038c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStreamType.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * GetMediaMetaDataStreamType - * - *

Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ -@JsonDeserialize(using = GetMediaMetaDataStreamType._Deserializer.class) -@JsonSerialize(using = GetMediaMetaDataStreamType._Serializer.class) -public class GetMediaMetaDataStreamType { - - public static final GetMediaMetaDataStreamType Video = new GetMediaMetaDataStreamType(1); - public static final GetMediaMetaDataStreamType Audio = new GetMediaMetaDataStreamType(2); - public static final GetMediaMetaDataStreamType Subtitle = new GetMediaMetaDataStreamType(3); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final int value; - - private GetMediaMetaDataStreamType(int value) { - this.value = value; - } - - /** - * Returns a GetMediaMetaDataStreamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetMediaMetaDataStreamType - */ - public static GetMediaMetaDataStreamType of(int value) { - synchronized (GetMediaMetaDataStreamType.class) { - return values.computeIfAbsent(value, v -> new GetMediaMetaDataStreamType(v)); - } - } - - public int value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetMediaMetaDataStreamType other = (GetMediaMetaDataStreamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetMediaMetaDataStreamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetMediaMetaDataStreamType[] values() { - synchronized (GetMediaMetaDataStreamType.class) { - return values.values().toArray(new GetMediaMetaDataStreamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1, Video); - map.put(2, Audio); - map.put(3, Subtitle); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1, GetMediaMetaDataStreamTypeEnum.Video); - map.put(2, GetMediaMetaDataStreamTypeEnum.Audio); - map.put(3, GetMediaMetaDataStreamTypeEnum.Subtitle); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetMediaMetaDataStreamType.class); - } - - @Override - public void serialize(GetMediaMetaDataStreamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetMediaMetaDataStreamType.class); - } - - @Override - public GetMediaMetaDataStreamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - int v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetMediaMetaDataStreamType.of(v); - } - } - - public enum GetMediaMetaDataStreamTypeEnum { - - Video(1), - Audio(2), - Subtitle(3),; - - private final int value; - - private GetMediaMetaDataStreamTypeEnum(int value) { - this.value = value; - } - - public int value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java index 06428b70..debb9742 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java @@ -188,20 +188,23 @@ public class GetRecentlyAddedMetadata { /** * The identifier for the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private long librarySectionID; + private Optional librarySectionID; /** * The key corresponding to the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionKey") - private String librarySectionKey; + private Optional librarySectionKey; /** * The title of the library section. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionTitle") - private String librarySectionTitle; + private Optional librarySectionTitle; /** * The original title of the media item (if different). @@ -213,8 +216,9 @@ public class GetRecentlyAddedMetadata { /** * The original release date of the media item. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt; /** * The GUID of the parent media item. @@ -506,11 +510,11 @@ public class GetRecentlyAddedMetadata { @JsonProperty("lastRatedAt") Optional lastRatedAt, @JsonProperty("lastViewedAt") Optional lastViewedAt, @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionKey") String librarySectionKey, - @JsonProperty("librarySectionTitle") String librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, @JsonProperty("parentGuid") Optional parentGuid, @JsonProperty("parentIndex") Optional parentIndex, @JsonProperty("parentKey") Optional parentKey, @@ -718,10 +722,6 @@ public class GetRecentlyAddedMetadata { String guid, int index, String key, - long librarySectionID, - String librarySectionKey, - String librarySectionTitle, - LocalDate originallyAvailableAt, String parentStudio, String parentTheme, String ratingKey, @@ -735,7 +735,7 @@ public class GetRecentlyAddedMetadata { String titleSort, String title, GetRecentlyAddedHubsType type) { - this(addedAt, art, Optional.empty(), audienceRating, Optional.empty(), childCount, Optional.empty(), Optional.empty(), Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), guid, index, key, Optional.empty(), Optional.empty(), Optional.empty(), librarySectionID, librarySectionKey, librarySectionTitle, Optional.empty(), originallyAvailableAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), parentStudio, parentTheme, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ratingKey, rating, seasonCount, Optional.empty(), slug, Optional.empty(), Optional.empty(), summary, tagline, theme, thumb, titleSort, title, type, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(addedAt, art, Optional.empty(), audienceRating, Optional.empty(), childCount, Optional.empty(), Optional.empty(), Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), guid, index, key, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), parentStudio, parentTheme, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ratingKey, rating, seasonCount, Optional.empty(), slug, Optional.empty(), Optional.empty(), summary, tagline, theme, thumb, titleSort, title, type, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -931,7 +931,7 @@ public class GetRecentlyAddedMetadata { * The identifier for the library section. */ @JsonIgnore - public long librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } @@ -939,7 +939,7 @@ public class GetRecentlyAddedMetadata { * The key corresponding to the library section. */ @JsonIgnore - public String librarySectionKey() { + public Optional librarySectionKey() { return librarySectionKey; } @@ -947,7 +947,7 @@ public class GetRecentlyAddedMetadata { * The title of the library section. */ @JsonIgnore - public String librarySectionTitle() { + public Optional librarySectionTitle() { return librarySectionTitle; } @@ -963,7 +963,7 @@ public class GetRecentlyAddedMetadata { * The original release date of the media item. */ @JsonIgnore - public LocalDate originallyAvailableAt() { + public Optional originallyAvailableAt() { return originallyAvailableAt; } @@ -1669,6 +1669,15 @@ public class GetRecentlyAddedMetadata { * The identifier for the library section. */ public GetRecentlyAddedMetadata withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public GetRecentlyAddedMetadata withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -1678,6 +1687,15 @@ public class GetRecentlyAddedMetadata { * The key corresponding to the library section. */ public GetRecentlyAddedMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetRecentlyAddedMetadata withLibrarySectionKey(Optional librarySectionKey) { Utils.checkNotNull(librarySectionKey, "librarySectionKey"); this.librarySectionKey = librarySectionKey; return this; @@ -1687,6 +1705,15 @@ public class GetRecentlyAddedMetadata { * The title of the library section. */ public GetRecentlyAddedMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetRecentlyAddedMetadata withLibrarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -1714,6 +1741,15 @@ public class GetRecentlyAddedMetadata { * The original release date of the media item. */ public GetRecentlyAddedMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public GetRecentlyAddedMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; @@ -2641,15 +2677,15 @@ public class GetRecentlyAddedMetadata { private Optional leafCount = Optional.empty(); - private Long librarySectionID; + private Optional librarySectionID = Optional.empty(); - private String librarySectionKey; + private Optional librarySectionKey = Optional.empty(); - private String librarySectionTitle; + private Optional librarySectionTitle = Optional.empty(); private Optional originalTitle = Optional.empty(); - private LocalDate originallyAvailableAt; + private Optional originallyAvailableAt = Optional.empty(); private Optional parentGuid = Optional.empty(); @@ -3108,6 +3144,15 @@ public class GetRecentlyAddedMetadata { * The identifier for the library section. */ public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -3117,6 +3162,15 @@ public class GetRecentlyAddedMetadata { * The key corresponding to the library section. */ public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(Optional librarySectionKey) { Utils.checkNotNull(librarySectionKey, "librarySectionKey"); this.librarySectionKey = librarySectionKey; return this; @@ -3126,6 +3180,15 @@ public class GetRecentlyAddedMetadata { * The title of the library section. */ public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); this.librarySectionTitle = librarySectionTitle; return this; @@ -3153,6 +3216,15 @@ public class GetRecentlyAddedMetadata { * The original release date of the media item. */ public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The original release date of the media item. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCollection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCollection.java deleted file mode 100644 index 10ba6748..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCollection.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.util.Objects; -import java.util.Optional; - -public class GetSearchAllLibrariesCollection { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchAllLibrariesCollection( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchAllLibrariesCollection() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetSearchAllLibrariesCollection withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - public GetSearchAllLibrariesCollection withTag(Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesCollection other = (GetSearchAllLibrariesCollection) o; - return - Objects.deepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Objects.hash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesCollection.class, - "tag", tag); - } - - public final static class Builder { - - private Optional tag = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - public Builder tag(Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetSearchAllLibrariesCollection build() { - return new GetSearchAllLibrariesCollection( - tag); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java index ede34d17..6a90567e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java @@ -5,34 +5,52 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; -import java.util.Optional; public class GetSearchAllLibrariesCountry { - @JsonInclude(Include.NON_ABSENT) + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonProperty("id") + private int id; + + /** + * The country of origin of this media item + */ @JsonProperty("tag") - private Optional tag; + private String tag; @JsonCreator public GetSearchAllLibrariesCountry( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + this.id = id; this.tag = tag; } - - public GetSearchAllLibrariesCountry() { - this(Optional.empty()); + + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonIgnore + public int id() { + return id; } + /** + * The country of origin of this media item + */ @JsonIgnore - public Optional tag() { + public String tag() { return tag; } @@ -40,13 +58,20 @@ public class GetSearchAllLibrariesCountry { return new Builder(); } - public GetSearchAllLibrariesCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public GetSearchAllLibrariesCountry withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetSearchAllLibrariesCountry withTag(Optional tag) { + /** + * The country of origin of this media item + */ + public GetSearchAllLibrariesCountry withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -63,36 +88,48 @@ public class GetSearchAllLibrariesCountry { } GetSearchAllLibrariesCountry other = (GetSearchAllLibrariesCountry) o; return + Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.tag, other.tag); } @Override public int hashCode() { return Objects.hash( + id, tag); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesCountry.class, + "id", id, "tag", tag); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the country. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The country of origin of this media item + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -100,6 +137,7 @@ public class GetSearchAllLibrariesCountry { public GetSearchAllLibrariesCountry build() { return new GetSearchAllLibrariesCountry( + id, tag); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java index 729e735f..da9732b4 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java @@ -9,6 +9,7 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -16,42 +17,108 @@ import java.util.Optional; public class GetSearchAllLibrariesDirector { - @JsonInclude(Include.NON_ABSENT) + /** + * Unique identifier for the director. + */ + @JsonProperty("id") + private int id; + + /** + * The role of Director + */ @JsonProperty("tag") - private Optional tag; + private String tag; + + /** + * The absolute URL of the thumbnail image for the director. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; @JsonCreator public GetSearchAllLibrariesDirector( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; this.tag = tag; + this.thumb = thumb; } - public GetSearchAllLibrariesDirector() { - this(Optional.empty()); + public GetSearchAllLibrariesDirector( + int id, + String tag) { + this(id, tag, Optional.empty()); } + /** + * Unique identifier for the director. + */ @JsonIgnore - public Optional tag() { + public int id() { + return id; + } + + /** + * The role of Director + */ + @JsonIgnore + public String tag() { return tag; } + /** + * The absolute URL of the thumbnail image for the director. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } - public GetSearchAllLibrariesDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the director. + */ + public GetSearchAllLibrariesDirector withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetSearchAllLibrariesDirector withTag(Optional tag) { + /** + * The role of Director + */ + public GetSearchAllLibrariesDirector withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + /** + * The absolute URL of the thumbnail image for the director. + */ + public GetSearchAllLibrariesDirector withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public GetSearchAllLibrariesDirector withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -63,44 +130,80 @@ public class GetSearchAllLibrariesDirector { } GetSearchAllLibrariesDirector other = (GetSearchAllLibrariesDirector) o; return - Objects.deepEquals(this.tag, other.tag); + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( - tag); + id, + tag, + thumb); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesDirector.class, - "tag", tag); + "id", id, + "tag", tag, + "thumb", thumb); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the director. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The role of Director + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the director. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetSearchAllLibrariesDirector build() { return new GetSearchAllLibrariesDirector( - tag); + id, + tag, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java new file mode 100644 index 00000000..1462a737 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java @@ -0,0 +1,621 @@ +/* + * 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 com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; +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 GetSearchAllLibrariesDirectory { + + /** + * The unique identifier path for the search result item. + */ + @JsonProperty("key") + private String key; + + /** + * The identifier for the library section. + */ + @JsonProperty("librarySectionID") + private long librarySectionID; + + /** + * The key corresponding to the library section. + */ + @JsonProperty("librarySectionKey") + private String librarySectionKey; + + /** + * The title of the library section. + */ + @JsonProperty("librarySectionTitle") + private String librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionType") + private Optional librarySectionType; + + /** + * The type of the directory. + */ + @JsonProperty("type") + private String type; + + @JsonProperty("id") + private long id; + + /** + * The filter string used to query this specific item in the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonProperty("tag") + private String tag; + + /** + * The type of tag associated with this search result (e.g., Director, Actor). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagType") + private Optional tagType; + + /** + * The unique identifier for the tag associated with this search result. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + /** + * The URL to the thumbnail image associated with this search result. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * The number of items associated with this search result. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("count") + private Optional count; + + @JsonCreator + public GetSearchAllLibrariesDirectory( + @JsonProperty("key") String key, + @JsonProperty("librarySectionID") long librarySectionID, + @JsonProperty("librarySectionKey") String librarySectionKey, + @JsonProperty("librarySectionTitle") String librarySectionTitle, + @JsonProperty("type") String type, + @JsonProperty("id") long id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") String tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("count") Optional count) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(count, "count"); + this.key = key; + this.librarySectionID = librarySectionID; + this.librarySectionKey = librarySectionKey; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionType = Builder._SINGLETON_VALUE_LibrarySectionType.value(); + this.type = type; + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagType = Builder._SINGLETON_VALUE_TagType.value(); + this.tagKey = tagKey; + this.thumb = thumb; + this.count = count; + } + + public GetSearchAllLibrariesDirectory( + String key, + long librarySectionID, + String librarySectionKey, + String librarySectionTitle, + String type, + long id, + String tag) { + this(key, librarySectionID, librarySectionKey, librarySectionTitle, type, id, Optional.empty(), tag, Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The unique identifier path for the search result item. + */ + @JsonIgnore + public String key() { + return key; + } + + /** + * The identifier for the library section. + */ + @JsonIgnore + public long librarySectionID() { + return librarySectionID; + } + + /** + * The key corresponding to the library section. + */ + @JsonIgnore + public String librarySectionKey() { + return librarySectionKey; + } + + /** + * The title of the library section. + */ + @JsonIgnore + public String librarySectionTitle() { + return librarySectionTitle; + } + + @JsonIgnore + public Optional librarySectionType() { + return librarySectionType; + } + + /** + * The type of the directory. + */ + @JsonIgnore + public String type() { + return type; + } + + @JsonIgnore + public long id() { + return id; + } + + /** + * The filter string used to query this specific item in the library. + */ + @JsonIgnore + public Optional filter() { + return filter; + } + + @JsonIgnore + public String tag() { + return tag; + } + + /** + * The type of tag associated with this search result (e.g., Director, Actor). + */ + @JsonIgnore + public Optional tagType() { + return tagType; + } + + /** + * The unique identifier for the tag associated with this search result. + */ + @JsonIgnore + public Optional tagKey() { + return tagKey; + } + + /** + * The URL to the thumbnail image associated with this search result. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + + /** + * The number of items associated with this search result. + */ + @JsonIgnore + public Optional count() { + return count; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The unique identifier path for the search result item. + */ + public GetSearchAllLibrariesDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The identifier for the library section. + */ + public GetSearchAllLibrariesDirectory withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetSearchAllLibrariesDirectory withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * The title of the library section. + */ + public GetSearchAllLibrariesDirectory withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The type of the directory. + */ + public GetSearchAllLibrariesDirectory withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetSearchAllLibrariesDirectory withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string used to query this specific item in the library. + */ + public GetSearchAllLibrariesDirectory withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * The filter string used to query this specific item in the library. + */ + public GetSearchAllLibrariesDirectory withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetSearchAllLibrariesDirectory withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * The unique identifier for the tag associated with this search result. + */ + public GetSearchAllLibrariesDirectory withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + /** + * The unique identifier for the tag associated with this search result. + */ + public GetSearchAllLibrariesDirectory withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The URL to the thumbnail image associated with this search result. + */ + public GetSearchAllLibrariesDirectory withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The URL to the thumbnail image associated with this search result. + */ + public GetSearchAllLibrariesDirectory withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * The number of items associated with this search result. + */ + public GetSearchAllLibrariesDirectory withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items associated with this search result. + */ + public GetSearchAllLibrariesDirectory withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchAllLibrariesDirectory other = (GetSearchAllLibrariesDirectory) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Objects.deepEquals(this.librarySectionType, other.librarySectionType) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.filter, other.filter) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.tagType, other.tagType) && + Objects.deepEquals(this.tagKey, other.tagKey) && + Objects.deepEquals(this.thumb, other.thumb) && + Objects.deepEquals(this.count, other.count); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + librarySectionID, + librarySectionKey, + librarySectionTitle, + librarySectionType, + type, + id, + filter, + tag, + tagType, + tagKey, + thumb, + count); + } + + @Override + public String toString() { + return Utils.toString(GetSearchAllLibrariesDirectory.class, + "key", key, + "librarySectionID", librarySectionID, + "librarySectionKey", librarySectionKey, + "librarySectionTitle", librarySectionTitle, + "librarySectionType", librarySectionType, + "type", type, + "id", id, + "filter", filter, + "tag", tag, + "tagType", tagType, + "tagKey", tagKey, + "thumb", thumb, + "count", count); + } + + public final static class Builder { + + private String key; + + private Long librarySectionID; + + private String librarySectionKey; + + private String librarySectionTitle; + + private String type; + + private Long id; + + private Optional filter = Optional.empty(); + + private String tag; + + private Optional tagKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional count = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The unique identifier path for the search result item. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The type of the directory. + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter string used to query this specific item in the library. + */ + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * The filter string used to query this specific item in the library. + */ + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * The unique identifier for the tag associated with this search result. + */ + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + /** + * The unique identifier for the tag associated with this search result. + */ + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The URL to the thumbnail image associated with this search result. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The URL to the thumbnail image associated with this search result. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * The number of items associated with this search result. + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items associated with this search result. + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public GetSearchAllLibrariesDirectory build() { + return new GetSearchAllLibrariesDirectory( + key, + librarySectionID, + librarySectionKey, + librarySectionTitle, + type, + id, + filter, + tag, + tagKey, + thumb, + count); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_LibrarySectionType = + new LazySingletonValue<>( + "librarySectionType", + "1", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_TagType = + new LazySingletonValue<>( + "tagType", + "4", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.java deleted file mode 100644 index c7ec8ab2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * GetSearchAllLibrariesEnableCreditsMarkerGeneration - * - *

Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ -@JsonDeserialize(using = GetSearchAllLibrariesEnableCreditsMarkerGeneration._Deserializer.class) -@JsonSerialize(using = GetSearchAllLibrariesEnableCreditsMarkerGeneration._Serializer.class) -public class GetSearchAllLibrariesEnableCreditsMarkerGeneration { - - public static final GetSearchAllLibrariesEnableCreditsMarkerGeneration LibraryDefault = new GetSearchAllLibrariesEnableCreditsMarkerGeneration("-1"); - public static final GetSearchAllLibrariesEnableCreditsMarkerGeneration Disabled = new GetSearchAllLibrariesEnableCreditsMarkerGeneration("0"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetSearchAllLibrariesEnableCreditsMarkerGeneration(String value) { - this.value = value; - } - - /** - * Returns a GetSearchAllLibrariesEnableCreditsMarkerGeneration with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetSearchAllLibrariesEnableCreditsMarkerGeneration - */ - public static GetSearchAllLibrariesEnableCreditsMarkerGeneration of(String value) { - synchronized (GetSearchAllLibrariesEnableCreditsMarkerGeneration.class) { - return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesEnableCreditsMarkerGeneration(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetSearchAllLibrariesEnableCreditsMarkerGeneration other = (GetSearchAllLibrariesEnableCreditsMarkerGeneration) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetSearchAllLibrariesEnableCreditsMarkerGeneration [value=" + value + "]"; - } - - // return an array just like an enum - public static GetSearchAllLibrariesEnableCreditsMarkerGeneration[] values() { - synchronized (GetSearchAllLibrariesEnableCreditsMarkerGeneration.class) { - return values.values().toArray(new GetSearchAllLibrariesEnableCreditsMarkerGeneration[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("-1", LibraryDefault); - map.put("0", Disabled); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("-1", GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum.LibraryDefault); - map.put("0", GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum.Disabled); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetSearchAllLibrariesEnableCreditsMarkerGeneration.class); - } - - @Override - public void serialize(GetSearchAllLibrariesEnableCreditsMarkerGeneration value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetSearchAllLibrariesEnableCreditsMarkerGeneration.class); - } - - @Override - public GetSearchAllLibrariesEnableCreditsMarkerGeneration deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetSearchAllLibrariesEnableCreditsMarkerGeneration.of(v); - } - } - - public enum GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum { - - LibraryDefault("-1"), - Disabled("0"),; - - private final String value; - - private GetSearchAllLibrariesEnableCreditsMarkerGenerationEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEpisodeSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEpisodeSort.java deleted file mode 100644 index 33f947f0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesEpisodeSort.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * GetSearchAllLibrariesEpisodeSort - * - *

Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ -@JsonDeserialize(using = GetSearchAllLibrariesEpisodeSort._Deserializer.class) -@JsonSerialize(using = GetSearchAllLibrariesEpisodeSort._Serializer.class) -public class GetSearchAllLibrariesEpisodeSort { - - public static final GetSearchAllLibrariesEpisodeSort LibraryDefault = new GetSearchAllLibrariesEpisodeSort("-1"); - public static final GetSearchAllLibrariesEpisodeSort OldestFirst = new GetSearchAllLibrariesEpisodeSort("0"); - public static final GetSearchAllLibrariesEpisodeSort NewestFirst = new GetSearchAllLibrariesEpisodeSort("1"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetSearchAllLibrariesEpisodeSort(String value) { - this.value = value; - } - - /** - * Returns a GetSearchAllLibrariesEpisodeSort with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetSearchAllLibrariesEpisodeSort - */ - public static GetSearchAllLibrariesEpisodeSort of(String value) { - synchronized (GetSearchAllLibrariesEpisodeSort.class) { - return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesEpisodeSort(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetSearchAllLibrariesEpisodeSort other = (GetSearchAllLibrariesEpisodeSort) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetSearchAllLibrariesEpisodeSort [value=" + value + "]"; - } - - // return an array just like an enum - public static GetSearchAllLibrariesEpisodeSort[] values() { - synchronized (GetSearchAllLibrariesEpisodeSort.class) { - return values.values().toArray(new GetSearchAllLibrariesEpisodeSort[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("-1", LibraryDefault); - map.put("0", OldestFirst); - map.put("1", NewestFirst); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("-1", GetSearchAllLibrariesEpisodeSortEnum.LibraryDefault); - map.put("0", GetSearchAllLibrariesEpisodeSortEnum.OldestFirst); - map.put("1", GetSearchAllLibrariesEpisodeSortEnum.NewestFirst); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetSearchAllLibrariesEpisodeSort.class); - } - - @Override - public void serialize(GetSearchAllLibrariesEpisodeSort value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetSearchAllLibrariesEpisodeSort.class); - } - - @Override - public GetSearchAllLibrariesEpisodeSort deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetSearchAllLibrariesEpisodeSort.of(v); - } - } - - public enum GetSearchAllLibrariesEpisodeSortEnum { - - LibraryDefault("-1"), - OldestFirst("0"), - NewestFirst("1"),; - - private final String value; - - private GetSearchAllLibrariesEpisodeSortEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java index 67d2075b..29558a52 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java @@ -5,34 +5,52 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; -import java.util.Optional; public class GetSearchAllLibrariesGenre { - @JsonInclude(Include.NON_ABSENT) + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonProperty("id") + private int id; + + /** + * The genre name of this media-item + */ @JsonProperty("tag") - private Optional tag; + private String tag; @JsonCreator public GetSearchAllLibrariesGenre( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + this.id = id; this.tag = tag; } - - public GetSearchAllLibrariesGenre() { - this(Optional.empty()); + + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + @JsonIgnore + public int id() { + return id; } + /** + * The genre name of this media-item + */ @JsonIgnore - public Optional tag() { + public String tag() { return tag; } @@ -40,13 +58,20 @@ public class GetSearchAllLibrariesGenre { return new Builder(); } - public GetSearchAllLibrariesGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public GetSearchAllLibrariesGenre withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetSearchAllLibrariesGenre withTag(Optional tag) { + /** + * The genre name of this media-item + */ + public GetSearchAllLibrariesGenre withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -63,36 +88,48 @@ public class GetSearchAllLibrariesGenre { } GetSearchAllLibrariesGenre other = (GetSearchAllLibrariesGenre) o; return + Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.tag, other.tag); } @Override public int hashCode() { return Objects.hash( + id, tag); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesGenre.class, + "id", id, "tag", tag); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * The unique identifier for the genre. + * NOTE: This is different for each Plex server and is not globally unique. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The genre name of this media-item + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; @@ -100,6 +137,7 @@ public class GetSearchAllLibrariesGenre { public GetSearchAllLibrariesGenre build() { return new GetSearchAllLibrariesGenre( + id, tag); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaGuid.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java similarity index 67% rename from src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaGuid.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java index 654d8546..d192f7b1 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaGuid.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java @@ -11,25 +11,23 @@ import java.lang.Override; import java.lang.String; import java.util.Objects; -public class GetSearchAllLibrariesMediaGuid { +public class GetSearchAllLibrariesGuids { /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ @JsonProperty("id") private String id; @JsonCreator - public GetSearchAllLibrariesMediaGuid( + public GetSearchAllLibrariesGuids( @JsonProperty("id") String id) { Utils.checkNotNull(id, "id"); this.id = id; } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ @JsonIgnore public String id() { @@ -41,10 +39,9 @@ public class GetSearchAllLibrariesMediaGuid { } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ - public GetSearchAllLibrariesMediaGuid withId(String id) { + public GetSearchAllLibrariesGuids withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; @@ -59,7 +56,7 @@ public class GetSearchAllLibrariesMediaGuid { if (o == null || getClass() != o.getClass()) { return false; } - GetSearchAllLibrariesMediaGuid other = (GetSearchAllLibrariesMediaGuid) o; + GetSearchAllLibrariesGuids other = (GetSearchAllLibrariesGuids) o; return Objects.deepEquals(this.id, other.id); } @@ -72,7 +69,7 @@ public class GetSearchAllLibrariesMediaGuid { @Override public String toString() { - return Utils.toString(GetSearchAllLibrariesMediaGuid.class, + return Utils.toString(GetSearchAllLibrariesGuids.class, "id", id); } @@ -85,8 +82,7 @@ public class GetSearchAllLibrariesMediaGuid { } /** - * Can be one of the following formats: - * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// */ public Builder id(String id) { Utils.checkNotNull(id, "id"); @@ -94,8 +90,8 @@ public class GetSearchAllLibrariesMediaGuid { return this; } - public GetSearchAllLibrariesMediaGuid build() { - return new GetSearchAllLibrariesMediaGuid( + public GetSearchAllLibrariesGuids build() { + return new GetSearchAllLibrariesGuids( id); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java index f7ccbd73..e0563c2c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java @@ -8,6 +8,11 @@ import java.lang.String; import java.util.Objects; import java.util.Optional; +/** + * GetSearchAllLibrariesHasThumbnail + * + *

Indicates if the part has a thumbnail. + */ public enum GetSearchAllLibrariesHasThumbnail { False("0"), True("1"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java new file mode 100644 index 00000000..c3a4b513 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; + +/** + * GetSearchAllLibrariesLibraryOptimizedForStreaming + * + *

Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ +@JsonDeserialize(using = GetSearchAllLibrariesLibraryOptimizedForStreaming._Deserializer.class) +public class GetSearchAllLibrariesLibraryOptimizedForStreaming { + + @JsonValue + private TypedObject value; + + private GetSearchAllLibrariesLibraryOptimizedForStreaming(TypedObject value) { + this.value = value; + } + + public static GetSearchAllLibrariesLibraryOptimizedForStreaming of(GetSearchAllLibrariesOptimizedForStreamingLibrary1 value) { + Utils.checkNotNull(value, "value"); + return new GetSearchAllLibrariesLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static GetSearchAllLibrariesLibraryOptimizedForStreaming of(boolean value) { + Utils.checkNotNull(value, "value"); + return new GetSearchAllLibrariesLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *

    + *
  • {@code dev.plexapi.sdk.models.operations.GetSearchAllLibrariesOptimizedForStreamingLibrary1}
  • + *
  • {@code boolean}
  • + *
+ * + *

Use {@code instanceof} to determine what type is returned. For example: + * + *

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchAllLibrariesLibraryOptimizedForStreaming other = (GetSearchAllLibrariesLibraryOptimizedForStreaming) o; + return Objects.deepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(GetSearchAllLibrariesLibraryOptimizedForStreaming.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(GetSearchAllLibrariesLibraryOptimizedForStreaming.class, + "value", value); + } + +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java index 7158d5cf..f8f439e8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java @@ -5,34 +5,31 @@ 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.util.Objects; -import java.util.Optional; +/** + * GetSearchAllLibrariesLocation + * + *

The folder path for the media item. + */ public class GetSearchAllLibrariesLocation { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("path") - private Optional path; + private String path; @JsonCreator public GetSearchAllLibrariesLocation( - @JsonProperty("path") Optional path) { + @JsonProperty("path") String path) { Utils.checkNotNull(path, "path"); this.path = path; } - - public GetSearchAllLibrariesLocation() { - this(Optional.empty()); - } @JsonIgnore - public Optional path() { + public String path() { return path; } @@ -41,12 +38,6 @@ public class GetSearchAllLibrariesLocation { } public GetSearchAllLibrariesLocation withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = Optional.ofNullable(path); - return this; - } - - public GetSearchAllLibrariesLocation withPath(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; @@ -80,19 +71,13 @@ public class GetSearchAllLibrariesLocation { public final static class Builder { - private Optional path = Optional.empty(); + private String path; private Builder() { // force use of static builder() method } public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = Optional.ofNullable(path); - return this; - } - - public Builder path(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java index 065a5bf7..f68bf693 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java @@ -8,12 +8,11 @@ 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 com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; -import java.lang.Double; +import java.lang.Float; import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -23,103 +22,162 @@ import java.util.Optional; public class GetSearchAllLibrariesMedia { + /** + * Unique media identifier. + */ @JsonProperty("id") - private int id; + private long id; + /** + * Duration of the media in milliseconds. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; + /** + * Bitrate in bits per second. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("bitrate") private Optional bitrate; + /** + * Video width in pixels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("width") private Optional width; + /** + * Video height in pixels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("height") private Optional height; + /** + * Aspect ratio of the video. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("aspectRatio") - private Optional aspectRatio; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; + private Optional aspectRatio; + /** + * Number of audio channels. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioChannels") private Optional audioChannels; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayOffset") + private Optional displayOffset; + + /** + * Audio codec used. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioCodec") private Optional audioCodec; + /** + * Video codec used. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoCodec") private Optional videoCodec; + /** + * Video resolution (e.g., 4k). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoResolution") private Optional videoResolution; + /** + * Container format of the media. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") - private String container; + private Optional container; + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoFrameRate") private Optional videoFrameRate; + /** + * Video profile (e.g., main 10). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoProfile") private Optional videoProfile; + /** + * Indicates whether voice activity is detected. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasVoiceActivity") private Optional hasVoiceActivity; + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") private Optional optimizedForStreaming; + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Part") - private List part; + private Optional> part; @JsonCreator public GetSearchAllLibrariesMedia( - @JsonProperty("id") int id, + @JsonProperty("id") long id, @JsonProperty("duration") Optional duration, @JsonProperty("bitrate") Optional bitrate, @JsonProperty("width") Optional width, @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("aspectRatio") Optional aspectRatio, @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("displayOffset") Optional displayOffset, @JsonProperty("audioCodec") Optional audioCodec, @JsonProperty("videoCodec") Optional videoCodec, @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") String container, + @JsonProperty("container") Optional container, @JsonProperty("videoFrameRate") Optional videoFrameRate, @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") List part) { + @JsonProperty("Part") Optional> part) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(bitrate, "bitrate"); Utils.checkNotNull(width, "width"); Utils.checkNotNull(height, "height"); Utils.checkNotNull(aspectRatio, "aspectRatio"); - Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(displayOffset, "displayOffset"); Utils.checkNotNull(audioCodec, "audioCodec"); Utils.checkNotNull(videoCodec, "videoCodec"); Utils.checkNotNull(videoResolution, "videoResolution"); @@ -127,6 +185,7 @@ public class GetSearchAllLibrariesMedia { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(part, "part"); @@ -136,8 +195,8 @@ public class GetSearchAllLibrariesMedia { this.width = width; this.height = height; this.aspectRatio = aspectRatio; - this.audioProfile = audioProfile; this.audioChannels = audioChannels; + this.displayOffset = displayOffset; this.audioCodec = audioCodec; this.videoCodec = videoCodec; this.videoResolution = videoResolution; @@ -145,299 +204,475 @@ public class GetSearchAllLibrariesMedia { this.videoFrameRate = videoFrameRate; this.videoProfile = videoProfile; this.hasVoiceActivity = hasVoiceActivity; + this.audioProfile = audioProfile; this.optimizedForStreaming = optimizedForStreaming; this.has64bitOffsets = has64bitOffsets; this.part = part; } public GetSearchAllLibrariesMedia( - int id, - String container, - List part) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), container, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), part); + long id) { + this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * Unique media identifier. + */ @JsonIgnore - public int id() { + public long id() { return id; } + /** + * Duration of the media in milliseconds. + */ @JsonIgnore public Optional duration() { return duration; } + /** + * Bitrate in bits per second. + */ @JsonIgnore public Optional bitrate() { return bitrate; } + /** + * Video width in pixels. + */ @JsonIgnore public Optional width() { return width; } + /** + * Video height in pixels. + */ @JsonIgnore public Optional height() { return height; } + /** + * Aspect ratio of the video. + */ @JsonIgnore - public Optional aspectRatio() { + public Optional aspectRatio() { return aspectRatio; } - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - + /** + * Number of audio channels. + */ @JsonIgnore public Optional audioChannels() { return audioChannels; } + @JsonIgnore + public Optional displayOffset() { + return displayOffset; + } + + /** + * Audio codec used. + */ @JsonIgnore public Optional audioCodec() { return audioCodec; } + /** + * Video codec used. + */ @JsonIgnore public Optional videoCodec() { return videoCodec; } + /** + * Video resolution (e.g., 4k). + */ @JsonIgnore public Optional videoResolution() { return videoResolution; } + /** + * Container format of the media. + */ @JsonIgnore - public String container() { + public Optional container() { return container; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ @JsonIgnore public Optional videoFrameRate() { return videoFrameRate; } + /** + * Video profile (e.g., main 10). + */ @JsonIgnore public Optional videoProfile() { return videoProfile; } + /** + * Indicates whether voice activity is detected. + */ @JsonIgnore public Optional hasVoiceActivity() { return hasVoiceActivity; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + @JsonIgnore + public Optional audioProfile() { + return audioProfile; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @SuppressWarnings("unchecked") @JsonIgnore public Optional optimizedForStreaming() { return (Optional) optimizedForStreaming; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ @JsonIgnore public Optional has64bitOffsets() { return has64bitOffsets; } + @SuppressWarnings("unchecked") @JsonIgnore - public List part() { - return part; + public Optional> part() { + return (Optional>) part; } public final static Builder builder() { return new Builder(); } - public GetSearchAllLibrariesMedia withId(int id) { + /** + * Unique media identifier. + */ + public GetSearchAllLibrariesMedia withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Duration of the media in milliseconds. + */ public GetSearchAllLibrariesMedia withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the media in milliseconds. + */ public GetSearchAllLibrariesMedia withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * Bitrate in bits per second. + */ public GetSearchAllLibrariesMedia withBitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } + /** + * Bitrate in bits per second. + */ public GetSearchAllLibrariesMedia withBitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } + /** + * Video width in pixels. + */ public GetSearchAllLibrariesMedia withWidth(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } + /** + * Video width in pixels. + */ public GetSearchAllLibrariesMedia withWidth(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } + /** + * Video height in pixels. + */ public GetSearchAllLibrariesMedia withHeight(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } + /** + * Video height in pixels. + */ public GetSearchAllLibrariesMedia withHeight(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } - public GetSearchAllLibrariesMedia withAspectRatio(double aspectRatio) { + /** + * Aspect ratio of the video. + */ + public GetSearchAllLibrariesMedia withAspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } - public GetSearchAllLibrariesMedia withAspectRatio(Optional aspectRatio) { + /** + * Aspect ratio of the video. + */ + public GetSearchAllLibrariesMedia withAspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public GetSearchAllLibrariesMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - public GetSearchAllLibrariesMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - + /** + * Number of audio channels. + */ public GetSearchAllLibrariesMedia withAudioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } + /** + * Number of audio channels. + */ public GetSearchAllLibrariesMedia withAudioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } + public GetSearchAllLibrariesMedia withDisplayOffset(int displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = Optional.ofNullable(displayOffset); + return this; + } + + public GetSearchAllLibrariesMedia withDisplayOffset(Optional displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = displayOffset; + return this; + } + + /** + * Audio codec used. + */ public GetSearchAllLibrariesMedia withAudioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } + /** + * Audio codec used. + */ public GetSearchAllLibrariesMedia withAudioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } + /** + * Video codec used. + */ public GetSearchAllLibrariesMedia withVideoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } + /** + * Video codec used. + */ public GetSearchAllLibrariesMedia withVideoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } + /** + * Video resolution (e.g., 4k). + */ public GetSearchAllLibrariesMedia withVideoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } + /** + * Video resolution (e.g., 4k). + */ public GetSearchAllLibrariesMedia withVideoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } + /** + * Container format of the media. + */ public GetSearchAllLibrariesMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the media. + */ + public GetSearchAllLibrariesMedia withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public GetSearchAllLibrariesMedia withVideoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public GetSearchAllLibrariesMedia withVideoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } + /** + * Video profile (e.g., main 10). + */ public GetSearchAllLibrariesMedia withVideoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } + /** + * Video profile (e.g., main 10). + */ public GetSearchAllLibrariesMedia withVideoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } + /** + * Indicates whether voice activity is detected. + */ public GetSearchAllLibrariesMedia withHasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } + /** + * Indicates whether voice activity is detected. + */ public GetSearchAllLibrariesMedia withHasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public GetSearchAllLibrariesMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public GetSearchAllLibrariesMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public GetSearchAllLibrariesMedia withOptimizedForStreaming(GetSearchAllLibrariesOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public GetSearchAllLibrariesMedia withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetSearchAllLibrariesMedia withHas64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public GetSearchAllLibrariesMedia withHas64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; @@ -445,6 +680,12 @@ public class GetSearchAllLibrariesMedia { } public GetSearchAllLibrariesMedia withPart(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetSearchAllLibrariesMedia withPart(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; @@ -467,8 +708,8 @@ public class GetSearchAllLibrariesMedia { Objects.deepEquals(this.width, other.width) && Objects.deepEquals(this.height, other.height) && Objects.deepEquals(this.aspectRatio, other.aspectRatio) && - Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.audioChannels, other.audioChannels) && + Objects.deepEquals(this.displayOffset, other.displayOffset) && Objects.deepEquals(this.audioCodec, other.audioCodec) && Objects.deepEquals(this.videoCodec, other.videoCodec) && Objects.deepEquals(this.videoResolution, other.videoResolution) && @@ -476,6 +717,7 @@ public class GetSearchAllLibrariesMedia { Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && + Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.part, other.part); @@ -490,8 +732,8 @@ public class GetSearchAllLibrariesMedia { width, height, aspectRatio, - audioProfile, audioChannels, + displayOffset, audioCodec, videoCodec, videoResolution, @@ -499,6 +741,7 @@ public class GetSearchAllLibrariesMedia { videoFrameRate, videoProfile, hasVoiceActivity, + audioProfile, optimizedForStreaming, has64bitOffsets, part); @@ -513,8 +756,8 @@ public class GetSearchAllLibrariesMedia { "width", width, "height", height, "aspectRatio", aspectRatio, - "audioProfile", audioProfile, "audioChannels", audioChannels, + "displayOffset", displayOffset, "audioCodec", audioCodec, "videoCodec", videoCodec, "videoResolution", videoResolution, @@ -522,6 +765,7 @@ public class GetSearchAllLibrariesMedia { "videoFrameRate", videoFrameRate, "videoProfile", videoProfile, "hasVoiceActivity", hasVoiceActivity, + "audioProfile", audioProfile, "optimizedForStreaming", optimizedForStreaming, "has64bitOffsets", has64bitOffsets, "part", part); @@ -529,7 +773,7 @@ public class GetSearchAllLibrariesMedia { public final static class Builder { - private Integer id; + private Long id; private Optional duration = Optional.empty(); @@ -539,19 +783,19 @@ public class GetSearchAllLibrariesMedia { private Optional height = Optional.empty(); - private Optional aspectRatio = Optional.empty(); - - private Optional audioProfile = Optional.empty(); + private Optional aspectRatio = Optional.empty(); private Optional audioChannels = Optional.empty(); + private Optional displayOffset = Optional.empty(); + private Optional audioCodec = Optional.empty(); private Optional videoCodec = Optional.empty(); private Optional videoResolution = Optional.empty(); - private String container; + private Optional container = Optional.empty(); private Optional videoFrameRate = Optional.empty(); @@ -559,202 +803,323 @@ public class GetSearchAllLibrariesMedia { private Optional hasVoiceActivity = Optional.empty(); - private Optional optimizedForStreaming; + private Optional audioProfile = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); - private List part; + private Optional> part = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(int id) { + /** + * Unique media identifier. + */ + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Duration of the media in milliseconds. + */ public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the media in milliseconds. + */ public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * Bitrate in bits per second. + */ public Builder bitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } + /** + * Bitrate in bits per second. + */ public Builder bitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } + /** + * Video width in pixels. + */ public Builder width(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } + /** + * Video width in pixels. + */ public Builder width(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } + /** + * Video height in pixels. + */ public Builder height(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } + /** + * Video height in pixels. + */ public Builder height(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } - public Builder aspectRatio(double aspectRatio) { + /** + * Aspect ratio of the video. + */ + public Builder aspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } - public Builder aspectRatio(Optional aspectRatio) { + /** + * Aspect ratio of the video. + */ + public Builder aspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - + /** + * Number of audio channels. + */ public Builder audioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } + /** + * Number of audio channels. + */ public Builder audioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } + public Builder displayOffset(int displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = Optional.ofNullable(displayOffset); + return this; + } + + public Builder displayOffset(Optional displayOffset) { + Utils.checkNotNull(displayOffset, "displayOffset"); + this.displayOffset = displayOffset; + return this; + } + + /** + * Audio codec used. + */ public Builder audioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } + /** + * Audio codec used. + */ public Builder audioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } + /** + * Video codec used. + */ public Builder videoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } + /** + * Video codec used. + */ public Builder videoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } + /** + * Video resolution (e.g., 4k). + */ public Builder videoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } + /** + * Video resolution (e.g., 4k). + */ public Builder videoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } + /** + * Container format of the media. + */ public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the media. + */ + public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public Builder videoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } + /** + * Frame rate of the video. Values found include NTSC, PAL, 24p + */ public Builder videoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } + /** + * Video profile (e.g., main 10). + */ public Builder videoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } + /** + * Video profile (e.g., main 10). + */ public Builder videoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } + /** + * Indicates whether voice activity is detected. + */ public Builder hasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } + /** + * Indicates whether voice activity is detected. + */ public Builder hasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public Builder optimizedForStreaming(GetSearchAllLibrariesOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } + /** + * Indicates whether the media has 64-bit offsets. + * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. + */ public Builder has64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; @@ -762,15 +1127,18 @@ public class GetSearchAllLibrariesMedia { } public Builder part(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; } public GetSearchAllLibrariesMedia build() { - if (optimizedForStreaming == null) { - optimizedForStreaming = _SINGLETON_VALUE_OptimizedForStreaming.value(); - } return new GetSearchAllLibrariesMedia( id, duration, @@ -778,8 +1146,8 @@ public class GetSearchAllLibrariesMedia { width, height, aspectRatio, - audioProfile, audioChannels, + displayOffset, audioCodec, videoCodec, videoResolution, @@ -787,15 +1155,10 @@ public class GetSearchAllLibrariesMedia { videoFrameRate, videoProfile, hasVoiceActivity, + audioProfile, optimizedForStreaming, has64bitOffsets, part); } - - private static final LazySingletonValue> _SINGLETON_VALUE_OptimizedForStreaming = - new LazySingletonValue<>( - "optimizedForStreaming", - "0", - new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java index 456dbe02..63dd847a 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java @@ -5,37 +5,180 @@ 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.Double; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.List; import java.util.Objects; +import java.util.Optional; public class GetSearchAllLibrariesMediaContainer { + /** + * Number of media items returned in this response. + */ @JsonProperty("size") - private double size; + private int size; + + /** + * Indicates whether syncing is allowed. + */ + @JsonProperty("allowSync") + private boolean allowSync; + + /** + * An plugin identifier for the media container. + */ + @JsonProperty("identifier") + private String identifier; + + /** + * The unique identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + /** + * The title of the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + /** + * The universally unique identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + /** + * The prefix used for media tag resource paths. + */ + @JsonProperty("mediaTagPrefix") + private String mediaTagPrefix; + + /** + * The version number for media tags. + */ + @JsonProperty("mediaTagVersion") + private long mediaTagVersion; @JsonProperty("SearchResult") private List searchResult; @JsonCreator public GetSearchAllLibrariesMediaContainer( - @JsonProperty("size") double size, + @JsonProperty("size") int size, + @JsonProperty("allowSync") boolean allowSync, + @JsonProperty("identifier") String identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("mediaTagPrefix") String mediaTagPrefix, + @JsonProperty("mediaTagVersion") long mediaTagVersion, @JsonProperty("SearchResult") List searchResult) { Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); Utils.checkNotNull(searchResult, "searchResult"); this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; this.searchResult = searchResult; } + + public GetSearchAllLibrariesMediaContainer( + int size, + boolean allowSync, + String identifier, + String mediaTagPrefix, + long mediaTagVersion, + List searchResult) { + this(size, allowSync, identifier, Optional.empty(), Optional.empty(), Optional.empty(), mediaTagPrefix, mediaTagVersion, searchResult); + } + /** + * Number of media items returned in this response. + */ @JsonIgnore - public double size() { + public int size() { return size; } + /** + * Indicates whether syncing is allowed. + */ + @JsonIgnore + public boolean allowSync() { + return allowSync; + } + + /** + * An plugin identifier for the media container. + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * The unique identifier for the library section. + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The title of the library section. + */ + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + /** + * The universally unique identifier for the library section. + */ + @JsonIgnore + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + /** + * The prefix used for media tag resource paths. + */ + @JsonIgnore + public String mediaTagPrefix() { + return mediaTagPrefix; + } + + /** + * The version number for media tags. + */ + @JsonIgnore + public long mediaTagVersion() { + return mediaTagVersion; + } + @JsonIgnore public List searchResult() { return searchResult; @@ -45,12 +188,105 @@ public class GetSearchAllLibrariesMediaContainer { return new Builder(); } - public GetSearchAllLibrariesMediaContainer withSize(double size) { + /** + * Number of media items returned in this response. + */ + public GetSearchAllLibrariesMediaContainer withSize(int size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * Indicates whether syncing is allowed. + */ + public GetSearchAllLibrariesMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public GetSearchAllLibrariesMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The unique identifier for the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public GetSearchAllLibrariesMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * The version number for media tags. + */ + public GetSearchAllLibrariesMediaContainer withMediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + public GetSearchAllLibrariesMediaContainer withSearchResult(List searchResult) { Utils.checkNotNull(searchResult, "searchResult"); this.searchResult = searchResult; @@ -69,6 +305,13 @@ public class GetSearchAllLibrariesMediaContainer { GetSearchAllLibrariesMediaContainer other = (GetSearchAllLibrariesMediaContainer) o; return Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.allowSync, other.allowSync) && + Objects.deepEquals(this.identifier, other.identifier) && + Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && Objects.deepEquals(this.searchResult, other.searchResult); } @@ -76,6 +319,13 @@ public class GetSearchAllLibrariesMediaContainer { public int hashCode() { return Objects.hash( size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, searchResult); } @@ -83,12 +333,33 @@ public class GetSearchAllLibrariesMediaContainer { public String toString() { return Utils.toString(GetSearchAllLibrariesMediaContainer.class, "size", size, + "allowSync", allowSync, + "identifier", identifier, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, "searchResult", searchResult); } public final static class Builder { - private Double size; + private Integer size; + + private Boolean allowSync; + + private String identifier; + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private String mediaTagPrefix; + + private Long mediaTagVersion; private List searchResult; @@ -96,12 +367,105 @@ public class GetSearchAllLibrariesMediaContainer { // force use of static builder() method } - public Builder size(double size) { + /** + * Number of media items returned in this response. + */ + public Builder size(int size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * Indicates whether syncing is allowed. + */ + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + /** + * An plugin identifier for the media container. + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The unique identifier for the library section. + */ + public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The unique identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + /** + * The universally unique identifier for the library section. + */ + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + /** + * The prefix used for media tag resource paths. + */ + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + /** + * The version number for media tags. + */ + public Builder mediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + public Builder searchResult(List searchResult) { Utils.checkNotNull(searchResult, "searchResult"); this.searchResult = searchResult; @@ -111,6 +475,13 @@ public class GetSearchAllLibrariesMediaContainer { public GetSearchAllLibrariesMediaContainer build() { return new GetSearchAllLibrariesMediaContainer( size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, searchResult); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetaDataRating.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetaDataRating.java deleted file mode 100644 index f3d37e74..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetaDataRating.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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.Float; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -public class GetSearchAllLibrariesMetaDataRating { - - /** - * A URI or path to the rating image. - */ - @JsonProperty("image") - private String image; - - /** - * The value of the rating. - */ - @JsonProperty("value") - private float value; - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonProperty("type") - private String type; - - @JsonCreator - public GetSearchAllLibrariesMetaDataRating( - @JsonProperty("image") String image, - @JsonProperty("value") float value, - @JsonProperty("type") String type) { - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(value, "value"); - Utils.checkNotNull(type, "type"); - this.image = image; - this.value = value; - this.type = type; - } - - /** - * A URI or path to the rating image. - */ - @JsonIgnore - public String image() { - return image; - } - - /** - * The value of the rating. - */ - @JsonIgnore - public float value() { - return value; - } - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonIgnore - public String type() { - return type; - } - - public final static Builder builder() { - return new Builder(); - } - - /** - * A URI or path to the rating image. - */ - public GetSearchAllLibrariesMetaDataRating withImage(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - /** - * The value of the rating. - */ - public GetSearchAllLibrariesMetaDataRating withValue(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - /** - * The type of rating (e.g., audience, critic). - */ - public GetSearchAllLibrariesMetaDataRating withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesMetaDataRating other = (GetSearchAllLibrariesMetaDataRating) o; - return - Objects.deepEquals(this.image, other.image) && - Objects.deepEquals(this.value, other.value) && - Objects.deepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Objects.hash( - image, - value, - type); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesMetaDataRating.class, - "image", image, - "value", value, - "type", type); - } - - public final static class Builder { - - private String image; - - private Float value; - - private String type; - - private Builder() { - // force use of static builder() method - } - - /** - * A URI or path to the rating image. - */ - public Builder image(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - /** - * The value of the rating. - */ - public Builder value(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - /** - * The type of rating (e.g., audience, critic). - */ - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchAllLibrariesMetaDataRating build() { - return new GetSearchAllLibrariesMetaDataRating( - image, - value, - type); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java index a2267c0f..92323f6e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Double; +import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Override; @@ -21,137 +22,166 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +/** + * GetSearchAllLibrariesMetadata + * + *

Unknown + */ public class GetSearchAllLibrariesMetadata { /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ @JsonProperty("ratingKey") private String ratingKey; + /** + * The unique key for the media item. + */ @JsonProperty("key") private String key; + /** + * The globally unique identifier for the media item. + */ @JsonProperty("guid") private String guid; + /** + * A URL‐friendly version of the media title. + */ + @JsonProperty("slug") + private String slug; + + /** + * The studio that produced the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("studio") private Optional studio; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipChildren") - private Optional skipChildren; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ @JsonProperty("type") private GetSearchAllLibrariesType type; + /** + * The title of the media item. + */ @JsonProperty("title") private String title; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("slug") - private Optional slug; + /** + * The banner image URL for the media item. + */ + @JsonProperty("banner") + private String banner; + /** + * The sort title used for ordering media items. + */ + @JsonProperty("titleSort") + private String titleSort; + + /** + * The content rating for the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("contentRating") private Optional contentRating; + /** + * A synopsis of the media item. + */ @JsonProperty("summary") private String summary; - @JsonInclude(Include.NON_ABSENT) + /** + * The critic rating for the media item. + */ @JsonProperty("rating") - private Optional rating; + private float rating; - @JsonInclude(Include.NON_ABSENT) + /** + * The audience rating for the media item. + */ @JsonProperty("audienceRating") - private Optional audienceRating; + private double audienceRating; + /** + * The release year of the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("year") private Optional year; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("seasonCount") - private Optional seasonCount; - - @JsonInclude(Include.NON_ABSENT) + /** + * A brief tagline for the media item. + */ @JsonProperty("tagline") - private Optional tagline; + private String tagline; /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("flattenSeasons") - private Optional flattenSeasons; - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("episodeSort") - private Optional episodeSort; - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("enableCreditsMarkerGeneration") - private Optional enableCreditsMarkerGeneration; - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("showOrdering") - private Optional showOrdering; - - @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumb") - private Optional thumb; + private String thumb; - @JsonInclude(Include.NON_ABSENT) + /** + * The art image URL for the media item. + */ @JsonProperty("art") - private Optional art; + private String art; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("banner") - private Optional banner; + /** + * The theme URL for the media item. + */ + @JsonProperty("theme") + private String theme; + /** + * The index position of the media item. + */ + @JsonProperty("index") + private int index; + + /** + * The number of leaf items (end nodes) under this media item. + */ @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + /** + * The number of leaf items that have been viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * The number of child items associated with this media item. + */ + @JsonProperty("childCount") + private int childCount; + + /** + * The total number of seasons (for TV shows). + */ + @JsonProperty("seasonCount") + private int seasonCount; + + /** + * The duration of the media item in milliseconds. + */ @JsonProperty("duration") - private Optional duration; + private int duration; + /** + * The original release date of the media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") private Optional originallyAvailableAt; - /** - * Unix epoch datetime in seconds - */ @JsonProperty("addedAt") private long addedAt; @@ -162,61 +192,269 @@ public class GetSearchAllLibrariesMetadata { @JsonProperty("updatedAt") private Optional updatedAt; + /** + * The release year of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + /** + * The URL for the audience rating image. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audienceRatingImage") private Optional audienceRatingImage; + /** + * The source from which chapter data is derived. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("chapterSource") private Optional chapterSource; + /** + * The primary extra key associated with this media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("primaryExtraKey") private Optional primaryExtraKey; + /** + * The original title of the media item (if different). + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; + @JsonProperty("originalTitle") + private Optional originalTitle; + /** + * The rating key of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The rating key of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentRatingKey") private Optional grandparentRatingKey; + /** + * The GUID of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + /** + * The GUID of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentGuid") private Optional grandparentGuid; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentSlug") - private Optional parentSlug; - + /** + * The slug for the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentSlug") private Optional grandparentSlug; + /** + * The key of the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; + @JsonProperty("grandparentKey") + private Optional grandparentKey; + /** + * The key of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The title of the grandparent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + /** + * The thumbnail URL for the grandparent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The theme URL for the grandparent media item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentTheme") private Optional grandparentTheme; /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The title of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * The index position of the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The thumbnail URL for the parent media item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The URL for the rating image. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * The number of times this media item has been viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * The current playback offset (in milliseconds). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + /** + * The number of times this media item has been skipped. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipCount") + private Optional skipCount; + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * The Unix timestamp representing the last time the item was rated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastRatedAt") + private Optional lastRatedAt; + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAtAccuracy") + private Optional createdAtAccuracy; + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAtTZOffset") + private Optional createdAtTZOffset; + + /** + * Unix timestamp for when the media item was last viewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("UltraBlurColors") + private Optional ultraBlurColors; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guids; + + /** + * The identifier for the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + /** + * The title of the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + /** + * The key corresponding to the library section. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("showOrdering") + private Optional showOrdering; + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("flattenSeasons") + private Optional flattenSeasons; + + /** + * Indicates whether child items should be skipped. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Media") private Optional> media; @@ -237,10 +475,6 @@ public class GetSearchAllLibrariesMetadata { @JsonProperty("Writer") private Optional> writer; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Collection") - private Optional> collection; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("Role") private Optional> role; @@ -249,525 +483,447 @@ public class GetSearchAllLibrariesMetadata { @JsonProperty("Location") private Optional> location; - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> mediaGuid; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Rating") - private Optional> metaDataRating; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("titleSort") - private Optional titleSort; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("theme") - private Optional theme; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("childCount") - private Optional childCount; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPremiumExtras") - private Optional hasPremiumExtras; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPremiumPrimaryExtra") - private Optional hasPremiumPrimaryExtra; - - /** - * The rating key of the parent item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentStudio") - private Optional parentStudio; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTheme") - private Optional parentTheme; - @JsonCreator public GetSearchAllLibrariesMetadata( @JsonProperty("ratingKey") String ratingKey, @JsonProperty("key") String key, @JsonProperty("guid") String guid, + @JsonProperty("slug") String slug, @JsonProperty("studio") Optional studio, - @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionKey") Optional librarySectionKey, @JsonProperty("type") GetSearchAllLibrariesType type, @JsonProperty("title") String title, - @JsonProperty("slug") Optional slug, + @JsonProperty("banner") String banner, + @JsonProperty("titleSort") String titleSort, @JsonProperty("contentRating") Optional contentRating, @JsonProperty("summary") String summary, - @JsonProperty("rating") Optional rating, - @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("rating") float rating, + @JsonProperty("audienceRating") double audienceRating, @JsonProperty("year") Optional year, - @JsonProperty("seasonCount") Optional seasonCount, - @JsonProperty("tagline") Optional tagline, - @JsonProperty("flattenSeasons") Optional flattenSeasons, - @JsonProperty("episodeSort") Optional episodeSort, - @JsonProperty("enableCreditsMarkerGeneration") Optional enableCreditsMarkerGeneration, - @JsonProperty("showOrdering") Optional showOrdering, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("art") Optional art, - @JsonProperty("banner") Optional banner, - @JsonProperty("duration") Optional duration, + @JsonProperty("tagline") String tagline, + @JsonProperty("thumb") String thumb, + @JsonProperty("art") String art, + @JsonProperty("theme") String theme, + @JsonProperty("index") int index, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("childCount") int childCount, + @JsonProperty("seasonCount") int seasonCount, + @JsonProperty("duration") int duration, @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, @JsonProperty("addedAt") long addedAt, @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("parentYear") Optional parentYear, @JsonProperty("audienceRatingImage") Optional audienceRatingImage, @JsonProperty("chapterSource") Optional chapterSource, @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentRatingKey") Optional parentRatingKey, @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("parentGuid") Optional parentGuid, @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("grandparentSlug") Optional grandparentSlug, @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("parentKey") Optional parentKey, @JsonProperty("grandparentTitle") Optional grandparentTitle, @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("parentSlug") Optional parentSlug, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentArt") Optional grandparentArt, @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("skipCount") Optional skipCount, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("lastRatedAt") Optional lastRatedAt, + @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, + @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("Image") Optional> image, + @JsonProperty("UltraBlurColors") Optional ultraBlurColors, + @JsonProperty("Guid") Optional> guids, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("showOrdering") Optional showOrdering, + @JsonProperty("flattenSeasons") Optional flattenSeasons, + @JsonProperty("skipChildren") Optional skipChildren, @JsonProperty("Media") Optional> media, @JsonProperty("Genre") Optional> genre, @JsonProperty("Country") Optional> country, @JsonProperty("Director") Optional> director, @JsonProperty("Writer") Optional> writer, - @JsonProperty("Collection") Optional> collection, @JsonProperty("Role") Optional> role, - @JsonProperty("Location") Optional> location, - @JsonProperty("Guid") Optional> mediaGuid, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Rating") Optional> metaDataRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("titleSort") Optional titleSort, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("index") Optional index, - @JsonProperty("theme") Optional theme, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") Optional childCount, - @JsonProperty("hasPremiumExtras") Optional hasPremiumExtras, - @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentStudio") Optional parentStudio, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTheme") Optional parentTheme) { + @JsonProperty("Location") Optional> location) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(slug, "slug"); Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(skipChildren, "skipChildren"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); Utils.checkNotNull(type, "type"); Utils.checkNotNull(title, "title"); - Utils.checkNotNull(slug, "slug"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(titleSort, "titleSort"); Utils.checkNotNull(contentRating, "contentRating"); Utils.checkNotNull(summary, "summary"); Utils.checkNotNull(rating, "rating"); Utils.checkNotNull(audienceRating, "audienceRating"); Utils.checkNotNull(year, "year"); - Utils.checkNotNull(seasonCount, "seasonCount"); Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - Utils.checkNotNull(episodeSort, "episodeSort"); - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - Utils.checkNotNull(showOrdering, "showOrdering"); Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(art, "art"); - Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(childCount, "childCount"); + Utils.checkNotNull(seasonCount, "seasonCount"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); Utils.checkNotNull(addedAt, "addedAt"); Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(parentYear, "parentYear"); Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); Utils.checkNotNull(chapterSource, "chapterSource"); Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(parentGuid, "parentGuid"); Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(grandparentSlug, "grandparentSlug"); Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(parentKey, "parentKey"); Utils.checkNotNull(grandparentTitle, "grandparentTitle"); Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(parentSlug, "parentSlug"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(skipCount, "skipCount"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + Utils.checkNotNull(guids, "guids"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(showOrdering, "showOrdering"); + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + Utils.checkNotNull(skipChildren, "skipChildren"); Utils.checkNotNull(media, "media"); Utils.checkNotNull(genre, "genre"); Utils.checkNotNull(country, "country"); Utils.checkNotNull(director, "director"); Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(collection, "collection"); Utils.checkNotNull(role, "role"); Utils.checkNotNull(location, "location"); - Utils.checkNotNull(mediaGuid, "mediaGuid"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(metaDataRating, "metaDataRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTheme, "parentTheme"); this.ratingKey = ratingKey; this.key = key; this.guid = guid; + this.slug = slug; this.studio = studio; - this.skipChildren = skipChildren; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionKey = librarySectionKey; this.type = type; this.title = title; - this.slug = slug; + this.banner = banner; + this.titleSort = titleSort; this.contentRating = contentRating; this.summary = summary; this.rating = rating; this.audienceRating = audienceRating; this.year = year; - this.seasonCount = seasonCount; this.tagline = tagline; - this.flattenSeasons = flattenSeasons; - this.episodeSort = episodeSort; - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - this.showOrdering = showOrdering; this.thumb = thumb; this.art = art; - this.banner = banner; + this.theme = theme; + this.index = index; + this.leafCount = leafCount; + this.viewedLeafCount = viewedLeafCount; + this.childCount = childCount; + this.seasonCount = seasonCount; this.duration = duration; this.originallyAvailableAt = originallyAvailableAt; this.addedAt = addedAt; this.updatedAt = updatedAt; + this.parentYear = parentYear; this.audienceRatingImage = audienceRatingImage; this.chapterSource = chapterSource; this.primaryExtraKey = primaryExtraKey; - this.ratingImage = ratingImage; + this.originalTitle = originalTitle; + this.parentRatingKey = parentRatingKey; this.grandparentRatingKey = grandparentRatingKey; + this.parentGuid = parentGuid; this.grandparentGuid = grandparentGuid; + this.grandparentSlug = grandparentSlug; this.grandparentKey = grandparentKey; + this.parentKey = parentKey; this.grandparentTitle = grandparentTitle; this.grandparentThumb = grandparentThumb; - this.parentSlug = parentSlug; - this.grandparentSlug = grandparentSlug; - this.grandparentArt = grandparentArt; this.grandparentTheme = grandparentTheme; + this.grandparentArt = grandparentArt; + this.parentTitle = parentTitle; + this.parentIndex = parentIndex; + this.parentThumb = parentThumb; + this.ratingImage = ratingImage; + this.viewCount = viewCount; + this.viewOffset = viewOffset; + this.skipCount = skipCount; + this.subtype = subtype; + this.lastRatedAt = lastRatedAt; + this.createdAtAccuracy = createdAtAccuracy; + this.createdAtTZOffset = createdAtTZOffset; + this.lastViewedAt = lastViewedAt; + this.userRating = userRating; + this.image = image; + this.ultraBlurColors = ultraBlurColors; + this.guids = guids; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionKey = librarySectionKey; + this.showOrdering = showOrdering; + this.flattenSeasons = flattenSeasons; + this.skipChildren = skipChildren; this.media = media; this.genre = genre; this.country = country; this.director = director; this.writer = writer; - this.collection = collection; this.role = role; this.location = location; - this.mediaGuid = mediaGuid; - this.ultraBlurColors = ultraBlurColors; - this.metaDataRating = metaDataRating; - this.image = image; - this.titleSort = titleSort; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.originalTitle = originalTitle; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.index = index; - this.theme = theme; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.hasPremiumExtras = hasPremiumExtras; - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - this.parentRatingKey = parentRatingKey; - this.parentGuid = parentGuid; - this.parentStudio = parentStudio; - this.parentKey = parentKey; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentYear = parentYear; - this.parentThumb = parentThumb; - this.parentTheme = parentTheme; } public GetSearchAllLibrariesMetadata( String ratingKey, String key, String guid, + String slug, GetSearchAllLibrariesType type, String title, + String banner, + String titleSort, String summary, + float rating, + double audienceRating, + String tagline, + String thumb, + String art, + String theme, + int index, + int childCount, + int seasonCount, + int duration, long addedAt) { - this(ratingKey, key, guid, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), type, title, Optional.empty(), Optional.empty(), summary, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(ratingKey, key, guid, slug, Optional.empty(), type, title, banner, titleSort, Optional.empty(), summary, rating, audienceRating, Optional.empty(), tagline, thumb, art, theme, index, Optional.empty(), Optional.empty(), childCount, seasonCount, duration, Optional.empty(), addedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ @JsonIgnore public String ratingKey() { return ratingKey; } + /** + * The unique key for the media item. + */ @JsonIgnore public String key() { return key; } + /** + * The globally unique identifier for the media item. + */ @JsonIgnore public String guid() { return guid; } + /** + * A URL‐friendly version of the media title. + */ + @JsonIgnore + public String slug() { + return slug; + } + + /** + * The studio that produced the media item. + */ @JsonIgnore public Optional studio() { return studio; } - @JsonIgnore - public Optional skipChildren() { - return skipChildren; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ @JsonIgnore public GetSearchAllLibrariesType type() { return type; } + /** + * The title of the media item. + */ @JsonIgnore public String title() { return title; } + /** + * The banner image URL for the media item. + */ @JsonIgnore - public Optional slug() { - return slug; + public String banner() { + return banner; } + /** + * The sort title used for ordering media items. + */ + @JsonIgnore + public String titleSort() { + return titleSort; + } + + /** + * The content rating for the media item. + */ @JsonIgnore public Optional contentRating() { return contentRating; } + /** + * A synopsis of the media item. + */ @JsonIgnore public String summary() { return summary; } + /** + * The critic rating for the media item. + */ @JsonIgnore - public Optional rating() { + public float rating() { return rating; } + /** + * The audience rating for the media item. + */ @JsonIgnore - public Optional audienceRating() { + public double audienceRating() { return audienceRating; } + /** + * The release year of the media item. + */ @JsonIgnore public Optional year() { return year; } + /** + * A brief tagline for the media item. + */ @JsonIgnore - public Optional seasonCount() { - return seasonCount; - } - - @JsonIgnore - public Optional tagline() { + public String tagline() { return tagline; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional flattenSeasons() { - return (Optional) flattenSeasons; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional episodeSort() { - return (Optional) episodeSort; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional enableCreditsMarkerGeneration() { - return (Optional) enableCreditsMarkerGeneration; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional showOrdering() { - return (Optional) showOrdering; - } - - @JsonIgnore - public Optional thumb() { + public String thumb() { return thumb; } + /** + * The art image URL for the media item. + */ @JsonIgnore - public Optional art() { + public String art() { return art; } + /** + * The theme URL for the media item. + */ @JsonIgnore - public Optional banner() { - return banner; + public String theme() { + return theme; } + /** + * The index position of the media item. + */ @JsonIgnore - public Optional duration() { + public int index() { + return index; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + /** + * The number of leaf items that have been viewed. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * The number of child items associated with this media item. + */ + @JsonIgnore + public int childCount() { + return childCount; + } + + /** + * The total number of seasons (for TV shows). + */ + @JsonIgnore + public int seasonCount() { + return seasonCount; + } + + /** + * The duration of the media item in milliseconds. + */ + @JsonIgnore + public int duration() { return duration; } + /** + * The original release date of the media item. + */ @JsonIgnore public Optional originallyAvailableAt() { return originallyAvailableAt; } - /** - * Unix epoch datetime in seconds - */ @JsonIgnore public long addedAt() { return addedAt; @@ -781,74 +937,312 @@ public class GetSearchAllLibrariesMetadata { return updatedAt; } + /** + * The release year of the parent media item. + */ + @JsonIgnore + public Optional parentYear() { + return parentYear; + } + + /** + * The URL for the audience rating image. + */ @JsonIgnore public Optional audienceRatingImage() { return audienceRatingImage; } + /** + * The source from which chapter data is derived. + */ @JsonIgnore public Optional chapterSource() { return chapterSource; } + /** + * The primary extra key associated with this media item. + */ @JsonIgnore public Optional primaryExtraKey() { return primaryExtraKey; } + /** + * The original title of the media item (if different). + */ @JsonIgnore - public Optional ratingImage() { - return ratingImage; + public Optional originalTitle() { + return originalTitle; } + /** + * The rating key of the parent media item. + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The rating key of the grandparent media item. + */ @JsonIgnore public Optional grandparentRatingKey() { return grandparentRatingKey; } + /** + * The GUID of the parent media item. + */ + @JsonIgnore + public Optional parentGuid() { + return parentGuid; + } + + /** + * The GUID of the grandparent media item. + */ @JsonIgnore public Optional grandparentGuid() { return grandparentGuid; } - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - @JsonIgnore - public Optional parentSlug() { - return parentSlug; - } - + /** + * The slug for the grandparent media item. + */ @JsonIgnore public Optional grandparentSlug() { return grandparentSlug; } + /** + * The key of the grandparent media item. + */ @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; + public Optional grandparentKey() { + return grandparentKey; } + /** + * The key of the parent media item. + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The title of the grandparent media item. + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The theme URL for the grandparent media item. + */ @JsonIgnore public Optional grandparentTheme() { return grandparentTheme; } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The title of the parent media item. + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * The index position of the parent media item. + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The thumbnail URL for the parent media item. + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The URL for the rating image. + */ + @JsonIgnore + public Optional ratingImage() { + return ratingImage; + } + + /** + * The number of times this media item has been viewed. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * The current playback offset (in milliseconds). + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + /** + * The number of times this media item has been skipped. + */ + @JsonIgnore + public Optional skipCount() { + return skipCount; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + @JsonIgnore + public Optional subtype() { + return subtype; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + @JsonIgnore + public Optional lastRatedAt() { + return lastRatedAt; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + @JsonIgnore + public Optional createdAtAccuracy() { + return createdAtAccuracy; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + @JsonIgnore + public Optional createdAtTZOffset() { + return createdAtTZOffset; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ultraBlurColors() { + return (Optional) ultraBlurColors; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guids() { + return (Optional>) guids; + } + + /** + * The identifier for the library section. + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The title of the library section. + */ + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + /** + * The key corresponding to the library section. + */ + @JsonIgnore + public Optional librarySectionKey() { + return librarySectionKey; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional showOrdering() { + return (Optional) showOrdering; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional flattenSeasons() { + return (Optional) flattenSeasons; + } + + /** + * Indicates whether child items should be skipped. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> media() { @@ -879,12 +1273,6 @@ public class GetSearchAllLibrariesMetadata { return (Optional>) writer; } - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> collection() { - return (Optional>) collection; - } - @SuppressWarnings("unchecked") @JsonIgnore public Optional> role() { @@ -897,153 +1285,12 @@ public class GetSearchAllLibrariesMetadata { return (Optional>) location; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> mediaGuid() { - return (Optional>) mediaGuid; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metaDataRating() { - return (Optional>) metaDataRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @JsonIgnore - public Optional titleSort() { - return titleSort; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional theme() { - return theme; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - @JsonIgnore - public Optional childCount() { - return childCount; - } - - @JsonIgnore - public Optional hasPremiumExtras() { - return hasPremiumExtras; - } - - @JsonIgnore - public Optional hasPremiumPrimaryExtra() { - return hasPremiumPrimaryExtra; - } - - /** - * The rating key of the parent item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - @JsonIgnore - public Optional parentStudio() { - return parentStudio; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional parentTheme() { - return parentTheme; - } - public final static Builder builder() { return new Builder(); } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ public GetSearchAllLibrariesMetadata withRatingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); @@ -1051,328 +1298,273 @@ public class GetSearchAllLibrariesMetadata { return this; } + /** + * The unique key for the media item. + */ public GetSearchAllLibrariesMetadata withKey(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + /** + * The globally unique identifier for the media item. + */ public GetSearchAllLibrariesMetadata withGuid(String guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; } + /** + * A URL‐friendly version of the media title. + */ + public GetSearchAllLibrariesMetadata withSlug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + /** + * The studio that produced the media item. + */ public GetSearchAllLibrariesMetadata withStudio(String studio) { Utils.checkNotNull(studio, "studio"); this.studio = Optional.ofNullable(studio); return this; } + /** + * The studio that produced the media item. + */ public GetSearchAllLibrariesMetadata withStudio(Optional studio) { Utils.checkNotNull(studio, "studio"); this.studio = studio; return this; } - public GetSearchAllLibrariesMetadata withSkipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - public GetSearchAllLibrariesMetadata withSkipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - public GetSearchAllLibrariesMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ public GetSearchAllLibrariesMetadata withType(GetSearchAllLibrariesType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * The title of the media item. + */ public GetSearchAllLibrariesMetadata withTitle(String title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public GetSearchAllLibrariesMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); + /** + * The banner image URL for the media item. + */ + public GetSearchAllLibrariesMetadata withBanner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; return this; } - public GetSearchAllLibrariesMetadata withSlug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; + /** + * The sort title used for ordering media items. + */ + public GetSearchAllLibrariesMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; return this; } + /** + * The content rating for the media item. + */ public GetSearchAllLibrariesMetadata withContentRating(String contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } + /** + * The content rating for the media item. + */ public GetSearchAllLibrariesMetadata withContentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } + /** + * A synopsis of the media item. + */ public GetSearchAllLibrariesMetadata withSummary(String summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; } - public GetSearchAllLibrariesMetadata withRating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - public GetSearchAllLibrariesMetadata withRating(Optional rating) { + /** + * The critic rating for the media item. + */ + public GetSearchAllLibrariesMetadata withRating(float rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; return this; } + /** + * The audience rating for the media item. + */ public GetSearchAllLibrariesMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - public GetSearchAllLibrariesMetadata withAudienceRating(Optional audienceRating) { Utils.checkNotNull(audienceRating, "audienceRating"); this.audienceRating = audienceRating; return this; } + /** + * The release year of the media item. + */ public GetSearchAllLibrariesMetadata withYear(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } + /** + * The release year of the media item. + */ public GetSearchAllLibrariesMetadata withYear(Optional year) { Utils.checkNotNull(year, "year"); this.year = year; return this; } - public GetSearchAllLibrariesMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = Optional.ofNullable(seasonCount); - return this; - } - - public GetSearchAllLibrariesMetadata withSeasonCount(Optional seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - + /** + * A brief tagline for the media item. + */ public GetSearchAllLibrariesMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - public GetSearchAllLibrariesMetadata withTagline(Optional tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = tagline; return this; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - public GetSearchAllLibrariesMetadata withFlattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetSearchAllLibrariesMetadata withFlattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public GetSearchAllLibrariesMetadata withEpisodeSort(GetSearchAllLibrariesEpisodeSort episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = Optional.ofNullable(episodeSort); - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public GetSearchAllLibrariesMetadata withEpisodeSort(Optional episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = episodeSort; - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public GetSearchAllLibrariesMetadata withEnableCreditsMarkerGeneration(GetSearchAllLibrariesEnableCreditsMarkerGeneration enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration); - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public GetSearchAllLibrariesMetadata withEnableCreditsMarkerGeneration(Optional enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public GetSearchAllLibrariesMetadata withShowOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public GetSearchAllLibrariesMetadata withShowOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - public GetSearchAllLibrariesMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - public GetSearchAllLibrariesMetadata withThumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The art image URL for the media item. + */ public GetSearchAllLibrariesMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - public GetSearchAllLibrariesMetadata withArt(Optional art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } - public GetSearchAllLibrariesMetadata withBanner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * The theme URL for the media item. + */ + public GetSearchAllLibrariesMetadata withTheme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; return this; } - public GetSearchAllLibrariesMetadata withBanner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * The index position of the media item. + */ + public GetSearchAllLibrariesMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The number of leaf items (end nodes) under this media item. + */ + public GetSearchAllLibrariesMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + public GetSearchAllLibrariesMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public GetSearchAllLibrariesMetadata withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public GetSearchAllLibrariesMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * The number of child items associated with this media item. + */ + public GetSearchAllLibrariesMetadata withChildCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + /** + * The total number of seasons (for TV shows). + */ + public GetSearchAllLibrariesMetadata withSeasonCount(int seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = seasonCount; + return this; + } + + /** + * The duration of the media item in milliseconds. + */ public GetSearchAllLibrariesMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public GetSearchAllLibrariesMetadata withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * The original release date of the media item. + */ public GetSearchAllLibrariesMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } + /** + * The original release date of the media item. + */ public GetSearchAllLibrariesMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - /** - * Unix epoch datetime in seconds - */ public GetSearchAllLibrariesMetadata withAddedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; @@ -1397,156 +1589,270 @@ public class GetSearchAllLibrariesMetadata { return this; } + /** + * The release year of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + /** + * The release year of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + /** + * The URL for the audience rating image. + */ public GetSearchAllLibrariesMetadata withAudienceRatingImage(String audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); return this; } + /** + * The URL for the audience rating image. + */ public GetSearchAllLibrariesMetadata withAudienceRatingImage(Optional audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = audienceRatingImage; return this; } + /** + * The source from which chapter data is derived. + */ public GetSearchAllLibrariesMetadata withChapterSource(String chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = Optional.ofNullable(chapterSource); return this; } + /** + * The source from which chapter data is derived. + */ public GetSearchAllLibrariesMetadata withChapterSource(Optional chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = chapterSource; return this; } + /** + * The primary extra key associated with this media item. + */ public GetSearchAllLibrariesMetadata withPrimaryExtraKey(String primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); return this; } + /** + * The primary extra key associated with this media item. + */ public GetSearchAllLibrariesMetadata withPrimaryExtraKey(Optional primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = primaryExtraKey; return this; } - public GetSearchAllLibrariesMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); + /** + * The original title of the media item (if different). + */ + public GetSearchAllLibrariesMetadata withOriginalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); return this; } - public GetSearchAllLibrariesMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; + /** + * The original title of the media item (if different). + */ + public GetSearchAllLibrariesMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; return this; } + /** + * The rating key of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The rating key of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The rating key of the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentRatingKey(String grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); return this; } + /** + * The rating key of the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = grandparentRatingKey; return this; } + /** + * The GUID of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + /** + * The GUID of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + /** + * The GUID of the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentGuid(String grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = Optional.ofNullable(grandparentGuid); return this; } + /** + * The GUID of the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentGuid(Optional grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = grandparentGuid; return this; } - public GetSearchAllLibrariesMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - public GetSearchAllLibrariesMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public GetSearchAllLibrariesMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - public GetSearchAllLibrariesMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public GetSearchAllLibrariesMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - public GetSearchAllLibrariesMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public GetSearchAllLibrariesMetadata withParentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - public GetSearchAllLibrariesMetadata withParentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - + /** + * The slug for the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); return this; } + /** + * The slug for the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentSlug(Optional grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = grandparentSlug; return this; } - public GetSearchAllLibrariesMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); + /** + * The key of the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); return this; } - public GetSearchAllLibrariesMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; + /** + * The key of the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; return this; } + /** + * The key of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The key of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The title of the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The title of the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The theme URL for the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentTheme(String grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = Optional.ofNullable(grandparentTheme); return this; } + /** + * The theme URL for the grandparent media item. + */ public GetSearchAllLibrariesMetadata withGrandparentTheme(Optional grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = grandparentTheme; @@ -1554,17 +1860,419 @@ public class GetSearchAllLibrariesMetadata { } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + public GetSearchAllLibrariesMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The art URL for the grandparent media item. + */ + public GetSearchAllLibrariesMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The title of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The title of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * The index position of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The index position of the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public GetSearchAllLibrariesMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The URL for the rating image. + */ + public GetSearchAllLibrariesMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * The URL for the rating image. + */ + public GetSearchAllLibrariesMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public GetSearchAllLibrariesMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public GetSearchAllLibrariesMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public GetSearchAllLibrariesMetadata withViewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public GetSearchAllLibrariesMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public GetSearchAllLibrariesMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public GetSearchAllLibrariesMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public GetSearchAllLibrariesMetadata withSubtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public GetSearchAllLibrariesMetadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public GetSearchAllLibrariesMetadata withLastRatedAt(long lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public GetSearchAllLibrariesMetadata withLastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public GetSearchAllLibrariesMetadata withCreatedAtAccuracy(String createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public GetSearchAllLibrariesMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = createdAtAccuracy; + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public GetSearchAllLibrariesMetadata withCreatedAtTZOffset(String createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public GetSearchAllLibrariesMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = createdAtTZOffset; + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public GetSearchAllLibrariesMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public GetSearchAllLibrariesMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public GetSearchAllLibrariesMetadata withUserRating(float userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public GetSearchAllLibrariesMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public GetSearchAllLibrariesMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public GetSearchAllLibrariesMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public GetSearchAllLibrariesMetadata withUltraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + public GetSearchAllLibrariesMetadata withUltraBlurColors(Optional ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + public GetSearchAllLibrariesMetadata withGuids(List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public GetSearchAllLibrariesMetadata withGuids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + /** + * The identifier for the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public GetSearchAllLibrariesMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public GetSearchAllLibrariesMetadata withShowOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = Optional.ofNullable(showOrdering); + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public GetSearchAllLibrariesMetadata withShowOrdering(Optional showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = showOrdering; + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public GetSearchAllLibrariesMetadata withFlattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public GetSearchAllLibrariesMetadata withFlattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public GetSearchAllLibrariesMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public GetSearchAllLibrariesMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + public GetSearchAllLibrariesMetadata withMedia(List media) { Utils.checkNotNull(media, "media"); this.media = Optional.ofNullable(media); return this; } - /** - * The Media object is only included when type query is `4` or higher. - */ public GetSearchAllLibrariesMetadata withMedia(Optional> media) { Utils.checkNotNull(media, "media"); this.media = media; @@ -1619,18 +2327,6 @@ public class GetSearchAllLibrariesMetadata { return this; } - public GetSearchAllLibrariesMetadata withCollection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - public GetSearchAllLibrariesMetadata withCollection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - public GetSearchAllLibrariesMetadata withRole(List role) { Utils.checkNotNull(role, "role"); this.role = Optional.ofNullable(role); @@ -1655,330 +2351,6 @@ public class GetSearchAllLibrariesMetadata { return this; } - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public GetSearchAllLibrariesMetadata withMediaGuid(List mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = Optional.ofNullable(mediaGuid); - return this; - } - - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public GetSearchAllLibrariesMetadata withMediaGuid(Optional> mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = mediaGuid; - return this; - } - - public GetSearchAllLibrariesMetadata withUltraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - public GetSearchAllLibrariesMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - public GetSearchAllLibrariesMetadata withMetaDataRating(List metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = Optional.ofNullable(metaDataRating); - return this; - } - - public GetSearchAllLibrariesMetadata withMetaDataRating(Optional> metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = metaDataRating; - return this; - } - - public GetSearchAllLibrariesMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public GetSearchAllLibrariesMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetSearchAllLibrariesMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - public GetSearchAllLibrariesMetadata withTitleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public GetSearchAllLibrariesMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - public GetSearchAllLibrariesMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetSearchAllLibrariesMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - public GetSearchAllLibrariesMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetSearchAllLibrariesMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - public GetSearchAllLibrariesMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - public GetSearchAllLibrariesMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - public GetSearchAllLibrariesMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - public GetSearchAllLibrariesMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - public GetSearchAllLibrariesMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public GetSearchAllLibrariesMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - public GetSearchAllLibrariesMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetSearchAllLibrariesMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); - return this; - } - - public GetSearchAllLibrariesMetadata withTheme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - public GetSearchAllLibrariesMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - public GetSearchAllLibrariesMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetSearchAllLibrariesMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - public GetSearchAllLibrariesMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public GetSearchAllLibrariesMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - public GetSearchAllLibrariesMetadata withChildCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public GetSearchAllLibrariesMetadata withHasPremiumExtras(String hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); - return this; - } - - public GetSearchAllLibrariesMetadata withHasPremiumExtras(Optional hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = hasPremiumExtras; - return this; - } - - public GetSearchAllLibrariesMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); - return this; - } - - public GetSearchAllLibrariesMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - return this; - } - - /** - * The rating key of the parent item. - */ - public GetSearchAllLibrariesMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent item. - */ - public GetSearchAllLibrariesMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public GetSearchAllLibrariesMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - public GetSearchAllLibrariesMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public GetSearchAllLibrariesMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - public GetSearchAllLibrariesMetadata withParentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public GetSearchAllLibrariesMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - public GetSearchAllLibrariesMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetSearchAllLibrariesMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - public GetSearchAllLibrariesMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetSearchAllLibrariesMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - public GetSearchAllLibrariesMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetSearchAllLibrariesMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - public GetSearchAllLibrariesMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetSearchAllLibrariesMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - public GetSearchAllLibrariesMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetSearchAllLibrariesMetadata withParentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - public GetSearchAllLibrariesMetadata withParentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } - @Override public boolean equals(java.lang.Object o) { @@ -1993,79 +2365,75 @@ public class GetSearchAllLibrariesMetadata { Objects.deepEquals(this.ratingKey, other.ratingKey) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.guid, other.guid) && + Objects.deepEquals(this.slug, other.slug) && Objects.deepEquals(this.studio, other.studio) && - Objects.deepEquals(this.skipChildren, other.skipChildren) && - Objects.deepEquals(this.librarySectionID, other.librarySectionID) && - Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && Objects.deepEquals(this.type, other.type) && Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.slug, other.slug) && + Objects.deepEquals(this.banner, other.banner) && + Objects.deepEquals(this.titleSort, other.titleSort) && Objects.deepEquals(this.contentRating, other.contentRating) && Objects.deepEquals(this.summary, other.summary) && Objects.deepEquals(this.rating, other.rating) && Objects.deepEquals(this.audienceRating, other.audienceRating) && Objects.deepEquals(this.year, other.year) && - Objects.deepEquals(this.seasonCount, other.seasonCount) && Objects.deepEquals(this.tagline, other.tagline) && - Objects.deepEquals(this.flattenSeasons, other.flattenSeasons) && - Objects.deepEquals(this.episodeSort, other.episodeSort) && - Objects.deepEquals(this.enableCreditsMarkerGeneration, other.enableCreditsMarkerGeneration) && - Objects.deepEquals(this.showOrdering, other.showOrdering) && Objects.deepEquals(this.thumb, other.thumb) && Objects.deepEquals(this.art, other.art) && - Objects.deepEquals(this.banner, other.banner) && + Objects.deepEquals(this.theme, other.theme) && + Objects.deepEquals(this.index, other.index) && + Objects.deepEquals(this.leafCount, other.leafCount) && + Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Objects.deepEquals(this.childCount, other.childCount) && + Objects.deepEquals(this.seasonCount, other.seasonCount) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && Objects.deepEquals(this.addedAt, other.addedAt) && Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.parentYear, other.parentYear) && Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && Objects.deepEquals(this.chapterSource, other.chapterSource) && Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.originalTitle, other.originalTitle) && + Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Objects.deepEquals(this.parentGuid, other.parentGuid) && Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + Objects.deepEquals(this.grandparentSlug, other.grandparentSlug) && Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + Objects.deepEquals(this.parentKey, other.parentKey) && Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && - Objects.deepEquals(this.parentSlug, other.parentSlug) && - Objects.deepEquals(this.grandparentSlug, other.grandparentSlug) && - Objects.deepEquals(this.grandparentArt, other.grandparentArt) && Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) && + Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + Objects.deepEquals(this.parentTitle, other.parentTitle) && + Objects.deepEquals(this.parentIndex, other.parentIndex) && + Objects.deepEquals(this.parentThumb, other.parentThumb) && + Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.viewCount, other.viewCount) && + Objects.deepEquals(this.viewOffset, other.viewOffset) && + Objects.deepEquals(this.skipCount, other.skipCount) && + Objects.deepEquals(this.subtype, other.subtype) && + Objects.deepEquals(this.lastRatedAt, other.lastRatedAt) && + Objects.deepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && + Objects.deepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && + Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + Objects.deepEquals(this.userRating, other.userRating) && + Objects.deepEquals(this.image, other.image) && + Objects.deepEquals(this.ultraBlurColors, other.ultraBlurColors) && + Objects.deepEquals(this.guids, other.guids) && + Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + Objects.deepEquals(this.showOrdering, other.showOrdering) && + Objects.deepEquals(this.flattenSeasons, other.flattenSeasons) && + Objects.deepEquals(this.skipChildren, other.skipChildren) && Objects.deepEquals(this.media, other.media) && Objects.deepEquals(this.genre, other.genre) && Objects.deepEquals(this.country, other.country) && Objects.deepEquals(this.director, other.director) && Objects.deepEquals(this.writer, other.writer) && - Objects.deepEquals(this.collection, other.collection) && Objects.deepEquals(this.role, other.role) && - Objects.deepEquals(this.location, other.location) && - Objects.deepEquals(this.mediaGuid, other.mediaGuid) && - Objects.deepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Objects.deepEquals(this.metaDataRating, other.metaDataRating) && - Objects.deepEquals(this.image, other.image) && - Objects.deepEquals(this.titleSort, other.titleSort) && - Objects.deepEquals(this.viewCount, other.viewCount) && - Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && - Objects.deepEquals(this.originalTitle, other.originalTitle) && - Objects.deepEquals(this.viewOffset, other.viewOffset) && - Objects.deepEquals(this.skipCount, other.skipCount) && - Objects.deepEquals(this.index, other.index) && - Objects.deepEquals(this.theme, other.theme) && - Objects.deepEquals(this.leafCount, other.leafCount) && - Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Objects.deepEquals(this.childCount, other.childCount) && - Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) && - Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && - Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && - Objects.deepEquals(this.parentGuid, other.parentGuid) && - Objects.deepEquals(this.parentStudio, other.parentStudio) && - Objects.deepEquals(this.parentKey, other.parentKey) && - Objects.deepEquals(this.parentTitle, other.parentTitle) && - Objects.deepEquals(this.parentIndex, other.parentIndex) && - Objects.deepEquals(this.parentYear, other.parentYear) && - Objects.deepEquals(this.parentThumb, other.parentThumb) && - Objects.deepEquals(this.parentTheme, other.parentTheme); + Objects.deepEquals(this.location, other.location); } @Override @@ -2074,79 +2442,75 @@ public class GetSearchAllLibrariesMetadata { ratingKey, key, guid, + slug, studio, - skipChildren, - librarySectionID, - librarySectionTitle, - librarySectionKey, type, title, - slug, + banner, + titleSort, contentRating, summary, rating, audienceRating, year, - seasonCount, tagline, - flattenSeasons, - episodeSort, - enableCreditsMarkerGeneration, - showOrdering, thumb, art, - banner, + theme, + index, + leafCount, + viewedLeafCount, + childCount, + seasonCount, duration, originallyAvailableAt, addedAt, updatedAt, + parentYear, audienceRatingImage, chapterSource, primaryExtraKey, - ratingImage, + originalTitle, + parentRatingKey, grandparentRatingKey, + parentGuid, grandparentGuid, + grandparentSlug, grandparentKey, + parentKey, grandparentTitle, grandparentThumb, - parentSlug, - grandparentSlug, - grandparentArt, grandparentTheme, + grandparentArt, + parentTitle, + parentIndex, + parentThumb, + ratingImage, + viewCount, + viewOffset, + skipCount, + subtype, + lastRatedAt, + createdAtAccuracy, + createdAtTZOffset, + lastViewedAt, + userRating, + image, + ultraBlurColors, + guids, + librarySectionID, + librarySectionTitle, + librarySectionKey, + showOrdering, + flattenSeasons, + skipChildren, media, genre, country, director, writer, - collection, role, - location, - mediaGuid, - ultraBlurColors, - metaDataRating, - image, - titleSort, - viewCount, - lastViewedAt, - originalTitle, - viewOffset, - skipCount, - index, - theme, - leafCount, - viewedLeafCount, - childCount, - hasPremiumExtras, - hasPremiumPrimaryExtra, - parentRatingKey, - parentGuid, - parentStudio, - parentKey, - parentTitle, - parentIndex, - parentYear, - parentThumb, - parentTheme); + location); } @Override @@ -2155,79 +2519,75 @@ public class GetSearchAllLibrariesMetadata { "ratingKey", ratingKey, "key", key, "guid", guid, + "slug", slug, "studio", studio, - "skipChildren", skipChildren, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionKey", librarySectionKey, "type", type, "title", title, - "slug", slug, + "banner", banner, + "titleSort", titleSort, "contentRating", contentRating, "summary", summary, "rating", rating, "audienceRating", audienceRating, "year", year, - "seasonCount", seasonCount, "tagline", tagline, - "flattenSeasons", flattenSeasons, - "episodeSort", episodeSort, - "enableCreditsMarkerGeneration", enableCreditsMarkerGeneration, - "showOrdering", showOrdering, "thumb", thumb, "art", art, - "banner", banner, + "theme", theme, + "index", index, + "leafCount", leafCount, + "viewedLeafCount", viewedLeafCount, + "childCount", childCount, + "seasonCount", seasonCount, "duration", duration, "originallyAvailableAt", originallyAvailableAt, "addedAt", addedAt, "updatedAt", updatedAt, + "parentYear", parentYear, "audienceRatingImage", audienceRatingImage, "chapterSource", chapterSource, "primaryExtraKey", primaryExtraKey, - "ratingImage", ratingImage, + "originalTitle", originalTitle, + "parentRatingKey", parentRatingKey, "grandparentRatingKey", grandparentRatingKey, + "parentGuid", parentGuid, "grandparentGuid", grandparentGuid, + "grandparentSlug", grandparentSlug, "grandparentKey", grandparentKey, + "parentKey", parentKey, "grandparentTitle", grandparentTitle, "grandparentThumb", grandparentThumb, - "parentSlug", parentSlug, - "grandparentSlug", grandparentSlug, - "grandparentArt", grandparentArt, "grandparentTheme", grandparentTheme, + "grandparentArt", grandparentArt, + "parentTitle", parentTitle, + "parentIndex", parentIndex, + "parentThumb", parentThumb, + "ratingImage", ratingImage, + "viewCount", viewCount, + "viewOffset", viewOffset, + "skipCount", skipCount, + "subtype", subtype, + "lastRatedAt", lastRatedAt, + "createdAtAccuracy", createdAtAccuracy, + "createdAtTZOffset", createdAtTZOffset, + "lastViewedAt", lastViewedAt, + "userRating", userRating, + "image", image, + "ultraBlurColors", ultraBlurColors, + "guids", guids, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionKey", librarySectionKey, + "showOrdering", showOrdering, + "flattenSeasons", flattenSeasons, + "skipChildren", skipChildren, "media", media, "genre", genre, "country", country, "director", director, "writer", writer, - "collection", collection, "role", role, - "location", location, - "mediaGuid", mediaGuid, - "ultraBlurColors", ultraBlurColors, - "metaDataRating", metaDataRating, - "image", image, - "titleSort", titleSort, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "originalTitle", originalTitle, - "viewOffset", viewOffset, - "skipCount", skipCount, - "index", index, - "theme", theme, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "hasPremiumExtras", hasPremiumExtras, - "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, - "parentRatingKey", parentRatingKey, - "parentGuid", parentGuid, - "parentStudio", parentStudio, - "parentKey", parentKey, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentYear", parentYear, - "parentThumb", parentThumb, - "parentTheme", parentTheme); + "location", location); } public final static class Builder { @@ -2238,51 +2598,47 @@ public class GetSearchAllLibrariesMetadata { private String guid; + private String slug; + private Optional studio = Optional.empty(); - private Optional skipChildren = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - private GetSearchAllLibrariesType type; private String title; - private Optional slug = Optional.empty(); + private String banner; + + private String titleSort; private Optional contentRating = Optional.empty(); private String summary; - private Optional rating = Optional.empty(); + private Float rating; - private Optional audienceRating = Optional.empty(); + private Double audienceRating; private Optional year = Optional.empty(); - private Optional seasonCount = Optional.empty(); + private String tagline; - private Optional tagline = Optional.empty(); + private String thumb; - private Optional flattenSeasons = Optional.empty(); + private String art; - private Optional episodeSort = Optional.empty(); + private String theme; - private Optional enableCreditsMarkerGeneration = Optional.empty(); + private Integer index; - private Optional showOrdering = Optional.empty(); + private Optional leafCount = Optional.empty(); - private Optional thumb = Optional.empty(); + private Optional viewedLeafCount = Optional.empty(); - private Optional art = Optional.empty(); + private Integer childCount; - private Optional banner = Optional.empty(); + private Integer seasonCount; - private Optional duration = Optional.empty(); + private Integer duration; private Optional originallyAvailableAt = Optional.empty(); @@ -2290,31 +2646,81 @@ public class GetSearchAllLibrariesMetadata { private Optional updatedAt = Optional.empty(); + private Optional parentYear = Optional.empty(); + private Optional audienceRatingImage = Optional.empty(); private Optional chapterSource = Optional.empty(); private Optional primaryExtraKey = Optional.empty(); - private Optional ratingImage = Optional.empty(); + private Optional originalTitle = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); private Optional grandparentRatingKey = Optional.empty(); + private Optional parentGuid = Optional.empty(); + private Optional grandparentGuid = Optional.empty(); + private Optional grandparentSlug = Optional.empty(); + private Optional grandparentKey = Optional.empty(); + private Optional parentKey = Optional.empty(); + private Optional grandparentTitle = Optional.empty(); private Optional grandparentThumb = Optional.empty(); - private Optional parentSlug = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); + private Optional grandparentTheme = Optional.empty(); private Optional grandparentArt = Optional.empty(); - private Optional grandparentTheme = Optional.empty(); + private Optional parentTitle = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional skipCount = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional lastRatedAt = Optional.empty(); + + private Optional createdAtAccuracy = Optional.empty(); + + private Optional createdAtTZOffset = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional ultraBlurColors = Optional.empty(); + + private Optional> guids = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional showOrdering = Optional.empty(); + + private Optional flattenSeasons = Optional.empty(); + + private Optional skipChildren = Optional.empty(); private Optional> media = Optional.empty(); @@ -2326,71 +2732,16 @@ public class GetSearchAllLibrariesMetadata { private Optional> writer = Optional.empty(); - private Optional> collection = Optional.empty(); - private Optional> role = Optional.empty(); private Optional> location = Optional.empty(); - - private Optional> mediaGuid = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional> metaDataRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional titleSort = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional theme = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional childCount = Optional.empty(); - - private Optional hasPremiumExtras = Optional.empty(); - - private Optional hasPremiumPrimaryExtra = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentStudio = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional parentTheme = Optional.empty(); private Builder() { // force use of static builder() method } /** - * The rating key (Media ID) of this media item. - * Note: This is always an integer, but is represented as a string in the API. + * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. */ public Builder ratingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); @@ -2398,328 +2749,273 @@ public class GetSearchAllLibrariesMetadata { return this; } + /** + * The unique key for the media item. + */ public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + /** + * The globally unique identifier for the media item. + */ public Builder guid(String guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; } + /** + * A URL‐friendly version of the media title. + */ + public Builder slug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + /** + * The studio that produced the media item. + */ public Builder studio(String studio) { Utils.checkNotNull(studio, "studio"); this.studio = Optional.ofNullable(studio); return this; } + /** + * The studio that produced the media item. + */ public Builder studio(Optional studio) { Utils.checkNotNull(studio, "studio"); this.studio = studio; return this; } - public Builder skipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - public Builder skipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The type of media content in the Plex library. This can represent videos, music, or photos. - */ public Builder type(GetSearchAllLibrariesType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * The title of the media item. + */ public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); + /** + * The banner image URL for the media item. + */ + public Builder banner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; return this; } - public Builder slug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; + /** + * The sort title used for ordering media items. + */ + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; return this; } + /** + * The content rating for the media item. + */ public Builder contentRating(String contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } + /** + * The content rating for the media item. + */ public Builder contentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } + /** + * A synopsis of the media item. + */ public Builder summary(String summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; } - public Builder rating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - public Builder rating(Optional rating) { + /** + * The critic rating for the media item. + */ + public Builder rating(float rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; return this; } + /** + * The audience rating for the media item. + */ public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - public Builder audienceRating(Optional audienceRating) { Utils.checkNotNull(audienceRating, "audienceRating"); this.audienceRating = audienceRating; return this; } + /** + * The release year of the media item. + */ public Builder year(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } + /** + * The release year of the media item. + */ public Builder year(Optional year) { Utils.checkNotNull(year, "year"); this.year = year; return this; } - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = Optional.ofNullable(seasonCount); - return this; - } - - public Builder seasonCount(Optional seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - + /** + * A brief tagline for the media item. + */ public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - public Builder tagline(Optional tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = tagline; return this; } /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + * The thumbnail image URL for the media item. */ - public Builder flattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public Builder episodeSort(GetSearchAllLibrariesEpisodeSort episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = Optional.ofNullable(episodeSort); - return this; - } - - /** - * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). - */ - public Builder episodeSort(Optional episodeSort) { - Utils.checkNotNull(episodeSort, "episodeSort"); - this.episodeSort = episodeSort; - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public Builder enableCreditsMarkerGeneration(GetSearchAllLibrariesEnableCreditsMarkerGeneration enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = Optional.ofNullable(enableCreditsMarkerGeneration); - return this; - } - - /** - * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). - */ - public Builder enableCreditsMarkerGeneration(Optional enableCreditsMarkerGeneration) { - Utils.checkNotNull(enableCreditsMarkerGeneration, "enableCreditsMarkerGeneration"); - this.enableCreditsMarkerGeneration = enableCreditsMarkerGeneration; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public Builder showOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). - */ - public Builder showOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - public Builder thumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } + /** + * The art image URL for the media item. + */ public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - public Builder art(Optional art) { Utils.checkNotNull(art, "art"); this.art = art; return this; } - public Builder banner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * The theme URL for the media item. + */ + public Builder theme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; return this; } - public Builder banner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * The index position of the media item. + */ + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The number of leaf items (end nodes) under this media item. + */ + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * The number of leaf items (end nodes) under this media item. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public Builder viewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * The number of leaf items that have been viewed. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * The number of child items associated with this media item. + */ + public Builder childCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + /** + * The total number of seasons (for TV shows). + */ + public Builder seasonCount(int seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = seasonCount; + return this; + } + + /** + * The duration of the media item in milliseconds. + */ public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * The original release date of the media item. + */ public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } + /** + * The original release date of the media item. + */ public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - /** - * Unix epoch datetime in seconds - */ public Builder addedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; @@ -2744,156 +3040,270 @@ public class GetSearchAllLibrariesMetadata { return this; } + /** + * The release year of the parent media item. + */ + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + /** + * The release year of the parent media item. + */ + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + /** + * The URL for the audience rating image. + */ public Builder audienceRatingImage(String audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); return this; } + /** + * The URL for the audience rating image. + */ public Builder audienceRatingImage(Optional audienceRatingImage) { Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); this.audienceRatingImage = audienceRatingImage; return this; } + /** + * The source from which chapter data is derived. + */ public Builder chapterSource(String chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = Optional.ofNullable(chapterSource); return this; } + /** + * The source from which chapter data is derived. + */ public Builder chapterSource(Optional chapterSource) { Utils.checkNotNull(chapterSource, "chapterSource"); this.chapterSource = chapterSource; return this; } + /** + * The primary extra key associated with this media item. + */ public Builder primaryExtraKey(String primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); return this; } + /** + * The primary extra key associated with this media item. + */ public Builder primaryExtraKey(Optional primaryExtraKey) { Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); this.primaryExtraKey = primaryExtraKey; return this; } - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); + /** + * The original title of the media item (if different). + */ + public Builder originalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); return this; } - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; + /** + * The original title of the media item (if different). + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; return this; } + /** + * The rating key of the parent media item. + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The rating key of the parent media item. + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The rating key of the grandparent media item. + */ public Builder grandparentRatingKey(String grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); return this; } + /** + * The rating key of the grandparent media item. + */ public Builder grandparentRatingKey(Optional grandparentRatingKey) { Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); this.grandparentRatingKey = grandparentRatingKey; return this; } + /** + * The GUID of the parent media item. + */ + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + /** + * The GUID of the parent media item. + */ + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + /** + * The GUID of the grandparent media item. + */ public Builder grandparentGuid(String grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = Optional.ofNullable(grandparentGuid); return this; } + /** + * The GUID of the grandparent media item. + */ public Builder grandparentGuid(Optional grandparentGuid) { Utils.checkNotNull(grandparentGuid, "grandparentGuid"); this.grandparentGuid = grandparentGuid; return this; } - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public Builder parentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - public Builder parentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - + /** + * The slug for the grandparent media item. + */ public Builder grandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); return this; } + /** + * The slug for the grandparent media item. + */ public Builder grandparentSlug(Optional grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = grandparentSlug; return this; } - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); + /** + * The key of the grandparent media item. + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); return this; } - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; + /** + * The key of the grandparent media item. + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; return this; } + /** + * The key of the parent media item. + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The key of the parent media item. + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The title of the grandparent media item. + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The title of the grandparent media item. + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The thumbnail URL for the grandparent media item. + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The theme URL for the grandparent media item. + */ public Builder grandparentTheme(String grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = Optional.ofNullable(grandparentTheme); return this; } + /** + * The theme URL for the grandparent media item. + */ public Builder grandparentTheme(Optional grandparentTheme) { Utils.checkNotNull(grandparentTheme, "grandparentTheme"); this.grandparentTheme = grandparentTheme; @@ -2901,17 +3311,419 @@ public class GetSearchAllLibrariesMetadata { } /** - * The Media object is only included when type query is `4` or higher. + * The art URL for the grandparent media item. */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The art URL for the grandparent media item. + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The title of the parent media item. + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The title of the parent media item. + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * The index position of the parent media item. + */ + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The index position of the parent media item. + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The thumbnail URL for the parent media item. + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The URL for the rating image. + */ + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * The URL for the rating image. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * The number of times this media item has been viewed. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public Builder viewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * The current playback offset (in milliseconds). + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public Builder skipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + /** + * The number of times this media item has been skipped. + */ + public Builder skipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public Builder subtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public Builder lastRatedAt(long lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + /** + * The Unix timestamp representing the last time the item was rated. + */ + public Builder lastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public Builder createdAtAccuracy(String createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); + return this; + } + + /** + * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). + */ + public Builder createdAtAccuracy(Optional createdAtAccuracy) { + Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); + this.createdAtAccuracy = createdAtAccuracy; + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public Builder createdAtTZOffset(String createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); + return this; + } + + /** + * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. + */ + public Builder createdAtTZOffset(Optional createdAtTZOffset) { + Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); + this.createdAtTZOffset = createdAtTZOffset; + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * Unix timestamp for when the media item was last viewed. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public Builder userRating(float userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * The rating provided by a user for the item. This value is expressed as a decimal number. + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public Builder image(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public Builder image(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public Builder ultraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + public Builder ultraBlurColors(Optional ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + public Builder guids(List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public Builder guids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The identifier for the library section. + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + /** + * The title of the library section. + */ + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + /** + * The key corresponding to the library section. + */ + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public Builder showOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = Optional.ofNullable(showOrdering); + return this; + } + + /** + * Setting that indicates the episode ordering for the show. + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) + */ + public Builder showOrdering(Optional showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = showOrdering; + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public Builder flattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + /** + * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). + */ + public Builder flattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * Indicates whether child items should be skipped. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + public Builder media(List media) { Utils.checkNotNull(media, "media"); this.media = Optional.ofNullable(media); return this; } - /** - * The Media object is only included when type query is `4` or higher. - */ public Builder media(Optional> media) { Utils.checkNotNull(media, "media"); this.media = media; @@ -2966,18 +3778,6 @@ public class GetSearchAllLibrariesMetadata { return this; } - public Builder collection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - public Builder collection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - public Builder role(List role) { Utils.checkNotNull(role, "role"); this.role = Optional.ofNullable(role); @@ -3001,409 +3801,81 @@ public class GetSearchAllLibrariesMetadata { this.location = location; return this; } - - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public Builder mediaGuid(List mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = Optional.ofNullable(mediaGuid); - return this; - } - - /** - * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. - */ - public Builder mediaGuid(Optional> mediaGuid) { - Utils.checkNotNull(mediaGuid, "mediaGuid"); - this.mediaGuid = mediaGuid; - return this; - } - - public Builder ultraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - public Builder ultraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - public Builder metaDataRating(List metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = Optional.ofNullable(metaDataRating); - return this; - } - - public Builder metaDataRating(Optional> metaDataRating) { - Utils.checkNotNull(metaDataRating, "metaDataRating"); - this.metaDataRating = metaDataRating; - return this; - } - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - public Builder titleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - public Builder index(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); - return this; - } - - public Builder theme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - public Builder childCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public Builder hasPremiumExtras(String hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); - return this; - } - - public Builder hasPremiumExtras(Optional hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = hasPremiumExtras; - return this; - } - - public Builder hasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); - return this; - } - - public Builder hasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - return this; - } - - /** - * The rating key of the parent item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public Builder parentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - public Builder parentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public Builder parentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - public Builder parentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public Builder parentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - public Builder parentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } public GetSearchAllLibrariesMetadata build() { return new GetSearchAllLibrariesMetadata( ratingKey, key, guid, + slug, studio, - skipChildren, - librarySectionID, - librarySectionTitle, - librarySectionKey, type, title, - slug, + banner, + titleSort, contentRating, summary, rating, audienceRating, year, - seasonCount, tagline, - flattenSeasons, - episodeSort, - enableCreditsMarkerGeneration, - showOrdering, thumb, art, - banner, + theme, + index, + leafCount, + viewedLeafCount, + childCount, + seasonCount, duration, originallyAvailableAt, addedAt, updatedAt, + parentYear, audienceRatingImage, chapterSource, primaryExtraKey, - ratingImage, + originalTitle, + parentRatingKey, grandparentRatingKey, + parentGuid, grandparentGuid, + grandparentSlug, grandparentKey, + parentKey, grandparentTitle, grandparentThumb, - parentSlug, - grandparentSlug, - grandparentArt, grandparentTheme, + grandparentArt, + parentTitle, + parentIndex, + parentThumb, + ratingImage, + viewCount, + viewOffset, + skipCount, + subtype, + lastRatedAt, + createdAtAccuracy, + createdAtTZOffset, + lastViewedAt, + userRating, + image, + ultraBlurColors, + guids, + librarySectionID, + librarySectionTitle, + librarySectionKey, + showOrdering, + flattenSeasons, + skipChildren, media, genre, country, director, writer, - collection, role, - location, - mediaGuid, - ultraBlurColors, - metaDataRating, - image, - titleSort, - viewCount, - lastViewedAt, - originalTitle, - viewOffset, - skipCount, - index, - theme, - leafCount, - viewedLeafCount, - childCount, - hasPremiumExtras, - hasPremiumPrimaryExtra, - parentRatingKey, - parentGuid, - parentStudio, - parentKey, - parentTitle, - parentIndex, - parentYear, - parentThumb, - parentTheme); + location); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java index e7ecb736..78763824 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java @@ -4,31 +4,98 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; -import java.util.Optional; -public enum GetSearchAllLibrariesOptimizedForStreaming { - Disable(0), - Enable(1); +/** + * GetSearchAllLibrariesOptimizedForStreaming + * + *

Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ +@JsonDeserialize(using = GetSearchAllLibrariesOptimizedForStreaming._Deserializer.class) +public class GetSearchAllLibrariesOptimizedForStreaming { @JsonValue - private final int value; - - private GetSearchAllLibrariesOptimizedForStreaming(int value) { + private TypedObject value; + + private GetSearchAllLibrariesOptimizedForStreaming(TypedObject value) { this.value = value; } - - public int value() { - return value; + + public static GetSearchAllLibrariesOptimizedForStreaming of(GetSearchAllLibrariesOptimizedForStreaming1 value) { + Utils.checkNotNull(value, "value"); + return new GetSearchAllLibrariesOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static GetSearchAllLibrariesOptimizedForStreaming of(boolean value) { + Utils.checkNotNull(value, "value"); + return new GetSearchAllLibrariesOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } - public static Optional fromValue(int value) { - for (GetSearchAllLibrariesOptimizedForStreaming o: GetSearchAllLibrariesOptimizedForStreaming.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } + /** + * Returns an instance of one of these types: + *

    + *
  • {@code dev.plexapi.sdk.models.operations.GetSearchAllLibrariesOptimizedForStreaming1}
  • + *
  • {@code boolean}
  • + *
+ * + *

Use {@code instanceof} to determine what type is returned. For example: + * + *

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; } - return Optional.empty(); + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchAllLibrariesOptimizedForStreaming other = (GetSearchAllLibrariesOptimizedForStreaming) o; + return Objects.deepEquals(this.value.value(), other.value.value()); } + + @Override + public int hashCode() { + return Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(GetSearchAllLibrariesOptimizedForStreaming.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(GetSearchAllLibrariesOptimizedForStreaming.class, + "value", value); + } + } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java new file mode 100644 index 00000000..dd15db18 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public enum GetSearchAllLibrariesOptimizedForStreaming1 { + ZERO(0), + ONE(1); + + @JsonValue + private final int value; + + private GetSearchAllLibrariesOptimizedForStreaming1(int value) { + this.value = value; + } + + public int value() { + return value; + } + + public static Optional fromValue(int value) { + for (GetSearchAllLibrariesOptimizedForStreaming1 o: GetSearchAllLibrariesOptimizedForStreaming1.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java new file mode 100644 index 00000000..266a6ccf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public enum GetSearchAllLibrariesOptimizedForStreamingLibrary1 { + ZERO(0), + ONE(1); + + @JsonValue + private final int value; + + private GetSearchAllLibrariesOptimizedForStreamingLibrary1(int value) { + this.value = value; + } + + public int value() { + return value; + } + + public static Optional fromValue(int value) { + for (GetSearchAllLibrariesOptimizedForStreamingLibrary1 o: GetSearchAllLibrariesOptimizedForStreamingLibrary1.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java index 948557e6..0198962e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java @@ -17,34 +17,84 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; import java.util.Objects; import java.util.Optional; public class GetSearchAllLibrariesPart { + /** + * Indicates if the part is accessible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accessible") + private Optional accessible; + + /** + * Indicates if the part exists. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("exists") + private Optional exists; + + /** + * Unique part identifier. + */ @JsonProperty("id") - private int id; + private long id; + /** + * Key to access this part. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private String key; + private Optional key; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("indexes") + private Optional indexes; + + /** + * Duration of the part in milliseconds. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; + /** + * File path for the part. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("file") - private String file; - - @JsonProperty("size") - private long size; + private Optional file; /** - * The container format of the media file. + * File size in bytes. */ - @JsonProperty("container") - private String container; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("packetLength") + private Optional packetLength; + + /** + * Container format of the part. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + /** + * Video profile for the part. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioProfile") private Optional audioProfile; @@ -53,111 +103,156 @@ public class GetSearchAllLibrariesPart { @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; + private Optional optimizedForStreaming; @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasThumbnail") private Optional hasThumbnail; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - @JsonCreator public GetSearchAllLibrariesPart( - @JsonProperty("id") int id, - @JsonProperty("key") String key, + @JsonProperty("accessible") Optional accessible, + @JsonProperty("exists") Optional exists, + @JsonProperty("id") long id, + @JsonProperty("key") Optional key, + @JsonProperty("indexes") Optional indexes, @JsonProperty("duration") Optional duration, - @JsonProperty("file") String file, - @JsonProperty("size") long size, - @JsonProperty("container") String container, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("packetLength") Optional packetLength, + @JsonProperty("container") Optional container, + @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("Stream") Optional> stream) { + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("hasThumbnail") Optional hasThumbnail) { + Utils.checkNotNull(accessible, "accessible"); + Utils.checkNotNull(exists, "exists"); Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); + Utils.checkNotNull(indexes, "indexes"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(file, "file"); Utils.checkNotNull(size, "size"); + Utils.checkNotNull(packetLength, "packetLength"); Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(indexes, "indexes"); Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(stream, "stream"); + this.accessible = accessible; + this.exists = exists; this.id = id; this.key = key; + this.indexes = indexes; this.duration = duration; this.file = file; this.size = size; + this.packetLength = packetLength; this.container = container; + this.videoProfile = videoProfile; this.audioProfile = audioProfile; this.has64bitOffsets = has64bitOffsets; this.optimizedForStreaming = optimizedForStreaming; - this.videoProfile = videoProfile; - this.indexes = indexes; this.hasThumbnail = hasThumbnail; - this.stream = stream; } public GetSearchAllLibrariesPart( - int id, - String key, - String file, - long size, - String container) { - this(id, key, Optional.empty(), file, size, container, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + long id) { + this(Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * Indicates if the part is accessible. + */ @JsonIgnore - public int id() { + public Optional accessible() { + return accessible; + } + + /** + * Indicates if the part exists. + */ + @JsonIgnore + public Optional exists() { + return exists; + } + + /** + * Unique part identifier. + */ + @JsonIgnore + public long id() { return id; } + /** + * Key to access this part. + */ @JsonIgnore - public String key() { + public Optional key() { return key; } + @JsonIgnore + public Optional indexes() { + return indexes; + } + + /** + * Duration of the part in milliseconds. + */ @JsonIgnore public Optional duration() { return duration; } + /** + * File path for the part. + */ @JsonIgnore - public String file() { + public Optional file() { return file; } + /** + * File size in bytes. + */ @JsonIgnore - public long size() { + public Optional size() { return size; } + @JsonIgnore + public Optional packetLength() { + return packetLength; + } + /** - * The container format of the media file. + * Container format of the part. */ @JsonIgnore - public String container() { + public Optional container() { return container; } + /** + * Video profile for the part. + */ + @JsonIgnore + public Optional videoProfile() { + return videoProfile; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ @JsonIgnore public Optional audioProfile() { return audioProfile; @@ -168,19 +263,13 @@ public class GetSearchAllLibrariesPart { return has64bitOffsets; } + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional optimizedForStreaming() { - return optimizedForStreaming; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @JsonIgnore - public Optional indexes() { - return indexes; + public Optional optimizedForStreaming() { + return (Optional) optimizedForStreaming; } @SuppressWarnings("unchecked") @@ -189,67 +278,199 @@ public class GetSearchAllLibrariesPart { return (Optional) hasThumbnail; } - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - public final static Builder builder() { return new Builder(); } - public GetSearchAllLibrariesPart withId(int id) { + /** + * Indicates if the part is accessible. + */ + public GetSearchAllLibrariesPart withAccessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = Optional.ofNullable(accessible); + return this; + } + + /** + * Indicates if the part is accessible. + */ + public GetSearchAllLibrariesPart withAccessible(Optional accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Indicates if the part exists. + */ + public GetSearchAllLibrariesPart withExists(boolean exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = Optional.ofNullable(exists); + return this; + } + + /** + * Indicates if the part exists. + */ + public GetSearchAllLibrariesPart withExists(Optional exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = exists; + return this; + } + + /** + * Unique part identifier. + */ + public GetSearchAllLibrariesPart withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Key to access this part. + */ public GetSearchAllLibrariesPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public GetSearchAllLibrariesPart withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + public GetSearchAllLibrariesPart withIndexes(String indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = Optional.ofNullable(indexes); + return this; + } + + public GetSearchAllLibrariesPart withIndexes(Optional indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = indexes; + return this; + } + + /** + * Duration of the part in milliseconds. + */ public GetSearchAllLibrariesPart withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the part in milliseconds. + */ public GetSearchAllLibrariesPart withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * File path for the part. + */ public GetSearchAllLibrariesPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public GetSearchAllLibrariesPart withFile(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } + /** + * File size in bytes. + */ public GetSearchAllLibrariesPart withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public GetSearchAllLibrariesPart withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + public GetSearchAllLibrariesPart withPacketLength(int packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = Optional.ofNullable(packetLength); + return this; + } + + public GetSearchAllLibrariesPart withPacketLength(Optional packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = packetLength; + return this; + } + /** - * The container format of the media file. + * Container format of the part. */ public GetSearchAllLibrariesPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the part. + */ + public GetSearchAllLibrariesPart withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Video profile for the part. + */ + public GetSearchAllLibrariesPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + /** + * Video profile for the part. + */ + public GetSearchAllLibrariesPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public GetSearchAllLibrariesPart withAudioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public GetSearchAllLibrariesPart withAudioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; @@ -268,42 +489,24 @@ public class GetSearchAllLibrariesPart { return this; } - public GetSearchAllLibrariesPart withOptimizedForStreaming(boolean optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public GetSearchAllLibrariesPart withOptimizedForStreaming(GetSearchAllLibrariesLibraryOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public GetSearchAllLibrariesPart withOptimizedForStreaming(Optional optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public GetSearchAllLibrariesPart withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } - public GetSearchAllLibrariesPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - public GetSearchAllLibrariesPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public GetSearchAllLibrariesPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public GetSearchAllLibrariesPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - public GetSearchAllLibrariesPart withHasThumbnail(GetSearchAllLibrariesHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); @@ -316,18 +519,6 @@ public class GetSearchAllLibrariesPart { return this; } - public GetSearchAllLibrariesPart withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - public GetSearchAllLibrariesPart withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - @Override public boolean equals(java.lang.Object o) { @@ -339,140 +530,288 @@ public class GetSearchAllLibrariesPart { } GetSearchAllLibrariesPart other = (GetSearchAllLibrariesPart) o; return + Objects.deepEquals(this.accessible, other.accessible) && + Objects.deepEquals(this.exists, other.exists) && Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.indexes, other.indexes) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.file, other.file) && Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.packetLength, other.packetLength) && Objects.deepEquals(this.container, other.container) && + Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Objects.deepEquals(this.videoProfile, other.videoProfile) && - Objects.deepEquals(this.indexes, other.indexes) && - Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && - Objects.deepEquals(this.stream, other.stream); + Objects.deepEquals(this.hasThumbnail, other.hasThumbnail); } @Override public int hashCode() { return Objects.hash( + accessible, + exists, id, key, + indexes, duration, file, size, + packetLength, container, + videoProfile, audioProfile, has64bitOffsets, optimizedForStreaming, - videoProfile, - indexes, - hasThumbnail, - stream); + hasThumbnail); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesPart.class, + "accessible", accessible, + "exists", exists, "id", id, "key", key, + "indexes", indexes, "duration", duration, "file", file, "size", size, + "packetLength", packetLength, "container", container, + "videoProfile", videoProfile, "audioProfile", audioProfile, "has64bitOffsets", has64bitOffsets, "optimizedForStreaming", optimizedForStreaming, - "videoProfile", videoProfile, - "indexes", indexes, - "hasThumbnail", hasThumbnail, - "stream", stream); + "hasThumbnail", hasThumbnail); } public final static class Builder { - private Integer id; + private Optional accessible = Optional.empty(); - private String key; + private Optional exists = Optional.empty(); + + private Long id; + + private Optional key = Optional.empty(); + + private Optional indexes = Optional.empty(); private Optional duration = Optional.empty(); - private String file; + private Optional file = Optional.empty(); - private Long size; + private Optional size = Optional.empty(); - private String container; + private Optional packetLength = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoProfile = Optional.empty(); private Optional audioProfile = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); - private Optional optimizedForStreaming = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional indexes = Optional.empty(); + private Optional optimizedForStreaming = Optional.empty(); private Optional hasThumbnail; - - private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(int id) { + /** + * Indicates if the part is accessible. + */ + public Builder accessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = Optional.ofNullable(accessible); + return this; + } + + /** + * Indicates if the part is accessible. + */ + public Builder accessible(Optional accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Indicates if the part exists. + */ + public Builder exists(boolean exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = Optional.ofNullable(exists); + return this; + } + + /** + * Indicates if the part exists. + */ + public Builder exists(Optional exists) { + Utils.checkNotNull(exists, "exists"); + this.exists = exists; + return this; + } + + /** + * Unique part identifier. + */ + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * Key to access this part. + */ public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * Key to access this part. + */ + public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + public Builder indexes(String indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = Optional.ofNullable(indexes); + return this; + } + + public Builder indexes(Optional indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = indexes; + return this; + } + + /** + * Duration of the part in milliseconds. + */ public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } + /** + * Duration of the part in milliseconds. + */ public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } + /** + * File path for the part. + */ public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * File path for the part. + */ + public Builder file(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } + /** + * File size in bytes. + */ public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * File size in bytes. + */ + public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + public Builder packetLength(int packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = Optional.ofNullable(packetLength); + return this; + } + + public Builder packetLength(Optional packetLength) { + Utils.checkNotNull(packetLength, "packetLength"); + this.packetLength = packetLength; + return this; + } + /** - * The container format of the media file. + * Container format of the part. */ public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * Container format of the part. + */ + public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } + /** + * Video profile for the part. + */ + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + /** + * Video profile for the part. + */ + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public Builder audioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } + /** + * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). + */ public Builder audioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; @@ -491,42 +830,24 @@ public class GetSearchAllLibrariesPart { return this; } - public Builder optimizedForStreaming(boolean optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public Builder optimizedForStreaming(GetSearchAllLibrariesLibraryOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public Builder optimizedForStreaming(Optional optimizedForStreaming) { + /** + * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + */ + public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - public Builder hasThumbnail(GetSearchAllLibrariesHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); @@ -538,37 +859,27 @@ public class GetSearchAllLibrariesPart { this.hasThumbnail = hasThumbnail; return this; } - - public Builder stream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - public Builder stream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } public GetSearchAllLibrariesPart build() { if (hasThumbnail == null) { hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); } return new GetSearchAllLibrariesPart( + accessible, + exists, id, key, + indexes, duration, file, size, + packetLength, container, + videoProfile, audioProfile, has64bitOffsets, optimizedForStreaming, - videoProfile, - indexes, - hasThumbnail, - stream); + hasThumbnail); } private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java index 8748c8e4..d030e344 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java @@ -9,7 +9,7 @@ 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.Long; +import java.lang.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -18,217 +18,112 @@ import java.util.Optional; public class GetSearchAllLibrariesRole { /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; + private int id; /** - * The filter used to find the actor or tag. + * The display tag for the actor (typically the actor's name). */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - /** - * The thumbnail of the actor - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - /** - * The name of the tag or actor. - */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("tag") - private Optional tag; + private String tag; /** - * Unique identifier for the tag. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("role") private Optional role; + /** + * The absolute URL of the thumbnail image for the actor. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + @JsonCreator public GetSearchAllLibrariesRole( - @JsonProperty("id") Optional id, - @JsonProperty("filter") Optional filter, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("tag") Optional tag, - @JsonProperty("tagKey") Optional tagKey, - @JsonProperty("role") Optional role) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("role") Optional role, + @JsonProperty("thumb") Optional thumb) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); Utils.checkNotNull(role, "role"); + Utils.checkNotNull(thumb, "thumb"); this.id = id; - this.filter = filter; - this.thumb = thumb; this.tag = tag; - this.tagKey = tagKey; this.role = role; + this.thumb = thumb; } - public GetSearchAllLibrariesRole() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public GetSearchAllLibrariesRole( + int id, + String tag) { + this(id, tag, Optional.empty(), Optional.empty()); } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ @JsonIgnore - public Optional id() { + public int id() { return id; } /** - * The filter used to find the actor or tag. + * The display tag for the actor (typically the actor's name). */ @JsonIgnore - public Optional filter() { - return filter; - } - - /** - * The thumbnail of the actor - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - /** - * The name of the tag or actor. - */ - @JsonIgnore - public Optional tag() { + public String tag() { return tag; } /** - * Unique identifier for the tag. - */ - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ @JsonIgnore public Optional role() { return role; } + /** + * The absolute URL of the thumbnail image for the actor. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - public GetSearchAllLibrariesRole withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * The ID of the tag or actor. - */ - public GetSearchAllLibrariesRole withId(Optional id) { + public GetSearchAllLibrariesRole withId(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** - * The filter used to find the actor or tag. - */ - public GetSearchAllLibrariesRole withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * The filter used to find the actor or tag. - */ - public GetSearchAllLibrariesRole withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The thumbnail of the actor - */ - public GetSearchAllLibrariesRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The thumbnail of the actor - */ - public GetSearchAllLibrariesRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The name of the tag or actor. + * The display tag for the actor (typically the actor's name). */ public GetSearchAllLibrariesRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - /** - * The name of the tag or actor. - */ - public GetSearchAllLibrariesRole withTag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** - * Unique identifier for the tag. - */ - public GetSearchAllLibrariesRole withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * Unique identifier for the tag. - */ - public GetSearchAllLibrariesRole withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public GetSearchAllLibrariesRole withRole(String role) { Utils.checkNotNull(role, "role"); @@ -237,7 +132,7 @@ public class GetSearchAllLibrariesRole { } /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public GetSearchAllLibrariesRole withRole(Optional role) { Utils.checkNotNull(role, "role"); @@ -245,6 +140,24 @@ public class GetSearchAllLibrariesRole { return this; } + /** + * The absolute URL of the thumbnail image for the actor. + */ + public GetSearchAllLibrariesRole withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public GetSearchAllLibrariesRole withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -257,145 +170,64 @@ public class GetSearchAllLibrariesRole { GetSearchAllLibrariesRole other = (GetSearchAllLibrariesRole) o; return Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.filter, other.filter) && - Objects.deepEquals(this.thumb, other.thumb) && Objects.deepEquals(this.tag, other.tag) && - Objects.deepEquals(this.tagKey, other.tagKey) && - Objects.deepEquals(this.role, other.role); + Objects.deepEquals(this.role, other.role) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( id, - filter, - thumb, tag, - tagKey, - role); + role, + thumb); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesRole.class, "id", id, - "filter", filter, - "thumb", thumb, "tag", tag, - "tagKey", tagKey, - "role", role); + "role", role, + "thumb", thumb); } public final static class Builder { - private Optional id = Optional.empty(); + private Integer id; - private Optional filter = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional tag = Optional.empty(); - - private Optional tagKey = Optional.empty(); + private String tag; private Optional role = Optional.empty(); + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } /** - * The ID of the tag or actor. + * The unique identifier for the role. + * NOTE: This is different for each Plex server and is not globally unique. */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * The ID of the tag or actor. - */ - public Builder id(Optional id) { + public Builder id(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** - * The filter used to find the actor or tag. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * The filter used to find the actor or tag. - */ - public Builder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The thumbnail of the actor - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The thumbnail of the actor - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The name of the tag or actor. + * The display tag for the actor (typically the actor's name). */ public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - /** - * The name of the tag or actor. - */ - public Builder tag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** - * Unique identifier for the tag. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * Unique identifier for the tag. - */ - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public Builder role(String role) { Utils.checkNotNull(role, "role"); @@ -404,22 +236,38 @@ public class GetSearchAllLibrariesRole { } /** - * The role of the actor or tag in the media. + * The role played by the actor in the media item. */ public Builder role(Optional role) { Utils.checkNotNull(role, "role"); this.role = role; return this; } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the actor. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetSearchAllLibrariesRole build() { return new GetSearchAllLibrariesRole( id, - filter, - thumb, tag, - tagKey, - role); + role, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java index d79fb466..faa19908 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java @@ -45,11 +45,12 @@ import java.util.Optional; * GetSearchAllLibrariesShowOrdering * *

Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) */ @JsonDeserialize(using = GetSearchAllLibrariesShowOrdering._Deserializer.class) @JsonSerialize(using = GetSearchAllLibrariesShowOrdering._Serializer.class) diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesStream.java deleted file mode 100644 index a36928b6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesStream.java +++ /dev/null @@ -1,2209 +0,0 @@ -/* - * 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.Double; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -public class GetSearchAllLibrariesStream { - - @JsonProperty("id") - private long id; - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - @JsonProperty("streamType") - private long streamType; - - /** - * Indicates if this is the default stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - /** - * Indicates if the stream is selected - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - /** - * Codec used by the stream - */ - @JsonProperty("codec") - private String codec; - - /** - * The index of the stream - */ - @JsonProperty("index") - private long index; - - /** - * The bitrate of the stream in kbps - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * The color primaries of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorPrimaries") - private Optional colorPrimaries; - - /** - * The color range of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorRange") - private Optional colorRange; - - /** - * The color space of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorSpace") - private Optional colorSpace; - - /** - * The transfer characteristics (TRC) of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorTrc") - private Optional colorTrc; - - /** - * The bit depth of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - /** - * The chroma location of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - /** - * The identifier of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamIdentifier") - private Optional streamIdentifier; - - /** - * The chroma subsampling format - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - /** - * The coded height of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - /** - * The coded width of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; - - /** - * The frame rate of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("frameRate") - private Optional frameRate; - - /** - * Indicates if the stream has a scaling matrix - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasScalingMatrix") - private Optional hasScalingMatrix; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hearingImpaired") - private Optional hearingImpaired; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("closedCaptions") - private Optional closedCaptions; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("embeddedInVideo") - private Optional embeddedInVideo; - - /** - * The height of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * The level of the video codec - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; - - /** - * The profile of the video codec - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - /** - * Number of reference frames - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refFrames") - private Optional refFrames; - - /** - * The scan type (progressive or interlaced) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanType") - private Optional scanType; - - /** - * The width of the video stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Display title of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayTitle") - private Optional displayTitle; - - /** - * Extended display title of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("extendedDisplayTitle") - private Optional extendedDisplayTitle; - - /** - * Number of audio channels (for audio streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - /** - * The language of the stream (for audio/subtitle streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - /** - * Language tag of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageTag") - private Optional languageTag; - - /** - * Language code of the stream - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageCode") - private Optional languageCode; - - /** - * The audio channel layout - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - /** - * Sampling rate of the audio stream in Hz - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - /** - * Title of the subtitle track (for subtitle streams) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - /** - * Indicates if the subtitle stream can auto-sync - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canAutoSync") - private Optional canAutoSync; - - @JsonCreator - public GetSearchAllLibrariesStream( - @JsonProperty("id") long id, - @JsonProperty("streamType") long streamType, - @JsonProperty("default") Optional default_, - @JsonProperty("selected") Optional selected, - @JsonProperty("codec") String codec, - @JsonProperty("index") long index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("colorPrimaries") Optional colorPrimaries, - @JsonProperty("colorRange") Optional colorRange, - @JsonProperty("colorSpace") Optional colorSpace, - @JsonProperty("colorTrc") Optional colorTrc, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("streamIdentifier") Optional streamIdentifier, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, - @JsonProperty("frameRate") Optional frameRate, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("hearingImpaired") Optional hearingImpaired, - @JsonProperty("closedCaptions") Optional closedCaptions, - @JsonProperty("embeddedInVideo") Optional embeddedInVideo, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("profile") Optional profile, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("scanType") Optional scanType, - @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") Optional displayTitle, - @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, - @JsonProperty("channels") Optional channels, - @JsonProperty("language") Optional language, - @JsonProperty("languageTag") Optional languageTag, - @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("title") Optional title, - @JsonProperty("canAutoSync") Optional canAutoSync) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(streamType, "streamType"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - Utils.checkNotNull(colorRange, "colorRange"); - Utils.checkNotNull(colorSpace, "colorSpace"); - Utils.checkNotNull(colorTrc, "colorTrc"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); - Utils.checkNotNull(frameRate, "frameRate"); - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - Utils.checkNotNull(closedCaptions, "closedCaptions"); - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(refFrames, "refFrames"); - Utils.checkNotNull(scanType, "scanType"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(languageTag, "languageTag"); - Utils.checkNotNull(languageCode, "languageCode"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.id = id; - this.streamType = streamType; - this.default_ = default_; - this.selected = selected; - this.codec = codec; - this.index = index; - this.bitrate = bitrate; - this.colorPrimaries = colorPrimaries; - this.colorRange = colorRange; - this.colorSpace = colorSpace; - this.colorTrc = colorTrc; - this.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.streamIdentifier = streamIdentifier; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; - this.frameRate = frameRate; - this.hasScalingMatrix = hasScalingMatrix; - this.hearingImpaired = hearingImpaired; - this.closedCaptions = closedCaptions; - this.embeddedInVideo = embeddedInVideo; - this.height = height; - this.level = level; - this.profile = profile; - this.refFrames = refFrames; - this.scanType = scanType; - this.width = width; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.channels = channels; - this.language = language; - this.languageTag = languageTag; - this.languageCode = languageCode; - this.audioChannelLayout = audioChannelLayout; - this.samplingRate = samplingRate; - this.title = title; - this.canAutoSync = canAutoSync; - } - - public GetSearchAllLibrariesStream( - long id, - long streamType, - String codec, - long index) { - this(id, streamType, Optional.empty(), Optional.empty(), codec, index, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public long id() { - return id; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - @JsonIgnore - public long streamType() { - return streamType; - } - - /** - * Indicates if this is the default stream - */ - @JsonIgnore - public Optional default_() { - return default_; - } - - /** - * Indicates if the stream is selected - */ - @JsonIgnore - public Optional selected() { - return selected; - } - - /** - * Codec used by the stream - */ - @JsonIgnore - public String codec() { - return codec; - } - - /** - * The index of the stream - */ - @JsonIgnore - public long index() { - return index; - } - - /** - * The bitrate of the stream in kbps - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * The color primaries of the video stream - */ - @JsonIgnore - public Optional colorPrimaries() { - return colorPrimaries; - } - - /** - * The color range of the video stream - */ - @JsonIgnore - public Optional colorRange() { - return colorRange; - } - - /** - * The color space of the video stream - */ - @JsonIgnore - public Optional colorSpace() { - return colorSpace; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - @JsonIgnore - public Optional colorTrc() { - return colorTrc; - } - - /** - * The bit depth of the video stream - */ - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - /** - * The chroma location of the video stream - */ - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - /** - * The identifier of the video stream - */ - @JsonIgnore - public Optional streamIdentifier() { - return streamIdentifier; - } - - /** - * The chroma subsampling format - */ - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - /** - * The coded height of the video stream - */ - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - /** - * The coded width of the video stream - */ - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - - /** - * The frame rate of the video stream - */ - @JsonIgnore - public Optional frameRate() { - return frameRate; - } - - /** - * Indicates if the stream has a scaling matrix - */ - @JsonIgnore - public Optional hasScalingMatrix() { - return hasScalingMatrix; - } - - @JsonIgnore - public Optional hearingImpaired() { - return hearingImpaired; - } - - @JsonIgnore - public Optional closedCaptions() { - return closedCaptions; - } - - @JsonIgnore - public Optional embeddedInVideo() { - return embeddedInVideo; - } - - /** - * The height of the video stream - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * The level of the video codec - */ - @JsonIgnore - public Optional level() { - return level; - } - - /** - * The profile of the video codec - */ - @JsonIgnore - public Optional profile() { - return profile; - } - - /** - * Number of reference frames - */ - @JsonIgnore - public Optional refFrames() { - return refFrames; - } - - /** - * The scan type (progressive or interlaced) - */ - @JsonIgnore - public Optional scanType() { - return scanType; - } - - /** - * The width of the video stream - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Display title of the stream - */ - @JsonIgnore - public Optional displayTitle() { - return displayTitle; - } - - /** - * Extended display title of the stream - */ - @JsonIgnore - public Optional extendedDisplayTitle() { - return extendedDisplayTitle; - } - - /** - * Number of audio channels (for audio streams) - */ - @JsonIgnore - public Optional channels() { - return channels; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - @JsonIgnore - public Optional language() { - return language; - } - - /** - * Language tag of the stream - */ - @JsonIgnore - public Optional languageTag() { - return languageTag; - } - - /** - * Language code of the stream - */ - @JsonIgnore - public Optional languageCode() { - return languageCode; - } - - /** - * The audio channel layout - */ - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - /** - * Sampling rate of the audio stream in Hz - */ - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - @JsonIgnore - public Optional title() { - return title; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - @JsonIgnore - public Optional canAutoSync() { - return canAutoSync; - } - - public final static Builder builder() { - return new Builder(); - } - - public GetSearchAllLibrariesStream withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - public GetSearchAllLibrariesStream withStreamType(long streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - - /** - * Indicates if this is the default stream - */ - public GetSearchAllLibrariesStream withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this is the default stream - */ - public GetSearchAllLibrariesStream withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Indicates if the stream is selected - */ - public GetSearchAllLibrariesStream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if the stream is selected - */ - public GetSearchAllLibrariesStream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * Codec used by the stream - */ - public GetSearchAllLibrariesStream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * The index of the stream - */ - public GetSearchAllLibrariesStream withIndex(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public GetSearchAllLibrariesStream withBitrate(long bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public GetSearchAllLibrariesStream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * The color primaries of the video stream - */ - public GetSearchAllLibrariesStream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * The color primaries of the video stream - */ - public GetSearchAllLibrariesStream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * The color range of the video stream - */ - public GetSearchAllLibrariesStream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * The color range of the video stream - */ - public GetSearchAllLibrariesStream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * The color space of the video stream - */ - public GetSearchAllLibrariesStream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * The color space of the video stream - */ - public GetSearchAllLibrariesStream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public GetSearchAllLibrariesStream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public GetSearchAllLibrariesStream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * The bit depth of the video stream - */ - public GetSearchAllLibrariesStream withBitDepth(long bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * The bit depth of the video stream - */ - public GetSearchAllLibrariesStream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * The chroma location of the video stream - */ - public GetSearchAllLibrariesStream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * The chroma location of the video stream - */ - public GetSearchAllLibrariesStream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * The identifier of the video stream - */ - public GetSearchAllLibrariesStream withStreamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - /** - * The identifier of the video stream - */ - public GetSearchAllLibrariesStream withStreamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - /** - * The chroma subsampling format - */ - public GetSearchAllLibrariesStream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * The chroma subsampling format - */ - public GetSearchAllLibrariesStream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * The coded height of the video stream - */ - public GetSearchAllLibrariesStream withCodedHeight(long codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * The coded height of the video stream - */ - public GetSearchAllLibrariesStream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * The coded width of the video stream - */ - public GetSearchAllLibrariesStream withCodedWidth(long codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * The coded width of the video stream - */ - public GetSearchAllLibrariesStream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - /** - * The frame rate of the video stream - */ - public GetSearchAllLibrariesStream withFrameRate(double frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * The frame rate of the video stream - */ - public GetSearchAllLibrariesStream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public GetSearchAllLibrariesStream withHasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public GetSearchAllLibrariesStream withHasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public GetSearchAllLibrariesStream withHearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - public GetSearchAllLibrariesStream withHearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - public GetSearchAllLibrariesStream withClosedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - public GetSearchAllLibrariesStream withClosedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - public GetSearchAllLibrariesStream withEmbeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - public GetSearchAllLibrariesStream withEmbeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * The height of the video stream - */ - public GetSearchAllLibrariesStream withHeight(long height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * The height of the video stream - */ - public GetSearchAllLibrariesStream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * The level of the video codec - */ - public GetSearchAllLibrariesStream withLevel(long level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * The level of the video codec - */ - public GetSearchAllLibrariesStream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * The profile of the video codec - */ - public GetSearchAllLibrariesStream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * The profile of the video codec - */ - public GetSearchAllLibrariesStream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * Number of reference frames - */ - public GetSearchAllLibrariesStream withRefFrames(long refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - /** - * Number of reference frames - */ - public GetSearchAllLibrariesStream withRefFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public GetSearchAllLibrariesStream withScanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public GetSearchAllLibrariesStream withScanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - /** - * The width of the video stream - */ - public GetSearchAllLibrariesStream withWidth(long width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * The width of the video stream - */ - public GetSearchAllLibrariesStream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title of the stream - */ - public GetSearchAllLibrariesStream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - /** - * Display title of the stream - */ - public GetSearchAllLibrariesStream withDisplayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title of the stream - */ - public GetSearchAllLibrariesStream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - /** - * Extended display title of the stream - */ - public GetSearchAllLibrariesStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public GetSearchAllLibrariesStream withChannels(long channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public GetSearchAllLibrariesStream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public GetSearchAllLibrariesStream withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public GetSearchAllLibrariesStream withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag of the stream - */ - public GetSearchAllLibrariesStream withLanguageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag of the stream - */ - public GetSearchAllLibrariesStream withLanguageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * Language code of the stream - */ - public GetSearchAllLibrariesStream withLanguageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * Language code of the stream - */ - public GetSearchAllLibrariesStream withLanguageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * The audio channel layout - */ - public GetSearchAllLibrariesStream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * The audio channel layout - */ - public GetSearchAllLibrariesStream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public GetSearchAllLibrariesStream withSamplingRate(long samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public GetSearchAllLibrariesStream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public GetSearchAllLibrariesStream withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public GetSearchAllLibrariesStream withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public GetSearchAllLibrariesStream withCanAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public GetSearchAllLibrariesStream withCanAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesStream other = (GetSearchAllLibrariesStream) o; - return - Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.streamType, other.streamType) && - Objects.deepEquals(this.default_, other.default_) && - Objects.deepEquals(this.selected, other.selected) && - Objects.deepEquals(this.codec, other.codec) && - Objects.deepEquals(this.index, other.index) && - Objects.deepEquals(this.bitrate, other.bitrate) && - Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) && - Objects.deepEquals(this.colorRange, other.colorRange) && - Objects.deepEquals(this.colorSpace, other.colorSpace) && - Objects.deepEquals(this.colorTrc, other.colorTrc) && - Objects.deepEquals(this.bitDepth, other.bitDepth) && - Objects.deepEquals(this.chromaLocation, other.chromaLocation) && - Objects.deepEquals(this.streamIdentifier, other.streamIdentifier) && - Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Objects.deepEquals(this.codedHeight, other.codedHeight) && - Objects.deepEquals(this.codedWidth, other.codedWidth) && - Objects.deepEquals(this.frameRate, other.frameRate) && - Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && - Objects.deepEquals(this.hearingImpaired, other.hearingImpaired) && - Objects.deepEquals(this.closedCaptions, other.closedCaptions) && - Objects.deepEquals(this.embeddedInVideo, other.embeddedInVideo) && - Objects.deepEquals(this.height, other.height) && - Objects.deepEquals(this.level, other.level) && - Objects.deepEquals(this.profile, other.profile) && - Objects.deepEquals(this.refFrames, other.refFrames) && - Objects.deepEquals(this.scanType, other.scanType) && - Objects.deepEquals(this.width, other.width) && - Objects.deepEquals(this.displayTitle, other.displayTitle) && - Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Objects.deepEquals(this.channels, other.channels) && - Objects.deepEquals(this.language, other.language) && - Objects.deepEquals(this.languageTag, other.languageTag) && - Objects.deepEquals(this.languageCode, other.languageCode) && - Objects.deepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Objects.deepEquals(this.samplingRate, other.samplingRate) && - Objects.deepEquals(this.title, other.title) && - Objects.deepEquals(this.canAutoSync, other.canAutoSync); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - streamType, - default_, - selected, - codec, - index, - bitrate, - colorPrimaries, - colorRange, - colorSpace, - colorTrc, - bitDepth, - chromaLocation, - streamIdentifier, - chromaSubsampling, - codedHeight, - codedWidth, - frameRate, - hasScalingMatrix, - hearingImpaired, - closedCaptions, - embeddedInVideo, - height, - level, - profile, - refFrames, - scanType, - width, - displayTitle, - extendedDisplayTitle, - channels, - language, - languageTag, - languageCode, - audioChannelLayout, - samplingRate, - title, - canAutoSync); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesStream.class, - "id", id, - "streamType", streamType, - "default_", default_, - "selected", selected, - "codec", codec, - "index", index, - "bitrate", bitrate, - "colorPrimaries", colorPrimaries, - "colorRange", colorRange, - "colorSpace", colorSpace, - "colorTrc", colorTrc, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "streamIdentifier", streamIdentifier, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, - "frameRate", frameRate, - "hasScalingMatrix", hasScalingMatrix, - "hearingImpaired", hearingImpaired, - "closedCaptions", closedCaptions, - "embeddedInVideo", embeddedInVideo, - "height", height, - "level", level, - "profile", profile, - "refFrames", refFrames, - "scanType", scanType, - "width", width, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "channels", channels, - "language", language, - "languageTag", languageTag, - "languageCode", languageCode, - "audioChannelLayout", audioChannelLayout, - "samplingRate", samplingRate, - "title", title, - "canAutoSync", canAutoSync); - } - - public final static class Builder { - - private Long id; - - private Long streamType; - - private Optional default_ = Optional.empty(); - - private Optional selected = Optional.empty(); - - private String codec; - - private Long index; - - private Optional bitrate = Optional.empty(); - - private Optional colorPrimaries = Optional.empty(); - - private Optional colorRange = Optional.empty(); - - private Optional colorSpace = Optional.empty(); - - private Optional colorTrc = Optional.empty(); - - private Optional bitDepth = Optional.empty(); - - private Optional chromaLocation = Optional.empty(); - - private Optional streamIdentifier = Optional.empty(); - - private Optional chromaSubsampling = Optional.empty(); - - private Optional codedHeight = Optional.empty(); - - private Optional codedWidth = Optional.empty(); - - private Optional frameRate = Optional.empty(); - - private Optional hasScalingMatrix = Optional.empty(); - - private Optional hearingImpaired = Optional.empty(); - - private Optional closedCaptions = Optional.empty(); - - private Optional embeddedInVideo = Optional.empty(); - - private Optional height = Optional.empty(); - - private Optional level = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional refFrames = Optional.empty(); - - private Optional scanType = Optional.empty(); - - private Optional width = Optional.empty(); - - private Optional displayTitle = Optional.empty(); - - private Optional extendedDisplayTitle = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional languageTag = Optional.empty(); - - private Optional languageCode = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional canAutoSync = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Type of stream (1 = video, 2 = audio, 3 = subtitle) - */ - public Builder streamType(long streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - - /** - * Indicates if this is the default stream - */ - public Builder default_(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this is the default stream - */ - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Indicates if the stream is selected - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if the stream is selected - */ - public Builder selected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * Codec used by the stream - */ - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * The index of the stream - */ - public Builder index(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public Builder bitrate(long bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * The bitrate of the stream in kbps - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * The color primaries of the video stream - */ - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * The color primaries of the video stream - */ - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * The color range of the video stream - */ - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * The color range of the video stream - */ - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * The color space of the video stream - */ - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * The color space of the video stream - */ - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * The transfer characteristics (TRC) of the video stream - */ - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * The bit depth of the video stream - */ - public Builder bitDepth(long bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * The bit depth of the video stream - */ - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * The chroma location of the video stream - */ - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * The chroma location of the video stream - */ - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * The identifier of the video stream - */ - public Builder streamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - /** - * The identifier of the video stream - */ - public Builder streamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - /** - * The chroma subsampling format - */ - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * The chroma subsampling format - */ - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * The coded height of the video stream - */ - public Builder codedHeight(long codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * The coded height of the video stream - */ - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * The coded width of the video stream - */ - public Builder codedWidth(long codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * The coded width of the video stream - */ - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - /** - * The frame rate of the video stream - */ - public Builder frameRate(double frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * The frame rate of the video stream - */ - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public Builder hasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - /** - * Indicates if the stream has a scaling matrix - */ - public Builder hasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public Builder hearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - public Builder hearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - public Builder closedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - public Builder closedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - public Builder embeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - public Builder embeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * The height of the video stream - */ - public Builder height(long height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * The height of the video stream - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * The level of the video codec - */ - public Builder level(long level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * The level of the video codec - */ - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * The profile of the video codec - */ - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * The profile of the video codec - */ - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * Number of reference frames - */ - public Builder refFrames(long refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - /** - * Number of reference frames - */ - public Builder refFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public Builder scanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - /** - * The scan type (progressive or interlaced) - */ - public Builder scanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - /** - * The width of the video stream - */ - public Builder width(long width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * The width of the video stream - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title of the stream - */ - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - /** - * Display title of the stream - */ - public Builder displayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title of the stream - */ - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - /** - * Extended display title of the stream - */ - public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public Builder channels(long channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - /** - * Number of audio channels (for audio streams) - */ - public Builder channels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * The language of the stream (for audio/subtitle streams) - */ - public Builder language(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag of the stream - */ - public Builder languageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag of the stream - */ - public Builder languageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * Language code of the stream - */ - public Builder languageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * Language code of the stream - */ - public Builder languageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * The audio channel layout - */ - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * The audio channel layout - */ - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public Builder samplingRate(long samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate of the audio stream in Hz - */ - public Builder samplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Title of the subtitle track (for subtitle streams) - */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public Builder canAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the subtitle stream can auto-sync - */ - public Builder canAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - public GetSearchAllLibrariesStream build() { - return new GetSearchAllLibrariesStream( - id, - streamType, - default_, - selected, - codec, - index, - bitrate, - colorPrimaries, - colorRange, - colorSpace, - colorTrc, - bitDepth, - chromaLocation, - streamIdentifier, - chromaSubsampling, - codedHeight, - codedWidth, - frameRate, - hasScalingMatrix, - hearingImpaired, - closedCaptions, - embeddedInVideo, - height, - level, - profile, - refFrames, - scanType, - width, - displayTitle, - extendedDisplayTitle, - channels, - language, - languageTag, - languageCode, - audioChannelLayout, - samplingRate, - title, - canAutoSync); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java index a0d53308..6a2b7df8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java @@ -9,6 +9,7 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -16,42 +17,108 @@ import java.util.Optional; public class GetSearchAllLibrariesWriter { - @JsonInclude(Include.NON_ABSENT) + /** + * Unique identifier for the writer. + */ + @JsonProperty("id") + private int id; + + /** + * The role of Writer + */ @JsonProperty("tag") - private Optional tag; + private String tag; + + /** + * The absolute URL of the thumbnail image for the writer. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; @JsonCreator public GetSearchAllLibrariesWriter( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") int id, + @JsonProperty("tag") String tag, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; this.tag = tag; + this.thumb = thumb; } - public GetSearchAllLibrariesWriter() { - this(Optional.empty()); + public GetSearchAllLibrariesWriter( + int id, + String tag) { + this(id, tag, Optional.empty()); } + /** + * Unique identifier for the writer. + */ @JsonIgnore - public Optional tag() { + public int id() { + return id; + } + + /** + * The role of Writer + */ + @JsonIgnore + public String tag() { return tag; } + /** + * The absolute URL of the thumbnail image for the writer. + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + public final static Builder builder() { return new Builder(); } - public GetSearchAllLibrariesWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the writer. + */ + public GetSearchAllLibrariesWriter withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public GetSearchAllLibrariesWriter withTag(Optional tag) { + /** + * The role of Writer + */ + public GetSearchAllLibrariesWriter withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + /** + * The absolute URL of the thumbnail image for the writer. + */ + public GetSearchAllLibrariesWriter withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public GetSearchAllLibrariesWriter withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -63,44 +130,80 @@ public class GetSearchAllLibrariesWriter { } GetSearchAllLibrariesWriter other = (GetSearchAllLibrariesWriter) o; return - Objects.deepEquals(this.tag, other.tag); + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.tag, other.tag) && + Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( - tag); + id, + tag, + thumb); } @Override public String toString() { return Utils.toString(GetSearchAllLibrariesWriter.class, - "tag", tag); + "id", id, + "tag", tag, + "thumb", thumb); } public final static class Builder { - private Optional tag = Optional.empty(); + private Integer id; + + private String tag; + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); + /** + * Unique identifier for the writer. + */ + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder tag(Optional tag) { + /** + * The role of Writer + */ + public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The absolute URL of the thumbnail image for the writer. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } public GetSearchAllLibrariesWriter build() { return new GetSearchAllLibrariesWriter( - tag); + id, + tag, + thumb); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java index 19fb1ef4..3773d760 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java @@ -5,52 +5,103 @@ 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.Float; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class SearchResult { + /** + * The score of the search result, typically a float value between 0 and 1. + */ @JsonProperty("score") private float score; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional directory; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Metadata") - private GetSearchAllLibrariesMetadata metadata; + private Optional metadata; @JsonCreator public SearchResult( @JsonProperty("score") float score, - @JsonProperty("Metadata") GetSearchAllLibrariesMetadata metadata) { + @JsonProperty("Directory") Optional directory, + @JsonProperty("Metadata") Optional metadata) { Utils.checkNotNull(score, "score"); + Utils.checkNotNull(directory, "directory"); Utils.checkNotNull(metadata, "metadata"); this.score = score; + this.directory = directory; this.metadata = metadata; } + + public SearchResult( + float score) { + this(score, Optional.empty(), Optional.empty()); + } + /** + * The score of the search result, typically a float value between 0 and 1. + */ @JsonIgnore public float score() { return score; } + @SuppressWarnings("unchecked") @JsonIgnore - public GetSearchAllLibrariesMetadata metadata() { - return metadata; + public Optional directory() { + return (Optional) directory; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional metadata() { + return (Optional) metadata; } public final static Builder builder() { return new Builder(); } + /** + * The score of the search result, typically a float value between 0 and 1. + */ public SearchResult withScore(float score) { Utils.checkNotNull(score, "score"); this.score = score; return this; } + public SearchResult withDirectory(GetSearchAllLibrariesDirectory directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public SearchResult withDirectory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + public SearchResult withMetadata(GetSearchAllLibrariesMetadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public SearchResult withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; @@ -68,6 +119,7 @@ public class SearchResult { SearchResult other = (SearchResult) o; return Objects.deepEquals(this.score, other.score) && + Objects.deepEquals(this.directory, other.directory) && Objects.deepEquals(this.metadata, other.metadata); } @@ -75,6 +127,7 @@ public class SearchResult { public int hashCode() { return Objects.hash( score, + directory, metadata); } @@ -82,6 +135,7 @@ public class SearchResult { public String toString() { return Utils.toString(SearchResult.class, "score", score, + "directory", directory, "metadata", metadata); } @@ -89,19 +143,42 @@ public class SearchResult { private Float score; - private GetSearchAllLibrariesMetadata metadata; + private Optional directory = Optional.empty(); + + private Optional metadata = Optional.empty(); private Builder() { // force use of static builder() method } + /** + * The score of the search result, typically a float value between 0 and 1. + */ public Builder score(float score) { Utils.checkNotNull(score, "score"); this.score = score; return this; } + public Builder directory(GetSearchAllLibrariesDirectory directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + public Builder metadata(GetSearchAllLibrariesMetadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; @@ -110,6 +187,7 @@ public class SearchResult { public SearchResult build() { return new SearchResult( score, + directory, metadata); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java b/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java index c8a25234..0badc258 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java @@ -45,11 +45,12 @@ import java.util.Optional; * ShowOrdering * *

Setting that indicates the episode ordering for the show. - * None = Library default, - * tmdbAiring = The Movie Database (Aired), - * aired = TheTVDB (Aired), - * dvd = TheTVDB (DVD), - * absolute = TheTVDB (Absolute)). + * Options: + * - None = Library default + * - tmdbAiring = The Movie Database (Aired) + * - aired = TheTVDB (Aired) + * - dvd = TheTVDB (DVD) + * - absolute = TheTVDB (Absolute) */ @JsonDeserialize(using = ShowOrdering._Deserializer.class) @JsonSerialize(using = ShowOrdering._Serializer.class) diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Stream.java b/src/main/java/dev/plexapi/sdk/models/operations/Stream.java index 2ccca63c..56a5cc2f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Stream.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Stream.java @@ -8,6 +8,8 @@ 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 com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Float; @@ -28,12 +30,12 @@ public class Stream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonProperty("streamType") - private StreamType streamType; + private long streamType; /** * Format of the stream (e.g., srt). @@ -363,7 +365,6 @@ public class Stream { @JsonCreator public Stream( @JsonProperty("id") long id, - @JsonProperty("streamType") StreamType streamType, @JsonProperty("format") Optional format, @JsonProperty("default") Optional default_, @JsonProperty("codec") String codec, @@ -414,7 +415,6 @@ public class Stream { @JsonProperty("dub") Optional dub, @JsonProperty("title") Optional title) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(streamType, "streamType"); Utils.checkNotNull(format, "format"); Utils.checkNotNull(default_, "default_"); Utils.checkNotNull(codec, "codec"); @@ -465,7 +465,7 @@ public class Stream { Utils.checkNotNull(dub, "dub"); Utils.checkNotNull(title, "title"); this.id = id; - this.streamType = streamType; + this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); this.format = format; this.default_ = default_; this.codec = codec; @@ -519,11 +519,10 @@ public class Stream { public Stream( long id, - StreamType streamType, String codec, String displayTitle, String extendedDisplayTitle) { - this(id, streamType, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -536,12 +535,12 @@ public class Stream { /** * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle + * - VIDEO = 1 + * - AUDIO = 2 + * - SUBTITLE = 3 */ @JsonIgnore - public StreamType streamType() { + public long streamType() { return streamType; } @@ -935,18 +934,6 @@ public class Stream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public Stream withStreamType(StreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -1952,8 +1939,6 @@ public class Stream { private Long id; - private StreamType streamType; - private Optional format = Optional.empty(); private Optional default_ = Optional.empty(); @@ -2065,18 +2050,6 @@ public class Stream { return this; } - /** - * Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ - public Builder streamType(StreamType streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - /** * Format of the stream (e.g., srt). */ @@ -2905,7 +2878,6 @@ public class Stream { public Stream build() { return new Stream( id, - streamType, format, default_, codec, @@ -2956,5 +2928,11 @@ public class Stream { dub, title); } + + private static final LazySingletonValue _SINGLETON_VALUE_StreamType = + new LazySingletonValue<>( + "streamType", + "1", + new TypeReference() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StreamType.java b/src/main/java/dev/plexapi/sdk/models/operations/StreamType.java deleted file mode 100644 index 95c01346..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StreamType.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

Wrapper class for an "open" enum. "Open" enums are those that are expected - * to evolve (particularly with the addition of enum members over time). If an - * open enum is used then the appearance of unexpected enum values (say in a - * response from an updated an API) will not bring about a runtime error thus - * ensuring that non-updated client versions can continue to work without error. - * - *

Note that instances are immutable and are singletons (an internal thread-safe - * cache is maintained to ensure that). As a consequence instances created with the - * same value will satisfy reference equality (via {@code ==}). - * - *

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -/** - * StreamType - * - *

Stream type: - * - 1 = video - * - 2 = audio - * - 3 = subtitle - */ -@JsonDeserialize(using = StreamType._Deserializer.class) -@JsonSerialize(using = StreamType._Serializer.class) -public class StreamType { - - public static final StreamType Video = new StreamType(1); - public static final StreamType Audio = new StreamType(2); - public static final StreamType Subtitle = new StreamType(3); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final int value; - - private StreamType(int value) { - this.value = value; - } - - /** - * Returns a StreamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as StreamType - */ - public static StreamType of(int value) { - synchronized (StreamType.class) { - return values.computeIfAbsent(value, v -> new StreamType(v)); - } - } - - public int value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - StreamType other = (StreamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "StreamType [value=" + value + "]"; - } - - // return an array just like an enum - public static StreamType[] values() { - synchronized (StreamType.class) { - return values.values().toArray(new StreamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1, Video); - map.put(2, Audio); - map.put(3, Subtitle); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1, StreamTypeEnum.Video); - map.put(2, StreamTypeEnum.Audio); - map.put(3, StreamTypeEnum.Subtitle); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(StreamType.class); - } - - @Override - public void serialize(StreamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(StreamType.class); - } - - @Override - public StreamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - int v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return StreamType.of(v); - } - } - - public enum StreamTypeEnum { - - Video(1), - Audio(2), - Subtitle(3),; - - private final int value; - - private StreamTypeEnum(int value) { - this.value = value; - } - - public int value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/utils/HTTPClient.java b/src/main/java/dev/plexapi/sdk/utils/HTTPClient.java index 30df5eb0..a60b5667 100644 --- a/src/main/java/dev/plexapi/sdk/utils/HTTPClient.java +++ b/src/main/java/dev/plexapi/sdk/utils/HTTPClient.java @@ -15,7 +15,7 @@ public interface HTTPClient { * Sends an HTTP request and returns the response. * *

Note that {@link HttpRequest} is immutable. To modify the request you can use - * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with + * {@code HttpRequest#newBuilder(HttpRequest, BiPredicate)} with * JDK 16 and later (which will copy the request for modification in a builder). * If that method is not available then use {@link Helpers#copy} (which also returns * a builder).